summaryrefslogtreecommitdiff
path: root/vcl/unx/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/source')
-rw-r--r--vcl/unx/source/app/i18n_cb.cxx12
-rw-r--r--vcl/unx/source/app/i18n_ic.cxx4
-rw-r--r--vcl/unx/source/app/i18n_status.cxx10
-rw-r--r--vcl/unx/source/app/keysymnames.cxx2
-rw-r--r--vcl/unx/source/app/saldata.cxx2
-rw-r--r--vcl/unx/source/app/saldisp.cxx136
-rw-r--r--vcl/unx/source/app/salinst.cxx28
-rw-r--r--vcl/unx/source/app/salsys.cxx6
-rw-r--r--vcl/unx/source/app/saltimer.cxx4
-rw-r--r--vcl/unx/source/app/sm.cxx8
-rw-r--r--vcl/unx/source/app/soicon.cxx14
-rw-r--r--vcl/unx/source/gdi/gcach_xpeer.cxx6
-rw-r--r--vcl/unx/source/gdi/pspgraphics.cxx58
-rw-r--r--vcl/unx/source/gdi/salbmp.cxx54
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx180
-rw-r--r--vcl/unx/source/gdi/salgdi2.cxx28
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx36
-rw-r--r--vcl/unx/source/gdi/salprnpsp.cxx68
-rw-r--r--vcl/unx/source/gdi/salvd.cxx30
-rw-r--r--vcl/unx/source/gdi/xfont.cxx6
-rw-r--r--vcl/unx/source/window/salframe.cxx146
-rw-r--r--vcl/unx/source/window/salobj.cxx28
22 files changed, 433 insertions, 433 deletions
diff --git a/vcl/unx/source/app/i18n_cb.cxx b/vcl/unx/source/app/i18n_cb.cxx
index d3a4f2b819ae..9756c728250d 100644
--- a/vcl/unx/source/app/i18n_cb.cxx
+++ b/vcl/unx/source/app/i18n_cb.cxx
@@ -284,12 +284,12 @@ Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback* feedback,
// Convert the XIM feedback values into appropriate VCL
// SAL_EXTTEXTINPUT_ATTR values
// returns an allocate list of attributes, which must be freed by caller
-USHORT*
-Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<USHORT>& rSalAttr )
+sal_uInt16*
+Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<sal_uInt16>& rSalAttr )
{
- USHORT *psalattr;
- USHORT nval;
- USHORT noldval = 0;
+ sal_uInt16 *psalattr;
+ sal_uInt16 nval;
+ sal_uInt16 noldval = 0;
XIMFeedback nfeedback;
// only work with reasonable length
@@ -299,7 +299,7 @@ Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<USHORT>
psalattr = &rSalAttr[0];
}
else
- return (USHORT*)NULL;
+ return (sal_uInt16*)NULL;
for (int npos = 0; npos < nlength; npos++)
{
diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx
index 3064be9367e1..46471d553dda 100644
--- a/vcl/unx/source/app/i18n_ic.cxx
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -187,7 +187,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
maClientData.aInputEv.mnCursorPos = 0;
maClientData.aInputEv.mnDeltaStart = 0;
maClientData.aInputEv.mnCursorFlags = 0;
- maClientData.aInputEv.mbOnlyCursor = FALSE;
+ maClientData.aInputEv.mbOnlyCursor = sal_False;
SalI18N_InputMethod *pInputMethod;
pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod();
@@ -763,7 +763,7 @@ SalI18N_InputContext::SetLanguage(LanguageType)
}
void
-SalI18N_InputContext::EndExtTextInput( USHORT /*nFlags*/ )
+SalI18N_InputContext::EndExtTextInput( sal_uInt16 /*nFlags*/ )
{
if ( mbUseable && (maContext != NULL) && maClientData.pFrame )
{
diff --git a/vcl/unx/source/app/i18n_status.cxx b/vcl/unx/source/app/i18n_status.cxx
index 3a6ae26a2b0e..8937a71c905f 100644
--- a/vcl/unx/source/app/i18n_status.cxx
+++ b/vcl/unx/source/app/i18n_status.cxx
@@ -102,7 +102,7 @@ class XIMStatusWindow : public StatusWindow
// for delayed showing
bool m_bDelayedShow;
I18NStatus::ShowReason m_eDelayedReason;
- ULONG m_nDelayedEvent;
+ sal_uInt32 m_nDelayedEvent;
// for toggling
bool m_bOn;
@@ -165,7 +165,7 @@ void XIMStatusWindow::layout()
m_aStatusText.SetPosSizePixel( Point( 1, 1 ), aControlSize );
m_aStatusText.SetFont( aFont );
- m_aStatusText.Show( TRUE );
+ m_aStatusText.Show( sal_True );
if (m_bAnchoredAtRight && IsVisible())
{
@@ -257,7 +257,7 @@ void XIMStatusWindow::setPosition( SalFrame* pParent )
{
setText( String() );
m_pLastParent = pParent;
- Show( FALSE, SHOW_NOACTIVATE );
+ Show( sal_False, SHOW_NOACTIVATE );
}
if( IsVisible() )
{
@@ -359,7 +359,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
m_aStatusBtn.SetSelectHdl( LINK( this, IIIMPStatusWindow, SelectHdl ) );
m_aStatusBtn.SetPopupMenu( &m_aMenu );
- m_aStatusBtn.Show( TRUE );
+ m_aStatusBtn.Show( sal_True );
const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() );
int i = 1;
@@ -384,7 +384,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
else
fprintf( stderr, "Warning: could not reposition status window since no frame\n" );
#endif
- EnableAlwaysOnTop( TRUE );
+ EnableAlwaysOnTop( sal_True );
}
IIIMPStatusWindow::~IIIMPStatusWindow()
diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx
index c9515f016433..b48f0e629bd9 100644
--- a/vcl/unx/source/app/keysymnames.cxx
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -597,7 +597,7 @@ static const keyboard_layout type6_layout[] =
#include <stdio.h>
#endif
-const char* SalDisplay::GetKeyboardName( BOOL bRefresh )
+const char* SalDisplay::GetKeyboardName( sal_Bool bRefresh )
{
if( bRefresh || ! m_aKeyboardName.Len() )
{
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
index beb7b60a551c..b14c11ac783e 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -408,7 +408,7 @@ void SalXLib::Init()
sal_uInt32 nParams = aCommandLine.getCommandArgCount();
rtl::OUString aParam;
rtl::OString aDisplay;
- for (USHORT i=0; i<nParams; i++)
+ for (sal_uInt16 i=0; i<nParams; i++)
{
aCommandLine.getCommandArg(i, aParam);
if (aParam.equalsAscii("-display"))
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 354c4d433d42..3e3a7c91b340 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -213,7 +213,7 @@ static int sal_significantBits( Pixel nMask )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static BOOL sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
+static sal_Bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
{
int nInfos;
XVisualInfo aTemplate;
@@ -223,25 +223,25 @@ static BOOL sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
pInfos = XGetVisualInfo( pDisplay, VisualIDMask, &aTemplate, &nInfos );
if( !pInfos )
- return FALSE;
+ return sal_False;
rVI = *pInfos;
XFree( pInfos );
DBG_ASSERT( rVI.visualid == nVID,
"sal_GetVisualInfo: could not get correct visual by visualId" );
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------
// check wether displaystring is in format N.M or N. or just N
// with N and M beeing natural numbers
-static BOOL
+static sal_Bool
sal_IsDisplayNumber( const char *pDisplayString )
{
if ( ! isdigit(*pDisplayString) )
- return FALSE;
+ return sal_False;
while ( isdigit(*(++pDisplayString)) )
; /* do nothing */
@@ -255,12 +255,12 @@ sal_IsDisplayNumber( const char *pDisplayString )
}
// check whether host1 and host2 point to the same ip address
-static BOOL
+static sal_Bool
sal_EqualHosts( const OUString& Host1, const OUString& Host2)
{
oslSocketAddr pHostAddr1;
oslSocketAddr pHostAddr2;
- BOOL bEqualAddress = FALSE;
+ sal_Bool bEqualAddress = sal_False;
if ( Host1.toChar() >= '0' && Host1.toChar() <= '9' )
pHostAddr1 = osl_createInetSocketAddr( Host1.pData, 0 );
@@ -273,7 +273,7 @@ sal_EqualHosts( const OUString& Host1, const OUString& Host2)
pHostAddr2 = osl_resolveHostname( Host2.pData );
if( pHostAddr1 && pHostAddr2 )
- bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? TRUE : FALSE;
+ bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? sal_True : sal_False;
if( pHostAddr1 )
osl_destroySocketAddr( pHostAddr1 );
@@ -283,14 +283,14 @@ sal_EqualHosts( const OUString& Host1, const OUString& Host2)
return bEqualAddress;
}
-static BOOL
+static sal_Bool
sal_IsLocalDisplay( Display *pDisplay )
{
const char *pDisplayString = DisplayString( pDisplay );
// no string, no idea
if ( pDisplayString == NULL || pDisplayString[ 0 ] == '\0')
- return FALSE;
+ return sal_False;
// check for ":x.y"
if ( pDisplayString[ 0 ] == ':' )
@@ -314,7 +314,7 @@ sal_IsLocalDisplay( Display *pDisplay )
// compare local hostname to displaystring, both may be ip address or
// hostname
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = sal_False;
char *pDisplayHost = strdup( pDisplayString );
char *pPtr = strrchr( pDisplayHost, ':' );
@@ -339,14 +339,14 @@ sal_IsLocalDisplay( Display *pDisplay )
// since it is not called very often and sal_IsLocalDisplay() is relative
// expensive bLocal_ is initialized on first call
-BOOL SalDisplay::IsLocal()
+sal_Bool SalDisplay::IsLocal()
{
if ( ! mbLocalIsValid )
{
bLocal_ = sal_IsLocalDisplay( pDisp_ );
- mbLocalIsValid = TRUE;
+ mbLocalIsValid = sal_True;
}
- return (BOOL)bLocal_;
+ return (sal_Bool)bLocal_;
}
// ---------------------------------------------------------------------------
@@ -411,7 +411,7 @@ static sal_Bool sal_IsTrustedSolaris (Display *p_display)
// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL SalDisplay::BestVisual( Display *pDisplay,
+sal_Bool SalDisplay::BestVisual( Display *pDisplay,
int nScreen,
XVisualInfo &rVI )
{
@@ -436,51 +436,51 @@ BOOL SalDisplay::BestVisual( Display *pDisplay,
int i;
for( i = 0; i < nVisuals; i++ )
{
- BOOL bUsable = FALSE;
+ sal_Bool bUsable = sal_False;
int nTrueColor = 1;
if ( pVInfos[i].screen != nScreen )
{
- bUsable = FALSE;
+ bUsable = sal_False;
}
else
if( pVInfos[i].c_class == TrueColor )
{
nTrueColor = 2048;
if( pVInfos[i].depth == 24 )
- bUsable = TRUE;
-#ifdef TRUECOLOR8
+ bUsable = sal_True;
+#ifdef sal_TrueCOLOR8
else if( pVInfos[i].depth == 8 )
{
nTrueColor = -1; // strongly discourage 8 bit true color
- bUsable = TRUE;
+ bUsable = sal_True;
}
#endif
-#ifdef TRUECOLOR15
+#ifdef sal_TrueCOLOR15
else if( pVInfos[i].depth == 15 )
- bUsable = TRUE;
+ bUsable = sal_True;
#endif
-#ifdef TRUECOLOR16
+#ifdef sal_TrueCOLOR16
else if( pVInfos[i].depth == 16 )
- bUsable = TRUE;
+ bUsable = sal_True;
#endif
-#ifdef TRUECOLOR32
+#ifdef sal_TrueCOLOR32
else if( pVInfos[i].depth == 32 )
{
nTrueColor = 256;
// we do not have use for an alpha channel
// better use a 24 or 16 bit truecolor visual if possible
- bUsable = TRUE;
+ bUsable = sal_True;
}
#endif
}
else if( pVInfos[i].c_class == PseudoColor )
{
if( pVInfos[i].depth <= 8 )
- bUsable = TRUE;
+ bUsable = sal_True;
#ifdef PSEUDOCOLOR12
else if( pVInfos[i].depth == 12 )
- bUsable = TRUE;
+ bUsable = sal_True;
#endif
}
pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024;
@@ -645,7 +645,7 @@ fd
GetSalData()->m_pInstance->GetYieldMutex();
::vos::OGuard aGuard( *pSalInstYieldMutex );
pDisplay->Yield();
- return TRUE;
+ return sal_True;
}
SalX11Display::SalX11Display( Display *display )
@@ -855,9 +855,9 @@ void SalDisplay::Init()
X11SalBitmap::ImplCreateCache();
hEventGuard_ = osl_createMutex();
- bLocal_ = FALSE; /* dont care, initialize later by
+ bLocal_ = sal_False; /* dont care, initialize later by
calling SalDisplay::IsLocal() */
- mbLocalIsValid = FALSE; /* bLocal_ is not yet initialized */
+ mbLocalIsValid = sal_False; /* bLocal_ is not yet initialized */
// - - - - - - - - - - Synchronize - - - - - - - - - - - - -
if( getenv( "SAL_SYNCHRONIZE" ) )
@@ -1105,7 +1105,7 @@ void SalDisplay::ModifierMapping()
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
+XubString SalDisplay::GetKeyName( sal_uInt16 nKeyCode ) const
{
String aStrMap;
@@ -1288,27 +1288,27 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
#define IsISOKey( n ) (0x0000FE00==((n)&0xFFFFFF00))
#endif
-USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
+sal_uInt16 SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
{
- USHORT nKey = 0;
+ sal_uInt16 nKey = 0;
if( XK_a <= keysym && XK_z >= keysym )
- nKey = (USHORT)(KEY_A + (keysym - XK_a));
+ nKey = (sal_uInt16)(KEY_A + (keysym - XK_a));
else if( XK_A <= keysym && XK_Z >= keysym )
- nKey = (USHORT)(KEY_A + (keysym - XK_A));
+ nKey = (sal_uInt16)(KEY_A + (keysym - XK_A));
else if( XK_0 <= keysym && XK_9 >= keysym )
- nKey = (USHORT)(KEY_0 + (keysym - XK_0));
+ nKey = (sal_uInt16)(KEY_0 + (keysym - XK_0));
else if( IsModifierKey( keysym ) )
;
else if( IsKeypadKey( keysym ) )
{
if( (keysym >= XK_KP_0) && (keysym <= XK_KP_9) )
{
- nKey = (USHORT)(KEY_0 + (keysym - XK_KP_0));
+ nKey = (sal_uInt16)(KEY_0 + (keysym - XK_KP_0));
*pcPrintable = '0' + nKey - KEY_0;
}
else if( IsPFKey( keysym ) )
- nKey = (USHORT)(KEY_F1 + (keysym - XK_KP_F1));
+ nKey = (sal_uInt16)(KEY_F1 + (keysym - XK_KP_F1));
else switch( keysym )
{
case XK_KP_Space:
@@ -1387,7 +1387,7 @@ USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
if( bNumLockFromXS_ )
{
if( keysym >= XK_F1 && keysym <= XK_F26 )
- nKey = (USHORT)(KEY_F1 + keysym - XK_F1);
+ nKey = (sal_uInt16)(KEY_F1 + keysym - XK_F1);
}
else switch( keysym )
{
@@ -1456,7 +1456,7 @@ USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
break;
default:
if( keysym >= XK_F1 && keysym <= XK_F26 )
- nKey = (USHORT)(KEY_F1 + keysym - XK_F1);
+ nKey = (sal_uInt16)(KEY_F1 + keysym - XK_F1);
break;
}
}
@@ -2157,7 +2157,7 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture )
// Events
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent )
+void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent )
{
if( osl_acquireMutex( hEventGuard_ ) )
{
@@ -2173,7 +2173,7 @@ void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent
}
}
-void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent )
+void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent )
{
if( osl_acquireMutex( hEventGuard_ ) )
{
@@ -2200,29 +2200,29 @@ void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEve
}
}
-BOOL SalX11Display::IsEvent()
+sal_Bool SalX11Display::IsEvent()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( osl_acquireMutex( hEventGuard_ ) )
{
if( m_aUserEvents.begin() != m_aUserEvents.end() )
- bRet = TRUE;
+ bRet = sal_True;
osl_releaseMutex( hEventGuard_ );
}
if( bRet || XEventsQueued( pDisp_, QueuedAlready ) )
- return TRUE;
+ return sal_True;
XFlush( pDisp_ );
- return FALSE;
+ return sal_False;
}
bool SalDisplay::DispatchInternalEvent()
{
SalFrame* pFrame = NULL;
void* pData = NULL;
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
if( osl_acquireMutex( hEventGuard_ ) )
{
@@ -2334,7 +2334,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
if( MappingModifier == pEvent->xmapping.request )
ModifierMapping();
if( MappingKeyboard == pEvent->xmapping.request ) // refresh mapping
- GetKeyboardName( TRUE );
+ GetKeyboardName( sal_True );
}
break;
case ButtonPress:
@@ -2853,14 +2853,14 @@ SalVisual::~SalVisual()
#define SALCOLOR RGB
#define SALCOLORREVERSE BGR
-BOOL SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
+sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
{
int n;
switch( GetMode() )
{
case other:
- return FALSE;
+ return sal_False;
case SALCOLOR:
break;
case SALCOLORREVERSE:
@@ -2885,17 +2885,17 @@ BOOL SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
fprintf( stderr, "SalVisual::Convert %d\n", GetMode() );
abort();
}
- return TRUE;
+ return sal_True;
}
-BOOL SalVisual::Convert( int &n0, int &n1, int &n2 )
+sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2 )
{
int n;
switch( GetMode() )
{
case other:
- return FALSE;
+ return sal_False;
case SALCOLOR:
break;
case RBG:
@@ -2929,7 +2929,7 @@ BOOL SalVisual::Convert( int &n0, int &n1, int &n2 )
fprintf( stderr, "SalVisual::Convert %d\n", GetMode() );
abort();
}
- return TRUE;
+ return sal_True;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -3101,7 +3101,7 @@ SalColormap::SalColormap()
}
// TrueColor
-SalColormap::SalColormap( USHORT nDepth )
+SalColormap::SalColormap( sal_uInt16 nDepth )
: m_pDisplay( GetX11SalData()->GetDisplay() ),
m_hColormap( None ),
m_nWhitePixel( (1 << nDepth) - 1 ),
@@ -3251,14 +3251,14 @@ void SalColormap::GetPalette()
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static USHORT sal_Lookup( const std::vector<SalColor>& rPalette,
+static sal_uInt16 sal_Lookup( const std::vector<SalColor>& rPalette,
int r, int g, int b,
Pixel nUsed )
{
- USHORT nPixel = 0;
+ sal_uInt16 nPixel = 0;
int nBest = ColorDiff( rPalette[0], r, g, b );
- for( USHORT i = 1; i < nUsed; i++ )
+ for( sal_uInt16 i = 1; i < nUsed; i++ )
{
int n = ColorDiff( rPalette[i], r, g, b );
@@ -3276,7 +3276,7 @@ static USHORT sal_Lookup( const std::vector<SalColor>& rPalette,
void SalColormap::GetLookupTable()
{
- m_aLookupTable = std::vector<USHORT>(16*16*16);
+ m_aLookupTable = std::vector<sal_uInt16>(16*16*16);
int i = 0;
for( int r = 0; r < 256; r += 17 )
@@ -3326,7 +3326,7 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const
return MAKE_SALCOLOR( aColor.red>>8, aColor.green>>8, aColor.blue>>8 );
}
-inline BOOL SalColormap::GetXPixel( XColor &rColor,
+inline sal_Bool SalColormap::GetXPixel( XColor &rColor,
int r,
int g,
int b ) const
@@ -3337,15 +3337,15 @@ inline BOOL SalColormap::GetXPixel( XColor &rColor,
return XAllocColor( GetXDisplay(), m_hColormap, &rColor );
}
-BOOL SalColormap::GetXPixels( XColor &rColor,
+sal_Bool SalColormap::GetXPixels( XColor &rColor,
int r,
int g,
int b ) const
{
if( !GetXPixel( rColor, r, g, b ) )
- return FALSE;
+ return sal_False;
if( rColor.pixel & 1 )
- return TRUE;
+ return sal_True;
return GetXPixel( rColor, r^0xFF, g^0xFF, b^0xFF );
}
@@ -3433,9 +3433,9 @@ Pixel SalColormap::GetPixel( SalColor nSalColor ) const
}
// Colormatching ueber Palette
- USHORT r = SALCOLOR_RED ( nSalColor );
- USHORT g = SALCOLOR_GREEN( nSalColor );
- USHORT b = SALCOLOR_BLUE ( nSalColor );
+ sal_uInt16 r = SALCOLOR_RED ( nSalColor );
+ sal_uInt16 g = SALCOLOR_GREEN( nSalColor );
+ sal_uInt16 b = SALCOLOR_BLUE ( nSalColor );
return m_aLookupTable[ (((r+8)/17) << 8)
+ (((g+8)/17) << 4)
+ ((b+8)/17) ];
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
index 88af0b70ef7e..9284f6aaa293 100644
--- a/vcl/unx/source/app/salinst.cxx
+++ b/vcl/unx/source/app/salinst.cxx
@@ -149,8 +149,8 @@ X11SalInstance::~X11SalInstance()
struct PredicateReturn
{
- USHORT nType;
- BOOL bRet;
+ sal_uInt16 nType;
+ sal_Bool bRet;
};
extern "C" {
@@ -161,7 +161,7 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
if ( pPre->bRet )
return False;
- USHORT nType;
+ sal_uInt16 nType;
switch( pEvent->type )
{
@@ -187,29 +187,29 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
}
if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & INPUT_OTHER) ) )
- pPre->bRet = TRUE;
+ pPre->bRet = sal_True;
return False;
}
}
-bool X11SalInstance::AnyInput(USHORT nType)
+bool X11SalInstance::AnyInput(sal_uInt16 nType)
{
X11SalData *pSalData = GetX11SalData();
Display *pDisplay = pSalData->GetDisplay()->GetDisplay();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( (nType & INPUT_TIMER) &&
pSalData->GetDisplay()->GetXLib()->CheckTimeout( false ) )
{
- bRet = TRUE;
+ bRet = sal_True;
}
else if (XPending(pDisplay) )
{
PredicateReturn aInput;
XEvent aEvent;
- aInput.bRet = FALSE;
+ aInput.bRet = sal_False;
aInput.nType = nType;
XCheckIfEvent(pDisplay, &aEvent, ImplPredicateEvent,
@@ -227,14 +227,14 @@ vos::IMutex* X11SalInstance::GetYieldMutex()
// -----------------------------------------------------------------------
-ULONG X11SalInstance::ReleaseYieldMutex()
+sal_uInt32 X11SalInstance::ReleaseYieldMutex()
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
if ( pYieldMutex->GetThreadId() ==
vos::OThread::getCurrentIdentifier() )
{
- ULONG nCount = pYieldMutex->GetAcquireCount();
- ULONG n = nCount;
+ sal_uInt32 nCount = pYieldMutex->GetAcquireCount();
+ sal_uInt32 n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -249,7 +249,7 @@ ULONG X11SalInstance::ReleaseYieldMutex()
// -----------------------------------------------------------------------
-void X11SalInstance::AcquireYieldMutex( ULONG nCount )
+void X11SalInstance::AcquireYieldMutex( sal_uInt32 nCount )
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
while ( nCount )
@@ -288,14 +288,14 @@ void* X11SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
return pDisplay ? (void*)pDisplay : (void*)"";
}
-SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, ULONG nSalFrameStyle )
+SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, sal_uInt32 nSalFrameStyle )
{
SalFrame *pFrame = new X11SalFrame( pParent, nSalFrameStyle );
return pFrame;
}
-SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, ULONG nStyle )
+SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, sal_uInt32 nStyle )
{
SalFrame* pFrame = new X11SalFrame( NULL, nStyle, pParentData );
diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx
index 84c9dba32e40..5e2b870f559f 100644
--- a/vcl/unx/source/app/salsys.cxx
+++ b/vcl/unx/source/app/salsys.cxx
@@ -152,13 +152,13 @@ int X11SalSystem::ShowNativeDialog( const String& rTitle, const String& rMessage
aWarn.SetText( rTitle );
aWarn.Clear();
- USHORT nButton = 0;
+ sal_uInt16 nButton = 0;
for( std::list< String >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it )
{
- aWarn.AddButton( *it, nButton+1, nButton == (USHORT)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 );
+ aWarn.AddButton( *it, nButton+1, nButton == (sal_uInt16)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 );
nButton++;
}
- aWarn.SetFocusButton( (USHORT)nDefButton+1 );
+ aWarn.SetFocusButton( (sal_uInt16)nDefButton+1 );
nRet = ((int)aWarn.Execute()) - 1;
diff --git a/vcl/unx/source/app/saltimer.cxx b/vcl/unx/source/app/saltimer.cxx
index 431470935d9e..7c4ec0676428 100644
--- a/vcl/unx/source/app/saltimer.cxx
+++ b/vcl/unx/source/app/saltimer.cxx
@@ -58,7 +58,7 @@ void SalXLib::StopTimer()
m_nTimeoutMS = 0;
}
-void SalXLib::StartTimer( ULONG nMS )
+void SalXLib::StartTimer( sal_uInt32 nMS )
{
timeval Timeout (m_aTimeout); // previous timeout.
gettimeofday (&m_aTimeout, 0);
@@ -89,7 +89,7 @@ void X11SalTimer::Stop()
GetX11SalData()->GetLib()->StopTimer();
}
-void X11SalTimer::Start( ULONG nMS )
+void X11SalTimer::Start( sal_uInt32 nMS )
{
GetX11SalData()->GetLib()->StartTimer( nMS );
}
diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx
index 959d6af5912d..21d9b8df60f3 100644
--- a/vcl/unx/source/app/sm.cxx
+++ b/vcl/unx/source/app/sm.cxx
@@ -149,7 +149,7 @@ extern "C" void SAL_CALL ICEConnectionWorker( void* );
class ICEConnectionObserver
{
friend void SAL_CALL ICEConnectionWorker(void*);
- static BOOL bIsWatching;
+ static sal_Bool bIsWatching;
static void ICEWatchProc( IceConn connection, IcePointer client_data,
Bool opening, IcePointer* watch_data );
@@ -175,7 +175,7 @@ public:
SmcConn SessionManagerClient::aSmcConnection = NULL;
ByteString SessionManagerClient::aClientID;
-BOOL ICEConnectionObserver::bIsWatching = FALSE;
+sal_Bool ICEConnectionObserver::bIsWatching = sal_False;
struct pollfd* ICEConnectionObserver::pFilehandles = NULL;
IceConn* ICEConnectionObserver::pConnections = NULL;
int ICEConnectionObserver::nConnections = 0;
@@ -606,7 +606,7 @@ void ICEConnectionObserver::activate()
{
nWakeupFiles[0] = nWakeupFiles[1] = 0;
ICEMutex = osl_createMutex();
- bIsWatching = TRUE;
+ bIsWatching = sal_True;
#ifdef USE_SM_EXTENSION
/*
* Default handlers call exit, we don't care that strongly if something
@@ -624,7 +624,7 @@ void ICEConnectionObserver::deactivate()
if( bIsWatching )
{
lock();
- bIsWatching = FALSE;
+ bIsWatching = sal_False;
#ifdef USE_SM_EXTENSION
IceRemoveConnectionWatch( ICEWatchProc, NULL );
IceSetErrorHandler( origErrorHandler );
diff --git a/vcl/unx/source/app/soicon.cxx b/vcl/unx/source/app/soicon.cxx
index 2bf9e55731d1..ddb14e9ecc39 100644
--- a/vcl/unx/source/app/soicon.cxx
+++ b/vcl/unx/source/app/soicon.cxx
@@ -43,13 +43,13 @@
#include <salbmp.h>
#include <vcl/svids.hrc>
-BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT iconSize,
+sal_Bool SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,sal_uInt16 nIcon, sal_uInt16 iconSize,
Pixmap& icon_pixmap, Pixmap& icon_mask)
{
if( ! ImplGetResMgr() )
- return FALSE;
+ return sal_False;
- USHORT nIconSizeOffset;
+ sal_uInt16 nIconSizeOffset;
if( iconSize >= 48 )
nIconSizeOffset = SV_ICON_SIZE48_START;
@@ -58,11 +58,11 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
else if( iconSize >= 16 )
nIconSizeOffset = SV_ICON_SIZE16_START;
else
- return FALSE;
+ return sal_False;
BitmapEx aIcon( ResId(nIconSizeOffset + nIcon, *ImplGetResMgr()));
- if( TRUE == aIcon.IsEmpty() )
- return FALSE;
+ if( sal_True == aIcon.IsEmpty() )
+ return sal_False;
SalTwoRect aRect;
aRect.mnSrcX = 0; aRect.mnSrcY = 0;
@@ -110,6 +110,6 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
XFreeGC( pDisplay->GetDisplay(), aMonoGC );
}
- return TRUE;
+ return sal_True;
}
diff --git a/vcl/unx/source/gdi/gcach_xpeer.cxx b/vcl/unx/source/gdi/gcach_xpeer.cxx
index a69a2426b519..3d2af898c7e2 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.cxx
@@ -465,13 +465,13 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nR
if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) )
{
// #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163
- ULONG nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1;
+ sal_uInt32 nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1;
nPixmapWidth = Max( nPixmapWidth, maRawBitmap.mnWidth );
rGlyphData.SetSize( Size( nPixmapWidth, maRawBitmap.mnHeight ) );
rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset );
- const ULONG nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize;
+ const sal_uInt32 nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize;
if( nBytes > 0 )
{
// conversion table LSB<->MSB (for XCreatePixmapFromData)
@@ -621,7 +621,7 @@ Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 );
aGlyphId = nGlyphIndex & 0x00FFFFFF;
- const ULONG nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
+ const sal_uInt32 nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId,
aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes );
mnBytesUsed += nBytes;
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index bab78b0cb2df..c7727dade852 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -278,7 +278,7 @@ void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY )
}
}
-USHORT PspGraphics::GetBitCount()
+sal_uInt16 PspGraphics::GetBitCount()
{
return m_pPrinterGfx->GetBitCount();
}
@@ -293,14 +293,14 @@ void PspGraphics::ResetClipRegion()
m_pPrinterGfx->ResetClipRegion ();
}
-void PspGraphics::BeginSetClipRegion( ULONG n )
+void PspGraphics::BeginSetClipRegion( sal_uInt32 n )
{
m_pPrinterGfx->BeginSetClipRegion(n);
}
-BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
+sal_Bool PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
{
- return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY);
+ return (sal_Bool)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY);
}
bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
@@ -379,12 +379,12 @@ void PspGraphics::drawRect( long nX, long nY, long nDX, long nDY )
m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY)));
}
-void PspGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
+void PspGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry )
{
m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry);
}
-void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void PspGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry )
{
// Point must be equal to SalPoint! see vcl/inc/salgtype.hxx
m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry);
@@ -409,13 +409,13 @@ bool PspGraphics::drawPolyLine( const basegfx::B2DPolygon&, double /*fTransparen
return false;
}
-sal_Bool PspGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool PspGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry);
return sal_True;
}
-sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool PspGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry);
return sal_True;
@@ -424,20 +424,20 @@ sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry,
sal_Bool PspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry )
+ const sal_uInt8* const* pFlgAry )
{
// Point must be equal to SalPoint! see vcl/inc/salgtype.hxx
- m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry);
+ m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (sal_uInt8**)pFlgAry);
return sal_True;
}
-void PspGraphics::invert( ULONG,
+void PspGraphics::invert( sal_uInt32,
const SalPoint*,
SalInvert )
{
DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" );
}
-BOOL PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize )
+sal_Bool PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize )
{
return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize );
}
@@ -448,7 +448,7 @@ void PspGraphics::copyBits( const SalTwoRect*,
DBG_ERROR( "Error: PrinterGfx::CopyBits() not implemented" );
}
-void PspGraphics::copyArea ( long,long,long,long,long,long,USHORT )
+void PspGraphics::copyArea ( long,long,long,long,long,long,sal_uInt16 )
{
DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" );
}
@@ -784,7 +784,7 @@ const ImplFontCharMap* PspGraphics::GetImplFontCharMap() const
return pIFCMap;
}
-USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
+sal_uInt16 PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
{
// release all fonts that are to be overridden
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
@@ -915,10 +915,10 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
}
}
-ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
+sal_uInt32 PspGraphics::GetKernPairs( sal_uInt32 nPairs, ImplKernPairData *pKernPairs )
{
const ::std::list< ::psp::KernPair >& rPairs( m_pPrinterGfx->getKernPairs() );
- ULONG nHavePairs = rPairs.size();
+ sal_uInt32 nHavePairs = rPairs.size();
if( pKernPairs && nPairs )
{
::std::list< ::psp::KernPair >::const_iterator it;
@@ -937,38 +937,38 @@ ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
return nHavePairs;
}
-BOOL PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
- return TRUE;
+ return sal_True;
}
-BOOL PspGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
::basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
@@ -1007,7 +1007,7 @@ SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel
//--------------------------------------------------------------------------
-BOOL PspGraphics::CreateFontSubset(
+sal_Bool PspGraphics::CreateFontSubset(
const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
@@ -1402,9 +1402,9 @@ bool PspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen
bool bRet = false;
bool bStarted = false;
bool bStopped = false;
- USHORT nPos;
- USHORT nStart = 0;
- USHORT nStop = rLen;
+ sal_uInt16 nPos;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nStop = rLen;
String aPhone = rOrig.Copy( nIndex, rLen );
if( ! m_bPhoneCollectionActive )
diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx
index cc7934b0a798..0b93333b91c3 100644
--- a/vcl/unx/source/gdi/salbmp.cxx
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -64,7 +64,7 @@ SalBitmap* X11SalInstance::CreateSalBitmap()
}
ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
-ULONG X11SalBitmap::mnCacheInstCount = 0;
+sal_uInt32 X11SalBitmap::mnCacheInstCount = 0;
// -----------------------------------------------------------------------------
@@ -109,7 +109,7 @@ void X11SalBitmap::ImplRemovedFromCache()
// -----------------------------------------------------------------------------
-BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal )
{
DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24, "Unsupported BitCount!" );
@@ -128,7 +128,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount,
if( pDIB )
{
- const USHORT nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0;
+ const sal_uInt16 nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0;
pDIB->mnFormat = BMP_FORMAT_BOTTOM_UP;
@@ -169,7 +169,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount,
try
{
- pDIB->mpBits = new BYTE[ pDIB->mnScanlineSize * pDIB->mnHeight ];
+ pDIB->mpBits = new sal_uInt8[ pDIB->mnScanlineSize * pDIB->mnHeight ];
}
catch(std::bad_alloc&)
{
@@ -214,7 +214,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
{
const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight };
BitmapBuffer aSrcBuf;
- ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP;
+ sal_uInt32 nDstFormat = BMP_FORMAT_BOTTOM_UP;
const BitmapPalette* pDstPal = NULL;
aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN;
@@ -222,7 +222,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
aSrcBuf.mnHeight = nHeight;
aSrcBuf.mnBitCount = pImage->bits_per_pixel;
aSrcBuf.mnScanlineSize = pImage->bytes_per_line;
- aSrcBuf.mpBits = (BYTE*) pImage->data;
+ aSrcBuf.mpBits = (sal_uInt8*) pImage->data;
pImage->red_mask = pSalDisp->GetVisual( nScreen ).red_mask;
pImage->green_mask = pSalDisp->GetVisual( nScreen ).green_mask;
@@ -304,12 +304,12 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
else if( aSrcBuf.mnBitCount <= 8 )
{
const SalColormap& rColMap = pSalDisp->GetColormap( nScreen );
- const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << nDrawableDepth) );
+ const sal_uInt16 nCols = Min( (sal_uInt32)rColMap.GetUsed(), (sal_uInt32)(1 << nDrawableDepth) );
rPal.SetEntryCount( nCols );
pDstPal = &rPal;
- for( USHORT i = 0; i < nCols; i++ )
+ for( sal_uInt16 i = 0; i < nCols; i++ )
{
const SalColor nColor( rColMap.GetColor( i ) );
BitmapColor& rBmpCol = rPal[ i ];
@@ -363,7 +363,7 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
if( pImage )
{
BitmapBuffer* pDstBuf;
- ULONG nDstFormat = BMP_FORMAT_TOP_DOWN;
+ sal_uInt32 nDstFormat = BMP_FORMAT_TOP_DOWN;
BitmapPalette* pPal = NULL;
ColorMask* pMask = NULL;
@@ -430,11 +430,11 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
else if( pImage->depth <= 8 )
{
const SalColormap& rColMap = pSalDisp->GetColormap( nScreen );
- const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << pImage->depth) );
+ const sal_uInt16 nCols = Min( (sal_uInt32)rColMap.GetUsed(), (sal_uInt32)(1 << pImage->depth) );
pPal = new BitmapPalette( nCols );
- for( USHORT i = 0; i < nCols; i++ )
+ for( sal_uInt16 i = 0; i < nCols; i++ )
{
const SalColor nColor( rColMap.GetColor( i ) );
BitmapColor& rBmpCol = (*pPal)[ i ];
@@ -683,7 +683,7 @@ void X11SalBitmap::ImplDraw( Drawable aDrawable,
// -----------------------------------------------------------------------------
-bool X11SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+bool X11SalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal )
{
Destroy();
mpDIB = ImplCreateDIB( rSize, nBitCount, rPal );
@@ -706,7 +706,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
// TODO: get rid of this when BitmapBuffer gets copy constructor
try
{
- mpDIB->mpBits = new BYTE[ mpDIB->mnScanlineSize * mpDIB->mnHeight ];
+ mpDIB->mpBits = new sal_uInt8[ mpDIB->mnScanlineSize * mpDIB->mnHeight ];
}
catch( std::bad_alloc& )
{
@@ -732,14 +732,14 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
bool X11SalBitmap::Create( const SalBitmap&, SalGraphics* )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------------
-bool X11SalBitmap::Create( const SalBitmap&, USHORT )
+bool X11SalBitmap::Create( const SalBitmap&, sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------------
@@ -775,9 +775,9 @@ Size X11SalBitmap::GetSize() const
// -----------------------------------------------------------------------------
-USHORT X11SalBitmap::GetBitCount() const
+sal_uInt16 X11SalBitmap::GetBitCount() const
{
- USHORT nBitCount;
+ sal_uInt16 nBitCount;
if( mpDIB )
nBitCount = mpDIB->mnBitCount;
@@ -954,7 +954,7 @@ ImplSalDDB::~ImplSalDDB()
bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const
{
- bool bRet = FALSE;
+ bool bRet = sal_False;
if( ( maPixmap != 0 ) && ( ( mnDepth == nDepth ) || ( 1 == mnDepth ) ) && nScreen == mnScreen)
{
@@ -963,7 +963,7 @@ bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRe
rTwoRect.mnDestWidth == maTwoRect.mnDestWidth && rTwoRect.mnDestHeight == maTwoRect.mnDestHeight )
{
// absolutely indentically
- bRet = TRUE;
+ bRet = sal_True;
}
else if( rTwoRect.mnSrcWidth == rTwoRect.mnDestWidth && rTwoRect.mnSrcHeight == rTwoRect.mnDestHeight &&
maTwoRect.mnSrcWidth == maTwoRect.mnDestWidth && maTwoRect.mnSrcHeight == maTwoRect.mnDestHeight &&
@@ -971,7 +971,7 @@ bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRe
( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) <= ( maTwoRect.mnSrcX + maTwoRect.mnSrcWidth ) &&
( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) <= ( maTwoRect.mnSrcY + maTwoRect.mnSrcHeight ) )
{
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1018,10 +1018,10 @@ void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
struct ImplBmpObj
{
X11SalBitmap* mpBmp;
- ULONG mnMemSize;
- ULONG mnFlags;
+ sal_uInt32 mnMemSize;
+ sal_uInt32 mnFlags;
- ImplBmpObj( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) :
+ ImplBmpObj( X11SalBitmap* pBmp, sal_uInt32 nMemSize, sal_uInt32 nFlags ) :
mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {}
};
@@ -1041,14 +1041,14 @@ ImplSalBitmapCache::~ImplSalBitmapCache()
// -----------------------------------------------------------------------------
-void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags )
+void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uInt32 nMemSize, sal_uInt32 nFlags )
{
ImplBmpObj* pObj;
- bool bFound = FALSE;
+ bool bFound = sal_False;
for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() )
if( pObj->mpBmp == pBmp )
- bFound = TRUE;
+ bFound = sal_True;
mnTotalSize += nMemSize;
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 9215f2e25b16..3802f4f394ac 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -67,21 +67,21 @@ class SalPolyLine
XPoint Points_[STATIC_POINTS];
XPoint *pFirst_;
public:
- inline SalPolyLine( ULONG nPoints );
- inline SalPolyLine( ULONG nPoints, const SalPoint *p );
+ inline SalPolyLine( sal_uInt32 nPoints );
+ inline SalPolyLine( sal_uInt32 nPoints, const SalPoint *p );
inline ~SalPolyLine();
- inline XPoint &operator [] ( ULONG n ) const
+ inline XPoint &operator [] ( sal_uInt32 n ) const
{ return pFirst_[n]; }
};
-inline SalPolyLine::SalPolyLine( ULONG nPoints )
+inline SalPolyLine::SalPolyLine( sal_uInt32 nPoints )
: pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ )
{}
-inline SalPolyLine::SalPolyLine( ULONG nPoints, const SalPoint *p )
+inline SalPolyLine::SalPolyLine( sal_uInt32 nPoints, const SalPoint *p )
: pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ )
{
- for( ULONG i = 0; i < nPoints; i++ )
+ for( sal_uInt32 i = 0; i < nPoints; i++ )
{
pFirst_[i].x = (short)p[i].mnX;
pFirst_[i].y = (short)p[i].mnY;
@@ -124,7 +124,7 @@ X11SalGraphics::X11SalGraphics()
#ifdef ENABLE_GRAPHITE
// check if graphite fonts have been disabled
static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" );
- bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : FALSE;
+ bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : sal_False;
#endif
pBrushGC_ = NULL;
@@ -140,20 +140,20 @@ X11SalGraphics::X11SalGraphics()
pStippleGC_ = NULL;
pTrackingGC_ = NULL;
- bWindow_ = FALSE;
- bPrinter_ = FALSE;
- bVirDev_ = FALSE;
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
- bXORMode_ = FALSE;
- bDitherBrush_ = FALSE;
+ bWindow_ = sal_False;
+ bPrinter_ = sal_False;
+ bVirDev_ = sal_False;
+ bPenGC_ = sal_False;
+ bFontGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
+ bXORMode_ = sal_False;
+ bDitherBrush_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -241,7 +241,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen )
SetDrawable( aTarget, nScreen );
#endif
- bWindow_ = TRUE;
+ bWindow_ = sal_True;
m_pFrame = pFrame;
m_pVDev = NULL;
}
@@ -306,7 +306,7 @@ GC X11SalGraphics::SelectPen()
XSetForeground( pDisplay, pPenGC_, nPenPixel_ );
XSetFunction ( pDisplay, pPenGC_, bXORMode_ ? GXxor : GXcopy );
SetClipRegion( pPenGC_ );
- bPenGC_ = TRUE;
+ bPenGC_ = sal_True;
}
return pPenGC_;
@@ -359,7 +359,7 @@ GC X11SalGraphics::SelectBrush()
XSetFunction ( pDisplay, pBrushGC_, bXORMode_ ? GXxor : GXcopy );
SetClipRegion( pBrushGC_ );
- bBrushGC_ = TRUE;
+ bBrushGC_ = sal_True;
}
return pBrushGC_;
@@ -391,26 +391,26 @@ GC X11SalGraphics::GetTrackingGC()
if( !bTrackingGC_ )
{
SetClipRegion( pTrackingGC_ );
- bTrackingGC_ = TRUE;
+ bTrackingGC_ = sal_True;
}
return pTrackingGC_;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::DrawLines( ULONG nPoints,
+void X11SalGraphics::DrawLines( sal_uInt32 nPoints,
const SalPolyLine &rPoints,
GC pGC,
bool bClose
)
{
// errechne wie viele Linien XWindow auf einmal zeichnen kann
- ULONG nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq))
+ sal_uInt32 nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq))
/ sizeof(xPoint);
if( nMaxLines > nPoints ) nMaxLines = nPoints;
// gebe alle Linien aus, die XWindows zeichnen kann.
- ULONG n;
+ sal_uInt32 n;
for( n = 0; nPoints - n > nMaxLines; n += nMaxLines - 1 )
XDrawLines( GetXDisplay(),
GetDrawable(),
@@ -454,24 +454,24 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
// test for correct depth (8bit)
if( GetColormap().GetVisual().GetDepth() != 8 )
- return FALSE;
+ return sal_False;
char pBits[64];
char *pBitsPtr = pBits;
// Set the pallette-entries for the dithering tile
- UINT8 nSalColorRed = SALCOLOR_RED ( nSalColor );
- UINT8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor );
- UINT8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor );
+ sal_uInt8 nSalColorRed = SALCOLOR_RED ( nSalColor );
+ sal_uInt8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor );
+ sal_uInt8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor );
for( int nY = 0; nY < 8; nY++ )
{
for( int nX = 0; nX < 8; nX++ )
{
short nMagic = nOrdDither8Bit[nY][nX];
- UINT8 nR = P_DELTA * DMAP( nSalColorRed, nMagic );
- UINT8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic );
- UINT8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic );
+ sal_uInt8 nR = P_DELTA * DMAP( nSalColorRed, nMagic );
+ sal_uInt8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic );
+ sal_uInt8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic );
*pBitsPtr++ = GetColormap().GetPixel( MAKE_SALCOLOR( nR, nG, nB ) );
}
@@ -511,7 +511,7 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
pImage->data = NULL;
XDestroyImage( pImage );
- return TRUE;
+ return sal_True;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -549,7 +549,7 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-USHORT X11SalGraphics::GetBitCount() // const
+sal_uInt16 X11SalGraphics::GetBitCount() // const
{
return GetVisual().GetDepth();
}
@@ -581,15 +581,15 @@ void X11SalGraphics::ResetClipRegion()
{
if( pClipRegion_ )
{
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
+ bPenGC_ = sal_False;
+ bFontGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
XDestroyRegion( pClipRegion_ );
pClipRegion_ = NULL;
@@ -597,7 +597,7 @@ void X11SalGraphics::ResetClipRegion()
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::BeginSetClipRegion( ULONG )
+void X11SalGraphics::BeginSetClipRegion( sal_uInt32 )
{
if( pClipRegion_ )
XDestroyRegion( pClipRegion_ );
@@ -608,7 +608,7 @@ void X11SalGraphics::BeginSetClipRegion( ULONG )
BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
{
if (!nDX || !nDY)
- return TRUE;
+ return sal_True;
XRectangle aRect;
aRect.x = (short)nX;
@@ -618,7 +618,7 @@ BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ );
- return TRUE;
+ return sal_True;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -631,15 +631,15 @@ bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalGraphics::EndSetClipRegion()
{
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
+ bPenGC_ = sal_False;
+ bFontGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
if( XEmptyRegion( pClipRegion_ ) )
{
@@ -654,7 +654,7 @@ void X11SalGraphics::SetLineColor()
if( nPenColor_ != SALCOLOR_NONE )
{
nPenColor_ = SALCOLOR_NONE;
- bPenGC_ = FALSE;
+ bPenGC_ = sal_False;
}
}
@@ -665,7 +665,7 @@ void X11SalGraphics::SetLineColor( SalColor nSalColor )
{
nPenColor_ = nSalColor;
nPenPixel_ = GetPixel( nSalColor );
- bPenGC_ = FALSE;
+ bPenGC_ = sal_False;
}
}
@@ -674,9 +674,9 @@ void X11SalGraphics::SetFillColor()
{
if( nBrushColor_ != SALCOLOR_NONE )
{
- bDitherBrush_ = FALSE;
+ bDitherBrush_ = sal_False;
nBrushColor_ = SALCOLOR_NONE;
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
}
}
@@ -685,7 +685,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor )
{
if( nBrushColor_ != nSalColor )
{
- bDitherBrush_ = FALSE;
+ bDitherBrush_ = sal_False;
nBrushColor_ = nSalColor;
nBrushPixel_ = GetPixel( nSalColor );
if( TrueColor != GetColormap().GetVisual().GetClass()
@@ -707,7 +707,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor )
&& nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown
&& nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) )
bDitherBrush_ = GetDitherPixmap(nSalColor);
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
}
}
@@ -727,7 +727,7 @@ void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor )
break;
}
nPenColor_ = GetColormap().GetColor( nPenPixel_ );
- bPenGC_ = FALSE;
+ bPenGC_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -745,9 +745,9 @@ void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor )
nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1;
break;
}
- bDitherBrush_ = FALSE;
+ bDitherBrush_ = sal_False;
nBrushColor_ = GetColormap().GetColor( nBrushPixel_ );
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -756,14 +756,14 @@ void X11SalGraphics::SetXORMode( bool bSet, bool )
if( !bXORMode_ == bSet )
{
bXORMode_ = bSet;
- bPenGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
+ bPenGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
}
}
@@ -839,13 +839,13 @@ void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
+void X11SalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry )
{
drawPolyLine( nPoints, pPtAry, false );
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool bClose )
+void X11SalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry, bool bClose )
{
if( nPenColor_ != 0xFFFFFFFF )
{
@@ -856,7 +856,7 @@ void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool b
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void X11SalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry )
{
if( nPoints == 0 )
return;
@@ -929,7 +929,7 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
{
if( nBrushColor_ != SALCOLOR_NONE )
{
- ULONG i, n;
+ sal_uInt32 i, n;
XLIB_Region pXRegA = NULL;
for( i = 0; i < nPoly; i++ ) {
@@ -956,7 +956,7 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
GC pGC = SelectBrush();
SetClipRegion( pGC, pXRegA ); // ??? doppelt
XDestroyRegion( pXRegA );
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
XFillRectangle( GetXDisplay(),
GetDrawable(),
@@ -966,20 +966,20 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
}
if( nPenColor_ != SALCOLOR_NONE )
- for( ULONG i = 0; i < nPoly; i++ )
+ for( sal_uInt32 i = 0; i < nPoly; i++ )
drawPolyLine( pPoints[i], pPtAry[i], true );
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-sal_Bool X11SalGraphics::drawPolyLineBezier( ULONG, const SalPoint*, const BYTE* )
+sal_Bool X11SalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const BYTE* )
{
return sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-sal_Bool X11SalGraphics::drawPolygonBezier( ULONG, const SalPoint*, const BYTE* )
+sal_Bool X11SalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const BYTE* )
{
return sal_False;
}
@@ -994,7 +994,7 @@ sal_Bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*,
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::invert( ULONG nPoints,
+void X11SalGraphics::invert( sal_uInt32 nPoints,
const SalPoint* pPtAry,
SalInvert nFlags )
{
@@ -1021,9 +1021,9 @@ void X11SalGraphics::invert( ULONG nPoints,
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,ULONG )
+BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,sal_uInt32 )
{
- return FALSE;
+ return sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -1094,22 +1094,22 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
// nothing to do for empty polypolygons
const int nOrigPolyCount = rOrigPolyPoly.count();
if( nOrigPolyCount <= 0 )
- return TRUE;
+ return sal_True;
// nothing to do if everything is transparent
if( (nBrushColor_ == SALCOLOR_NONE)
&& (nPenColor_ == SALCOLOR_NONE) )
- return TRUE;
+ return sal_True;
// cannot handle pencolor!=brushcolor yet
if( (nPenColor_ != SALCOLOR_NONE)
&& (nPenColor_ != nBrushColor_) )
- return FALSE;
+ return sal_False;
// TODO: remove the env-variable when no longer needed
static const char* pRenderEnv = getenv( "SAL_DISABLE_RENDER_POLY" );
if( pRenderEnv )
- return FALSE;
+ return sal_False;
// snap to raster if requested
basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly;
diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx
index 1cb2abbedf43..018f7514dfeb 100644
--- a/vcl/unx/source/gdi/salgdi2.cxx
+++ b/vcl/unx/source/gdi/salgdi2.cxx
@@ -150,7 +150,7 @@ inline GC X11SalGraphics::GetMonoGC( Pixmap hPixmap )
if( !bMonoGC_ )
{
SetClipRegion( pMonoGC_ );
- bMonoGC_ = TRUE;
+ bMonoGC_ = sal_True;
}
return pMonoGC_;
@@ -167,7 +167,7 @@ inline GC X11SalGraphics::GetCopyGC()
if( !bCopyGC_ )
{
SetClipRegion( pCopyGC_ );
- bCopyGC_ = TRUE;
+ bCopyGC_ = sal_True;
}
return pCopyGC_;
}
@@ -185,7 +185,7 @@ GC X11SalGraphics::GetInvertGC()
if( !bInvertGC_ )
{
SetClipRegion( pInvertGC_ );
- bInvertGC_ = TRUE;
+ bInvertGC_ = sal_True;
}
return pInvertGC_;
}
@@ -233,7 +233,7 @@ GC X11SalGraphics::GetInvert50GC()
if( !bInvert50GC_ )
{
SetClipRegion( pInvert50GC_ );
- bInvert50GC_ = TRUE;
+ bInvert50GC_ = sal_True;
}
return pInvert50GC_;
}
@@ -251,7 +251,7 @@ inline GC X11SalGraphics::GetStippleGC()
{
XSetFunction( GetXDisplay(), pStippleGC_, bXORMode_ ? GXxor : GXcopy );
SetClipRegion( pStippleGC_ );
- bStippleGC_ = TRUE;
+ bStippleGC_ = sal_True;
}
return pStippleGC_;
@@ -608,7 +608,7 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
void X11SalGraphics::copyArea ( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
- USHORT )
+ sal_uInt16 )
{
SalTwoRect aPosAry;
@@ -661,11 +661,11 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry,
DBG_ASSERT( !bPrinter_, "Drawing of transparent bitmaps on printer devices is strictly forbidden" );
// decide if alpha masking or transparency masking is needed
- BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( TRUE );
+ BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( sal_True );
if( pAlphaBuffer != NULL )
{
int nMaskFormat = pAlphaBuffer->mnFormat;
- const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, TRUE );
+ const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, sal_True );
if( nMaskFormat == BMP_FORMAT_8BIT_PAL )
drawAlphaBitmap( *pPosAry, rSrcBitmap, rMaskBitmap );
}
@@ -686,7 +686,7 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
// figure work mode depth. If this is a VDev Drawable, use its
// bitdepth to create pixmaps for, otherwise, XCopyArea will
// refuse to work.
- const USHORT nDepth( m_pVDev ?
+ const sal_uInt16 nDepth( m_pVDev ?
m_pVDev->GetDepth() :
pSalDisp->GetVisual( m_nScreen ).GetDepth() );
Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
@@ -745,8 +745,8 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
DBG_TESTTRANS( aBG );
// #105055# Disable XOR temporarily
- BOOL bOldXORMode( bXORMode_ );
- bXORMode_ = FALSE;
+ sal_Bool bOldXORMode( bXORMode_ );
+ bXORMode_ = sal_False;
// copy pixmap #2 (result) to background
XCopyArea( pXDisp, aBG, aDrawable, GetCopyGC(),
@@ -834,7 +834,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// TODO: use SalX11Bitmap functionality and caching for the Alpha Pixmap
// problem is that they don't provide an 8bit Pixmap on a non-8bit display
- BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rAlphaBmp).AcquireBuffer( TRUE );
+ BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rAlphaBmp).AcquireBuffer( sal_True );
// an XImage needs its data top_down
// TODO: avoid wrongly oriented images in upper layers!
@@ -879,7 +879,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
if( pAlphaBits != (char*)pAlphaBuffer->mpBits )
delete[] pAlphaBits;
- const_cast<SalBitmap&>(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, TRUE );
+ const_cast<SalBitmap&>(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, sal_True );
XRenderPictureAttributes aAttr;
aAttr.repeat = true;
@@ -1045,7 +1045,7 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
}
X11SalBitmap* pSalBitmap = new X11SalBitmap;
- USHORT nBitCount = GetBitCount();
+ sal_uInt16 nBitCount = GetBitCount();
if( &GetDisplay()->GetColormap( m_nScreen ) != &GetColormap() )
nBitCount = 1;
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index 62e575ebc5ef..e570e0e02bc6 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -566,7 +566,7 @@ X11SalGraphics::SelectFont()
{
XSetForeground( pDisplay, pFontGC_, nTextPixel_ );
SetClipRegion( pFontGC_ );
- bFontGC_ = TRUE;
+ bFontGC_ = sal_True;
}
return pFontGC_;
@@ -622,7 +622,7 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev
Size aReqSize( pEntry->mnWidth, pEntry->mnHeight );
mXFont[ nFallbackLevel ] = GetDisplay()->GetFont( &rX11Font, aReqSize, bFontVertical_ );
- bFontGC_ = FALSE;
+ bFontGC_ = sal_False;
return true;
}
@@ -1509,9 +1509,9 @@ const ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const
//
// ----------------------------------------------------------------------------
-USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
+sal_uInt16 X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
{
- USHORT nRetVal = 0;
+ sal_uInt16 nRetVal = 0;
if( !setFont( pEntry, nFallbackLevel ) )
nRetVal |= SAL_SETFONT_BADFONT;
if( bPrinter_ || (mpServerFont[ nFallbackLevel ] != NULL) )
@@ -1528,7 +1528,7 @@ X11SalGraphics::SetTextColor( SalColor nSalColor )
{
nTextColor_ = nSalColor;
nTextPixel_ = GetPixel( nSalColor );
- bFontGC_ = FALSE;
+ bFontGC_ = sal_False;
}
}
@@ -1776,15 +1776,15 @@ X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel )
// ---------------------------------------------------------------------------
-ULONG
-X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
+sal_uInt32
+X11SalGraphics::GetKernPairs( sal_uInt32 nPairs, ImplKernPairData *pKernPairs )
{
if( ! bPrinter_ )
{
if( mpServerFont[0] != NULL )
{
ImplKernPairData* pTmpKernPairs;
- ULONG nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs );
+ sal_uInt32 nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs );
for( unsigned int i = 0; i < nPairs && i < nGotPairs; ++i )
pKernPairs[ i ] = pTmpKernPairs[ i ];
delete[] pTmpKernPairs;
@@ -1796,40 +1796,40 @@ X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
// ---------------------------------------------------------------------------
-BOOL X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = mpServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------
-BOOL X11SalGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool X11SalGraphics::GetGlyphOutline( long nGlyphIndex,
::basegfx::B2DPolyPolygon& rPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = mpServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------------
@@ -1894,7 +1894,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const
//--------------------------------------------------------------------------
-BOOL X11SalGraphics::CreateFontSubset(
+sal_Bool X11SalGraphics::CreateFontSubset(
const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx
index ece724d717cb..c8a0f6532133 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -213,7 +213,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
if( rData.getStreamBuffer( pBuffer, nBytes ) )
{
pJobSetup->mnDriverDataLen = nBytes;
- pJobSetup->mpDriverData = (BYTE*)pBuffer;
+ pJobSetup->mpDriverData = (sal_uInt8*)pBuffer;
}
else
{
@@ -588,15 +588,15 @@ void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics )
// -----------------------------------------------------------------------
-BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
+sal_Bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
{
if( ! pFrame || ! pJobSetup )
- return FALSE;
+ return sal_False;
getPaLib();
if( ! pSetupFunction )
- return FALSE;
+ return sal_False;
PrinterInfoManager& rManager = PrinterInfoManager::get();
@@ -616,14 +616,14 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
void* pBuffer = NULL;
aInfo.getStreamBuffer( pBuffer, nBytes );
pJobSetup->mnDriverDataLen = nBytes;
- pJobSetup->mpDriverData = (BYTE*)pBuffer;
+ pJobSetup->mpDriverData = (sal_uInt8*)pBuffer;
// copy everything to job setup
copyJobDataToJobSetup( pJobSetup, aInfo );
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -633,7 +633,7 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
// data should be merged into the driver data
// If pJobSetup->mpDriverData IS NULL, then the driver defaults
// should be merged into the independent data
-BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
+sal_Bool PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
{
// set/clear backwards compatibility flag
bool bStrictSO52Compatibility = false;
@@ -652,7 +652,7 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
copyJobDataToJobSetup( pJobSetup, m_aJobData );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -661,8 +661,8 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
// and sets the new independ data in pJobSetup
// Only the data must be changed, where the bit
// in nGetDataFlags is set
-BOOL PspSalInfoPrinter::SetData(
- ULONG nSetDataFlags,
+sal_Bool PspSalInfoPrinter::SetData(
+ sal_uInt32 nSetDataFlags,
ImplJobSetup* pJobSetup )
{
JobData aData;
@@ -711,7 +711,7 @@ BOOL PspSalInfoPrinter::SetData(
}
if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) )
- return FALSE;
+ return sal_False;
}
// merge paperbin if necessary
@@ -771,10 +771,10 @@ BOOL PspSalInfoPrinter::SetData(
m_aJobData = aData;
copyJobDataToJobSetup( pJobSetup, aData );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -823,7 +823,7 @@ void PspSalInfoPrinter::GetPageInfo(
// -----------------------------------------------------------------------
-ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
+sal_uInt32 PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
{
if( ! pJobSetup )
return 0;
@@ -837,7 +837,7 @@ ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
// -----------------------------------------------------------------------
-String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin )
+String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uInt32 nPaperBin )
{
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
@@ -846,7 +846,7 @@ String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG
if( aData.m_pParser )
{
const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL;
- if( ! pKey || nPaperBin >= (ULONG)pKey->countValues() )
+ if( ! pKey || nPaperBin >= (sal_uInt32)pKey->countValues() )
aRet = aData.m_pParser->getDefaultInputSlot();
else
{
@@ -861,7 +861,7 @@ String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG
// -----------------------------------------------------------------------
-ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType )
+sal_uInt32 PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, sal_uInt16 nType )
{
switch( nType )
{
@@ -955,11 +955,11 @@ static String getTmpName()
return aSys;
}
-BOOL PspSalPrinter::StartJob(
+sal_Bool PspSalPrinter::StartJob(
const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies,
+ sal_uInt32 nCopies,
bool bCollate,
bool bDirect,
ImplJobSetup* pJobSetup )
@@ -1035,16 +1035,16 @@ BOOL PspSalPrinter::StartJob(
}
m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility );
- return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? TRUE : FALSE;
+ return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::EndJob()
+sal_Bool PspSalPrinter::EndJob()
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
if( m_bIsPDFWriterJob )
- bSuccess = TRUE;
+ bSuccess = sal_True;
else
{
bSuccess = m_aPrintJob.EndJob();
@@ -1072,16 +1072,16 @@ BOOL PspSalPrinter::EndJob()
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::AbortJob()
+sal_Bool PspSalPrinter::AbortJob()
{
- BOOL bAbort = m_aPrintJob.AbortJob() ? TRUE : FALSE;
+ sal_Bool bAbort = m_aPrintJob.AbortJob() ? sal_True : sal_False;
vcl_sal::PrinterUpdate::jobEnded();
return bAbort;
}
// -----------------------------------------------------------------------
-SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
+SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, sal_Bool )
{
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter );
@@ -1102,16 +1102,16 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::EndPage()
+sal_Bool PspSalPrinter::EndPage()
{
sal_Bool bResult = m_aPrintJob.EndPage();
m_aPrinterGfx.Clear();
- return bResult ? TRUE : FALSE;
+ return bResult ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-ULONG PspSalPrinter::GetErrorCode()
+sal_uInt32 PspSalPrinter::GetErrorCode()
{
return 0;
}
@@ -1121,10 +1121,10 @@ ULONG PspSalPrinter::GetErrorCode()
struct PDFNewJobParameters
{
Size maPageSize;
- USHORT mnPaperBin;
+ sal_uInt16 mnPaperBin;
PDFNewJobParameters( const Size& i_rSize = Size(),
- USHORT i_nPaperBin = 0xffff )
+ sal_uInt16 i_nPaperBin = 0xffff )
: maPageSize( i_rSize ), mnPaperBin( i_nPaperBin ) {}
bool operator!=(const PDFNewJobParameters& rComp ) const
@@ -1152,7 +1152,7 @@ struct PDFPrintFile
, maParameters( i_rNewParameters ) {}
};
-BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName,
+sal_Bool PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName,
ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController )
{
OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? rtl::OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "<nil>" );
@@ -1376,7 +1376,7 @@ BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobNam
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx
index f242fffae715..675deef90ffe 100644
--- a/vcl/unx/source/gdi/salvd.cxx
+++ b/vcl/unx/source/gdi/salvd.cxx
@@ -44,7 +44,7 @@
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
- USHORT nBitCount, const SystemGraphicsData *pData )
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData )
{
X11SalVirtualDevice *pVDev = new X11SalVirtualDevice();
if( !nBitCount && pGraphics )
@@ -125,14 +125,14 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
m_pFrame = NULL;
bWindow_ = pDisplay->IsDisplay();
- bVirDev_ = TRUE;
+ bVirDev_ = sal_True;
}
// -=-= SalVirDevData / SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay,
+sal_Bool X11SalVirtualDevice::Init( SalDisplay *pDisplay,
long nDX, long nDY,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
int nScreen,
Pixmap hDrawable,
void* pRenderFormatVoid )
@@ -170,12 +170,12 @@ BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay,
else
{
hDrawable_ = hDrawable;
- bExternPixmap_ = TRUE;
+ bExternPixmap_ = sal_True;
}
pGraphics_->Init( this, pColormap, bDeleteColormap );
- return hDrawable_ != None ? TRUE : FALSE;
+ return hDrawable_ != None ? sal_True : sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -187,8 +187,8 @@ X11SalVirtualDevice::X11SalVirtualDevice()
nDX_ = 0;
nDY_ = 0;
nDepth_ = 0;
- bGraphics_ = FALSE;
- bExternPixmap_ = FALSE;
+ bGraphics_ = sal_False;
+ bExternPixmap_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -208,18 +208,18 @@ SalGraphics* X11SalVirtualDevice::GetGraphics()
return NULL;
if( pGraphics_ )
- bGraphics_ = TRUE;
+ bGraphics_ = sal_True;
return pGraphics_;
}
void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* )
-{ bGraphics_ = FALSE; }
+{ bGraphics_ = sal_False; }
-BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
+sal_Bool X11SalVirtualDevice::SetSize( long nDX, long nDY )
{
if( bExternPixmap_ )
- return FALSE;
+ return sal_False;
// #144688#
// the X protocol request CreatePixmap puts an upper bound
@@ -229,7 +229,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
// 16 bit truncation here without noticing.
if( nDX < 0 || nDX > 65535 ||
nDY < 0 || nDY > 65535 )
- return FALSE;
+ return sal_False;
if( !nDX ) nDX = 1;
if( !nDY ) nDY = 1;
@@ -248,7 +248,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
nDX_ = 1;
nDY_ = 1;
}
- return FALSE;
+ return sal_False;
}
if( GetDrawable() )
@@ -261,7 +261,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
if( pGraphics_ )
InitGraphics( this );
- return TRUE;
+ return sal_True;
}
void X11SalVirtualDevice::GetSize( long& rWidth, long& rHeight )
diff --git a/vcl/unx/source/gdi/xfont.cxx b/vcl/unx/source/gdi/xfont.cxx
index f6d19909cd4a..a4da5033e36b 100644
--- a/vcl/unx/source/gdi/xfont.cxx
+++ b/vcl/unx/source/gdi/xfont.cxx
@@ -275,16 +275,16 @@ ExtendedFontStruct::Match( const ExtendedXlfd *pXlfd,
return false;
if( bVertical != mbVertical )
- return FALSE;
+ return false;
if( rPixelSize.Height() != maPixelSize.Height() )
- return FALSE;
+ return false;
long nReqWidth = rPixelSize.Width();
if( !nReqWidth )
nReqWidth = rPixelSize.Height();
if( nReqWidth != maPixelSize.Width() )
- return FALSE;
+ return false;
return true;
}
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index 9934277302e1..0e0c5f6c03c7 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -209,7 +209,7 @@ void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pParentData, bool bUseGeometry )
+void X11SalFrame::Init( sal_uInt32 nSalFrameStyle, int nScreen, SystemParentData* pParentData, bool bUseGeometry )
{
if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() )
nScreen = GetDisplay()->GetDefaultScreenNumber();
@@ -482,8 +482,8 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
}
nShowState_ = SHOWSTATE_UNKNOWN;
- bViewable_ = TRUE;
- bMapped_ = FALSE;
+ bViewable_ = sal_True;
+ bMapped_ = sal_False;
nVisibility_ = VisibilityFullyObscured;
mhWindow = XCreateWindow( GetXDisplay(),
aFrameParent,
@@ -645,7 +645,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent )
+X11SalFrame::X11SalFrame( SalFrame *pParent, sal_uInt32 nSalFrameStyle, SystemParentData* pSystemParent )
{
X11SalData* pSalData = GetX11SalData();
@@ -686,16 +686,16 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentD
nHeight_ = 0;
nStyle_ = 0;
mnExtStyle = 0;
- bAlwaysOnTop_ = FALSE;
+ bAlwaysOnTop_ = sal_False;
- // set bViewable_ to TRUE: hack GetClientSize to report something
+ // set bViewable_ to sal_True: hack GetClientSize to report something
// different to 0/0 before first map
- bViewable_ = TRUE;
- bMapped_ = FALSE;
- bDefaultPosition_ = TRUE;
+ bViewable_ = sal_True;
+ bMapped_ = sal_False;
+ bDefaultPosition_ = sal_True;
nVisibility_ = VisibilityFullyObscured;
m_nWorkArea = 0;
- mbInShow = FALSE;
+ mbInShow = sal_False;
m_bXEmbed = false;
nScreenSaversTimeout_ = 0;
@@ -790,10 +790,10 @@ X11SalFrame::~X11SalFrame()
XSelectInput( GetXDisplay(), GetShellWindow(), 0 );
XSelectInput( GetXDisplay(), GetWindow(), 0 );
- ShowFullScreen( FALSE, 0 );
+ ShowFullScreen( sal_False, 0 );
if( bMapped_ )
- Show( FALSE );
+ Show( sal_False );
if( mpInputContext )
{
@@ -963,7 +963,7 @@ void X11SalFrame::Enable( BOOL /*bEnable*/ )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::SetIcon( USHORT nIcon )
+void X11SalFrame::SetIcon( sal_uInt16 nIcon )
{
if ( ! IsChildWindow() )
{
@@ -1158,7 +1158,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
{
SessionManagerClient::open(); // will simply return after the first time
- mbInShow = TRUE;
+ mbInShow = sal_True;
if( ! (nStyle_ & SAL_FRAME_STYLE_INTRO) )
{
// hide all INTRO frames
@@ -1170,12 +1170,12 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
if( pFrame->nStyle_ & SAL_FRAME_STYLE_INTRO )
{
if( pFrame->bMapped_ )
- const_cast<X11SalFrame*>(pFrame)->Show( FALSE );
+ const_cast<X11SalFrame*>(pFrame)->Show( sal_False );
}
}
}
- // update NET_WM_STATE which may have been deleted due to earlier Show(FALSE)
+ // update NET_WM_STATE which may have been deleted due to earlier Show(sal_False)
if( nShowState_ == SHOWSTATE_HIDDEN )
GetDisplay()->getWMAdaptor()->frameIsMapping( this );
@@ -1185,7 +1185,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
* with the basic dialogue editor,
* which shows a frame and instantly hides it again. After that the
* editor window is shown and the WM takes this as an opportunity
- * to show our hidden transient frame also. So Show( FALSE ) must
+ * to show our hidden transient frame also. So Show( sal_False ) must
* withdraw the frame AND delete the WM_TRANSIENT_FOR property.
* In case the frame is shown again, the transient hint must be restored here.
*/
@@ -1319,7 +1319,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
* #98107# plugged windows don't necessarily get the
* focus on show because the parent may already be mapped
* and have the focus. So try to set the focus
- * to the child on Show(TRUE)
+ * to the child on Show(sal_True)
*/
if( (nStyle_ & SAL_FRAME_STYLE_PLUG) && ! m_bXEmbed )
XSetInputFocus( GetXDisplay(),
@@ -1367,7 +1367,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::ToTop( USHORT nFlags )
+void X11SalFrame::ToTop( sal_uInt16 nFlags )
{
if( ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
&& ! ( nStyle_ & SAL_FRAME_STYLE_FLOAT )
@@ -1585,7 +1585,7 @@ void X11SalFrame::updateScreenNumber()
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( nStyle_ & SAL_FRAME_STYLE_PLUG )
return;
@@ -1851,7 +1851,7 @@ BOOL X11SalFrame::GetWindowState( SalFrameState* pState )
pState->mnMask |= _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY;
}
- return TRUE;
+ return sal_True;
}
// ----------------------------------------------------------------------------
@@ -2170,22 +2170,22 @@ void X11SalFrame::SetScreenNumber( unsigned int nNewScreen )
Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] );
bool bVisible = bMapped_;
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left());
maGeometry.nY = aNewScreenRect.Top() + (maGeometry.nY - aOldScreenRect.Top());
createNewWindow( None, m_nScreen );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
maGeometry.nScreenNumber = nNewScreen;
}
else if( sal_Int32(nNewScreen) < GetDisplay()->GetScreenCount() )
{
bool bVisible = bMapped_;
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
createNewWindow( None, nNewScreen );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
maGeometry.nScreenNumber = nNewScreen;
}
}
@@ -2210,7 +2210,7 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
nStyle_ |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
bool bVisible = bMapped_;
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
maGeometry.nX = aRect.Left();
maGeometry.nY = aRect.Top();
maGeometry.nWidth = aRect.GetWidth();
@@ -2223,7 +2223,7 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
else
GetDisplay()->getWMAdaptor()->showFullScreen( this, true );
if( bVisible )
- Show(TRUE);
+ Show(sal_True);
}
else
@@ -2234,14 +2234,14 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
Rectangle aRect = maRestorePosSize;
maRestorePosSize = Rectangle();
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
createNewWindow( None, m_nScreen );
if( !aRect.IsEmpty() )
SetPosSize( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(),
SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y |
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
}
}
else
@@ -2254,12 +2254,12 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
if( mbFullScreen )
pDisplay_->getWMAdaptor()->showFullScreen( this, false );
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
createNewWindow( None, nScreen );
if( mbFullScreen )
pDisplay_->getWMAdaptor()->showFullScreen( this, true );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
}
if( mbFullScreen == (bool)bFullScreen )
return;
@@ -2344,7 +2344,7 @@ MessageToXAutoLock( Display *p_display, int n_message )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::StartPresentation( BOOL bStart )
+void X11SalFrame::StartPresentation( sal_Bool bStart )
{
I18NStatus::get().show( !bStart, I18NStatus::presentation );
if ( bStart )
@@ -2362,7 +2362,7 @@ void X11SalFrame::StartPresentation( BOOL bStart )
static bool DPMSExtensionAvailable =
#ifndef SOLARIS
(DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0);
- static XLIB_BOOL DPMSEnabled = false;
+ static BOOL DPMSEnabled = false;
#else
false;
bool DPMSEnabled = false;
@@ -2544,7 +2544,7 @@ X11SalFrame::HandleExtTextEvent (XClientMessageEvent *pEvent)
BOOL X11SalFrame::PostEvent( void *pData )
{
GetDisplay()->SendInternalEvent( this, pData );
- return TRUE;
+ return sal_True;
}
// Title
@@ -2616,7 +2616,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext )
// -----------------------------------------------------------------------
-void X11SalFrame::EndExtTextInput( USHORT nFlags )
+void X11SalFrame::EndExtTextInput( sal_uInt16 nFlags )
{
if (mpInputContext != NULL)
mpInputContext->EndExtTextInput( nFlags );
@@ -2624,12 +2624,12 @@ void X11SalFrame::EndExtTextInput( USHORT nFlags )
// -----------------------------------------------------------------------
-XubString X11SalFrame::GetKeyName( USHORT nKeyCode )
+XubString X11SalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
return GetDisplay()->GetKeyName( nKeyCode );
}
-XubString X11SalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode )
+XubString X11SalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode )
{
return GetKeyName( nKeyCode );
}
@@ -2637,7 +2637,7 @@ XubString X11SalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode )
BOOL X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
{
// not supported yet
- return FALSE;
+ return sal_False;
}
LanguageType X11SalFrame::GetInputLanguage()
@@ -2696,7 +2696,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
{
bool bWasVisible = bMapped_;
if( bWasVisible )
- Show( FALSE );
+ Show( sal_False );
if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() )
nScreen = m_nScreen;
@@ -2765,7 +2765,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
}
if( bWasVisible )
- Show( TRUE );
+ Show( sal_True );
std::list< X11SalFrame* > aChildren = maChildren;
for( std::list< X11SalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it )
@@ -2801,9 +2801,9 @@ void X11SalFrame::Beep( SoundType eSoundType ) // not fully suported
// Event Handling
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static USHORT sal_GetCode( int state )
+static sal_uInt16 sal_GetCode( int state )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
if( state & Button1Mask )
nCode |= MOUSE_LEFT;
@@ -2852,7 +2852,7 @@ SalFrame::SalPointerState X11SalFrame::GetPointerState()
long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
{
SalMouseEvent aMouseEvt;
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
bool bClosePopups = false;
if( nVisibleFloats && pEvent->type == EnterNotify )
@@ -2978,7 +2978,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
}
if( ! bInside )
{
- // need not take care of the XUngrabPointer in Show( FALSE )
+ // need not take care of the XUngrabPointer in Show( sal_False )
// because XUngrabPointer does not produce errors if pointer
// is not grabbed
XUngrabPointer( GetXDisplay(), CurrentTime );
@@ -3062,7 +3062,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
if( pEvent->type == ButtonRelease )
return 0;
- static ULONG nLines = 0;
+ static sal_uInt32 nLines = 0;
if( ! nLines )
{
char* pEnv = getenv( "SAL_WHEELLINES" );
@@ -3124,14 +3124,14 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
// in the independent part.
struct KeyAlternate
{
- USHORT nKeyCode;
+ sal_uInt16 nKeyCode;
sal_Unicode nCharCode;
KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {}
- KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
+ KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
inline KeyAlternate
-GetAlternateKeyCode( const USHORT nKeyCode )
+GetAlternateKeyCode( const sal_uInt16 nKeyCode )
{
KeyAlternate aAlternate;
@@ -3156,7 +3156,7 @@ void X11SalFrame::beginUnicodeSequence()
if( ! aDeleteWatch.isDeleted() )
{
- USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
+ sal_uInt16 nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
SalExtTextInputEvent aEv;
aEv.mnTime = 0;
aEv.maText = rSeq;
@@ -3164,7 +3164,7 @@ void X11SalFrame::beginUnicodeSequence()
aEv.mnCursorPos = 0;
aEv.mnDeltaStart = 0;
aEv.mnCursorFlags = 0;
- aEv.mbOnlyCursor = FALSE;
+ aEv.mbOnlyCursor = sal_False;
CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
}
@@ -3185,7 +3185,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
aBuf.append( rSeq );
aBuf.append( c );
rSeq = aBuf.makeStringAndClear();
- std::vector<USHORT> attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE );
+ std::vector<sal_uInt16> attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE );
SalExtTextInputEvent aEv;
aEv.mnTime = 0;
@@ -3194,7 +3194,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
aEv.mnCursorPos = 0;
aEv.mnDeltaStart = 0;
aEv.mnCursorFlags = 0;
- aEv.mbOnlyCursor = FALSE;
+ aEv.mbOnlyCursor = sal_False;
CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
bRet = true;
@@ -3219,7 +3219,7 @@ bool X11SalFrame::endUnicodeSequence()
sal_Int32 nValue = aNumbers.toInt32( 16 );
if( nValue >= 32 )
{
- USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
+ sal_uInt16 nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
SalExtTextInputEvent aEv;
aEv.mnTime = 0;
aEv.maText = rtl::OUString( sal_Unicode(nValue) );
@@ -3227,7 +3227,7 @@ bool X11SalFrame::endUnicodeSequence()
aEv.mnCursorPos = 0;
aEv.mnDeltaStart = 0;
aEv.mnCursorFlags = 0;
- aEv.mbOnlyCursor = FALSE;
+ aEv.mbOnlyCursor = sal_False;
CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
}
}
@@ -3272,8 +3272,8 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
}
SalKeyEvent aKeyEvt;
- USHORT nKeyCode;
- USHORT nModCode = 0;
+ sal_uInt16 nKeyCode;
+ sal_uInt16 nModCode = 0;
char aDummy;
if( pEvent->state & ShiftMask )
@@ -3306,8 +3306,8 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
// the event state does not contain ControlMask. In the release
// event its the other way round: it does contain the Control mask.
// The modifier mode therefore has to be adapted manually.
- USHORT nExtModMask = 0;
- USHORT nModMask = 0;
+ sal_uInt16 nExtModMask = 0;
+ sal_uInt16 nModMask = 0;
switch( nKeySym )
{
case XK_Control_L:
@@ -3413,7 +3413,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if( nModCode == (KEY_SHIFT | KEY_MOD1) && pEvent->type == XLIB_KeyPress )
{
- USHORT nSeqKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy );
+ sal_uInt16 nSeqKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy );
if( nSeqKeyCode == KEY_U )
{
beginUnicodeSequence();
@@ -3600,7 +3600,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
if ((mpParent != NULL && nStyle_ == 0)
&& pSVData->maWinData.mpFirstFloat )
{
- ULONG nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
+ sal_uInt32 nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
pSVData->maWinData.mpFirstFloat->SetPopupModeFlags(
nMode & ~(FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE));
}
@@ -3623,7 +3623,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
{
XRectangle aRect = { 0, 0, 0, 0 };
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if( pEvent->type == Expose )
{
@@ -3845,8 +3845,8 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
hWM_Parent = GetShellWindow();
break;
}
- /* #107048# this sometimes happens if a Show(TRUE) is
- * immediately followed by Show(FALSE) (which is braindead anyway)
+ /* #107048# this sometimes happens if a Show(sal_True) is
+ * immediately followed by Show(sal_False) (which is braindead anyway)
*/
if( hDummy == hWM_Parent )
hDummy = hRoot;
@@ -4192,7 +4192,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
if( -1 == nCaptured_ )
{
- CaptureMouse( TRUE );
+ CaptureMouse( sal_True );
#ifdef DBG_UTIL
if( -1 != nCaptured_ )
pDisplay_->PrintEvent( "Captured", pEvent );
@@ -4263,9 +4263,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
XUnmapWindow( GetXDisplay(), GetShellWindow() );
break;
}
- bMapped_ = TRUE;
- bViewable_ = TRUE;
- nRet = TRUE;
+ bMapped_ = sal_True;
+ bViewable_ = sal_True;
+ nRet = sal_True;
if ( mpInputContext != NULL )
mpInputContext->Map( this );
CallCallback( SALEVENT_RESIZE, NULL );
@@ -4353,7 +4353,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
RestackChildren();
- mbInShow = FALSE;
+ mbInShow = sal_False;
m_bSetFocusOnMap = false;
}
break;
@@ -4361,9 +4361,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
case UnmapNotify:
if( pEvent->xunmap.window == GetShellWindow() )
{
- bMapped_ = FALSE;
- bViewable_ = FALSE;
- nRet = TRUE;
+ bMapped_ = sal_False;
+ bViewable_ = sal_False;
+ nRet = sal_True;
if ( mpInputContext != NULL )
mpInputContext->Unmap( this );
CallCallback( SALEVENT_RESIZE, NULL );
@@ -4378,7 +4378,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
case VisibilityNotify:
nVisibility_ = pEvent->xvisibility.state;
- nRet = TRUE;
+ nRet = sal_True;
if( bAlwaysOnTop_
&& bMapped_
&& ! GetDisplay()->getWMAdaptor()->isAlwaysOnTopOK()
@@ -4477,7 +4477,7 @@ void X11SalFrame::ResetClipRegion()
op, ordering );
}
-void X11SalFrame::BeginSetClipRegion( ULONG nRects )
+void X11SalFrame::BeginSetClipRegion( sal_uInt32 nRects )
{
if( m_pClipRectangles )
delete [] m_pClipRectangles;
diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
index 2ff6d05c35c6..730eab142415 100644
--- a/vcl/unx/source/window/salobj.cxx
+++ b/vcl/unx/source/window/salobj.cxx
@@ -55,12 +55,12 @@
// =======================================================================
// SalInstance member to create and destroy a SalObject
-SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow )
+SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow )
{
return X11SalObject::CreateObject( pParent, pWindowData, bShow );
}
-X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow )
+X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow )
{
int error_base, event_base;
X11SalObject* pObject = new X11SalObject();
@@ -152,7 +152,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pVisual,
CWEventMask|CWColormap, &aAttribs );
XSync( pDisp, False );
- BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
+ sal_Bool bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
pSalDisp->GetXLib()->PopXErrorLevel();
if( bWasXError )
{
@@ -179,7 +179,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pObjData->pAppContext = NULL;
XSync(pDisp, False);
- BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
+ sal_Bool bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
pSalDisp->GetXLib()->PopXErrorLevel();
if( bWasXError )
{
@@ -219,7 +219,7 @@ SalClipRegion::~SalClipRegion()
void
-SalClipRegion::BeginSetClipRegion( ULONG nRects )
+SalClipRegion::BeginSetClipRegion( sal_uInt32 nRects )
{
if (ClipRectangleList)
delete [] ClipRectangleList;
@@ -324,7 +324,7 @@ X11SalObject::ResetClipRegion()
void
-X11SalObject::BeginSetClipRegion( ULONG nRectCount )
+X11SalObject::BeginSetClipRegion( sal_uInt32 nRectCount )
{
maClipRegion.BeginSetClipRegion ( nRectCount );
}
@@ -375,7 +375,7 @@ X11SalObject::EndSetClipRegion()
}
-USHORT
+sal_uInt16
X11SalObject::GetClipRegionType()
{
return maClipRegion.GetClipRegionType();
@@ -399,7 +399,7 @@ X11SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
void
-X11SalObject::Show( BOOL bVisible )
+X11SalObject::Show( sal_Bool bVisible )
{
if ( ! maSystemChildData.aWindow )
return;
@@ -420,7 +420,7 @@ X11SalObject::Show( BOOL bVisible )
// -----------------------------------------------------------------------
-void X11SalObject::Enable( BOOL )
+void X11SalObject::Enable( sal_Bool )
{
}
@@ -454,9 +454,9 @@ const SystemChildData* X11SalObject::GetSystemData() const
return &maSystemChildData;
}
-static USHORT sal_GetCode( int state )
+static sal_uInt16 sal_GetCode( int state )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
if( state & Button1Mask )
nCode |= MOUSE_LEFT;
@@ -512,7 +512,7 @@ long X11SalObject::Dispatch( XEvent* pEvent )
aEvt.mnTime = pEvent->xbutton.time;
aEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
aEvt.mnButton = 0;
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
if( pEvent->type == ButtonPress ||
pEvent->type == ButtonRelease )
{
@@ -537,10 +537,10 @@ long X11SalObject::Dispatch( XEvent* pEvent )
switch( pEvent->type )
{
case UnmapNotify:
- pObject->mbVisible = FALSE;
+ pObject->mbVisible = sal_False;
return 1;
case MapNotify:
- pObject->mbVisible = TRUE;
+ pObject->mbVisible = sal_True;
return 1;
case ButtonPress:
pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL );