diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-01-07 18:24:18 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-01-07 18:24:18 +0100 |
commit | 68f2d13c9f1698eb45c4a1b341d1cac7c7526929 (patch) | |
tree | 7410ec5fba02e438b18e68ca5aa78f2fa3f26ef0 /vcl/unx/source/app | |
parent | 39ad2ff73a9700be25064169bc8bd85001ab959c (diff) |
removetooltypes: #i112600# Adapt Unix part for removed tool types
Diffstat (limited to 'vcl/unx/source/app')
-rw-r--r-- | vcl/unx/source/app/i18n_cb.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/source/app/i18n_ic.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/source/app/i18n_status.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/source/app/keysymnames.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/source/app/saldata.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/source/app/saldisp.cxx | 136 | ||||
-rw-r--r-- | vcl/unx/source/app/salinst.cxx | 28 | ||||
-rw-r--r-- | vcl/unx/source/app/salsys.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/source/app/saltimer.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/source/app/sm.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/source/app/soicon.cxx | 14 |
11 files changed, 113 insertions, 113 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; } |