summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-04-09 09:31:27 +0100
committerCaolán McNamara <cmc@openoffice.org>2010-04-09 09:31:27 +0100
commit99fd3e0e62a616c79a95ed10370878b41d90dd90 (patch)
treea6c72fcbe2c39a2d8e3b9ce3f0f4b2d7a50f4a6d /tools
parent323f4068f6e23a23cfdc80b02142c32dc9fd0bb6 (diff)
parent0768a7d2726ce4f0772b52d95eeb23143336655c (diff)
cmcfixes74: merge with DEV300 m76
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/diagnose_ex.h23
-rw-r--r--tools/inc/tools/wintypes.hxx5
2 files changed, 23 insertions, 5 deletions
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h
index 73b7bd9f96a5..fac739b32583 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -118,11 +118,28 @@
ifc ); }
/** This macro asserts the given condition (in debug mode), and
- returns false afterwards.
+ returns the given value afterwards.
*/
-#define ENSURE_OR_RETURN(c, m) if( !(c) ) { \
+#define ENSURE_OR_RETURN(c, m, r) if( !(c) ) { \
OSL_ENSURE(c, m); \
- return false; }
+ return r; }
+
+/** This macro asserts the given condition (in debug mode), and
+ returns false afterwards.
+ */
+#define ENSURE_OR_RETURN_FALSE(c, m) \
+ ENSURE_OR_RETURN(c, m, false)
+
+
+/** This macro asserts the given condition (in debug mode), and
+ returns afterwards, without return value "void".
+ */
+#define ENSURE_OR_RETURN_VOID( c, m ) \
+ if( !(c) ) \
+ { \
+ OSL_ENSURE( c, m ); \
+ return; \
+ }
diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index c909ca3e37b0..8f13af8fd842 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -178,10 +178,11 @@ typedef sal_Int64 WinBits;
#define WB_NOLABEL ((WinBits)0x02000000)
#define WB_SORT ((WinBits)0x04000000)
#define WB_DROPDOWN ((WinBits)0x08000000)
+#define WB_HIDE ((WinBits)SAL_CONST_INT64(0x80000000))
#define WB_AUTOHSCROLL ((WinBits)SAL_CONST_INT64(0x10000000))
#define WB_DOCKABLE ((WinBits)SAL_CONST_INT64(0x20000000))
#define WB_AUTOVSCROLL ((WinBits)SAL_CONST_INT64(0x40000000))
-#define WB_HYPHENATION (((WinBits)SAL_CONST_INT64(0x80000000)) | WB_WORDBREAK)
+#define WB_HYPHENATION (((WinBits)SAL_CONST_INT64(0x800000000)) | WB_WORDBREAK)
#define WB_CHILDDLGCTRL ((WinBits)SAL_CONST_INT64(0x100000000000))
// system floating window
@@ -193,7 +194,6 @@ typedef sal_Int64 WinBits;
#define WB_DEFAULTWIN ((WinBits)SAL_CONST_INT64(0x4000000000))
#define WB_NEEDSFOCUS ((WinBits)SAL_CONST_INT64(0x1000000000))
-#define WB_HIDE ((WinBits)SAL_CONST_INT64(0x80000000))
#define WB_HSCROLL WB_HORZ
#define WB_VSCROLL WB_VERT
#define WB_TOPIMAGE WB_TOP
@@ -205,6 +205,7 @@ typedef sal_Int64 WinBits;
#define WB_SMALLSTYLE ((WinBits)0x04000000)
#define WB_TOGGLE ((WinBits)SAL_CONST_INT64(0x1000000000))
#define WB_BEVELBUTTON ((WinBits)SAL_CONST_INT64(0x2000000000))
+#define WB_FLATBUTTON ((WinBits)SAL_CONST_INT64(0x4000000000))
// Window-Bits for FixedText
#define WB_PATHELLIPSIS ((WinBits)0x00100000)