summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-25 11:20:10 +0200
committerNoel Grandin <noel@peralex.com>2015-05-26 08:30:18 +0200
commitbb7ce3137dbe12d67f393b95a437b18e3a63f8e7 (patch)
tree12d4b581ac21aaaa243d6d070b00a8695b624b92 /include
parent3dc50a3b9afc6eec42fb9f657a4dfd236066892f (diff)
convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the IDL docs for XWindowPeer Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
Diffstat (limited to 'include')
-rw-r--r--include/svtools/treelistbox.hxx6
-rw-r--r--include/svx/svxdlg.hxx2
-rw-r--r--include/vcl/window.hxx35
3 files changed, 25 insertions, 18 deletions
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 7a5084d52508..aaf6997052b1 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -777,10 +777,10 @@ public:
SvTreeListEntry* GetCurEntry() const;
using Window::Invalidate;
- virtual void Invalidate( sal_uInt16 nFlags = 0) SAL_OVERRIDE;
- virtual void Invalidate( const Rectangle&, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE) SAL_OVERRIDE;
+ virtual void Invalidate( const Rectangle&, InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
- void SetHighlightRange(sal_uInt16 nFirstTab=0,sal_uInt16 nLastTab=0xffff);
+ void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff);
// A Parent's Children are turned into Children of the Parent which comes next in hierarchy
void RemoveParentKeepChildren( SvTreeListEntry* pParent );
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index ebf3226e2129..2b76efc8c621 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -143,7 +143,7 @@ public:
virtual Size GetSizePixel() const = 0;
virtual void Hide() = 0;
virtual bool IsVisible() const = 0;
- virtual void Invalidate( sal_uInt16 nFlags = 0 ) = 0;
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) = 0;
};
class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index c791ddea0600..7c97bf977aa5 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -221,15 +221,22 @@ namespace o3tl
}
// Flags for Invalidate
-#define INVALIDATE_CHILDREN ((sal_uInt16)0x0001)
-#define INVALIDATE_NOCHILDREN ((sal_uInt16)0x0002)
-#define INVALIDATE_NOERASE ((sal_uInt16)0x0004)
-#define INVALIDATE_UPDATE ((sal_uInt16)0x0008)
-#define INVALIDATE_TRANSPARENT ((sal_uInt16)0x0010)
-#define INVALIDATE_NOTRANSPARENT ((sal_uInt16)0x0020)
-#define INVALIDATE_NOCLIPCHILDREN ((sal_uInt16)0x4000)
-// Temporaer fuer Kompatibilitaet
-#define INVALIDATE_BACKGROUND INVALIDATE_TRANSPARENT
+// must match css::awt::InvalidateStyle
+enum class InvalidateFlags
+{
+ NONE = 0x0000,
+ Children = 0x0001,
+ NoChildren = 0x0002,
+ NoErase = 0x0004,
+ Update = 0x0008,
+ Transparent = 0x0010,
+ NoTransparent = 0x0020,
+ NoClipChildren = 0x4000,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<InvalidateFlags> : is_typed_flags<InvalidateFlags, 0x403f> {};
+}
// Flags for Validate
#define VALIDATE_CHILDREN ((sal_uInt16)0x0001)
@@ -501,7 +508,7 @@ public:
SAL_DLLPRIVATE vcl::Window* ImplGetParent() const;
SAL_DLLPRIVATE vcl::Window* ImplFindWindow( const Point& rFramePos );
- SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFlags nFlags );
SAL_DLLPRIVATE void ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion );
SAL_DLLPRIVATE bool ImplSetClipFlag( bool bSysObjOnlySmaller = false );
@@ -568,7 +575,7 @@ protected:
SAL_DLLPRIVATE vcl::Window* ImplGetBorderWindow() const;
- SAL_DLLPRIVATE void ImplInvalidate( const vcl::Region* rRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags );
SAL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rFramePos );
@@ -1065,9 +1072,9 @@ public:
sal_uInt16 nFlags = 0 );
void Scroll( long nHorzScroll, long nVertScroll,
const Rectangle& rRect, sal_uInt16 nFlags = 0 );
- virtual void Invalidate( sal_uInt16 nFlags = 0 );
- virtual void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
- virtual void Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags = 0 );
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE );
+ virtual void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE );
+ virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE );
void Validate( sal_uInt16 nFlags = 0 );
bool HasPaintEvent() const;
void Update();