summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-17 17:02:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-17 18:45:14 +0100
commit5169abbac92f30b950ab19c2c8e285c47fb1f0d7 (patch)
tree12dc79b6a99b1978982f816037a9c1bad23032f0 /vcl/inc
parent3e5ff1f8d4da3470fa4016264c9410834a9736d8 (diff)
bool improvements
Change-Id: I7ec4f5b2e691ec03e9e2c5ca3a004f1e04efbc27
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/salframe.hxx2
-rw-r--r--vcl/inc/salwtype.hxx2
-rw-r--r--vcl/inc/sft.hxx4
-rw-r--r--vcl/inc/unx/i18n_ic.hxx4
-rw-r--r--vcl/inc/unx/i18n_im.hxx10
-rw-r--r--vcl/inc/unx/salunxtime.h10
-rw-r--r--vcl/inc/window.h4
7 files changed, 17 insertions, 19 deletions
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 4c6965569797..41b510f7e879 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -240,7 +240,7 @@ public:
// that should not know more than necessary about the SalFrame implementation
// (e.g. input methods, printer update handlers).
long CallCallback( sal_uInt16 nEvent, const void* pEvent ) const
- { return m_pProc ? m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent ) : 0; }
+ { return m_pProc ? long(m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent )) : 0; }
};
#endif // INCLUDED_VCL_INC_SALFRAME_HXX
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index 4828f39c42db..b592a6ab7768 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -238,7 +238,7 @@ struct SalQueryCharPositionEvent
// - SalFrame-Types -
// ------------------
-typedef long (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame,
+typedef bool (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame,
sal_uInt16 nEvent, const void* pEvent );
// --------------------
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index b5b0548ffeed..aba541e874b9 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -178,7 +178,7 @@ namespace vcl
sal_uInt8 *ptr; /**< pointer to glyph data */
sal_uInt16 aw; /**< advance width */
sal_Int16 lsb; /**< left sidebearing */
- sal_uInt16 compflag; /**< 0- if non-composite, 1- otherwise */
+ bool compflag; /**< false- if non-composite */
sal_uInt16 npoints; /**< number of points */
sal_uInt16 ncontours; /**< number of contours */
/* */
@@ -225,7 +225,7 @@ namespace vcl
int typoLineGap; /**< OS/2 portable typographc line gap */
int winAscent; /**< ascender metric for Windows */
int winDescent; /**< descender metric for Windows */
- int symbolEncoded; /**< 1: MS symbol encoded 0: not symbol encoded */
+ bool symbolEncoded; /**< true: MS symbol encoded */
int rangeFlag; /**< if set to 1 Unicode Range flags are applicable */
sal_uInt32 ur1; /**< bits 0 - 31 of Unicode Range flags */
sal_uInt32 ur2; /**< bits 32 - 63 of Unicode Range flags */
diff --git a/vcl/inc/unx/i18n_ic.hxx b/vcl/inc/unx/i18n_ic.hxx
index 603451759783..9e7182d9cdd4 100644
--- a/vcl/inc/unx/i18n_ic.hxx
+++ b/vcl/inc/unx/i18n_ic.hxx
@@ -49,14 +49,14 @@ private:
XVaNestedList mpStatusAttributes;
XVaNestedList mpPreeditAttributes;
- Bool SupportInputMethodStyle( XIMStyles *pIMStyles );
+ bool SupportInputMethodStyle( XIMStyles *pIMStyles );
unsigned int GetWeightingOfIMStyle( XIMStyle n_style ) const ;
Bool IsSupportedIMStyle( XIMStyle n_style ) const ;
public:
Bool UseContext() { return mbUseable; }
- Bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; }
+ bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; }
XIC GetContext() { return maContext; }
void ExtendEventMask( XLIB_Window aFocusWindow );
diff --git a/vcl/inc/unx/i18n_im.hxx b/vcl/inc/unx/i18n_im.hxx
index 0da25d677c78..9f418848d7bc 100644
--- a/vcl/inc/unx/i18n_im.hxx
+++ b/vcl/inc/unx/i18n_im.hxx
@@ -28,7 +28,7 @@ extern "C" char* GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize);
class VCLPLUG_GEN_PUBLIC SalI18N_InputMethod
{
- Bool mbUseable; // system supports locale as well as status
+ bool mbUseable; // system supports locale as well as status
// and preedit style ?
XIM maMethod;
XIMCallback maDestroyCallback;
@@ -37,13 +37,13 @@ class VCLPLUG_GEN_PUBLIC SalI18N_InputMethod
public:
Bool PosixLocale();
- Bool UseMethod() { return mbUseable; }
+ bool UseMethod() { return mbUseable; }
XIM GetMethod() { return maMethod; }
void HandleDestroyIM();
- Bool CreateMethod( Display *pDisplay );
+ bool CreateMethod( Display *pDisplay );
XIMStyles *GetSupportedStyles() { return mpStyles; }
- Bool SetLocale( const char* pLocale = "" );
- Bool FilterEvent( XEvent *pEvent, XLIB_Window window );
+ bool SetLocale( const char* pLocale = "" );
+ bool FilterEvent( XEvent *pEvent, XLIB_Window window );
SalI18N_InputMethod();
~SalI18N_InputMethod();
diff --git a/vcl/inc/unx/salunxtime.h b/vcl/inc/unx/salunxtime.h
index aa6f4a266396..4715bfdba684 100644
--- a/vcl/inc/unx/salunxtime.h
+++ b/vcl/inc/unx/salunxtime.h
@@ -30,25 +30,23 @@
#endif
#include <sal/types.h>
-inline int operator >= ( const timeval &t1, const timeval &t2 )
+inline bool operator >= ( const timeval &t1, const timeval &t2 )
{
if( t1.tv_sec == t2.tv_sec )
return t1.tv_usec >= t2.tv_usec;
return t1.tv_sec > t2.tv_sec;
}
-inline int operator > ( const timeval &t1, const timeval &t2 )
+inline bool operator > ( const timeval &t1, const timeval &t2 )
{
if( t1.tv_sec == t2.tv_sec )
return t1.tv_usec > t2.tv_usec;
return t1.tv_sec > t2.tv_sec;
}
-inline int operator == ( const timeval &t1, const timeval &t2 )
+inline bool operator == ( const timeval &t1, const timeval &t2 )
{
- if( t1.tv_sec == t2.tv_sec )
- return t1.tv_usec == t2.tv_usec;
- return sal_False;
+ return t1.tv_sec == t2.tv_sec && t1.tv_usec == t2.tv_usec;
}
inline timeval &operator -= ( timeval &t1, const timeval &t2 )
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 87fb5aa331ab..00702c2aee5d 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -97,7 +97,7 @@ namespace vcl {
// - Prototypes -
// --------------
-long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent );
+bool ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent );
// -----------
// - HitTest -
@@ -406,7 +406,7 @@ public:
// - Hilfsmethoden -
// -----------------
-long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave,
+bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave,
long nX, long nY, sal_uIntPtr nMsgTime,
sal_uInt16 nCode, sal_uInt16 nMode );
void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight );