diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-22 10:37:31 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-29 20:16:53 +0200 |
commit | 35e13c7ec530a46cc0c92cf986231acece3afd2a (patch) | |
tree | 4128389b8f8f5ddb29d78642fc978bbad94b3f37 /include | |
parent | a5e58e66d82a63d99ced4ed8a42c38ed6179aa6c (diff) |
convert WINDOW_POSSIZE constants to scoped enum
Change-Id: Id85137ffc7309a66b04132d588d289db136117b9
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/sidebar/PanelLayout.hxx | 2 | ||||
-rw-r--r-- | include/vcl/combobox.hxx | 2 | ||||
-rw-r--r-- | include/vcl/dockwin.hxx | 6 | ||||
-rw-r--r-- | include/vcl/lstbox.hxx | 2 | ||||
-rw-r--r-- | include/vcl/window.hxx | 32 |
5 files changed, 26 insertions, 18 deletions
diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 9c58248f9deb..09386a697cb8 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -38,7 +38,7 @@ public: virtual void dispose() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; - virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE; + virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE; virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) SAL_OVERRIDE; }; diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index 83e4a1812d4a..50058fd2eaa7 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -109,7 +109,7 @@ public: virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE; - virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE { Edit::SetPosSizePixel( rNewPos, rNewSize ); } diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 605441ed4d0b..156d0a0642bb 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -171,7 +171,7 @@ public: void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); + PosSizeFlags nFlags = PosSizeFlags::All ); void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) { mpDockingWindow->SetPosSizePixel( rNewPos, rNewSize ); } @@ -211,7 +211,7 @@ public: // be availbale from the toolkit void SetPosSizePixel( vcl::Window *pWin, long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); + PosSizeFlags nFlags = PosSizeFlags::All ); Rectangle GetPosSizePixel( const vcl::Window *pWin ); }; @@ -347,7 +347,7 @@ public: virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE { Window::SetPosSizePixel( rNewPos, rNewSize ); } diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 1687dc7a4cf6..8a5efc5bc853 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -102,7 +102,7 @@ public: virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE; virtual void setPosSizePixel( long nX, long nY, - long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE { Control::SetPosSizePixel( rNewPos, rNewSize ); } diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 3078b4260ae5..f1d7a92a0718 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -116,7 +116,6 @@ enum class TrackingEventFlags End = 0x1000, DontCallHdl = 0x8000, }; - namespace o3tl { template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x9107> {}; @@ -149,15 +148,24 @@ enum class GetWindowType }; // Flags for setPosSizePixel() -#define WINDOW_POSSIZE_X ((sal_uInt16)0x0001) -#define WINDOW_POSSIZE_Y ((sal_uInt16)0x0002) -#define WINDOW_POSSIZE_WIDTH ((sal_uInt16)0x0004) -#define WINDOW_POSSIZE_HEIGHT ((sal_uInt16)0x0008) -#define WINDOW_POSSIZE_POS (WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y) -#define WINDOW_POSSIZE_SIZE (WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT) -#define WINDOW_POSSIZE_POSSIZE (WINDOW_POSSIZE_POS | WINDOW_POSSIZE_SIZE) -#define WINDOW_POSSIZE_ALL (WINDOW_POSSIZE_POSSIZE) -#define WINDOW_POSSIZE_DROPDOWN ((sal_uInt16)0x0010) +// These must match the definitions in css::awt::PosSize +enum class PosSizeFlags +{ + NONE = 0x0000, + X = 0x0001, + Y = 0x0002, + Width = 0x0004, + Height = 0x0008, + Pos = X | Y, + Size = Width | Height, + PosSize = Pos | Size, + All = PosSize, + Dropdown = 0x0010, +}; +namespace o3tl +{ + template<> struct typed_flags<PosSizeFlags> : is_typed_flags<PosSizeFlags, 0x001f> {}; +} // Flags for Show() #define SHOW_NOPARENTUPDATE ((sal_uInt16)0x0001) @@ -498,7 +506,7 @@ public: SAL_DLLPRIVATE void ImplMirrorFramePos( Point &pt ) const; - SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); + SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags ); SAL_DLLPRIVATE void ImplAddDel( ImplDelData* pDel ); SAL_DLLPRIVATE void ImplRemoveDel( ImplDelData* pDel ); @@ -1000,7 +1008,7 @@ public: virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); + PosSizeFlags nFlags = PosSizeFlags::All ); virtual void SetPosPixel( const Point& rNewPos ); virtual Point GetPosPixel() const; virtual void SetSizePixel( const Size& rNewSize ); |