diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-09-29 15:46:40 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-09-29 15:46:40 +0800 |
commit | 94ff531ca59a495547530f5c080d8e04e1f34ace (patch) | |
tree | 50597c12e13de7688d1eb42a7bb72e5fbd25f3eb /vcl/source/window | |
parent | af9614943d37f8e7c6a068cde7497dd7f6248451 (diff) |
removetooltypes: #i112600# some more changes in vcl and tools, reverted config strings in l10ntools and rsc
Diffstat (limited to 'vcl/source/window')
38 files changed, 3702 insertions, 3702 deletions
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 3018236fff1a..31f2fe4dce67 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -46,7 +46,7 @@ DECLARE_TABLE( ImplAccelTable, ImplAccelEntry* ) DECLARE_LIST( ImplAccelList, ImplAccelEntry* ) -#define ACCELENTRY_NOTFOUND ((USHORT)0xFFFF) +#define ACCELENTRY_NOTFOUND ((sal_uInt16)0xFFFF) // ======================================================================= @@ -63,14 +63,14 @@ DBG_NAME( Accelerator ) // ======================================================================= -USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId, - USHORT* pIndex = NULL ) +sal_uInt16 ImplAccelEntryGetIndex( ImplAccelList* pList, sal_uInt16 nId, + sal_uInt16* pIndex = NULL ) { - ULONG nLow; - ULONG nHigh; - ULONG nMid; - ULONG nCount = pList->Count(); - USHORT nCompareId; + sal_uIntPtr nLow; + sal_uIntPtr nHigh; + sal_uIntPtr nMid; + sal_uIntPtr nCount = pList->Count(); + sal_uInt16 nCompareId; // Abpruefen, ob der erste Key groesser als der Vergleichskey ist if ( !nCount || (nId < pList->GetObject( 0 )->mnId) ) @@ -94,7 +94,7 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId, if ( nId > nCompareId ) nLow = nMid + 1; else - return (USHORT)nMid; + return (sal_uInt16)nMid; } } while ( nLow <= nHigh ); @@ -102,9 +102,9 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId, if ( pIndex ) { if ( nId > nCompareId ) - *pIndex = (USHORT)(nMid+1); + *pIndex = (sal_uInt16)(nMid+1); else - *pIndex = (USHORT)nMid; + *pIndex = (sal_uInt16)nMid; } return ACCELENTRY_NOTFOUND; @@ -114,8 +114,8 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId, static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry ) { - USHORT nInsIndex; - USHORT nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex ); + sal_uInt16 nInsIndex; + sal_uInt16 nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex ); if ( nIndex != ACCELENTRY_NOTFOUND ) { @@ -128,17 +128,17 @@ static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry ) } while ( nIndex < pList->Count() ); - pList->Insert( pEntry, (ULONG)nIndex ); + pList->Insert( pEntry, (sal_uIntPtr)nIndex ); } else - pList->Insert( pEntry, (ULONG)nInsIndex ); + pList->Insert( pEntry, (sal_uIntPtr)nInsIndex ); } // ----------------------------------------------------------------------- -static USHORT ImplAccelEntryGetFirstPos( ImplAccelList* pList, USHORT nId ) +static sal_uInt16 ImplAccelEntryGetFirstPos( ImplAccelList* pList, sal_uInt16 nId ) { - USHORT nIndex = ImplAccelEntryGetIndex( pList, nId ); + sal_uInt16 nIndex = ImplAccelEntryGetIndex( pList, nId ); if ( nIndex != ACCELENTRY_NOTFOUND ) { while ( nIndex ) @@ -161,7 +161,7 @@ void Accelerator::ImplInit() { mnCurId = 0; mnCurRepeat = 0; - mbIsCancel = FALSE; + mbIsCancel = sal_False; mpDel = NULL; } @@ -191,7 +191,7 @@ void Accelerator::ImplCopyData( ImplAccelData& rAccelData ) else pEntry->mpAutoAccel = NULL; - mpData->maKeyTable.Insert( (ULONG)pEntry->maKeyCode.GetFullKeyCode(), pEntry ); + mpData->maKeyTable.Insert( (sal_uIntPtr)pEntry->maKeyCode.GetFullKeyCode(), pEntry ); mpData->maIdList.Insert( pEntry, LIST_APPEND ); pEntry = rAccelData.maIdList.Next(); @@ -217,18 +217,18 @@ void Accelerator::ImplDeleteData() // ----------------------------------------------------------------------- -void Accelerator::ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode, - BOOL bEnable, Accelerator* pAutoAccel ) +void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, + sal_Bool bEnable, Accelerator* pAutoAccel ) { DBG_CHKTHIS( Accelerator, NULL ); DBG_ASSERT( nItemId, "Accelerator::InsertItem(): ItemId == 0" ); if ( rKeyCode.IsFunction() ) { - USHORT nCode1; - USHORT nCode2; - USHORT nCode3; - USHORT nCode4; + sal_uInt16 nCode1; + sal_uInt16 nCode2; + sal_uInt16 nCode3; + sal_uInt16 nCode4; ImplGetKeyCode( rKeyCode.GetFunction(), nCode1, nCode2, nCode3, nCode4 ); if ( nCode1 ) ImplInsertAccel( nItemId, KeyCode( nCode1, nCode1 ), bEnable, pAutoAccel ); @@ -256,7 +256,7 @@ void Accelerator::ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode, pEntry->mbEnabled = bEnable; // Ab in die Tabellen - ULONG nCode = rKeyCode.GetFullKeyCode(); + sal_uIntPtr nCode = rKeyCode.GetFullKeyCode(); if ( !nCode ) { DBG_ERROR( "Accelerator::InsertItem(): KeyCode with KeyCode 0 not allowed" ); @@ -315,9 +315,9 @@ void Accelerator::ImplLoadRes( const ResId& rResId ) GetRes( rResId ); maHelpStr = ReadStringRes(); - ULONG nObjFollows = ReadLongRes(); + sal_uIntPtr nObjFollows = ReadLongRes(); - for( ULONG i = 0; i < nObjFollows; i++ ) + for( sal_uIntPtr i = 0; i < nObjFollows; i++ ) { InsertItem( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) ); @@ -332,7 +332,7 @@ Accelerator::~Accelerator() // AccelManager benachrichtigen, das Accelrator geloescht wurde if ( mpDel ) - *mpDel = TRUE; + *mpDel = sal_True; ImplDeleteData(); delete mpData; @@ -361,9 +361,9 @@ void Accelerator::Select() // ----------------------------------------------------------------------- -void Accelerator::InsertItem( USHORT nItemId, const KeyCode& rKeyCode ) +void Accelerator::InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode ) { - ImplInsertAccel( nItemId, rKeyCode, TRUE, NULL ); + ImplInsertAccel( nItemId, rKeyCode, sal_True, NULL ); } // ----------------------------------------------------------------------- @@ -372,15 +372,15 @@ void Accelerator::InsertItem( const ResId& rResId ) { DBG_CHKTHIS( Accelerator, NULL ); - ULONG nObjMask; - USHORT nAccelKeyId; - USHORT bDisable; + sal_uIntPtr nObjMask; + sal_uInt16 nAccelKeyId; + sal_uInt16 bDisable; KeyCode aKeyCode; Accelerator* pAutoAccel = NULL; GetRes( rResId.SetRT( RSC_ACCELITEM ) ); nObjMask = ReadLongRes(); - nAccelKeyId = sal::static_int_cast<USHORT>(ReadLongRes()); + nAccelKeyId = sal::static_int_cast<sal_uInt16>(ReadLongRes()); bDisable = ReadShortRes(); if ( nObjMask & ACCELITEM_KEY ) @@ -403,22 +403,22 @@ void Accelerator::InsertItem( const ResId& rResId ) // ----------------------------------------------------------------------- -void Accelerator::RemoveItem( USHORT nItemId ) +void Accelerator::RemoveItem( sal_uInt16 nItemId ) { DBG_CHKTHIS( Accelerator, NULL ); // Aus der Id-Liste entfernen - USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); + sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); if ( nIndex != ACCELENTRY_NOTFOUND ) { - USHORT nItemCount = GetItemCount(); + sal_uInt16 nItemCount = GetItemCount(); do { - ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nIndex ); + ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nIndex ); if ( pEntry && pEntry->mnId == nItemId ) { mpData->maKeyTable.Remove( pEntry->maKeyCode.GetFullKeyCode() ); - mpData->maIdList.Remove( (ULONG)nIndex ); + mpData->maIdList.Remove( (sal_uIntPtr)nIndex ); // AutoResAccel zerstoeren if ( pEntry->mpAutoAccel ) @@ -443,18 +443,18 @@ void Accelerator::RemoveItem( const KeyCode rKeyCode ) if ( pEntry ) { // Aus der Id-Liste entfernen - USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), pEntry->mnId ); - USHORT nItemCount = GetItemCount(); + sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), pEntry->mnId ); + sal_uInt16 nItemCount = GetItemCount(); do { - if ( mpData->maIdList.GetObject( (ULONG)nIndex ) == pEntry ) + if ( mpData->maIdList.GetObject( (sal_uIntPtr)nIndex ) == pEntry ) break; nIndex++; } while ( nIndex < nItemCount ); mpData->maKeyTable.Remove( rKeyCode.GetFullKeyCode() ); - mpData->maIdList.Remove( (ULONG)nIndex ); + mpData->maIdList.Remove( (sal_uIntPtr)nIndex ); // AutoResAccel zerstoeren if ( pEntry->mpAutoAccel ) @@ -477,20 +477,20 @@ void Accelerator::Clear() // ----------------------------------------------------------------------- -USHORT Accelerator::GetItemCount() const +sal_uInt16 Accelerator::GetItemCount() const { DBG_CHKTHIS( Accelerator, NULL ); - return (USHORT)mpData->maIdList.Count(); + return (sal_uInt16)mpData->maIdList.Count(); } // ----------------------------------------------------------------------- -USHORT Accelerator::GetItemId( USHORT nPos ) const +sal_uInt16 Accelerator::GetItemId( sal_uInt16 nPos ) const { DBG_CHKTHIS( Accelerator, NULL ); - ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nPos ); + ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nPos ); if ( pEntry ) return pEntry->mnId; else @@ -499,11 +499,11 @@ USHORT Accelerator::GetItemId( USHORT nPos ) const // ----------------------------------------------------------------------- -KeyCode Accelerator::GetItemKeyCode( USHORT nPos ) const +KeyCode Accelerator::GetItemKeyCode( sal_uInt16 nPos ) const { DBG_CHKTHIS( Accelerator, NULL ); - ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nPos ); + ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nPos ); if ( pEntry ) return pEntry->maKeyCode; else @@ -512,7 +512,7 @@ KeyCode Accelerator::GetItemKeyCode( USHORT nPos ) const // ----------------------------------------------------------------------- -USHORT Accelerator::GetItemId( const KeyCode& rKeyCode ) const +sal_uInt16 Accelerator::GetItemId( const KeyCode& rKeyCode ) const { DBG_CHKTHIS( Accelerator, NULL ); @@ -525,30 +525,30 @@ USHORT Accelerator::GetItemId( const KeyCode& rKeyCode ) const // ----------------------------------------------------------------------- -KeyCode Accelerator::GetKeyCode( USHORT nItemId ) const +KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const { DBG_CHKTHIS( Accelerator, NULL ); - USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); + sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); if ( nIndex != ACCELENTRY_NOTFOUND ) - return mpData->maIdList.GetObject( (ULONG)nIndex )->maKeyCode; + return mpData->maIdList.GetObject( (sal_uIntPtr)nIndex )->maKeyCode; else return KeyCode(); } // ----------------------------------------------------------------------- -BOOL Accelerator::IsIdValid( USHORT nItemId ) const +sal_Bool Accelerator::IsIdValid( sal_uInt16 nItemId ) const { DBG_CHKTHIS( Accelerator, NULL ); - USHORT nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId ); + sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId ); return (nIndex != ACCELENTRY_NOTFOUND); } // ----------------------------------------------------------------------- -BOOL Accelerator::IsKeyCodeValid( const KeyCode rKeyCode ) const +sal_Bool Accelerator::IsKeyCodeValid( const KeyCode rKeyCode ) const { DBG_CHKTHIS( Accelerator, NULL ); @@ -558,7 +558,7 @@ BOOL Accelerator::IsKeyCodeValid( const KeyCode rKeyCode ) const // ----------------------------------------------------------------------- -BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat ) +sal_Bool Accelerator::Call( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) { DBG_CHKTHIS( Accelerator, NULL ); @@ -567,7 +567,7 @@ BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat ) { if ( pEntry->mbEnabled ) { - BOOL bDel = FALSE; + sal_Bool bDel = sal_False; mnCurId = pEntry->mnId; maCurKeyCode = rKeyCode; mnCurRepeat = nRepeat; @@ -580,26 +580,26 @@ BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat ) mnCurRepeat = 0; } - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void Accelerator::SetAccel( USHORT nItemId, Accelerator* pAccel ) +void Accelerator::SetAccel( sal_uInt16 nItemId, Accelerator* pAccel ) { DBG_CHKTHIS( Accelerator, NULL ); - USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); + sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); if ( nIndex != ACCELENTRY_NOTFOUND ) { - USHORT nItemCount = GetItemCount(); + sal_uInt16 nItemCount = GetItemCount(); do { - ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nIndex ); + ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nIndex ); if ( pEntry->mnId != nItemId ) break; @@ -612,13 +612,13 @@ void Accelerator::SetAccel( USHORT nItemId, Accelerator* pAccel ) // ----------------------------------------------------------------------- -Accelerator* Accelerator::GetAccel( USHORT nItemId ) const +Accelerator* Accelerator::GetAccel( sal_uInt16 nItemId ) const { DBG_CHKTHIS( Accelerator, NULL ); - USHORT nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId ); + sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId ); if ( nIndex != ACCELENTRY_NOTFOUND ) - return mpData->maIdList.GetObject( (ULONG)nIndex )->mpAccel; + return mpData->maIdList.GetObject( (sal_uIntPtr)nIndex )->mpAccel; else return NULL; } @@ -644,22 +644,22 @@ Accelerator* Accelerator::GetAccel( const KeyCode rKeyCode ) const if ( pEntry ) return pEntry->mpAccel; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void Accelerator::EnableItem( USHORT nItemId, BOOL bEnable ) +void Accelerator::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable ) { DBG_CHKTHIS( Accelerator, NULL ); - USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); + sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId ); if ( nIndex != ACCELENTRY_NOTFOUND ) { - USHORT nItemCount = GetItemCount(); + sal_uInt16 nItemCount = GetItemCount(); do { - ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nIndex ); + ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nIndex ); if ( pEntry->mnId != nItemId ) break; @@ -672,20 +672,20 @@ void Accelerator::EnableItem( USHORT nItemId, BOOL bEnable ) // ----------------------------------------------------------------------- -BOOL Accelerator::IsItemEnabled( USHORT nItemId ) const +sal_Bool Accelerator::IsItemEnabled( sal_uInt16 nItemId ) const { DBG_CHKTHIS( Accelerator, NULL ); - USHORT nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId ); + sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId ); if ( nIndex != ACCELENTRY_NOTFOUND ) - return mpData->maIdList.GetObject( (ULONG)nIndex )->mbEnabled; + return mpData->maIdList.GetObject( (sal_uIntPtr)nIndex )->mbEnabled; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void Accelerator::EnableItem( const KeyCode rKeyCode, BOOL bEnable ) +void Accelerator::EnableItem( const KeyCode rKeyCode, sal_Bool bEnable ) { DBG_CHKTHIS( Accelerator, NULL ); @@ -696,7 +696,7 @@ void Accelerator::EnableItem( const KeyCode rKeyCode, BOOL bEnable ) // ----------------------------------------------------------------------- -BOOL Accelerator::IsItemEnabled( const KeyCode rKeyCode ) const +sal_Bool Accelerator::IsItemEnabled( const KeyCode rKeyCode ) const { DBG_CHKTHIS( Accelerator, NULL ); @@ -704,7 +704,7 @@ BOOL Accelerator::IsItemEnabled( const KeyCode rKeyCode ) const if ( pEntry ) return pEntry->mbEnabled; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -719,7 +719,7 @@ Accelerator& Accelerator::operator=( const Accelerator& rAccel ) maCurKeyCode = KeyCode(); mnCurId = 0; mnCurRepeat = 0; - mbIsCancel = FALSE; + mbIsCancel = sal_False; // Tabellen loeschen und kopieren ImplDeleteData(); diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx index 81699bcaabb0..ea9407eaa136 100644 --- a/vcl/source/window/accmgr.cxx +++ b/vcl/source/window/accmgr.cxx @@ -55,7 +55,7 @@ ImplAccelManager::~ImplAccelManager() // ----------------------------------------------------------------------- -BOOL ImplAccelManager::InsertAccel( Accelerator* pAccel ) +sal_Bool ImplAccelManager::InsertAccel( Accelerator* pAccel ) { if ( !mpAccelList ) mpAccelList = new ImplAccelList; @@ -63,13 +63,13 @@ BOOL ImplAccelManager::InsertAccel( Accelerator* pAccel ) { // Gibts den schon ? if ( mpAccelList->GetPos( pAccel ) != LIST_ENTRY_NOTFOUND ) - return FALSE; + return sal_False; } // Am Anfang der Liste einfuegen - mpAccelList->Insert( pAccel, (ULONG)0 ); + mpAccelList->Insert( pAccel, (sal_uIntPtr)0 ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -86,7 +86,7 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel ) //sequence list, throw away the entire sequence if ( mpSequenceList ) { - for (USHORT i = 0; i < pAccel->GetItemCount(); ++i) + for (sal_uInt16 i = 0; i < pAccel->GetItemCount(); ++i) { Accelerator* pSubAccel = pAccel->GetAccel(pAccel->GetItemId(i)); if ( mpSequenceList->GetPos( pSubAccel ) != LIST_ENTRY_NOTFOUND ) @@ -103,7 +103,7 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel ) // ----------------------------------------------------------------------- -void ImplAccelManager::EndSequence( BOOL bCancel ) +void ImplAccelManager::EndSequence( sal_Bool bCancel ) { // Sind wir ueberhaupt in einer Sequenz ? if ( !mpSequenceList ) @@ -113,13 +113,13 @@ void ImplAccelManager::EndSequence( BOOL bCancel ) Accelerator* pTempAccel = mpSequenceList->First(); while( pTempAccel ) { - BOOL bDel = FALSE; + sal_Bool bDel = sal_False; pTempAccel->mbIsCancel = bCancel; pTempAccel->mpDel = &bDel; pTempAccel->Deactivate(); if ( !bDel ) { - pTempAccel->mbIsCancel = FALSE; + pTempAccel->mbIsCancel = sal_False; pTempAccel->mpDel = NULL; } @@ -133,15 +133,15 @@ void ImplAccelManager::EndSequence( BOOL bCancel ) // ----------------------------------------------------------------------- -BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) +sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) { Accelerator* pAccel; // Haben wir ueberhaupt Acceleratoren ?? if ( !mpAccelList ) - return FALSE; + return sal_False; if ( !mpAccelList->Count() ) - return FALSE; + return sal_False; // Sind wir in einer Sequenz ? if ( mpSequenceList ) @@ -154,7 +154,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) { // Sequenz abbrechen FlushAccel(); - return FALSE; + return sal_False; } // Ist der Eintrag da drin ? @@ -168,11 +168,11 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) { DBG_CHKOBJ( pNextAccel, Accelerator, NULL ); - mpSequenceList->Insert( pNextAccel, (ULONG)0 ); + mpSequenceList->Insert( pNextAccel, (sal_uIntPtr)0 ); // Activate-Handler vom Neuen rufen pNextAccel->Activate(); - return TRUE; + return sal_True; } else { @@ -184,7 +184,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) // Dem Accelerator das aktuelle Item setzen // und Handler rufen - BOOL bDel = FALSE; + sal_Bool bDel = sal_False; pAccel->maCurKeyCode = rKeyCode; pAccel->mnCurId = pEntry->mnId; pAccel->mnCurRepeat = nRepeat; @@ -201,14 +201,14 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) pAccel->mpDel = NULL; } - return TRUE; + return sal_True; } else { // Sequenz abbrechen, weil Acceleraor disabled // Taste wird weitergeleitet (ans System) FlushAccel(); - return FALSE; + return sal_False; } } } @@ -216,7 +216,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) { // Sequenz abbrechen wegen falscher Taste FlushAccel(); - return FALSE; + return sal_False; } } @@ -239,13 +239,13 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) // Sequenz-Liste erzeugen mpSequenceList = new ImplAccelList; - mpSequenceList->Insert( pAccel, (ULONG)0 ); - mpSequenceList->Insert( pNextAccel, (ULONG)0 ); + mpSequenceList->Insert( pAccel, (sal_uIntPtr)0 ); + mpSequenceList->Insert( pNextAccel, (sal_uIntPtr)0 ); // Activate-Handler vom Neuen rufen pNextAccel->Activate(); - return TRUE; + return sal_True; } else { @@ -258,7 +258,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) // Dem Accelerator das aktuelle Item setzen // und Handler rufen - BOOL bDel = FALSE; + sal_Bool bDel = sal_False; pAccel->maCurKeyCode = rKeyCode; pAccel->mnCurId = pEntry->mnId; pAccel->mnCurRepeat = nRepeat; @@ -275,10 +275,10 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) pAccel->mpDel = NULL; } - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } } @@ -286,5 +286,5 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ) pAccel = mpAccelList->Next(); } - return FALSE; + return sal_False; } diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 8eedf76043da..2cd24857c156 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -54,7 +54,7 @@ using namespace ::com::sun::star::uno; // ======================================================================= -static void ImplGetPinImage( USHORT nStyle, BOOL bPinIn, Image& rImage ) +static void ImplGetPinImage( sal_uInt16 nStyle, sal_Bool bPinIn, Image& rImage ) { // ImageListe laden, wenn noch nicht vorhanden ImplSVData* pSVData = ImplGetSVData(); @@ -72,7 +72,7 @@ static void ImplGetPinImage( USHORT nStyle, BOOL bPinIn, Image& rImage ) } // Image ermitteln und zurueckgeben - USHORT nId; + sal_uInt16 nId; if ( nStyle & BUTTON_DRAW_PRESSED ) { if ( bPinIn ) @@ -127,9 +127,9 @@ static void ImplDrawBrdWinSymbol( OutputDevice* pDev, static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev, const Rectangle& rRect, - SymbolType eSymbol, USHORT nState ) + SymbolType eSymbol, sal_uInt16 nState ) { - BOOL bMouseOver = (nState & BUTTON_DRAW_HIGHLIGHT) != 0; + sal_Bool bMouseOver = (nState & BUTTON_DRAW_HIGHLIGHT) != 0; nState &= ~BUTTON_DRAW_HIGHLIGHT; Rectangle aTempRect; @@ -142,8 +142,8 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev, pWin->SetFillColor( pDev->GetSettings().GetStyleSettings().GetWindowColor() ); pWin->SetLineColor(); pWin->DrawRect( rRect ); - pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? TRUE : FALSE, - TRUE, FALSE ); + pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? sal_True : sal_False, + sal_True, sal_False ); } aTempRect = rRect; aTempRect.nLeft+=3; @@ -172,23 +172,23 @@ ImplBorderWindowView::~ImplBorderWindowView() // ----------------------------------------------------------------------- -BOOL ImplBorderWindowView::MouseMove( const MouseEvent& ) +sal_Bool ImplBorderWindowView::MouseMove( const MouseEvent& ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ImplBorderWindowView::MouseButtonDown( const MouseEvent& ) +sal_Bool ImplBorderWindowView::MouseButtonDown( const MouseEvent& ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ImplBorderWindowView::Tracking( const TrackingEvent& ) +sal_Bool ImplBorderWindowView::Tracking( const TrackingEvent& ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -243,7 +243,7 @@ void ImplBorderWindowView::ImplInitTitle( ImplBorderFrameData* pData ) // ----------------------------------------------------------------------- -USHORT ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const Point& rPos ) +sal_uInt16 ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const Point& rPos ) { ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; @@ -322,15 +322,15 @@ USHORT ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const Poin // ----------------------------------------------------------------------- -BOOL ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) +sal_Bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) { - USHORT oldCloseState = pData->mnCloseState; - USHORT oldMenuState = pData->mnMenuState; + sal_uInt16 oldCloseState = pData->mnCloseState; + sal_uInt16 oldMenuState = pData->mnMenuState; pData->mnCloseState &= ~BUTTON_DRAW_HIGHLIGHT; pData->mnMenuState &= ~BUTTON_DRAW_HIGHLIGHT; Point aMousePos = rMEvt.GetPosPixel(); - USHORT nHitTest = ImplHitTest( pData, aMousePos ); + sal_uInt16 nHitTest = ImplHitTest( pData, aMousePos ); PointerStyle ePtrStyle = POINTER_ARROW; if ( nHitTest & BORDERWINDOW_HITTEST_LEFT ) ePtrStyle = POINTER_WINDOW_WSIZE; @@ -359,12 +359,12 @@ BOOL ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous if( pData->mnMenuState != oldMenuState ) pData->mpBorderWindow->Invalidate( pData->maMenuRect ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) +sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) { ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; @@ -372,11 +372,11 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons { pData->maMouseOff = rMEvt.GetPosPixel(); pData->mnHitTest = ImplHitTest( pData, pData->maMouseOff ); - USHORT nDragFullTest = 0; + sal_uInt16 nDragFullTest = 0; if ( pData->mnHitTest ) { - BOOL bTracking = TRUE; - BOOL bHitTest = TRUE; + sal_Bool bTracking = sal_True; + sal_Bool bHitTest = sal_True; if ( pData->mnHitTest & BORDERWINDOW_HITTEST_CLOSE ) { @@ -441,18 +441,18 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons } else { - bTracking = FALSE; + bTracking = sal_False; if ( (pData->mnHitTest & BORDERWINDOW_DRAW_TITLE) && ((rMEvt.GetClicks() % 2) == 0) ) { pData->mnHitTest = 0; - bHitTest = FALSE; + bHitTest = sal_False; if ( pBorderWindow->ImplGetClientWindow()->IsSystemWindow() ) { SystemWindow* pClientWindow = (SystemWindow*)(pBorderWindow->ImplGetClientWindow()); - if ( TRUE /*pBorderWindow->mbDockBtn*/ ) // always perform docking on double click, no button required + if ( sal_True /*pBorderWindow->mbDockBtn*/ ) // always perform docking on double click, no button required pClientWindow->TitleButtonClick( TITLE_BUTTON_DOCKING ); else if ( pBorderWindow->GetStyle() & WB_ROLLABLE ) { @@ -469,9 +469,9 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons if ( bTracking ) { - pData->mbDragFull = FALSE; + pData->mbDragFull = sal_False; if ( nDragFullTest ) - pData->mbDragFull = TRUE; // always fulldrag for proper docking, ignore system settings + pData->mbDragFull = sal_True; // always fulldrag for proper docking, ignore system settings pBorderWindow->StartTracking(); } else if ( bHitTest ) @@ -479,18 +479,18 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ) +sal_Bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ) { ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; if ( rTEvt.IsTrackingEnded() ) { - USHORT nHitTest = pData->mnHitTest; + sal_uInt16 nHitTest = pData->mnHitTest; pData->mnHitTest = 0; if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE ) @@ -932,7 +932,7 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -941,9 +941,9 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect ) { - USHORT nHelpId = 0; + sal_uInt16 nHelpId = 0; String aHelpStr; - USHORT nHitTest = ImplHitTest( pData, rPos ); + sal_uInt16 nHitTest = ImplHitTest( pData, rPos ); if ( nHitTest ) { if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE ) @@ -1063,7 +1063,7 @@ long ImplNoBorderWindowView::CalcTitleWidth() const // ----------------------------------------------------------------------- -void ImplNoBorderWindowView::DrawWindow( USHORT, OutputDevice*, const Point* ) +void ImplNoBorderWindowView::DrawWindow( sal_uInt16, OutputDevice*, const Point* ) { } @@ -1089,7 +1089,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei mnHeight = nHeight; mbNWFBorder = false; - USHORT nBorderStyle = mpBorderWindow->GetBorderStyle(); + sal_uInt16 nBorderStyle = mpBorderWindow->GetBorderStyle(); if ( nBorderStyle & WINDOW_BORDER_NOBORDER ) { mnLeftBorder = 0; @@ -1167,16 +1167,16 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei if( mnWidth && mnHeight ) { - mpBorderWindow->SetPaintTransparent( TRUE ); + mpBorderWindow->SetPaintTransparent( sal_True ); mpBorderWindow->SetBackground(); - pCtrl->SetPaintTransparent( TRUE ); + pCtrl->SetPaintTransparent( sal_True ); Window* pCompoundParent = NULL; if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() ) pCompoundParent = pWin->GetParent(); if( pCompoundParent ) - pCompoundParent->SetPaintTransparent( TRUE ); + pCompoundParent->SetPaintTransparent( sal_True ); if( mnWidth < aBounds.GetWidth() || mnHeight < aBounds.GetHeight() ) { @@ -1199,7 +1199,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei if( ! mbNWFBorder ) { - USHORT nStyle = FRAME_DRAW_NODRAW; + sal_uInt16 nStyle = FRAME_DRAW_NODRAW; // Wenn Border umgesetzt wurde oder BorderWindow ein Frame-Fenster // ist, dann Border nach aussen if ( (nBorderStyle & WINDOW_BORDER_DOUBLEOUT) || mpBorderWindow->mbSmallOutBorder ) @@ -1240,13 +1240,13 @@ long ImplSmallBorderWindowView::CalcTitleWidth() const // ----------------------------------------------------------------------- -void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, const Point* ) +void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*, const Point* ) { - USHORT nBorderStyle = mpBorderWindow->GetBorderStyle(); + sal_uInt16 nBorderStyle = mpBorderWindow->GetBorderStyle(); if ( nBorderStyle & WINDOW_BORDER_NOBORDER ) return; - BOOL bNativeOK = FALSE; + sal_Bool bNativeOK = sal_False; // for native widget drawing we must find out what // control this border belongs to Window *pWin = NULL, *pCtrl = NULL; @@ -1337,9 +1337,9 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co nState |= CTRL_STATE_FOCUSED; } - BOOL bMouseOver = FALSE; + sal_Bool bMouseOver = sal_False; Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD ); - while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == FALSE ) + while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == sal_False ) pCtrlChild = pCtrlChild->GetWindow( WINDOW_NEXT ); if( bMouseOver ) @@ -1385,7 +1385,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co } else { - USHORT nStyle = 0; + sal_uInt16 nStyle = 0; // Wenn Border umgesetzt wurde oder BorderWindow ein Frame-Fenster // ist, dann Border nach aussen if ( (nBorderStyle & WINDOW_BORDER_DOUBLEOUT) || mpBorderWindow->mbSmallOutBorder ) @@ -1417,7 +1417,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow ) { maFrameData.mpBorderWindow = pBorderWindow; - maFrameData.mbDragFull = FALSE; + maFrameData.mbDragFull = sal_False; maFrameData.mnHitTest = 0; maFrameData.mnPinState = 0; maFrameData.mnCloseState = 0; @@ -1444,21 +1444,21 @@ ImplStdBorderWindowView::~ImplStdBorderWindowView() // ----------------------------------------------------------------------- -BOOL ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt ) +sal_Bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt ) { return ImplMouseMove( &maFrameData, rMEvt ); } // ----------------------------------------------------------------------- -BOOL ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) { return ImplMouseButtonDown( &maFrameData, rMEvt ); } // ----------------------------------------------------------------------- -BOOL ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) +sal_Bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) { return ImplTracking( &maFrameData, rTEvt ); } @@ -1654,7 +1654,7 @@ long ImplStdBorderWindowView::CalcTitleWidth() const // ----------------------------------------------------------------------- -void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ) +void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ) { ImplBorderFrameData* pData = &maFrameData; OutputDevice* pDev = pOutDev ? pOutDev : pData->mpOutDev; @@ -1665,7 +1665,7 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD DecorationView aDecoView( pDev ); Color aFrameColor( rStyleSettings.GetFaceColor() ); - aFrameColor.DecreaseContrast( (UINT8) (0.50 * 255)); + aFrameColor.DecreaseContrast( (sal_uInt8) (0.50 * 255)); // Draw Frame if ( nDrawFlags & BORDERWINDOW_DRAW_FRAME ) @@ -1734,7 +1734,7 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD if ( pOffset ) aInRect.Move( pOffset->X(), pOffset->Y() ); - USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_CLIP; + sal_uInt16 nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_CLIP; // must show tooltip ? TextRectInfo aInfo; @@ -1824,14 +1824,14 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD // ======================================================================= void ImplBorderWindow::ImplInit( Window* pParent, - WinBits nStyle, USHORT nTypeStyle, + WinBits nStyle, sal_uInt16 nTypeStyle, const ::com::sun::star::uno::Any& ) { ImplInit( pParent, nStyle, nTypeStyle, NULL ); } void ImplBorderWindow::ImplInit( Window* pParent, - WinBits nStyle, USHORT nTypeStyle, + WinBits nStyle, sal_uInt16 nTypeStyle, SystemParentData* pSystemParentData ) { @@ -1842,44 +1842,44 @@ void ImplBorderWindow::ImplInit( Window* pParent, nTestStyle |= WB_APP; nStyle &= nTestStyle; - mpWindowImpl->mbBorderWin = TRUE; - mbSmallOutBorder = FALSE; + mpWindowImpl->mbBorderWin = sal_True; + mbSmallOutBorder = sal_False; if ( nTypeStyle & BORDERWINDOW_STYLE_FRAME ) { if( (nStyle & WB_SYSTEMCHILDWINDOW) ) { - mpWindowImpl->mbOverlapWin = TRUE; - mpWindowImpl->mbFrame = TRUE; - mbFrameBorder = FALSE; + mpWindowImpl->mbOverlapWin = sal_True; + mpWindowImpl->mbFrame = sal_True; + mbFrameBorder = sal_False; } else if( (nStyle & WB_OWNERDRAWDECORATION) ) { - mpWindowImpl->mbOverlapWin = TRUE; - mpWindowImpl->mbFrame = TRUE; - mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? FALSE : TRUE; + mpWindowImpl->mbOverlapWin = sal_True; + mpWindowImpl->mbFrame = sal_True; + mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? sal_False : sal_True; } else { - mpWindowImpl->mbOverlapWin = TRUE; - mpWindowImpl->mbFrame = TRUE; - mbFrameBorder = FALSE; + mpWindowImpl->mbOverlapWin = sal_True; + mpWindowImpl->mbFrame = sal_True; + mbFrameBorder = sal_False; // closeable windows may have a border as well, eg. system floating windows without caption if ( (nOrgStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE/* | WB_CLOSEABLE*/)) == WB_BORDER ) - mbSmallOutBorder = TRUE; + mbSmallOutBorder = sal_True; } } else if ( nTypeStyle & BORDERWINDOW_STYLE_OVERLAP ) { - mpWindowImpl->mbOverlapWin = TRUE; - mbFrameBorder = TRUE; + mpWindowImpl->mbOverlapWin = sal_True; + mbFrameBorder = sal_True; } else - mbFrameBorder = FALSE; + mbFrameBorder = sal_False; if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT ) - mbFloatWindow = TRUE; + mbFloatWindow = sal_True; else - mbFloatWindow = FALSE; + mbFloatWindow = sal_False; Window::ImplInit( pParent, nStyle, pSystemParentData ); SetBackground(); @@ -1892,13 +1892,13 @@ void ImplBorderWindow::ImplInit( Window* pParent, mnMaxHeight = SHRT_MAX; mnRollHeight = 0; mnOrgMenuHeight = 0; - mbPined = FALSE; - mbRollUp = FALSE; - mbMenuHide = FALSE; - mbDockBtn = FALSE; - mbMenuBtn = FALSE; - mbHideBtn = FALSE; - mbHelpBtn = FALSE; + mbPined = sal_False; + mbRollUp = sal_False; + mbMenuHide = sal_False; + mbDockBtn = sal_False; + mbMenuBtn = sal_False; + mbHideBtn = sal_False; + mbHelpBtn = sal_False; mbDisplayActive = IsActive(); if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT ) @@ -1913,7 +1913,7 @@ void ImplBorderWindow::ImplInit( Window* pParent, ImplBorderWindow::ImplBorderWindow( Window* pParent, SystemParentData* pSystemParentData, - WinBits nStyle, USHORT nTypeStyle + WinBits nStyle, sal_uInt16 nTypeStyle ) : Window( WINDOW_BORDERWINDOW ) { ImplInit( pParent, nStyle, nTypeStyle, pSystemParentData ); @@ -1922,14 +1922,14 @@ ImplBorderWindow::ImplBorderWindow( Window* pParent, // ----------------------------------------------------------------------- ImplBorderWindow::ImplBorderWindow( Window* pParent, WinBits nStyle , - USHORT nTypeStyle ) : + sal_uInt16 nTypeStyle ) : Window( WINDOW_BORDERWINDOW ) { ImplInit( pParent, nStyle, nTypeStyle, ::com::sun::star::uno::Any() ); } ImplBorderWindow::ImplBorderWindow( Window* pParent, - WinBits nStyle, USHORT nTypeStyle, + WinBits nStyle, sal_uInt16 nTypeStyle, const ::com::sun::star::uno::Any& aSystemToken ) : Window( WINDOW_BORDERWINDOW ) { @@ -1980,7 +1980,7 @@ void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Poin void ImplBorderWindow::Activate() { - SetDisplayActive( TRUE ); + SetDisplayActive( sal_True ); Window::Activate(); } @@ -1991,7 +1991,7 @@ void ImplBorderWindow::Deactivate() // Fenster die immer Active sind, nehmen wir von dieser Regel aus, // genauso, wenn ein Menu aktiv wird, ignorieren wir das Deactivate if ( GetActivateMode() && !ImplGetSVData()->maWinData.mbNoDeactivate ) - SetDisplayActive( FALSE ); + SetDisplayActive( sal_False ); Window::Deactivate(); } @@ -2105,7 +2105,7 @@ void ImplBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { if ( !mpWindowImpl->mbFrame || (GetStyle() & WB_OWNERDRAWDECORATION) ) - UpdateView( TRUE, ImplGetWindow()->GetOutputSizePixel() ); + UpdateView( sal_True, ImplGetWindow()->GetOutputSizePixel() ); } Window::DataChanged( rDCEvt ); @@ -2134,7 +2134,7 @@ void ImplBorderWindow::InitView() // ----------------------------------------------------------------------- -void ImplBorderWindow::UpdateView( BOOL bNewView, const Size& rNewOutSize ) +void ImplBorderWindow::UpdateView( sal_Bool bNewView, const Size& rNewOutSize ) { sal_Int32 nLeftBorder; sal_Int32 nTopBorder; @@ -2210,7 +2210,7 @@ void ImplBorderWindow::InvalidateBorder() // ----------------------------------------------------------------------- -void ImplBorderWindow::SetDisplayActive( BOOL bActive ) +void ImplBorderWindow::SetDisplayActive( sal_Bool bActive ) { if ( mbDisplayActive != bActive ) { @@ -2222,26 +2222,26 @@ void ImplBorderWindow::SetDisplayActive( BOOL bActive ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetTitleType( USHORT nTitleType, const Size& rSize ) +void ImplBorderWindow::SetTitleType( sal_uInt16 nTitleType, const Size& rSize ) { mnTitleType = nTitleType; - UpdateView( FALSE, rSize ); + UpdateView( sal_False, rSize ); } // ----------------------------------------------------------------------- -void ImplBorderWindow::SetBorderStyle( USHORT nStyle ) +void ImplBorderWindow::SetBorderStyle( sal_uInt16 nStyle ) { if ( !mbFrameBorder && (mnBorderStyle != nStyle) ) { mnBorderStyle = nStyle; - UpdateView( FALSE, ImplGetWindow()->GetOutputSizePixel() ); + UpdateView( sal_False, ImplGetWindow()->GetOutputSizePixel() ); } } // ----------------------------------------------------------------------- -void ImplBorderWindow::SetPin( BOOL bPin ) +void ImplBorderWindow::SetPin( sal_Bool bPin ) { mbPined = bPin; InvalidateBorder(); @@ -2249,11 +2249,11 @@ void ImplBorderWindow::SetPin( BOOL bPin ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetRollUp( BOOL bRollUp, const Size& rSize ) +void ImplBorderWindow::SetRollUp( sal_Bool bRollUp, const Size& rSize ) { mbRollUp = bRollUp; mnRollHeight = rSize.Height(); - UpdateView( FALSE, rSize ); + UpdateView( sal_False, rSize ); } // ----------------------------------------------------------------------- @@ -2268,7 +2268,7 @@ void ImplBorderWindow::SetCloser() // ----------------------------------------------------------------------- -void ImplBorderWindow::SetDockButton( BOOL bDockButton ) +void ImplBorderWindow::SetDockButton( sal_Bool bDockButton ) { mbDockBtn = bDockButton; Size aSize = GetOutputSizePixel(); @@ -2278,7 +2278,7 @@ void ImplBorderWindow::SetDockButton( BOOL bDockButton ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetHideButton( BOOL bHideButton ) +void ImplBorderWindow::SetHideButton( sal_Bool bHideButton ) { mbHideBtn = bHideButton; Size aSize = GetOutputSizePixel(); @@ -2288,7 +2288,7 @@ void ImplBorderWindow::SetHideButton( BOOL bHideButton ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetHelpButton( BOOL bHelpButton ) +void ImplBorderWindow::SetHelpButton( sal_Bool bHelpButton ) { mbHelpBtn = bHelpButton; Size aSize = GetOutputSizePixel(); @@ -2298,7 +2298,7 @@ void ImplBorderWindow::SetHelpButton( BOOL bHelpButton ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetMenuButton( BOOL bMenuButton ) +void ImplBorderWindow::SetMenuButton( sal_Bool bMenuButton ) { mbMenuBtn = bMenuButton; Size aSize = GetOutputSizePixel(); @@ -2325,7 +2325,7 @@ void ImplBorderWindow::SetMenuBarWindow( Window* pWindow ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetMenuBarMode( BOOL bHide ) +void ImplBorderWindow::SetMenuBarMode( sal_Bool bHide ) { mbMenuHide = bHide; UpdateMenuHeight(); diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index e835fe749ed1..4927505d7e4b 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -44,9 +44,9 @@ struct ImplBtnDlgItem { - USHORT mnId; - BOOL mbOwnButton; - BOOL mbDummyAlign; + sal_uInt16 mnId; + sal_Bool mbOwnButton; + sal_Bool mbDummyAlign; long mnSepSize; PushButton* mpPushButton; }; @@ -61,7 +61,7 @@ void ButtonDialog::ImplInitButtonDialogData() mnButtonSize = 0; mnCurButtonId = 0; mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND; - mbFormat = TRUE; + mbFormat = sal_True; } // ----------------------------------------------------------------------- @@ -110,7 +110,7 @@ ButtonDialog::~ButtonDialog() // ----------------------------------------------------------------------- -PushButton* ButtonDialog::ImplCreatePushButton( USHORT nBtnFlags ) +PushButton* ButtonDialog::ImplCreatePushButton( sal_uInt16 nBtnFlags ) { PushButton* pBtn; WinBits nStyle = 0; @@ -134,7 +134,7 @@ PushButton* ButtonDialog::ImplCreatePushButton( USHORT nBtnFlags ) // ----------------------------------------------------------------------- -ImplBtnDlgItem* ButtonDialog::ImplGetItem( USHORT nId ) const +ImplBtnDlgItem* ButtonDialog::ImplGetItem( sal_uInt16 nId ) const { ImplBtnDlgItem* pItem = mpItemList->First(); while ( pItem ) @@ -258,7 +258,7 @@ void ButtonDialog::ImplPosControls() SetOutputSizePixel( aDlgSize ); - mbFormat = FALSE; + mbFormat = sal_False; } // ----------------------------------------------------------------------- @@ -331,13 +331,13 @@ void ButtonDialog::Click() // ----------------------------------------------------------------------- -void ButtonDialog::AddButton( const XubString& rText, USHORT nId, - USHORT nBtnFlags, long nSepPixel ) +void ButtonDialog::AddButton( const XubString& rText, sal_uInt16 nId, + sal_uInt16 nBtnFlags, long nSepPixel ) { // PageItem anlegen ImplBtnDlgItem* pItem = new ImplBtnDlgItem; pItem->mnId = nId; - pItem->mbOwnButton = TRUE; + pItem->mbOwnButton = sal_True; pItem->mnSepSize = nSepPixel; pItem->mpPushButton = ImplCreatePushButton( nBtnFlags ); if ( rText.Len() ) @@ -349,18 +349,18 @@ void ButtonDialog::AddButton( const XubString& rText, USHORT nId, if ( nBtnFlags & BUTTONDIALOG_FOCUSBUTTON ) mnFocusButtonId = nId; - mbFormat = TRUE; + mbFormat = sal_True; } // ----------------------------------------------------------------------- -void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId, - USHORT nBtnFlags, long nSepPixel ) +void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId, + sal_uInt16 nBtnFlags, long nSepPixel ) { // PageItem anlegen ImplBtnDlgItem* pItem = new ImplBtnDlgItem; pItem->mnId = nId; - pItem->mbOwnButton = TRUE; + pItem->mbOwnButton = sal_True; pItem->mnSepSize = nSepPixel; if ( eType == BUTTON_OK ) @@ -386,18 +386,18 @@ void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId, // In die Liste eintragen mpItemList->Insert( pItem, LIST_APPEND ); - mbFormat = TRUE; + mbFormat = sal_True; } // ----------------------------------------------------------------------- -void ButtonDialog::AddButton( PushButton* pBtn, USHORT nId, - USHORT nBtnFlags, long nSepPixel ) +void ButtonDialog::AddButton( PushButton* pBtn, sal_uInt16 nId, + sal_uInt16 nBtnFlags, long nSepPixel ) { // PageItem anlegen ImplBtnDlgItem* pItem = new ImplBtnDlgItem; pItem->mnId = nId; - pItem->mbOwnButton = FALSE; + pItem->mbOwnButton = sal_False; pItem->mnSepSize = nSepPixel; pItem->mpPushButton = pBtn; @@ -407,12 +407,12 @@ void ButtonDialog::AddButton( PushButton* pBtn, USHORT nId, // In die View-Liste eintragen mpItemList->Insert( pItem, LIST_APPEND ); - mbFormat = TRUE; + mbFormat = sal_True; } // ----------------------------------------------------------------------- -void ButtonDialog::RemoveButton( USHORT nId ) +void ButtonDialog::RemoveButton( sal_uInt16 nId ) { ImplBtnDlgItem* pItem = mpItemList->First(); while ( pItem ) @@ -424,7 +424,7 @@ void ButtonDialog::RemoveButton( USHORT nId ) delete pItem->mpPushButton; delete pItem; mpItemList->Remove(); - mbFormat = TRUE; + mbFormat = sal_True; break; } @@ -449,29 +449,29 @@ void ButtonDialog::Clear() } mpItemList->Clear(); - mbFormat = TRUE; + mbFormat = sal_True; } // ----------------------------------------------------------------------- -USHORT ButtonDialog::GetButtonCount() const +sal_uInt16 ButtonDialog::GetButtonCount() const { - return (USHORT)mpItemList->Count(); + return (sal_uInt16)mpItemList->Count(); } // ----------------------------------------------------------------------- -USHORT ButtonDialog::GetButtonId( USHORT nButton ) const +sal_uInt16 ButtonDialog::GetButtonId( sal_uInt16 nButton ) const { if ( nButton < mpItemList->Count() ) - return (USHORT)mpItemList->GetObject( nButton )->mnId; + return (sal_uInt16)mpItemList->GetObject( nButton )->mnId; else return BUTTONDIALOG_BUTTON_NOTFOUND; } // ----------------------------------------------------------------------- -PushButton* ButtonDialog::GetPushButton( USHORT nId ) const +PushButton* ButtonDialog::GetPushButton( sal_uInt16 nId ) const { ImplBtnDlgItem* pItem = ImplGetItem( nId ); @@ -483,20 +483,20 @@ PushButton* ButtonDialog::GetPushButton( USHORT nId ) const // ----------------------------------------------------------------------- -void ButtonDialog::SetButtonText( USHORT nId, const XubString& rText ) +void ButtonDialog::SetButtonText( sal_uInt16 nId, const XubString& rText ) { ImplBtnDlgItem* pItem = ImplGetItem( nId ); if ( pItem ) { pItem->mpPushButton->SetText( rText ); - mbFormat = TRUE; + mbFormat = sal_True; } } // ----------------------------------------------------------------------- -XubString ButtonDialog::GetButtonText( USHORT nId ) const +XubString ButtonDialog::GetButtonText( sal_uInt16 nId ) const { ImplBtnDlgItem* pItem = ImplGetItem( nId ); @@ -508,7 +508,7 @@ XubString ButtonDialog::GetButtonText( USHORT nId ) const // ----------------------------------------------------------------------- -void ButtonDialog::SetButtonHelpText( USHORT nId, const XubString& rText ) +void ButtonDialog::SetButtonHelpText( sal_uInt16 nId, const XubString& rText ) { ImplBtnDlgItem* pItem = ImplGetItem( nId ); @@ -518,7 +518,7 @@ void ButtonDialog::SetButtonHelpText( USHORT nId, const XubString& rText ) // ----------------------------------------------------------------------- -XubString ButtonDialog::GetButtonHelpText( USHORT nId ) const +XubString ButtonDialog::GetButtonHelpText( sal_uInt16 nId ) const { ImplBtnDlgItem* pItem = ImplGetItem( nId ); @@ -530,7 +530,7 @@ XubString ButtonDialog::GetButtonHelpText( USHORT nId ) const // ----------------------------------------------------------------------- -void ButtonDialog::SetButtonHelpId( USHORT nId, ULONG nHelpId ) +void ButtonDialog::SetButtonHelpId( sal_uInt16 nId, sal_uIntPtr nHelpId ) { ImplBtnDlgItem* pItem = ImplGetItem( nId ); @@ -540,7 +540,7 @@ void ButtonDialog::SetButtonHelpId( USHORT nId, ULONG nHelpId ) // ----------------------------------------------------------------------- -ULONG ButtonDialog::GetButtonHelpId( USHORT nId ) const +sal_uIntPtr ButtonDialog::GetButtonHelpId( sal_uInt16 nId ) const { ImplBtnDlgItem* pItem = ImplGetItem( nId ); diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx index 03e01c96742b..e10d33028fbc 100644 --- a/vcl/source/window/cmdevt.cxx +++ b/vcl/source/window/cmdevt.cxx @@ -45,24 +45,24 @@ CommandExtTextInputData::CommandExtTextInputData() mnDeltaStart = 0; mnOldTextLen = 0; mnCursorFlags = 0; - mbOnlyCursor = FALSE; + mbOnlyCursor = sal_False; } // ----------------------------------------------------------------------- CommandExtTextInputData::CommandExtTextInputData( const XubString& rText, - const USHORT* pTextAttr, + const sal_uInt16* pTextAttr, xub_StrLen nCursorPos, - USHORT nCursorFlags, + sal_uInt16 nCursorFlags, xub_StrLen nDeltaStart, xub_StrLen nOldTextLen, - BOOL bOnlyCursor ) : + sal_Bool bOnlyCursor ) : maText( rText ) { if ( pTextAttr && maText.Len() ) { - mpTextAttr = new USHORT[maText.Len()]; - memcpy( mpTextAttr, pTextAttr, maText.Len()*sizeof(USHORT) ); + mpTextAttr = new sal_uInt16[maText.Len()]; + memcpy( mpTextAttr, pTextAttr, maText.Len()*sizeof(sal_uInt16) ); } else mpTextAttr = NULL; @@ -80,8 +80,8 @@ CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData& { if ( rData.mpTextAttr && maText.Len() ) { - mpTextAttr = new USHORT[maText.Len()]; - memcpy( mpTextAttr, rData.mpTextAttr, maText.Len()*sizeof(USHORT) ); + mpTextAttr = new sal_uInt16[maText.Len()]; + memcpy( mpTextAttr, rData.mpTextAttr, maText.Len()*sizeof(sal_uInt16) ); } else mpTextAttr = NULL; diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index 5725189e10c3..3be6fad02366 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -47,8 +47,8 @@ struct ImplCursorData long mnPixSlant; // Pixel-Slant short mnOrientation; // Pixel-Orientation unsigned char mnDirection; // indicates writing direction - USHORT mnStyle; // Cursor-Style - BOOL mbCurVisible; // Ist Cursor aktuell sichtbar + sal_uInt16 mnStyle; // Cursor-Style + sal_Bool mbCurVisible; // Ist Cursor aktuell sichtbar Window* mpWindow; // Zugeordnetes Windows }; @@ -57,9 +57,9 @@ struct ImplCursorData static void ImplCursorInvert( ImplCursorData* pData ) { Window* pWindow = pData->mpWindow; - BOOL bMapMode = pWindow->IsMapModeEnabled(); - pWindow->EnableMapMode( FALSE ); - USHORT nInvertStyle; + sal_Bool bMapMode = pWindow->IsMapModeEnabled(); + pWindow->EnableMapMode( sal_False ); + sal_uInt16 nInvertStyle; if ( pData->mnStyle & CURSOR_SHADOW ) nInvertStyle = INVERT_50; else @@ -154,7 +154,7 @@ void Cursor::ImplDraw() // Ausgabeflaeche berechnen und ausgeben ImplCursorInvert( mpData ); - mpData->mbCurVisible = TRUE; + mpData->mbCurVisible = sal_True; } } @@ -165,13 +165,13 @@ void Cursor::ImplRestore() if ( mpData && mpData->mbCurVisible ) { ImplCursorInvert( mpData ); - mpData->mbCurVisible = FALSE; + mpData->mbCurVisible = sal_False; } } // ----------------------------------------------------------------------- -void Cursor::ImplShow( BOOL bDrawDirect ) +void Cursor::ImplShow( sal_Bool bDrawDirect ) { if ( mbVisible ) { @@ -193,7 +193,7 @@ void Cursor::ImplShow( BOOL bDrawDirect ) if ( !mpData ) { mpData = new ImplCursorData; - mpData->mbCurVisible = FALSE; + mpData->mbCurVisible = sal_False; mpData->maTimer.SetTimeoutHdl( LINK( this, Cursor, ImplTimerHdl ) ); } @@ -268,7 +268,7 @@ Cursor::Cursor() mnOrientation = 0; mnDirection = 0; mnStyle = 0; - mbVisible = FALSE; + mbVisible = sal_False; } // ----------------------------------------------------------------------- @@ -301,7 +301,7 @@ Cursor::~Cursor() // ----------------------------------------------------------------------- -void Cursor::SetStyle( USHORT nStyle ) +void Cursor::SetStyle( sal_uInt16 nStyle ) { if ( mnStyle != nStyle ) { @@ -316,7 +316,7 @@ void Cursor::Show() { if ( !mbVisible ) { - mbVisible = TRUE; + mbVisible = sal_True; ImplShow(); } } @@ -327,7 +327,7 @@ void Cursor::Hide() { if ( mbVisible ) { - mbVisible = FALSE; + mbVisible = sal_False; ImplHide(); } } @@ -448,7 +448,7 @@ Cursor& Cursor::operator=( const Cursor& rCursor ) // ----------------------------------------------------------------------- -BOOL Cursor::operator==( const Cursor& rCursor ) const +sal_Bool Cursor::operator==( const Cursor& rCursor ) const { if ( (maPos == rCursor.maPos) && (maSize == rCursor.maSize) && @@ -456,7 +456,7 @@ BOOL Cursor::operator==( const Cursor& rCursor ) const (mnOrientation == rCursor.mnOrientation) && (mnDirection == rCursor.mnDirection) && (mbVisible == rCursor.mbVisible) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index a32790cfb0d4..31ecb4763e4b 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -45,7 +45,7 @@ // ======================================================================= void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect, - USHORT nStyle, BOOL bClose ) + sal_uInt16 nStyle, sal_Bool bClose ) { DecorationView aView( pDev ); const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); @@ -508,7 +508,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, case SYMBOL_CHECKMARK: { // #106953# never mirror checkmarks - BOOL bRTL = pDev->ImplHasMirroredGraphics() && pDev->IsRTLEnabled(); + sal_Bool bRTL = pDev->ImplHasMirroredGraphics() && pDev->IsRTLEnabled(); Point aPos1( bRTL ? rRect.Right() : rRect.Left(), rRect.Bottom() - rRect.GetHeight() / 3 ); Point aPos2( bRTL ? rRect.Right() - rRect.GetWidth()/3 : rRect.Left() + rRect.GetWidth()/3, @@ -635,7 +635,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, { Rectangle aRect( nCenterX-n2, nCenterY-n2, nCenterX+n2, nCenterY+n2 ); - ImplDrawOS2Symbol( pDev, aRect, 0, TRUE ); + ImplDrawOS2Symbol( pDev, aRect, 0, sal_True ); } break; @@ -643,7 +643,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, { Rectangle aRect( nCenterX-n2+4, nCenterY-n2+4, nCenterX+n2-4, nCenterY+n2-3 ); - ImplDrawOS2Symbol( pDev, aRect, 0, FALSE ); + ImplDrawOS2Symbol( pDev, aRect, 0, sal_False ); DecorationView aDecoView( pDev ); Rectangle aRect2( nCenterX-n2, nCenterY-n2, nCenterX-n2+2, nCenterY+n2 ); @@ -662,7 +662,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, { Rectangle aRect( nCenterX-n2+3, nCenterY-n2+3, nCenterX+n2-3, nCenterY+n2-3 ); - ImplDrawOS2Symbol( pDev, aRect, 0, FALSE ); + ImplDrawOS2Symbol( pDev, aRect, 0, sal_False ); } break; } @@ -671,16 +671,16 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, // ----------------------------------------------------------------------- void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType, - const Color& rColor, USHORT nStyle ) + const Color& rColor, sal_uInt16 nStyle ) { const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings(); Rectangle aRect = mpOutDev->LogicToPixel( rRect ); Color aOldLineColor = mpOutDev->GetLineColor(); Color aOldFillColor = mpOutDev->GetFillColor(); - BOOL bOldMapMode = mpOutDev->IsMapModeEnabled(); + sal_Bool bOldMapMode = mpOutDev->IsMapModeEnabled(); mpOutDev->SetLineColor(); mpOutDev->SetFillColor( rColor ); - mpOutDev->EnableMapMode( FALSE ); + mpOutDev->EnableMapMode( sal_False ); if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) || (mpOutDev->GetOutDevType() == OUTDEV_PRINTER) ) @@ -724,8 +724,8 @@ void DecorationView::DrawFrame( const Rectangle& rRect, Rectangle aRect = mpOutDev->LogicToPixel( rRect ); Color aOldLineColor = mpOutDev->GetLineColor(); Color aOldFillColor = mpOutDev->GetFillColor(); - BOOL bOldMapMode = mpOutDev->IsMapModeEnabled(); - mpOutDev->EnableMapMode( FALSE ); + sal_Bool bOldMapMode = mpOutDev->IsMapModeEnabled(); + mpOutDev->EnableMapMode( sal_False ); mpOutDev->SetLineColor(); mpOutDev->ImplDraw2ColorFrame( aRect, rLeftTopColor, rRightBottomColor ); mpOutDev->SetLineColor( aOldLineColor ); @@ -736,7 +736,7 @@ void DecorationView::DrawFrame( const Rectangle& rRect, // ======================================================================= void DecorationView::DrawHighlightFrame( const Rectangle& rRect, - USHORT nStyle ) + sal_uInt16 nStyle ) { const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings(); Color aLightColor = rStyleSettings.GetLightColor(); @@ -786,7 +786,7 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect, // ======================================================================= static void ImplDrawDPILineRect( OutputDevice* pDev, Rectangle& rRect, - const Color* pColor, BOOL bRound = FALSE ) + const Color* pColor, sal_Bool bRound = sal_False ) { long nLineWidth = pDev->ImplGetDPIX()/300; long nLineHeight = pDev->ImplGetDPIY()/300; @@ -835,10 +835,10 @@ static void ImplDrawDPILineRect( OutputDevice* pDev, Rectangle& rRect, // ======================================================================= static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, - const StyleSettings& rStyleSettings, USHORT nStyle ) + const StyleSettings& rStyleSettings, sal_uInt16 nStyle ) { // mask menu style - BOOL bMenuStyle = (nStyle & FRAME_DRAW_MENU) ? TRUE : FALSE; + sal_Bool bMenuStyle = (nStyle & FRAME_DRAW_MENU) ? sal_True : sal_False; nStyle &= ~FRAME_DRAW_MENU; Window *pWin = NULL; @@ -849,7 +849,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, // menus may use different border colors (eg on XP) // normal frames will be drawn using the shadow color // whereas window frame borders will use black - BOOL bFlatBorders = ( !bMenuStyle && rStyleSettings.GetUseFlatBorders() ); + sal_Bool bFlatBorders = ( !bMenuStyle && rStyleSettings.GetUseFlatBorders() ); // no flat borders for standard VCL controls (ie formcontrols that keep their classic look) // will not affect frame windows (like dropdowns) @@ -858,13 +858,13 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, // check for formcontrol, i.e., a control without NWF enabled Control *pControl = dynamic_cast< Control* >( pWin->GetWindow( WINDOW_CLIENT ) ); if( pControl && pControl->IsNativeWidgetEnabled() ) - bFlatBorders = TRUE; + bFlatBorders = sal_True; else - bFlatBorders = FALSE; + bFlatBorders = sal_False; } // no round corners for window frame borders - BOOL bRound = (bFlatBorders && !(nStyle & FRAME_DRAW_WINDOWBORDER)); + sal_Bool bRound = (bFlatBorders && !(nStyle & FRAME_DRAW_WINDOWBORDER)); if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) || (pDev->GetOutDevType() == OUTDEV_PRINTER) || @@ -873,7 +873,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, if ( nStyle & FRAME_DRAW_NODRAW ) { - USHORT nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle; + sal_uInt16 nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle; if( pWin->GetType() == WINDOW_BORDERWINDOW ) nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER; ImplControlValue aControlValue( nValueStyle ); @@ -888,7 +888,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, ImplDrawDPILineRect( pDev, rRect, NULL, bRound ); else { - USHORT nFrameStyle = nStyle & FRAME_DRAW_STYLE; + sal_uInt16 nFrameStyle = nStyle & FRAME_DRAW_STYLE; if ( nFrameStyle == FRAME_DRAW_GROUP ) { @@ -918,7 +918,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, { if( pWin && pWin->IsNativeControlSupported(CTRL_FRAME, PART_BORDER) ) { - USHORT nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle; + sal_uInt16 nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle; if( pWin->GetType() == WINDOW_BORDERWINDOW ) nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER; ImplControlValue aControlValue( nValueStyle ); @@ -955,7 +955,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, } else { - USHORT nFrameStyle = nStyle & FRAME_DRAW_STYLE; + sal_uInt16 nFrameStyle = nStyle & FRAME_DRAW_STYLE; if ( nFrameStyle == FRAME_DRAW_GROUP ) { pDev->SetFillColor(); @@ -1030,7 +1030,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, rRect.Right()--; rRect.Bottom()--; - BOOL bDrawn = TRUE; + sal_Bool bDrawn = sal_True; if ( nFrameStyle == FRAME_DRAW_DOUBLEIN ) { if( bFlatBorders ) // no 3d effect @@ -1050,7 +1050,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, rStyleSettings.GetLightColor(), rStyleSettings.GetShadowColor() ); else - bDrawn = FALSE; + bDrawn = sal_False; } if( bDrawn ) { @@ -1067,14 +1067,14 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, // ----------------------------------------------------------------------- -Rectangle DecorationView::DrawFrame( const Rectangle& rRect, USHORT nStyle ) +Rectangle DecorationView::DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle ) { Rectangle aRect = rRect; - BOOL bOldMap = mpOutDev->IsMapModeEnabled(); + sal_Bool bOldMap = mpOutDev->IsMapModeEnabled(); if ( bOldMap ) { aRect = mpOutDev->LogicToPixel( aRect ); - mpOutDev->EnableMapMode( FALSE ); + mpOutDev->EnableMapMode( sal_False ); } if ( !rRect.IsEmpty() ) @@ -1103,7 +1103,7 @@ Rectangle DecorationView::DrawFrame( const Rectangle& rRect, USHORT nStyle ) // ======================================================================= static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect, - const StyleSettings& rStyleSettings, USHORT nStyle ) + const StyleSettings& rStyleSettings, sal_uInt16 nStyle ) { Rectangle aFillRect = rRect; @@ -1316,14 +1316,14 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect, // ----------------------------------------------------------------------- -Rectangle DecorationView::DrawButton( const Rectangle& rRect, USHORT nStyle ) +Rectangle DecorationView::DrawButton( const Rectangle& rRect, sal_uInt16 nStyle ) { Rectangle aRect = rRect; - BOOL bOldMap = mpOutDev->IsMapModeEnabled(); + sal_Bool bOldMap = mpOutDev->IsMapModeEnabled(); if ( bOldMap ) { aRect = mpOutDev->LogicToPixel( aRect ); - mpOutDev->EnableMapMode( FALSE ); + mpOutDev->EnableMapMode( sal_False ); } if ( !rRect.IsEmpty() ) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 3b5585d3bc63..5ce32a14d725 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -74,24 +74,24 @@ static ByteString ImplGetDialogText( Dialog* pDialog ) // ======================================================================= -static BOOL ImplIsMnemonicCtrl( Window* pWindow ) +static sal_Bool ImplIsMnemonicCtrl( Window* pWindow ) { if( ! pWindow->GetSettings().GetStyleSettings().GetAutoMnemonic() ) - return FALSE; + return sal_False; if ( (pWindow->GetType() == WINDOW_RADIOBUTTON) || (pWindow->GetType() == WINDOW_CHECKBOX) || (pWindow->GetType() == WINDOW_TRISTATEBOX) || (pWindow->GetType() == WINDOW_PUSHBUTTON) ) - return TRUE; + return sal_True; if ( pWindow->GetType() == WINDOW_FIXEDTEXT ) { if ( pWindow->GetStyle() & (WB_INFO | WB_NOLABEL) ) - return FALSE; + return sal_False; Window* pNextWindow = pWindow->GetWindow( WINDOW_NEXT ); if ( !pNextWindow ) - return FALSE; + return sal_False; pNextWindow = pNextWindow->GetWindow( WINDOW_CLIENT ); if ( !(pNextWindow->GetStyle() & WB_TABSTOP) || (pNextWindow->GetType() == WINDOW_FIXEDTEXT) || @@ -100,12 +100,12 @@ static BOOL ImplIsMnemonicCtrl( Window* pWindow ) (pNextWindow->GetType() == WINDOW_CHECKBOX) || (pNextWindow->GetType() == WINDOW_TRISTATEBOX) || (pNextWindow->GetType() == WINDOW_PUSHBUTTON) ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -216,7 +216,7 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog ) static void ImplMouseAutoPos( Dialog* pDialog ) { - ULONG nMouseOptions = pDialog->GetSettings().GetMouseSettings().GetOptions(); + sal_uIntPtr nMouseOptions = pDialog->GetSettings().GetMouseSettings().GetOptions(); if ( nMouseOptions & MOUSE_OPTION_AUTOCENTERPOS ) { Size aSize = pDialog->GetOutputSizePixel(); @@ -251,13 +251,13 @@ struct DialogImpl void Dialog::ImplInitDialogData() { - mpWindowImpl->mbDialog = TRUE; + mpWindowImpl->mbDialog = sal_True; mpDialogParent = NULL; mpPrevExecuteDlg = NULL; - mbInExecute = FALSE; - mbOldSaveBack = FALSE; - mbInClose = FALSE; - mbModalMode = FALSE; + mbInExecute = sal_False; + mbOldSaveBack = sal_False; + mbInClose = sal_False; + mbModalMode = sal_False; mnMousePositioned = 0; mpDialogImpl = new DialogImpl; } @@ -266,7 +266,7 @@ void Dialog::ImplInitDialogData() void Dialog::ImplInit( Window* pParent, WinBits nStyle ) { - USHORT nSysWinMode = Application::GetSystemWindowMode(); + sal_uInt16 nSysWinMode = Application::GetSystemWindowMode(); if ( !(nStyle & WB_NODIALOGCONTROL) ) nStyle |= WB_DIALOGCONTROL; @@ -292,7 +292,7 @@ void Dialog::ImplInit( Window* pParent, WinBits nStyle ) while ( pExeDlg ) { // Nur wenn er sichtbar und enabled ist - if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, TRUE ) && + if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, sal_True ) && pExeDlg->IsReallyVisible() && pExeDlg->IsEnabled() && pExeDlg->IsInputEnabled() && !pExeDlg->IsInModalMode() ) { @@ -342,8 +342,8 @@ void Dialog::ImplInit( Window* pParent, WinBits nStyle ) } else { - mpWindowImpl->mbFrame = TRUE; - mpWindowImpl->mbOverlapWin = TRUE; + mpWindowImpl->mbFrame = sal_True; + mpWindowImpl->mbOverlapWin = sal_True; SystemWindow::ImplInit( pParent, (nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE)) | WB_CLOSEABLE, NULL ); // Now set all style bits mpWindowImpl->mnStyle = nStyle; @@ -375,7 +375,7 @@ void Dialog::ImplInitSettings() else if( IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_DIALOG ) ) { mpWindowImpl->mnNativeBackground = PART_BACKGROUND_DIALOG; - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); } // fallback to settings color else @@ -468,7 +468,7 @@ long Dialog::Notify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); KeyCode aKeyCode = pKEvt->GetKeyCode(); - USHORT nKeyCode = aKeyCode.GetCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( (nKeyCode == KEY_ESCAPE) && ((GetStyle() & WB_CLOSEABLE) || ImplGetCancelButton( this ) || ImplGetOKButton( this )) ) @@ -478,7 +478,7 @@ long Dialog::Notify( NotifyEvent& rNEvt ) // post this Close asynchronous so we can leave our key handler before // we get destroyed PostUserEvent( LINK( this, Dialog, ImplAsyncCloseHdl ), this ); - return TRUE; + return sal_True; } } else if ( rNEvt.GetType() == EVENT_GETFOCUS ) @@ -489,8 +489,8 @@ long Dialog::Notify( NotifyEvent& rNEvt ) if( mbInExecute && mbModalMode ) { // do not change modal counter (pSVData->maAppData.mnModalDialog) - SetModalInputMode( FALSE ); - SetModalInputMode( TRUE ); + SetModalInputMode( sal_False ); + SetModalInputMode( sal_True ); // #93022# def-button might have changed after show if( !mnMousePositioned ) @@ -555,23 +555,23 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -BOOL Dialog::Close() +sal_Bool Dialog::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() && !IsInExecute() ) - return FALSE; + return sal_False; - mbInClose = TRUE; + mbInClose = sal_True; if ( !(GetStyle() & WB_CLOSEABLE) ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; ImplAddDel( &aDelData ); PushButton* pButton = ImplGetCancelButton( this ); if ( pButton ) @@ -582,30 +582,30 @@ BOOL Dialog::Close() if ( pButton ) pButton->Click(); else - bRet = FALSE; + bRet = sal_False; } if ( aDelData.IsDelete() ) - return TRUE; + return sal_True; ImplRemoveDel( &aDelData ); return bRet; } if ( IsInExecute() ) { - EndDialog( FALSE ); - mbInClose = FALSE; - return TRUE; + EndDialog( sal_False ); + mbInClose = sal_False; + return sal_True; } else { - mbInClose = FALSE; + mbInClose = sal_False; return SystemWindow::Close(); } } // ----------------------------------------------------------------------- -BOOL Dialog::ImplStartExecuteModal() +sal_Bool Dialog::ImplStartExecuteModal() { if ( mbInExecute ) { @@ -614,7 +614,7 @@ BOOL Dialog::ImplStartExecuteModal() aErrorStr += ImplGetDialogText( this ); DBG_ERROR( aErrorStr.GetBuffer() ); #endif - return FALSE; + return sal_False; } if ( Application::IsDialogCancelEnabled() ) @@ -624,7 +624,7 @@ BOOL Dialog::ImplStartExecuteModal() aErrorStr += ImplGetDialogText( this ); DBG_ERROR( aErrorStr.GetBuffer() ); #endif - return FALSE; + return sal_False; } #ifdef DBG_UTIL @@ -653,15 +653,15 @@ BOOL Dialog::ImplStartExecuteModal() pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL ); if ( pSVData->maWinData.mpCaptureWin ) pSVData->maWinData.mpCaptureWin->ReleaseMouse(); - EnableInput( TRUE, TRUE ); + EnableInput( sal_True, sal_True ); if ( GetParent() ) { NotifyEvent aNEvt( EVENT_EXECUTEDIALOG, this ); GetParent()->Notify( aNEvt ); } - mbInExecute = TRUE; - SetModalInputMode( TRUE ); + mbInExecute = sal_True; + SetModalInputMode( sal_True ); mbOldSaveBack = IsSaveBackgroundEnabled(); EnableSaveBackground(); @@ -671,7 +671,7 @@ BOOL Dialog::ImplStartExecuteModal() Show(); pSVData->maAppData.mnModalMode++; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -743,7 +743,7 @@ void Dialog::StartExecuteModal( const Link& rEndDialogHdl ) // ----------------------------------------------------------------------- -BOOL Dialog::IsStartedModal() const +sal_Bool Dialog::IsStartedModal() const { return mpDialogImpl->mbStartedModal; } @@ -754,7 +754,7 @@ void Dialog::EndDialog( long nResult ) { if ( mbInExecute ) { - SetModalInputMode( FALSE ); + SetModalInputMode( sal_False ); // Dialog aus der Kette der Dialoge die in Execute stehen entfernen ImplSVData* pSVData = ImplGetSVData(); @@ -802,7 +802,7 @@ void Dialog::EndDialog( long nResult ) mpDialogImpl->mbStartedModal = false; mpDialogImpl->mnResult = -1; } - mbInExecute = FALSE; + mbInExecute = sal_False; } } @@ -823,9 +823,9 @@ void Dialog::EndAllDialogs( Window* pParent ) while ( pModDialog ) { pTempModDialog = pModDialog->mpPrevExecuteDlg; - if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, TRUE ) ) ) + if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, sal_True ) ) ) { - pModDialog->EndDialog( FALSE ); + pModDialog->EndDialog( sal_False ); pModDialog->PostUserEvent( Link() ); } pModDialog = pTempModDialog; @@ -834,7 +834,7 @@ void Dialog::EndAllDialogs( Window* pParent ) // ----------------------------------------------------------------------- -void Dialog::SetModalInputMode( BOOL bModal ) +void Dialog::SetModalInputMode( sal_Bool bModal ) { if ( bModal == mbModalMode ) return; @@ -848,8 +848,8 @@ void Dialog::SetModalInputMode( BOOL bModal ) // Diable the prev Modal Dialog, because our dialog must close at first, // before the other dialog can be closed (because the other dialog // is on stack since our dialog returns) - if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, TRUE ) ) - mpPrevExecuteDlg->EnableInput( FALSE, TRUE, TRUE, this ); + if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) ) + mpPrevExecuteDlg->EnableInput( sal_False, sal_True, sal_True, this ); // determine next overlap dialog parent Window* pParent = GetParent(); @@ -876,20 +876,20 @@ void Dialog::SetModalInputMode( BOOL bModal ) } // Enable the prev Modal Dialog - if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, TRUE ) ) + if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) ) { - mpPrevExecuteDlg->EnableInput( TRUE, TRUE, TRUE, this ); + mpPrevExecuteDlg->EnableInput( sal_True, sal_True, sal_True, this ); // ensure continued modality of prev dialog // do not change modality counter - mpPrevExecuteDlg->SetModalInputMode( FALSE ); - mpPrevExecuteDlg->SetModalInputMode( TRUE ); + mpPrevExecuteDlg->SetModalInputMode( sal_False ); + mpPrevExecuteDlg->SetModalInputMode( sal_True ); } } } // ----------------------------------------------------------------------- -void Dialog::SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs ) +void Dialog::SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs ) { if ( bSubModalDialogs ) { @@ -898,7 +898,7 @@ void Dialog::SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs ) while ( pOverlap ) { if ( pOverlap->IsDialog() ) - ((Dialog*)pOverlap)->SetModalInputMode( bModal, TRUE ); + ((Dialog*)pOverlap)->SetModalInputMode( bModal, sal_True ); pOverlap = pOverlap->mpWindowImpl->mpNext; } } @@ -933,7 +933,7 @@ void Dialog::GrabFocusToFirstControl() !pFocusControl->IsVisible() || !pFocusControl->IsEnabled() || !pFocusControl->IsInputEnabled() ) { - USHORT n = 0; + sal_uInt16 n = 0; pFocusControl = ImplGetDlgWindow( n, DLGWINDOW_FIRST ); } if ( pFocusControl ) @@ -945,13 +945,13 @@ void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ImplBorderWindow aImplWin( (Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); // aImplWin.SetText( GetText() ); // aImplWin.SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() ); -// aImplWin.SetDisplayActive( TRUE ); +// aImplWin.SetDisplayActive( sal_True ); // aImplWin.InitView(); aImplWin.GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); } -void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG ) +void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -977,7 +977,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULO ImplBorderWindow aImplWin( this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); aImplWin.SetText( GetText() ); aImplWin.SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() ); - aImplWin.SetDisplayActive( TRUE ); + aImplWin.SetDisplayActive( sal_True ); aImplWin.InitView(); aImplWin.Draw( Rectangle( aPos, aSize ), pDev, aPos ); diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 64f2b7e0d2a1..5681d6c2b724 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star; // ======================================================================= -static BOOL ImplHasIndirectTabParent( Window* pWindow ) +static sal_Bool ImplHasIndirectTabParent( Window* pWindow ) { // The window has inderect tab parent if it is included in tab hierarchy // of the indirect parent window @@ -74,7 +74,7 @@ static Window* ImplGetTopParentOfTabHierarchy( Window* pParent ) // ----------------------------------------------------------------------- -static Window* ImplGetSubChildWindow( Window* pParent, USHORT n, USHORT& nIndex ) +static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex ) { Window* pTabPage = NULL; Window* pFoundWindow = NULL; @@ -150,7 +150,7 @@ static Window* ImplGetSubChildWindow( Window* pParent, USHORT n, USHORT& nIndex // ----------------------------------------------------------------------- -static Window* ImplGetChildWindow( Window* pParent, USHORT n, USHORT& nIndex, BOOL bTestEnable ) +static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable ) { pParent = ImplGetTopParentOfTabHierarchy( pParent ); @@ -158,7 +158,7 @@ static Window* ImplGetChildWindow( Window* pParent, USHORT n, USHORT& nIndex, BO Window* pWindow = ImplGetSubChildWindow( pParent, n, nIndex ); if ( bTestEnable ) { - USHORT n2 = nIndex; + sal_uInt16 n2 = nIndex; while ( pWindow && (!pWindow->IsEnabled() || !pWindow->IsInputEnabled()) ) { n2 = nIndex+1; @@ -184,7 +184,7 @@ static Window* ImplGetChildWindow( Window* pParent, USHORT n, USHORT& nIndex, BO // ----------------------------------------------------------------------- -static Window* ImplGetNextWindow( Window* pParent, USHORT n, USHORT& nIndex, BOOL bTestEnable ) +static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable ) { Window* pWindow = ImplGetChildWindow( pParent, n+1, nIndex, bTestEnable ); if ( n == nIndex ) @@ -197,17 +197,17 @@ static Window* ImplGetNextWindow( Window* pParent, USHORT n, USHORT& nIndex, BOO // ----------------------------------------------------------------------- -Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType, - USHORT nFormStart, USHORT nFormEnd, - USHORT* pIndex ) +Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, + sal_uInt16 nFormStart, sal_uInt16 nFormEnd, + sal_uInt16* pIndex ) { DBG_ASSERT( (nIndex >= nFormStart) && (nIndex <= nFormEnd), "Window::ImplGetDlgWindow() - nIndex not in Form" ); Window* pWindow = NULL; - USHORT i; - USHORT nTemp; - USHORT nStartIndex; + sal_uInt16 i; + sal_uInt16 nTemp; + sal_uInt16 nStartIndex; if ( nType == DLGWINDOW_PREV ) { @@ -218,7 +218,7 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType, i--; else i = nFormEnd; - pWindow = ImplGetChildWindow( this, i, nTemp, TRUE ); + pWindow = ImplGetChildWindow( this, i, nTemp, sal_True ); if ( !pWindow ) break; if ( (i == nTemp) && (pWindow->GetStyle() & WB_TABSTOP) ) @@ -238,19 +238,19 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType, { if ( i < nFormEnd ) { - pWindow = ImplGetNextWindow( this, i, i, TRUE ); + pWindow = ImplGetNextWindow( this, i, i, sal_True ); if ( (i > nFormEnd) || (i < nFormStart) ) - pWindow = ImplGetChildWindow( this, nFormStart, i, TRUE ); + pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); } else - pWindow = ImplGetChildWindow( this, nFormStart, i, TRUE ); + pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); } if ( i <= nFormEnd ) { // 2ten Index mitfuehren, falls alle Controls disablte - USHORT nStartIndex2 = i; - USHORT nOldIndex = i+1; + sal_uInt16 nStartIndex2 = i; + sal_uInt16 nOldIndex = i+1; do { @@ -263,9 +263,9 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType, } nOldIndex = i; if ( (i > nFormEnd) || (i < nFormStart) ) - pWindow = ImplGetChildWindow( this, nFormStart, i, TRUE ); + pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); else - pWindow = ImplGetNextWindow( this, i, i, TRUE ); + pWindow = ImplGetNextWindow( this, i, i, sal_True ); } while ( (i != nStartIndex) && (i != nStartIndex2) ); @@ -303,20 +303,20 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType, // ----------------------------------------------------------------------- -static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& rIndex, - USHORT& rFormStart, USHORT& rFormEnd ) +static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt16& rIndex, + sal_uInt16& rFormStart, sal_uInt16& rFormEnd ) { Window* pSWindow; Window* pSecondWindow = NULL; Window* pTempWindow = NULL; - USHORT i; - USHORT nSecond_i = 0; - USHORT nFormStart = 0; - USHORT nSecondFormStart = 0; - USHORT nFormEnd; + sal_uInt16 i; + sal_uInt16 nSecond_i = 0; + sal_uInt16 nFormStart = 0; + sal_uInt16 nSecondFormStart = 0; + sal_uInt16 nFormEnd; // Focus-Fenster in der Child-Liste suchen - Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, FALSE ); + Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, sal_False ); if( pWindow == NULL ) pWindow = pSWindow; @@ -339,7 +339,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& break; } - pSWindow = ImplGetNextWindow( pParent, i, i, FALSE ); + pSWindow = ImplGetNextWindow( pParent, i, i, sal_False ); if ( !i ) pSWindow = NULL; } @@ -369,7 +369,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& do { nFormEnd = i; - pTempWindow = ImplGetNextWindow( pParent, i, i, FALSE ); + pTempWindow = ImplGetNextWindow( pParent, i, i, sal_False ); // the DialogControlStart mark is only accepted for the direct children if ( !i @@ -387,7 +387,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& if ( nIteration >= 2 ) { // this is an unexpected scenario - DBG_ASSERT( FALSE, "It seems to be an endless loop!" ); + DBG_ASSERT( sal_False, "It seems to be an endless loop!" ); rFormStart = 0; break; } @@ -401,16 +401,16 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& // ----------------------------------------------------------------------- -static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode cCharCode, - USHORT nFormStart, USHORT nFormEnd, BOOL bCheckEnable = TRUE ) +static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, xub_Unicode cCharCode, + sal_uInt16 nFormStart, sal_uInt16 nFormEnd, sal_Bool bCheckEnable = sal_True ) { DBG_ASSERT( (rIndex >= nFormStart) && (rIndex <= nFormEnd), "Window::ImplFindAccelWindow() - rIndex not in Form" ); xub_Unicode cCompareChar; - USHORT nStart = rIndex; - USHORT i = rIndex; - int bSearch = TRUE; + sal_uInt16 nStart = rIndex; + sal_uInt16 i = rIndex; + int bSearch = sal_True; Window* pWindow; // MT: Where can we keep the CharClass?! @@ -422,13 +422,13 @@ static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode cCharCode = xCharClass->toUpper( String(cCharCode), 0, 1, rLocale )[0]; if ( i < nFormEnd ) - pWindow = ImplGetNextWindow( pParent, i, i, TRUE ); + pWindow = ImplGetNextWindow( pParent, i, i, sal_True ); else - pWindow = ImplGetChildWindow( pParent, nFormStart, i, TRUE ); + pWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_True ); while( bSearch && pWindow ) { const XubString aStr = pWindow->GetText(); - USHORT nPos = aStr.Search( '~' ); + sal_uInt16 nPos = aStr.Search( '~' ); while ( nPos != STRING_NOTFOUND ) { cCompareChar = aStr.GetChar( nPos+1 ); @@ -452,9 +452,9 @@ static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode // children checked for accelerators if( (pWindow->GetStyle() & WB_CHILDDLGCTRL) != 0 ) { - USHORT nChildIndex; - USHORT nChildFormStart; - USHORT nChildFormEnd; + sal_uInt16 nChildIndex; + sal_uInt16 nChildFormStart; + sal_uInt16 nChildFormEnd; // get form start and end ::ImplFindDlgCtrlWindow( pWindow, NULL, @@ -484,14 +484,14 @@ static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode // ----------------------------------------------------------------------- -void Window::ImplControlFocus( USHORT nFlags ) +void Window::ImplControlFocus( sal_uInt16 nFlags ) { if ( nFlags & GETFOCUS_MNEMONIC ) { if ( GetType() == WINDOW_RADIOBUTTON ) { if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( TRUE, nFlags ); + ((RadioButton*)this)->ImplCallClick( sal_True, nFlags ); else ImplGrabFocus( nFlags ); } @@ -504,8 +504,8 @@ void Window::ImplControlFocus( USHORT nFlags ) ((CheckBox*)this)->ImplCheck(); else if ( mpWindowImpl->mbPushButton ) { - ((PushButton*)this)->SetPressed( TRUE ); - ((PushButton*)this)->SetPressed( FALSE ); + ((PushButton*)this)->SetPressed( sal_True ); + ((PushButton*)this)->SetPressed( sal_False ); ((PushButton*)this)->Click(); } } @@ -516,7 +516,7 @@ void Window::ImplControlFocus( USHORT nFlags ) if ( GetType() == WINDOW_RADIOBUTTON ) { if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( TRUE, nFlags ); + ((RadioButton*)this)->ImplCallClick( sal_True, nFlags ); else ImplGrabFocus( nFlags ); } @@ -527,32 +527,32 @@ void Window::ImplControlFocus( USHORT nFlags ) // ----------------------------------------------------------------------- -BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) +sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); - USHORT nKeyCode = aKeyCode.GetCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); Window* pSWindow; Window* pTempWindow; Window* pButtonWindow; - USHORT i; - USHORT iButton; - USHORT iButtonStart; - USHORT iTemp; - USHORT nIndex; - USHORT nFormStart; - USHORT nFormEnd; - USHORT nDlgCtrlFlags; + sal_uInt16 i; + sal_uInt16 iButton; + sal_uInt16 iButtonStart; + sal_uInt16 iTemp; + sal_uInt16 nIndex; + sal_uInt16 nFormStart; + sal_uInt16 nFormEnd; + sal_uInt16 nDlgCtrlFlags; // Ohne Focus-Window koennen wir auch keine Steuerung uebernehmen Window* pFocusWindow = Application::GetFocusWindow(); if ( !pFocusWindow || !ImplIsWindowOrChild( pFocusWindow ) ) - return FALSE; + return sal_False; // Focus-Fenster in der Child-Liste suchen pSWindow = ::ImplFindDlgCtrlWindow( this, pFocusWindow, nIndex, nFormStart, nFormEnd ); if ( !pSWindow ) - return FALSE; + return sal_False; i = nIndex; nDlgCtrlFlags = 0; @@ -571,7 +571,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) if ( nKeyCode == KEY_RETURN ) { // Wir suchen zuerst nach einem DefPushButton/CancelButton - pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, TRUE ); + pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True ); iButtonStart = iButton; while ( pButtonWindow ) { @@ -579,17 +579,17 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) pButtonWindow->mpWindowImpl->mbPushButton ) break; - pButtonWindow = ImplGetNextWindow( this, iButton, iButton, TRUE ); + pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True ); if ( (iButton <= iButtonStart) || (iButton > nFormEnd) ) pButtonWindow = NULL; } if ( bKeyInput && !pButtonWindow && (nDlgCtrlFlags & WINDOW_DLGCTRL_RETURN) ) { - USHORT nType; - USHORT nGetFocusFlags = GETFOCUS_TAB; - USHORT nNewIndex; - USHORT iStart; + sal_uInt16 nType; + sal_uInt16 nGetFocusFlags = GETFOCUS_TAB; + sal_uInt16 nNewIndex; + sal_uInt16 iStart; if ( aKeyCode.IsShift() ) { nType = DLGWINDOW_PREV; @@ -618,7 +618,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) nGetFocusFlags |= GETFOCUS_AROUND; } pTempWindow->ImplControlFocus( nGetFocusFlags ); - return TRUE; + return sal_True; } else { @@ -640,21 +640,21 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->GetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = 0; - return TRUE; + return sal_True; } } } else if ( nKeyCode == KEY_ESCAPE ) { // Wir suchen zuerst nach einem DefPushButton/CancelButton - pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, TRUE ); + pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True ); iButtonStart = iButton; while ( pButtonWindow ) { if ( pButtonWindow->GetType() == WINDOW_CANCELBUTTON ) break; - pButtonWindow = ImplGetNextWindow( this, iButton, iButton, TRUE ); + pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True ); if ( (iButton <= iButtonStart) || (iButton > nFormEnd) ) pButtonWindow = NULL; } @@ -663,9 +663,9 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( FALSE ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; - return TRUE; + return sal_True; } } } @@ -676,10 +676,10 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) // keine Alt-Taste abfangen, wegen Windows if ( !aKeyCode.IsMod2() ) { - USHORT nType; - USHORT nGetFocusFlags = GETFOCUS_TAB; - USHORT nNewIndex; - BOOL bFormular = FALSE; + sal_uInt16 nType; + sal_uInt16 nGetFocusFlags = GETFOCUS_TAB; + sal_uInt16 nNewIndex; + sal_Bool bFormular = sal_False; // Bei Ctrl-Tab erstmal testen, ob zwischen Formularen // gesprungen werden soll @@ -688,7 +688,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) // Gruppe suchen Window* pFormularFirstWindow = NULL; Window* pLastFormularFirstWindow = NULL; - pTempWindow = ImplGetChildWindow( this, 0, iTemp, FALSE ); + pTempWindow = ImplGetChildWindow( this, 0, iTemp, sal_False ); Window* pPrevFirstFormularFirstWindow = NULL; Window* pFirstFormularFirstWindow = pTempWindow; while ( pTempWindow ) @@ -696,7 +696,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) if ( pTempWindow->ImplGetWindow()->IsDialogControlStart() ) { if ( iTemp != 0 ) - bFormular = TRUE; + bFormular = sal_True; if ( aKeyCode.IsShift() ) { if ( iTemp <= nIndex ) @@ -711,7 +711,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) pLastFormularFirstWindow = pTempWindow; } - pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, FALSE ); + pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, sal_False ); if ( !iTemp ) pTempWindow = NULL; } @@ -726,9 +726,9 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) pFormularFirstWindow = pFirstFormularFirstWindow; } - USHORT nFoundFormStart = 0; - USHORT nFoundFormEnd = 0; - USHORT nTempIndex = 0; + sal_uInt16 nFoundFormStart = 0; + sal_uInt16 nFoundFormEnd = 0; + sal_uInt16 nTempIndex = 0; if ( ::ImplFindDlgCtrlWindow( this, pFormularFirstWindow, nTempIndex, nFoundFormStart, nFoundFormEnd ) ) { @@ -737,7 +737,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) if ( pFormularFirstWindow ) { pFormularFirstWindow->ImplControlFocus(); - return TRUE; + return sal_True; } } } @@ -773,7 +773,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->GetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = 0; - return TRUE; + return sal_True; } else if ( pWindow ) { @@ -789,7 +789,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) nGetFocusFlags |= GETFOCUS_AROUND; } pWindow->ImplControlFocus( nGetFocusFlags ); - return TRUE; + return sal_True; } } } @@ -812,7 +812,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) { if ( pWindow != pSWindow ) pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD ); - return TRUE; + return sal_True; } if ( nStyle & WB_GROUP ) @@ -839,7 +839,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) if ( pWindow->IsVisible() && pWindow->IsEnabled() && pWindow->IsInputEnabled() ) { pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD ); - return TRUE; + return sal_True; } pWindow = pWindow->GetWindow( WINDOW_NEXT ); @@ -853,11 +853,11 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) pSWindow = ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd ); if ( pSWindow ) { - USHORT nGetFocusFlags = GETFOCUS_MNEMONIC; + sal_uInt16 nGetFocusFlags = GETFOCUS_MNEMONIC; if ( pSWindow == ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd ) ) nGetFocusFlags |= GETFOCUS_UNIQUEMNEMONIC; pSWindow->ImplControlFocus( nGetFocusFlags ); - return TRUE; + return sal_True; } } } @@ -869,30 +869,30 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow) ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( FALSE ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } - ((PushButton*)pButtonWindow)->SetPressed( TRUE ); + ((PushButton*)pButtonWindow)->SetPressed( sal_True ); mpWindowImpl->mpDlgCtrlDownWindow = pButtonWindow; } else if ( mpWindowImpl->mpDlgCtrlDownWindow == pButtonWindow ) { mpWindowImpl->mpDlgCtrlDownWindow = NULL; - ((PushButton*)pButtonWindow)->SetPressed( FALSE ); + ((PushButton*)pButtonWindow)->SetPressed( sal_False ); ((PushButton*)pButtonWindow)->Click(); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- // checks if this window has dialog control -BOOL Window::ImplHasDlgCtrl() +sal_Bool Window::ImplHasDlgCtrl() { Window* pDlgCtrlParent; Window* pDlgCtrl; @@ -906,9 +906,9 @@ BOOL Window::ImplHasDlgCtrl() pDlgCtrlParent = pDlgCtrlParent->ImplGetParent(); if ( !pDlgCtrlParent || ((pDlgCtrlParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) != WB_DIALOGCONTROL) ) - return FALSE; + return sal_False; else - return TRUE; + return sal_True; } void Window::ImplDlgCtrlNextWindow() @@ -916,9 +916,9 @@ void Window::ImplDlgCtrlNextWindow() Window* pDlgCtrlParent; Window* pDlgCtrl; Window* pSWindow; - USHORT nIndex; - USHORT nFormStart; - USHORT nFormEnd; + sal_uInt16 nIndex; + sal_uInt16 nFormStart; + sal_uInt16 nFormEnd; // lookup window for dialog control pDlgCtrl = this; @@ -945,14 +945,14 @@ if ( !pDlgCtrlParent || (GetStyle() & WB_NODIALOGCONTROL) || ((pDlgCtrlParent->G // ----------------------------------------------------------------------- static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, - BOOL bGetFocus ) + sal_Bool bGetFocus ) { PushButton* pOldDefButton = NULL; PushButton* pNewDefButton = NULL; Window* pSWindow; - USHORT i; - USHORT nFormStart; - USHORT nFormEnd; + sal_uInt16 i; + sal_uInt16 nFormStart; + sal_uInt16 nFormEnd; // Formular suchen pSWindow = ::ImplFindDlgCtrlWindow( pParent, pFocusWindow, i, nFormStart, nFormEnd ); @@ -962,7 +962,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, nFormEnd = 0xFFFF; } - pSWindow = ImplGetChildWindow( pParent, nFormStart, i, FALSE ); + pSWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_False ); while ( pSWindow ) { if ( pSWindow->ImplIsPushButton() ) @@ -976,14 +976,14 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, pNewDefButton = pPushButton; } - pSWindow = ImplGetNextWindow( pParent, i, i, FALSE ); + pSWindow = ImplGetNextWindow( pParent, i, i, sal_False ); if ( !i || (i > nFormEnd) ) pSWindow = NULL; } if ( !bGetFocus ) { - USHORT nDummy; + sal_uInt16 nDummy; Window* pNewFocusWindow = Application::GetFocusWindow(); if ( !pNewFocusWindow || !pParent->ImplIsWindowOrChild( pNewFocusWindow ) ) pNewDefButton = NULL; @@ -995,19 +995,19 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, if ( pOldDefButton != pNewDefButton ) { if ( pOldDefButton ) - pOldDefButton->ImplSetDefButton( FALSE ); + pOldDefButton->ImplSetDefButton( sal_False ); if ( pNewDefButton ) - pNewDefButton->ImplSetDefButton( TRUE ); + pNewDefButton->ImplSetDefButton( sal_True ); } } // ----------------------------------------------------------------------- -void Window::ImplDlgCtrlFocusChanged( Window* pWindow, BOOL bGetFocus ) +void Window::ImplDlgCtrlFocusChanged( Window* pWindow, sal_Bool bGetFocus ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( FALSE ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } @@ -1018,9 +1018,9 @@ void Window::ImplDlgCtrlFocusChanged( Window* pWindow, BOOL bGetFocus ) Window* Window::ImplFindDlgCtrlWindow( Window* pWindow ) { - USHORT nIndex; - USHORT nFormStart; - USHORT nFormEnd; + sal_uInt16 nIndex; + sal_uInt16 nFormStart; + sal_uInt16 nFormEnd; // Focus-Fenster in der Child-Liste suchen und zurueckgeben return ::ImplFindDlgCtrlWindow( this, pWindow, nIndex, nFormStart, nFormEnd ); @@ -1046,7 +1046,7 @@ Window* Window::GetParentLabeledBy( const Window* ) const static sal_Unicode getAccel( const String& rStr ) { sal_Unicode nChar = 0; - USHORT nPos = 0; + sal_uInt16 nPos = 0; do { nPos = rStr.Search( '~', nPos ); @@ -1087,10 +1087,10 @@ Window* Window::GetLabelFor() const { // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text. // See tools/options/print for example. - BOOL bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE); + sal_Bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE); Window* pSWindow = NULL; // get index, form start and form end - USHORT nIndex=0, nFormStart=0, nFormEnd=0; + sal_uInt16 nIndex=0, nFormStart=0, nFormEnd=0; pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, const_cast<Window*>(this), nIndex, @@ -1104,7 +1104,7 @@ Window* Window::GetLabelFor() const nAccel, nFormStart, nFormEnd, - FALSE ); + sal_False ); } else { @@ -1116,7 +1116,7 @@ Window* Window::GetLabelFor() const pSWindow = ::ImplGetChildWindow( pFrameWindow, nIndex, nIndex, - FALSE ); + sal_False ); if( pSWindow && pSWindow->IsVisible() && ! (pSWindow->GetStyle() & WB_NOLABEL) ) { WindowType nType = pSWindow->GetType(); @@ -1174,7 +1174,7 @@ Window* Window::GetLabeledBy() const // is directly before the control // get form start and form end and index of this control - USHORT nIndex, nFormStart, nFormEnd; + sal_uInt16 nIndex, nFormStart, nFormEnd; Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, const_cast<Window*>(this), nIndex, @@ -1189,13 +1189,13 @@ Window* Window::GetLabeledBy() const { nFormStart = nIndex-1; } - for( USHORT nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- ) + for( sal_uInt16 nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- ) { - USHORT nFoundIndex = 0; + sal_uInt16 nFoundIndex = 0; pSWindow = ::ImplGetChildWindow( pFrameWindow, nSearchIndex, nFoundIndex, - FALSE ); + sal_False ); if( pSWindow && pSWindow->IsVisible() && !(pSWindow->GetStyle() & WB_NOLABEL) ) { WindowType nType = pSWindow->GetType(); @@ -1232,14 +1232,14 @@ KeyEvent Window::GetActivationKey() const } if( nAccel ) { - USHORT nCode = 0; + sal_uInt16 nCode = 0; if( nAccel >= 'a' && nAccel <= 'z' ) nCode = KEY_A + (nAccel-'a'); else if( nAccel >= 'A' && nAccel <= 'Z' ) nCode = KEY_A + (nAccel-'A'); else if( nAccel >= '0' && nAccel <= '9' ) nCode = KEY_0 + (nAccel-'0'); - KeyCode aKeyCode( nCode, FALSE, FALSE, TRUE, FALSE ); + KeyCode aKeyCode( nCode, sal_False, sal_False, sal_True, sal_False ); aKeyEvent = KeyEvent( nAccel, aKeyCode ); } return aKeyEvent; diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 95e6c6113c45..afdf5ca99035 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -126,7 +126,7 @@ void DockingAreaWindow::StateChanged( StateChangedType nType ) // ----------------------------------------------------------------------- -BOOL DockingAreaWindow::IsHorizontal() const +sal_Bool DockingAreaWindow::IsHorizontal() const { return ( mpImplData->meAlign == WINDOWALIGN_TOP || mpImplData->meAlign == WINDOWALIGN_BOTTOM ); } @@ -149,7 +149,7 @@ WindowAlign DockingAreaWindow::GetAlign() const void DockingAreaWindow::Paint( const Rectangle& ) { - EnableNativeWidget( TRUE ); // only required because the toolkit curently switches this flag off + EnableNativeWidget( sal_True ); // only required because the toolkit curently switches this flag off if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) ) { ImplControlValue aControlValue; @@ -159,7 +159,7 @@ void DockingAreaWindow::Paint( const Rectangle& ) { // give NWF a hint that this dockingarea is adjacent to the menubar // useful for special gradient effects that should cover both windows - aToolbarValue.mbIsTopDockingArea = TRUE; + aToolbarValue.mbIsTopDockingArea = sal_True; } aControlValue.setOptionalVal( (void *)(&aToolbarValue) ); ControlState nState = CTRL_STATE_ENABLED; @@ -174,8 +174,8 @@ void DockingAreaWindow::Paint( const Rectangle& ) aCtrlRegion, nState, aControlValue, rtl::OUString() ); // each toolbar gets a thin border to better recognize its borders on the homogeneous docking area - USHORT nChildren = GetChildCount(); - for( USHORT n = 0; n < nChildren; n++ ) + sal_uInt16 nChildren = GetChildCount(); + for( sal_uInt16 n = 0; n < nChildren; n++ ) { Window* pChild = GetChild( n ); if ( pChild->IsVisible() ) @@ -199,8 +199,8 @@ void DockingAreaWindow::Paint( const Rectangle& ) // create map to find toolbar lines Size aOutSz = GetOutputSizePixel(); std::map< int, int > ranges; - USHORT nChildren = GetChildCount(); - for( USHORT n = 0; n < nChildren; n++ ) + sal_uInt16 nChildren = GetChildCount(); + for( sal_uInt16 n = 0; n < nChildren; n++ ) { Window* pChild = GetChild( n ); Point aPos = pChild->GetPosPixel(); diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index e67c2d9ecfd5..ec208cc0c4a0 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -62,13 +62,13 @@ class ImplDockFloatWin2 : public FloatingWindow { private: ImplDockingWindowWrapper* mpDockWin; - ULONG mnLastTicks; + sal_uIntPtr mnLastTicks; Timer maDockTimer; Timer maEndDockTimer; Point maDockPos; Rectangle maDockRect; - BOOL mbInMove; - ULONG mnLastUserEvent; + sal_Bool mbInMove; + sal_uIntPtr mnLastUserEvent; DECL_LINK( DockingHdl, ImplDockFloatWin2* ); DECL_LINK( DockTimerHdl, ImplDockFloatWin2* ); @@ -80,18 +80,18 @@ public: virtual void Move(); virtual void Resize(); - virtual void TitleButtonClick( USHORT nButton ); + virtual void TitleButtonClick( sal_uInt16 nButton ); virtual void Pin(); virtual void Roll(); virtual void PopupModeEnd(); virtual void Resizing( Size& rSize ); - virtual BOOL Close(); + virtual sal_Bool Close(); using Window::SetPosSizePixel; virtual void SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, - USHORT nFlags = WINDOW_POSSIZE_ALL ); + sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); - ULONG GetLastTicks() const { return mnLastTicks; } + sal_uIntPtr GetLastTicks() const { return mnLastTicks; } }; // ======================================================================= @@ -101,16 +101,16 @@ ImplDockFloatWin2::ImplDockFloatWin2( Window* pParent, WinBits nWinBits, FloatingWindow( pParent, nWinBits ), mpDockWin( pDockingWin ), mnLastTicks( Time::GetSystemTicks() ), - mbInMove( FALSE ), + mbInMove( sal_False ), mnLastUserEvent( 0 ) { // Daten vom DockingWindow uebernehmen if ( pDockingWin ) { SetSettings( pDockingWin->GetWindow()->GetSettings() ); - Enable( pDockingWin->GetWindow()->IsEnabled(), FALSE ); - EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), FALSE ); - AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), FALSE ); + Enable( pDockingWin->GetWindow()->IsEnabled(), sal_False ); + EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), sal_False ); + AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), sal_False ); EnableAlwaysOnTop( pDockingWin->GetWindow()->IsAlwaysOnTopEnabled() ); SetActivateMode( pDockingWin->GetWindow()->GetActivateMode() ); } @@ -150,7 +150,7 @@ IMPL_LINK( ImplDockFloatWin2, DockTimerHdl, ImplDockFloatWin2*, EMPTYARG ) else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, FALSE ); + mpDockWin->EndDocking( maDockRect, sal_False ); } else { @@ -170,7 +170,7 @@ IMPL_LINK( ImplDockFloatWin2, EndDockTimerHdl, ImplDockFloatWin2*, EMPTYARG ) if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, TRUE ); + mpDockWin->EndDocking( maDockRect, sal_True ); } else { @@ -189,7 +189,7 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG ) Window *pDockingArea = mpDockWin->GetWindow()->GetParent(); PointerState aState = pDockingArea->GetPointerState(); - BOOL bRealMove = TRUE; + sal_Bool bRealMove = sal_True; if( GetStyle() & WB_OWNERDRAWDECORATION ) { // for windows with ownerdraw decoration @@ -210,9 +210,9 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG ) PointerState aBorderState = pBorder->GetPointerState(); if( aBorderRect.IsInside( aBorderState.maPos ) ) - bRealMove = TRUE; + bRealMove = sal_True; else - bRealMove = FALSE; + bRealMove = sal_False; } } @@ -232,7 +232,7 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG ) if( ! mpDockWin->IsDocking() ) mpDockWin->StartDocking( aMousePos, maDockRect ); - BOOL bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); + sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); if( ! bFloatMode ) { @@ -250,7 +250,7 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG ) EndDockTimerHdl( this ); } } - mbInMove = FALSE; + mbInMove = sal_False; return 0; } // ----------------------------------------------------------------------- @@ -260,7 +260,7 @@ void ImplDockFloatWin2::Move() if( mbInMove ) return; - mbInMove = TRUE; + mbInMove = sal_True; FloatingWindow::Move(); mpDockWin->GetWindow()->Move(); @@ -292,7 +292,7 @@ void ImplDockFloatWin2::Resize() void ImplDockFloatWin2::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, - USHORT nFlags ) + sal_uInt16 nFlags ) { FloatingWindow::SetPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); } @@ -300,7 +300,7 @@ void ImplDockFloatWin2::SetPosSizePixel( long nX, long nY, // ----------------------------------------------------------------------- -void ImplDockFloatWin2::TitleButtonClick( USHORT nButton ) +void ImplDockFloatWin2::TitleButtonClick( sal_uInt16 nButton ) { FloatingWindow::TitleButtonClick( nButton ); mpDockWin->TitleButtonClick( nButton ); @@ -340,7 +340,7 @@ void ImplDockFloatWin2::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -BOOL ImplDockFloatWin2::Close() +sal_Bool ImplDockFloatWin2::Close() { return mpDockWin->Close(); } @@ -376,33 +376,33 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const Window return NULL; } -BOOL DockingManager::IsDockable( const Window *pWindow ) +sal_Bool DockingManager::IsDockable( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); /* if( pWindow->HasDockingHandler() ) - return TRUE; + return sal_True; */ return (pWrapper != NULL); } -BOOL DockingManager::IsFloating( const Window *pWindow ) +sal_Bool DockingManager::IsFloating( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) return pWrapper->IsFloatingMode(); else - return FALSE; + return sal_False; } -BOOL DockingManager::IsLocked( const Window *pWindow ) +sal_Bool DockingManager::IsLocked( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsLocked() ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } void DockingManager::Lock( const Window *pWindow ) @@ -419,14 +419,14 @@ void DockingManager::Unlock( const Window *pWindow ) pWrapper->Unlock(); } -void DockingManager::SetFloatingMode( const Window *pWindow, BOOL bFloating ) +void DockingManager::SetFloatingMode( const Window *pWindow, sal_Bool bFloating ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) pWrapper->SetFloatingMode( bFloating ); } -void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow, ULONG nFlags ) +void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow, sal_uIntPtr nFlags ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) @@ -441,13 +441,13 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ); } -BOOL DockingManager::IsInPopupMode( const Window *pWindow ) +sal_Bool DockingManager::IsInPopupMode( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsInPopupMode() ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -491,7 +491,7 @@ void DockingManager::RemoveWindow( const Window *pWindow ) void DockingManager::SetPosSizePixel( Window *pWindow, long nX, long nY, long nWidth, long nHeight, - USHORT nFlags ) + sal_uInt16 nFlags ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) @@ -532,8 +532,8 @@ class ImplPopupFloatWin : public FloatingWindow { private: ImplDockingWindowWrapper* mpDockingWin; - BOOL mbHighlight; - BOOL mbMoving; + sal_Bool mbHighlight; + sal_Bool mbMoving; bool mbTrackingEnabled; Point maDelta; Point maTearOffPosition; @@ -566,13 +566,13 @@ public: ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) : FloatingWindow( pParent, WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW) { - mpWindowImpl->mbToolbarFloatingWindow = TRUE; // indicate window type, required for accessibility + mpWindowImpl->mbToolbarFloatingWindow = sal_True; // indicate window type, required for accessibility // which should not see this window as a toplevel window mpDockingWin = pDockingWin; - mbHighlight = FALSE; - mbMoving = FALSE; - mbTrackingEnabled = FALSE; - mbGripAtBottom = TRUE; + mbHighlight = sal_False; + mbMoving = sal_False; + mbTrackingEnabled = sal_False; + mbGripAtBottom = sal_True; mbHasGrip = bHasGrip; ImplSetBorder(); @@ -682,9 +682,9 @@ void ImplPopupFloatWin::DrawBorder() void ImplPopupFloatWin::DrawGrip() { - BOOL bLinecolor = IsLineColor(); + sal_Bool bLinecolor = IsLineColor(); Color aLinecolor = GetLineColor(); - BOOL bFillcolor = IsFillColor(); + sal_Bool bFillcolor = IsFillColor(); Color aFillcolor = GetFillColor(); // draw background @@ -697,7 +697,7 @@ void ImplPopupFloatWin::DrawGrip() if( mbHighlight ) { Erase( aRect ); - DrawSelectionBackground( aRect, 2, FALSE, TRUE, FALSE ); + DrawSelectionBackground( aRect, 2, sal_False, sal_True, sal_False ); } else { @@ -784,18 +784,18 @@ void ImplPopupFloatWin::MouseMove( const MouseEvent& rMEvt ) if( mbTrackingEnabled && rMEvt.IsLeft() && GetDragRect().IsInside( aMousePos ) ) { // start window move - mbMoving = TRUE; + mbMoving = sal_True; StartTracking( STARTTRACK_NOKEYCANCEL ); return; } if( !mbHighlight && GetDragRect().IsInside( aMousePos ) ) { - mbHighlight = TRUE; + mbHighlight = sal_True; DrawGrip(); } if( mbHighlight && ( rMEvt.IsLeaveWindow() || !GetDragRect().IsInside( aMousePos ) ) ) { - mbHighlight = FALSE; + mbHighlight = sal_False; DrawGrip(); } } @@ -832,7 +832,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbMoving = FALSE; + mbMoving = sal_False; EndPopupMode( FLOATWIN_POPUPMODEEND_TEAROFF ); } else if ( !rTEvt.GetMouseEvent().IsSynthetic() ) @@ -856,39 +856,39 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow ) mpDockingWindow = (Window*) pWindow; mpParent = pWindow->GetParent(); - mbDockable = TRUE; - mbLocked = FALSE; + mbDockable = sal_True; + mbLocked = sal_False; mnFloatBits = WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES); DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow ); if( pDockWin ) mnFloatBits = pDockWin->GetFloatStyle(); // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = FALSE; + mbStartDockingEnabled = sal_False; } ImplDockingWindowWrapper::~ImplDockingWindowWrapper() { if ( IsFloatingMode() ) { - GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE ); - SetFloatingMode( FALSE ); + GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); + SetFloatingMode( sal_False ); } } // ----------------------------------------------------------------------- -BOOL ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) +sal_Bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) { if ( !mbDockable ) - return FALSE; + return sal_False; if( !mbStartDockingEnabled ) - return FALSE; + return sal_False; maMouseOff = rPos; maMouseStart = maMouseOff; - mbDocking = TRUE; + mbDocking = sal_True; mbLastFloatMode = IsFloatingMode(); mbStartFloat = mbLastFloatMode; @@ -932,7 +932,7 @@ BOOL ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) GetWindow()->ImplGetFrameWindow()->ImplUpdateAll(); GetWindow()->StartTracking( STARTTRACK_KEYMOD ); - return TRUE; + return sal_True; } // ======================================================================= @@ -941,15 +941,15 @@ void ImplDockingWindowWrapper::ImplInitData() { mpDockingWindow = NULL; - //GetWindow()->mpWindowImpl->mbDockWin = TRUE; // TODO: must be eliminated + //GetWindow()->mpWindowImpl->mbDockWin = sal_True; // TODO: must be eliminated mpFloatWin = NULL; - mbDockCanceled = FALSE; - mbFloatPrevented = FALSE; - mbDocking = FALSE; - mbPined = FALSE; - mbRollUp = FALSE; - mbDockBtn = FALSE; - mbHideBtn = FALSE; + mbDockCanceled = sal_False; + mbFloatPrevented = sal_False; + mbDocking = sal_False; + mbPined = sal_False; + mbRollUp = sal_False; + mbDockBtn = sal_False; + mbHideBtn = sal_False; maMaxOutSize = Size( SHRT_MAX, SHRT_MAX ); } @@ -962,13 +962,13 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbDocking = FALSE; + mbDocking = sal_False; GetWindow()->HideTracking(); if ( rTEvt.IsTrackingCanceled() ) { - mbDockCanceled = TRUE; + mbDockCanceled = sal_True; EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); - mbDockCanceled = FALSE; + mbDockCanceled = sal_False; } else EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); @@ -996,9 +996,9 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) aPos.X() += maMouseOff.X(); aPos.Y() += maMouseOff.Y(); - BOOL bFloatMode = Docking( aPos, aTrackRect ); + sal_Bool bFloatMode = Docking( aPos, aTrackRect ); - mbFloatPrevented = FALSE; + mbFloatPrevented = sal_False; if ( mbLastFloatMode != bFloatMode ) { if ( bFloatMode ) @@ -1021,7 +1021,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) mbLastFloatMode = bFloatMode; } - USHORT nTrackStyle; + sal_uInt16 nTrackStyle; if ( bFloatMode ) nTrackStyle = SHOWTRACK_OBJECT; else @@ -1058,12 +1058,12 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe DockingData data( rPoint, rRect, IsFloatingMode() ); GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_STARTDOCKING, &data ); - mbDocking = TRUE; + mbDocking = sal_True; } // ----------------------------------------------------------------------- -BOOL ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) +sal_Bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) { DockingData data( rPoint, rRect, IsFloatingMode() ); @@ -1074,18 +1074,18 @@ BOOL ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) +void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) { Rectangle aRect( rRect ); if ( !IsDockingCanceled() ) { - BOOL bShow = FALSE; + sal_Bool bShow = sal_False; if ( bFloatMode != IsFloatingMode() ) { - GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE ); + GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); SetFloatingMode( bFloatMode ); - bShow = TRUE; + bShow = sal_True; if ( bFloatMode ) { // #i44800# always use outputsize - as in all other places @@ -1101,30 +1101,30 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, BOOL bFloatMo } if ( bShow ) - GetWindow()->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + GetWindow()->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } EndDockingData data( aRect, IsFloatingMode(), IsDockingCanceled() ); GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_ENDDOCKING, &data ); - mbDocking = FALSE; + mbDocking = sal_False; // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = FALSE; + mbStartDockingEnabled = sal_False; } // ----------------------------------------------------------------------- -BOOL ImplDockingWindowWrapper::PrepareToggleFloatingMode() +sal_Bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() { - BOOL bFloating = TRUE; + sal_Bool bFloating = sal_True; GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_PREPARETOGGLEFLOATING, &bFloating ); return bFloating; } // ----------------------------------------------------------------------- -BOOL ImplDockingWindowWrapper::Close() +sal_Bool ImplDockingWindowWrapper::Close() { // TODO: send event /* @@ -1132,15 +1132,15 @@ BOOL ImplDockingWindowWrapper::Close() ImplAddDel( &aDelData ); GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) - return FALSE; + return sal_False; - GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE ); + GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); */ - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -1157,12 +1157,12 @@ void ImplDockingWindowWrapper::ToggleFloatingMode() GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_TOGGLEFLOATING ); // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = FALSE; + mbStartDockingEnabled = sal_False; } // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::TitleButtonClick( USHORT nType ) +void ImplDockingWindowWrapper::TitleButtonClick( sal_uInt16 nType ) { if( nType == TITLE_BUTTON_MENU ) { @@ -1211,7 +1211,7 @@ void ImplDockingWindowWrapper::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::ShowTitleButton( USHORT nButton, BOOL bVisible ) +void ImplDockingWindowWrapper::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) { if ( mpFloatWin ) mpFloatWin->ShowTitleButton( nButton, bVisible ); @@ -1226,7 +1226,7 @@ void ImplDockingWindowWrapper::ShowTitleButton( USHORT nButton, BOOL bVisible ) // ----------------------------------------------------------------------- -BOOL ImplDockingWindowWrapper::IsTitleButtonVisible( USHORT nButton ) const +sal_Bool ImplDockingWindowWrapper::IsTitleButtonVisible( sal_uInt16 nButton ) const { if ( mpFloatWin ) return mpFloatWin->IsTitleButtonVisible( nButton ); @@ -1241,13 +1241,13 @@ BOOL ImplDockingWindowWrapper::IsTitleButtonVisible( USHORT nButton ) const // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, ULONG nFlags ) +void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, sal_uIntPtr nFlags ) { // do nothing if window is floating if( IsFloatingMode() ) return; - GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE ); + GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); // prepare reparenting Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); @@ -1304,7 +1304,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, ULONG nF IMPL_LINK( ImplDockingWindowWrapper, PopupModeEnd, void*, EMPTYARG ) { - GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE ); + GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); // set parameter for handler before destroying floating window ImplPopupFloatWin *pPopupFloatWin = (ImplPopupFloatWin*) mpFloatWin; @@ -1335,17 +1335,17 @@ IMPL_LINK( ImplDockingWindowWrapper, PopupModeEnd, void*, EMPTYARG ) } -BOOL ImplDockingWindowWrapper::IsInPopupMode() const +sal_Bool ImplDockingWindowWrapper::IsInPopupMode() const { if( GetFloatingWindow() ) return GetFloatingWindow()->IsInPopupMode(); else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode ) +void ImplDockingWindowWrapper::SetFloatingMode( sal_Bool bFloatMode ) { // do nothing if window is docked and locked if( !IsFloatingMode() && IsLocked() ) @@ -1355,11 +1355,11 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode ) { if ( PrepareToggleFloatingMode() ) { - BOOL bVisible = GetWindow()->IsVisible(); + sal_Bool bVisible = GetWindow()->IsVisible(); if ( bFloatMode ) { - GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE ); + GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); maDockPos = GetWindow()->GetPosPixel(); @@ -1425,13 +1425,13 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode ) mpFloatWin = pWin; if ( bVisible ) - GetWindow()->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + GetWindow()->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); ToggleFloatingMode(); } else { - GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE ); + GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); // FloatingDaten wird im FloatingWindow speichern maFloatPos = mpFloatWin->GetPosPixel(); @@ -1496,7 +1496,7 @@ void ImplDockingWindowWrapper::SetTabStop() void ImplDockingWindowWrapper::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, - USHORT nFlags ) + sal_uInt16 nFlags ) { if ( mpFloatWin ) mpFloatWin->SetPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); @@ -1564,14 +1564,14 @@ Point ImplDockingWindowWrapper::GetFloatingPos() const // old inlines from DockingWindow // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::SetPin( BOOL bPin ) +void ImplDockingWindowWrapper::SetPin( sal_Bool bPin ) { if ( mpFloatWin ) mpFloatWin->SetPin( bPin ); mbPined = bPin; } -BOOL ImplDockingWindowWrapper::IsPined() const +sal_Bool ImplDockingWindowWrapper::IsPined() const { if ( mpFloatWin ) return mpFloatWin->IsPined(); @@ -1582,17 +1582,17 @@ void ImplDockingWindowWrapper::RollUp() { if ( mpFloatWin ) mpFloatWin->RollUp(); - mbRollUp = TRUE; + mbRollUp = sal_True; } void ImplDockingWindowWrapper::RollDown() { if ( mpFloatWin ) mpFloatWin->RollDown(); - mbRollUp = FALSE; + mbRollUp = sal_False; } -BOOL ImplDockingWindowWrapper::IsRollUp() const +sal_Bool ImplDockingWindowWrapper::IsRollUp() const { if ( mpFloatWin ) return mpFloatWin->IsRollUp(); @@ -1649,7 +1649,7 @@ void ImplDockingWindowWrapper::SetFloatingPos( const Point& rNewPos ) maFloatPos = rNewPos; } -BOOL ImplDockingWindowWrapper::IsFloatingMode() const +sal_Bool ImplDockingWindowWrapper::IsFloatingMode() const { return (mpFloatWin != NULL); } @@ -1667,7 +1667,7 @@ Rectangle ImplDockingWindowWrapper::GetDragArea() const void ImplDockingWindowWrapper::Lock() { - mbLocked = TRUE; + mbLocked = sal_True; // only toolbars support locking ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() ); if( pToolBox ) @@ -1676,14 +1676,14 @@ void ImplDockingWindowWrapper::Lock() void ImplDockingWindowWrapper::Unlock() { - mbLocked = FALSE; + mbLocked = sal_False; // only toolbars support locking ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() ); if( pToolBox ) pToolBox->Lock( mbLocked ); } -BOOL ImplDockingWindowWrapper::IsLocked() const +sal_Bool ImplDockingWindowWrapper::IsLocked() const { return mbLocked; } diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index c8e382bad982..8b0f1030285f 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -82,12 +82,12 @@ class ImplDockFloatWin : public FloatingWindow { private: DockingWindow* mpDockWin; - ULONG mnLastTicks; + sal_uIntPtr mnLastTicks; Timer maDockTimer; Point maDockPos; Rectangle maDockRect; - BOOL mbInMove; - ULONG mnLastUserEvent; + sal_Bool mbInMove; + sal_uIntPtr mnLastUserEvent; DECL_LINK( DockingHdl, ImplDockFloatWin* ); DECL_LINK( DockTimerHdl, ImplDockFloatWin* ); @@ -98,14 +98,14 @@ public: virtual void Move(); virtual void Resize(); - virtual void TitleButtonClick( USHORT nButton ); + virtual void TitleButtonClick( sal_uInt16 nButton ); virtual void Pin(); virtual void Roll(); virtual void PopupModeEnd(); virtual void Resizing( Size& rSize ); - virtual BOOL Close(); + virtual sal_Bool Close(); - ULONG GetLastTicks() const { return mnLastTicks; } + sal_uIntPtr GetLastTicks() const { return mnLastTicks; } }; @@ -114,16 +114,16 @@ ImplDockFloatWin::ImplDockFloatWin( Window* pParent, WinBits nWinBits, FloatingWindow( pParent, nWinBits ), mpDockWin( pDockingWin ), mnLastTicks( Time::GetSystemTicks() ), - mbInMove( FALSE ), + mbInMove( sal_False ), mnLastUserEvent( 0 ) { // Daten vom DockingWindow uebernehmen if ( pDockingWin ) { SetSettings( pDockingWin->GetSettings() ); - Enable( pDockingWin->IsEnabled(), FALSE ); - EnableInput( pDockingWin->IsInputEnabled(), FALSE ); - AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), FALSE ); + Enable( pDockingWin->IsEnabled(), sal_False ); + EnableInput( pDockingWin->IsInputEnabled(), sal_False ); + AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), sal_False ); EnableAlwaysOnTop( pDockingWin->IsAlwaysOnTopEnabled() ); SetActivateMode( pDockingWin->GetActivateMode() ); } @@ -155,14 +155,14 @@ IMPL_LINK( ImplDockFloatWin, DockTimerHdl, ImplDockFloatWin*, EMPTYARG ) { // i43499 CTRL disables docking now mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, TRUE ); + mpDockWin->EndDocking( maDockRect, sal_True ); if( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) maDockTimer.Start(); } else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, FALSE ); + mpDockWin->EndDocking( maDockRect, sal_False ); } else { @@ -193,7 +193,7 @@ IMPL_LINK( ImplDockFloatWin, DockingHdl, ImplDockFloatWin*, EMPTYARG ) // mouse pos also in screen pixels Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos ); - BOOL bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); + sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); if( ! bFloatMode ) { mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW ); @@ -203,10 +203,10 @@ IMPL_LINK( ImplDockFloatWin, DockingHdl, ImplDockFloatWin*, EMPTYARG ) { mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking(); maDockTimer.Stop(); - mpDockWin->EndDocking( maDockRect, TRUE ); + mpDockWin->EndDocking( maDockRect, sal_True ); } } - mbInMove = FALSE; + mbInMove = sal_False; return 0; } // ----------------------------------------------------------------------- @@ -216,7 +216,7 @@ void ImplDockFloatWin::Move() if( mbInMove ) return; - mbInMove = TRUE; + mbInMove = sal_True; FloatingWindow::Move(); mpDockWin->Move(); @@ -244,7 +244,7 @@ void ImplDockFloatWin::Resize() // ----------------------------------------------------------------------- -void ImplDockFloatWin::TitleButtonClick( USHORT nButton ) +void ImplDockFloatWin::TitleButtonClick( sal_uInt16 nButton ) { FloatingWindow::TitleButtonClick( nButton ); mpDockWin->TitleButtonClick( nButton ); @@ -284,21 +284,21 @@ void ImplDockFloatWin::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -BOOL ImplDockFloatWin::Close() +sal_Bool ImplDockFloatWin::Close() { return mpDockWin->Close(); } // ======================================================================= -BOOL DockingWindow::ImplStartDocking( const Point& rPos ) +sal_Bool DockingWindow::ImplStartDocking( const Point& rPos ) { if ( !mbDockable ) - return FALSE; + return sal_False; maMouseOff = rPos; maMouseStart = maMouseOff; - mbDocking = TRUE; + mbDocking = sal_True; mbLastFloatMode = IsFloatingMode(); mbStartFloat = mbLastFloatMode; @@ -331,17 +331,17 @@ BOOL DockingWindow::ImplStartDocking( const Point& rPos ) if ( GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_DOCKING && !( mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ) ) // no full drag when migrating to system window - mbDragFull = TRUE; + mbDragFull = sal_True; else { StartDocking(); - mbDragFull = FALSE; + mbDragFull = sal_False; ImplUpdateAll(); ImplGetFrameWindow()->ImplUpdateAll(); } StartTracking( STARTTRACK_KEYMOD ); - return TRUE; + return sal_True; } // ======================================================================= @@ -349,17 +349,17 @@ BOOL DockingWindow::ImplStartDocking( const Point& rPos ) void DockingWindow::ImplInitDockingWindowData() { mpImplData = new ImplData; - mpWindowImpl->mbDockWin = TRUE; + mpWindowImpl->mbDockWin = sal_True; mpFloatWin = NULL; - mbDockCanceled = FALSE; - mbDockPrevented = FALSE; - mbFloatPrevented = FALSE; - mbDocking = FALSE; - mbPined = FALSE; - mbRollUp = FALSE; - mbDockBtn = FALSE; - mbHideBtn = FALSE; + mbDockCanceled = sal_False; + mbDockPrevented = sal_False; + mbFloatPrevented = sal_False; + mbDocking = sal_False; + mbPined = sal_False; + mbRollUp = sal_False; + mbDockBtn = sal_False; + mbHideBtn = sal_False; } // ----------------------------------------------------------------------- @@ -408,7 +408,7 @@ void DockingWindow::ImplLoadRes( const ResId& rResId ) { Window::ImplLoadRes( rResId ); - ULONG nMask = ReadLongRes(); + sal_uIntPtr nMask = ReadLongRes(); if ( (RSC_DOCKINGWINDOW_XYMAPMODE | RSC_DOCKINGWINDOW_X | RSC_DOCKINGWINDOW_Y) & nMask ) @@ -437,8 +437,8 @@ void DockingWindow::ImplLoadRes( const ResId& rResId ) if ( nMask & RSC_DOCKINGWINDOW_FLOATING ) { - if ( (BOOL)ReadShortRes() ) - SetFloatingMode( TRUE ); + if ( (sal_Bool)ReadShortRes() ) + SetFloatingMode( sal_True ); } } @@ -480,8 +480,8 @@ DockingWindow::~DockingWindow() { if ( IsFloatingMode() ) { - Show( FALSE, SHOW_NOFOCUSCHANGE ); - SetFloatingMode( FALSE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); + SetFloatingMode( sal_False ); } delete mpImplData; } @@ -497,7 +497,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbDocking = FALSE; + mbDocking = sal_False; if ( mbDragFull ) { // Bei Abbruch alten Zustand wieder herstellen @@ -513,9 +513,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) HideTracking(); if ( rTEvt.IsTrackingCanceled() ) { - mbDockCanceled = TRUE; + mbDockCanceled = sal_True; EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); - mbDockCanceled = FALSE; + mbDockCanceled = sal_False; } else EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); @@ -545,9 +545,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) aFramePos.Y() += maMouseOff.Y(); if ( mbDragFull ) StartDocking(); - BOOL bFloatMode = Docking( aFramePos, aTrackRect ); - mbDockPrevented = FALSE; - mbFloatPrevented = FALSE; + sal_Bool bFloatMode = Docking( aFramePos, aTrackRect ); + mbDockPrevented = sal_False; + mbFloatPrevented = sal_False; if ( mbLastFloatMode != bFloatMode ) { if ( bFloatMode ) @@ -585,7 +585,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) } else { - USHORT nTrackStyle; + sal_uInt16 nTrackStyle; if ( bFloatMode ) nTrackStyle = SHOWTRACK_BIG; else @@ -625,7 +625,7 @@ long DockingWindow::Notify( NotifyEvent& rNEvt ) if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) ) { SetFloatingMode( !IsFloatingMode() ); - return TRUE; + return sal_True; } else if ( pMEvt->GetClicks() == 1 ) { @@ -643,7 +643,7 @@ long DockingWindow::Notify( NotifyEvent& rNEvt ) } ImplStartDocking( aPos ); } - return TRUE; + return sal_True; } } } @@ -654,7 +654,7 @@ long DockingWindow::Notify( NotifyEvent& rNEvt ) rKey.IsShift() && rKey.IsMod1() ) { SetFloatingMode( !IsFloatingMode() ); - return TRUE; + return sal_True; } } } @@ -666,28 +666,28 @@ long DockingWindow::Notify( NotifyEvent& rNEvt ) void DockingWindow::StartDocking() { - mbDocking = TRUE; + mbDocking = sal_True; } // ----------------------------------------------------------------------- -BOOL DockingWindow::Docking( const Point&, Rectangle& ) +sal_Bool DockingWindow::Docking( const Point&, Rectangle& ) { return IsFloatingMode(); } // ----------------------------------------------------------------------- -void DockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) +void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) { if ( !IsDockingCanceled() ) { - BOOL bShow = FALSE; + sal_Bool bShow = sal_False; if ( bFloatMode != IsFloatingMode() ) { - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); SetFloatingMode( bFloatMode ); - bShow = TRUE; + bShow = sal_True; if ( bFloatMode && mpFloatWin ) mpFloatWin->SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() ); } @@ -701,32 +701,32 @@ void DockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) if ( bShow ) Show(); } - mbDocking = FALSE; + mbDocking = sal_False; } // ----------------------------------------------------------------------- -BOOL DockingWindow::PrepareToggleFloatingMode() +sal_Bool DockingWindow::PrepareToggleFloatingMode() { - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -BOOL DockingWindow::Close() +sal_Bool DockingWindow::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) - return FALSE; + return sal_False; - Show( FALSE, SHOW_NOFOCUSCHANGE ); - return TRUE; + Show( sal_False, SHOW_NOFOCUSCHANGE ); + return sal_True; } // ----------------------------------------------------------------------- @@ -737,7 +737,7 @@ void DockingWindow::ToggleFloatingMode() // ----------------------------------------------------------------------- -void DockingWindow::TitleButtonClick( USHORT ) +void DockingWindow::TitleButtonClick( sal_uInt16 ) { } @@ -794,7 +794,7 @@ void DockingWindow::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -void DockingWindow::ShowTitleButton( USHORT nButton, BOOL bVisible ) +void DockingWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) { if ( mpFloatWin ) mpFloatWin->ShowTitleButton( nButton, bVisible ); @@ -809,7 +809,7 @@ void DockingWindow::ShowTitleButton( USHORT nButton, BOOL bVisible ) // ----------------------------------------------------------------------- -BOOL DockingWindow::IsTitleButtonVisible( USHORT nButton ) const +sal_Bool DockingWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const { if ( mpFloatWin ) return mpFloatWin->IsTitleButtonVisible( nButton ); @@ -824,7 +824,7 @@ BOOL DockingWindow::IsTitleButtonVisible( USHORT nButton ) const // ----------------------------------------------------------------------- -void DockingWindow::SetFloatingMode( BOOL bFloatMode ) +void DockingWindow::SetFloatingMode( sal_Bool bFloatMode ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) @@ -836,11 +836,11 @@ void DockingWindow::SetFloatingMode( BOOL bFloatMode ) { if ( PrepareToggleFloatingMode() ) // changes to floating mode can be vetoed { - BOOL bVisible = IsVisible(); + sal_Bool bVisible = IsVisible(); if ( bFloatMode ) { - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); maDockPos = Window::GetPosPixel(); @@ -889,7 +889,7 @@ void DockingWindow::SetFloatingMode( BOOL bFloatMode ) } else { - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); // FloatingDaten wird im FloatingWindow speichern maFloatPos = mpFloatWin->GetPosPixel(); @@ -970,7 +970,7 @@ void DockingWindow::SetTabStop() void DockingWindow::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, - USHORT nFlags ) + sal_uInt16 nFlags ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) @@ -1096,7 +1096,7 @@ Point DockingWindow::GetFloatingPos() const return maFloatPos; } -BOOL DockingWindow::IsFloatingMode() const +sal_Bool DockingWindow::IsFloatingMode() const { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 323bbe3b0d74..cb441bf23945 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -78,9 +78,9 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) { mpImplData = new ImplData; - mpWindowImpl->mbFloatWin = TRUE; - mbInCleanUp = FALSE; - mbGrabFocus = FALSE; + mpWindowImpl->mbFloatWin = sal_True; + mbInCleanUp = sal_False; + mbGrabFocus = sal_False; DBG_ASSERT( pParent, "FloatWindow::FloatingWindow(): - pParent == NULL!" ); @@ -92,7 +92,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) // no Border, then we dont need a border window if ( !nStyle ) { - mpWindowImpl->mbOverlapWin = TRUE; + mpWindowImpl->mbOverlapWin = sal_True; nStyle |= WB_DIALOGCONTROL; SystemWindow::ImplInit( pParent, nStyle, NULL ); } @@ -107,14 +107,14 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) WinBits nFloatWinStyle = nStyle; // #99154# floaters are not closeable by default anymore, eg fullscreen floater // nFloatWinStyle |= WB_CLOSEABLE; - mpWindowImpl->mbFrame = TRUE; - mpWindowImpl->mbOverlapWin = TRUE; + mpWindowImpl->mbFrame = sal_True; + mpWindowImpl->mbOverlapWin = sal_True; SystemWindow::ImplInit( pParent, nFloatWinStyle & ~WB_BORDER, NULL ); } else { ImplBorderWindow* pBorderWin; - USHORT nBorderStyle = BORDERWINDOW_STYLE_BORDER | BORDERWINDOW_STYLE_FLOAT; + sal_uInt16 nBorderStyle = BORDERWINDOW_STYLE_BORDER | BORDERWINDOW_STYLE_FLOAT; if( nStyle & WB_OWNERDRAWDECORATION ) nBorderStyle |= BORDERWINDOW_STYLE_FRAME; else nBorderStyle |= BORDERWINDOW_STYLE_OVERLAP; @@ -128,7 +128,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL ); pBorderWin->mpWindowImpl->mpClientWindow = this; pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder ); - pBorderWin->SetDisplayActive( TRUE ); + pBorderWin->SetDisplayActive( sal_True ); mpWindowImpl->mpBorderWindow = pBorderWin; mpWindowImpl->mpRealParent = pParent; } @@ -141,11 +141,11 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) mnTitle = (nStyle & WB_MOVEABLE) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE; mnOldTitle = mnTitle; mnPopupModeFlags = 0; - mbInPopupMode = FALSE; - mbPopupMode = FALSE; - mbPopupModeCanceled = FALSE; - mbPopupModeTearOff = FALSE; - mbMouseDown = FALSE; + mbInPopupMode = sal_False; + mbPopupMode = sal_False; + mbPopupModeCanceled = sal_False; + mbPopupModeTearOff = sal_False; + mbMouseDown = sal_False; ImplInitSettings(); } @@ -194,7 +194,7 @@ void FloatingWindow::ImplLoadRes( const ResId& rResId ) { SystemWindow::ImplLoadRes( rResId ); - ULONG nObjMask = ReadLongRes(); + sal_uIntPtr nObjMask = ReadLongRes(); if ( (RSC_FLOATINGWINDOW_WHMAPMODE | RSC_FLOATINGWINDOW_WIDTH | RSC_FLOATINGWINDOW_HEIGHT) & nObjMask ) @@ -240,7 +240,7 @@ FloatingWindow::~FloatingWindow() // ----------------------------------------------------------------------- -Point FloatingWindow::CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, ULONG nFlags, USHORT& rArrangeIndex ) +Point FloatingWindow::CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, sal_uIntPtr nFlags, sal_uInt16& rArrangeIndex ) { return ImplCalcPos( pWindow, rRect, nFlags, rArrangeIndex ); } @@ -248,8 +248,8 @@ Point FloatingWindow::CalcFloatingPosition( Window* pWindow, const Rectangle& rR // ----------------------------------------------------------------------- Point FloatingWindow::ImplCalcPos( Window* pWindow, - const Rectangle& rRect, ULONG nFlags, - USHORT& rArrangeIndex ) + const Rectangle& rRect, sal_uIntPtr nFlags, + sal_uInt16& rArrangeIndex ) { // Fenster-Position ermitteln Point aPos; @@ -265,7 +265,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, Rectangle normRect( rRect ); // rRect is already relative to top-level window normRect.SetPos( pW->ScreenToOutputPixel( normRect.TopLeft() ) ); - BOOL bRTL = Application::GetSettings().GetLayoutRTL(); + sal_Bool bRTL = Application::GetSettings().GetLayoutRTL(); Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ), pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) ); @@ -279,9 +279,9 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, Application::GetBestScreen( bRTL ? devRectRTL : devRect ) ); - USHORT nArrangeAry[5]; - USHORT nArrangeIndex; - BOOL bBreak; + sal_uInt16 nArrangeAry[5]; + sal_uInt16 nArrangeIndex; + sal_Bool bBreak; Point e1,e2; // the common edge between the item rect and the floating window if ( nFlags & FLOATWIN_POPUPMODE_LEFT ) @@ -323,7 +323,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, for ( ; nArrangeIndex < 5; nArrangeIndex++ ) { - bBreak = TRUE; + bBreak = sal_True; switch ( nArrangeAry[nArrangeIndex] ) { @@ -334,12 +334,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, if( bRTL ) // --- RTL --- we're comparing screen coordinates here { if( (devRectRTL.Right()+aSize.Width()) > aScreenRect.Right() ) - bBreak = FALSE; + bBreak = sal_False; } else { if ( aPos.X() < aScreenRect.Left() ) - bBreak = FALSE; + bBreak = sal_False; } if( bBreak ) { @@ -358,12 +358,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, if( bRTL ) // --- RTL --- we're comparing screen coordinates here { if( (devRectRTL.Left() - aSize.Width()) < aScreenRect.Left() ) - bBreak = FALSE; + bBreak = sal_False; } else { if ( aPos.X()+aSize.Width() > aScreenRect.Right() ) - bBreak = FALSE; + bBreak = sal_False; } if( bBreak ) { @@ -380,7 +380,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, aPos.X() = devRect.Left(); aPos.Y() = devRect.Top()-aSize.Height()+1; if ( aPos.Y() < aScreenRect.Top() ) - bBreak = FALSE; + bBreak = sal_False; if( bBreak ) { e1 = devRect.TopLeft(); @@ -395,7 +395,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, case FLOATWIN_POPUPMODE_DOWN: aPos = devRect.BottomLeft(); if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() ) - bBreak = FALSE; + bBreak = sal_False; if( bBreak ) { e1 = devRect.BottomLeft(); @@ -466,7 +466,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, // ----------------------------------------------------------------------- -FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Point& rPos, USHORT& rHitTest ) +FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Point& rPos, sal_uInt16& rHitTest ) { FloatingWindow* pWin = this; @@ -541,20 +541,20 @@ FloatingWindow* FloatingWindow::ImplFindLastLevelFloat() // ----------------------------------------------------------------------- -BOOL FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow ) +sal_Bool FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow ) { FloatingWindow* pWin = this; do { if ( pWin->mpFirstPopupModeWin == pWindow ) - return TRUE; + return sal_True; pWin = pWin->mpNextFloat; } while ( pWin ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -563,7 +563,7 @@ IMPL_LINK( FloatingWindow, ImplEndPopupModeHdl, void*, EMPTYARG ) { mnPostId = 0; mnPopupModeFlags = 0; - mbPopupMode = FALSE; + mbPopupMode = sal_False; PopupModeEnd(); return 0; } @@ -580,12 +580,12 @@ long FloatingWindow::Notify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); KeyCode aKeyCode = pKEvt->GetKeyCode(); - USHORT nKeyCode = aKeyCode.GetCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( (nKeyCode == KEY_ESCAPE) && (GetStyle() & WB_CLOSEABLE) ) { Close(); - return TRUE; + return sal_True; } } } @@ -625,7 +625,7 @@ void FloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) void FloatingWindow::ImplCallPopupModeEnd() { // PopupMode wurde beendet - mbInPopupMode = FALSE; + mbInPopupMode = sal_False; // Handler asyncron rufen if ( !mnPostId ) @@ -641,13 +641,13 @@ void FloatingWindow::PopupModeEnd() // ----------------------------------------------------------------------- -void FloatingWindow::SetTitleType( USHORT nTitle ) +void FloatingWindow::SetTitleType( sal_uInt16 nTitle ) { if ( (mnTitle != nTitle) && mpWindowImpl->mpBorderWindow ) { mnTitle = nTitle; Size aOutSize = GetOutputSizePixel(); - USHORT nTitleStyle; + sal_uInt16 nTitleStyle; if ( nTitle == FLOATWIN_TITLE_NORMAL ) nTitleStyle = BORDERWINDOW_TITLE_SMALL; else if ( nTitle == FLOATWIN_TITLE_TEAROFF ) @@ -661,11 +661,11 @@ void FloatingWindow::SetTitleType( USHORT nTitle ) // ----------------------------------------------------------------------- -void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags ) +void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uIntPtr nFlags ) { // avoid flickering if ( IsVisible() ) - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); if ( IsRollUp() ) RollDown(); @@ -687,7 +687,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags ) nFlags |= FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE; // compute window position according to flags and arrangement - USHORT nArrangeIndex; + sal_uInt16 nArrangeIndex; SetPosPixel( ImplCalcPos( this, rRect, nFlags, nArrangeIndex ) ); // set data and display window @@ -708,11 +708,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags ) maFloatRect.Right() += 2; maFloatRect.Bottom() += 2; mnPopupModeFlags = nFlags; - mbInPopupMode = TRUE; - mbPopupMode = TRUE; - mbPopupModeCanceled = FALSE; - mbPopupModeTearOff = FALSE; - mbMouseDown = FALSE; + mbInPopupMode = sal_True; + mbPopupMode = sal_True; + mbPopupModeCanceled = sal_False; + mbPopupModeTearOff = sal_False; + mbMouseDown = sal_False; mbOldSaveBackMode = IsSaveBackgroundEnabled(); EnableSaveBackground(); @@ -724,22 +724,22 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags ) if( nFlags & FLOATWIN_POPUPMODE_GRABFOCUS ) { // force key input even without focus (useful for menues) - mbGrabFocus = TRUE; + mbGrabFocus = sal_True; } - Show( TRUE, SHOW_NOACTIVATE ); + Show( sal_True, SHOW_NOACTIVATE ); } // ----------------------------------------------------------------------- -void FloatingWindow::StartPopupMode( ToolBox* pBox, ULONG nFlags ) +void FloatingWindow::StartPopupMode( ToolBox* pBox, sal_uIntPtr nFlags ) { // get selected button - USHORT nItemId = pBox->GetDownItemId(); + sal_uInt16 nItemId = pBox->GetDownItemId(); if ( !nItemId ) return; mpImplData->mpBox = pBox; - pBox->ImplFloatControl( TRUE, this ); + pBox->ImplFloatControl( sal_True, this ); // retrieve some data from the ToolBox Rectangle aRect = pBox->GetItemRect( nItemId ); @@ -778,14 +778,14 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, ULONG nFlags ) // ----------------------------------------------------------------------- -void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId ) +void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uIntPtr nFocusId ) { if ( !mbInPopupMode ) return; ImplSVData* pSVData = ImplGetSVData(); - mbInCleanUp = TRUE; // prevent killing this window due to focus change while working with it + mbInCleanUp = sal_True; // prevent killing this window due to focus change while working with it // Bei allen nachfolgenden PopupMode-Fenster den Modus auch beenden while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat != this ) @@ -796,13 +796,13 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId ) pSVData->maWinData.mpFirstFloat = mpNextFloat; mpNextFloat = NULL; - ULONG nPopupModeFlags = mnPopupModeFlags; + sal_uIntPtr nPopupModeFlags = mnPopupModeFlags; // Wenn nicht abgerissen wurde, dann Fenster wieder Hiden if ( !(nFlags & FLOATWIN_POPUPMODEEND_TEAROFF) || !(nPopupModeFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF) ) { - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); // Focus evt. auf ein entsprechendes FloatingWindow weiterschalten if ( nFocusId ) @@ -810,13 +810,13 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId ) else if ( pSVData->maWinData.mpFocusWin && pSVData->maWinData.mpFirstFloat && ImplIsWindowOrChild( pSVData->maWinData.mpFocusWin ) ) pSVData->maWinData.mpFirstFloat->GrabFocus(); - mbPopupModeTearOff = FALSE; + mbPopupModeTearOff = sal_False; } else { - mbPopupModeTearOff = TRUE; + mbPopupModeTearOff = sal_True; if ( nFocusId ) - Window::EndSaveFocus( nFocusId, FALSE ); + Window::EndSaveFocus( nFocusId, sal_False ); } EnableSaveBackground( mbOldSaveBackMode ); @@ -828,7 +828,7 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId ) // ToolBox wieder auf normal schalten if ( mpImplData->mpBox ) { - mpImplData->mpBox->ImplFloatControl( FALSE, this ); + mpImplData->mpBox->ImplFloatControl( sal_False, this ); mpImplData->mpBox = NULL; } @@ -849,12 +849,12 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId ) } } - mbInCleanUp = FALSE; + mbInCleanUp = sal_False; } // ----------------------------------------------------------------------- -void FloatingWindow::EndPopupMode( USHORT nFlags ) +void FloatingWindow::EndPopupMode( sal_uInt16 nFlags ) { ImplEndPopupMode( nFlags ); } diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index bcc5536fd028..af52cbe563d5 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -46,7 +46,7 @@ // ======================================================================= -static USHORT aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] = +static sal_uInt16 aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] = { 0, 0, 0, 0, // KEYFUNC_DONTKNOW KEY_N | KEY_MOD1, 0, 0, 0, // KEYFUNC_NEW @@ -71,9 +71,9 @@ static USHORT aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] = // ----------------------------------------------------------------------- -void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT& rCode3, USHORT& rCode4 ) +void ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 ) { - USHORT nIndex = (USHORT)eFunc; + sal_uInt16 nIndex = (sal_uInt16)eFunc; nIndex *= 4; rCode1 = aImplKeyFuncTab[nIndex]; rCode2 = aImplKeyFuncTab[nIndex+1]; @@ -85,7 +85,7 @@ void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT& KeyCode::KeyCode( KeyFuncType eFunction ) { - USHORT nDummy; + sal_uInt16 nDummy; ImplGetKeyCode( eFunction, nCode, nDummy, nDummy, nDummy ); eFunc = eFunction; } @@ -101,18 +101,18 @@ KeyCode::KeyCode( const ResId& rResId ) { pResMgr->Increment( sizeof( RSHEADER_TYPE ) ); - ULONG nKeyCode = pResMgr->ReadLong(); - ULONG nModifier = pResMgr->ReadLong(); - ULONG nKeyFunc = pResMgr->ReadLong(); + sal_uIntPtr nKeyCode = pResMgr->ReadLong(); + sal_uIntPtr nModifier = pResMgr->ReadLong(); + sal_uIntPtr nKeyFunc = pResMgr->ReadLong(); eFunc = (KeyFuncType)nKeyFunc; if ( eFunc != KEYFUNC_DONTKNOW ) { - USHORT nDummy; + sal_uInt16 nDummy; ImplGetKeyCode( eFunc, nCode, nDummy, nDummy, nDummy ); } else - nCode = sal::static_int_cast<USHORT>(nKeyCode | nModifier); + nCode = sal::static_int_cast<sal_uInt16>(nKeyCode | nModifier); } } @@ -141,15 +141,15 @@ KeyFuncType KeyCode::GetFunction() const if ( eFunc != KEYFUNC_DONTKNOW ) return eFunc; - USHORT nCompCode = GetModifier() | GetCode(); + sal_uInt16 nCompCode = GetModifier() | GetCode(); if ( nCompCode ) { - for ( USHORT i = (USHORT)KEYFUNC_NEW; i < (USHORT)KEYFUNC_FRONT; i++ ) + for ( sal_uInt16 i = (sal_uInt16)KEYFUNC_NEW; i < (sal_uInt16)KEYFUNC_FRONT; i++ ) { - USHORT nKeyCode1; - USHORT nKeyCode2; - USHORT nKeyCode3; - USHORT nKeyCode4; + sal_uInt16 nKeyCode1; + sal_uInt16 nKeyCode2; + sal_uInt16 nKeyCode3; + sal_uInt16 nKeyCode4; ImplGetKeyCode( (KeyFuncType)i, nKeyCode1, nKeyCode2, nKeyCode3, nKeyCode4 ); if ( (nCompCode == nKeyCode1) || (nCompCode == nKeyCode2) || (nCompCode == nKeyCode3) || (nCompCode == nKeyCode4) ) return (KeyFuncType)i; diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx index f4011b9be16e..9d6854430611 100644 --- a/vcl/source/window/keyevent.cxx +++ b/vcl/source/window/keyevent.cxx @@ -74,8 +74,8 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const { KeyEvent aClone(*this); - USHORT nCode = maKeyCode.GetCode(); - USHORT nMod = maKeyCode.GetAllModifier(); + sal_uInt16 nCode = maKeyCode.GetCode(); + sal_uInt16 nMod = maKeyCode.GetAllModifier(); switch (eMode) { diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index cebe1d1f596c..4679915d3627 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -80,9 +80,9 @@ namespace vcl struct MenuLayoutData : public ControlLayoutData { - std::vector< USHORT > m_aLineItemIds; - std::vector< USHORT > m_aLineItemPositions; - std::map< USHORT, Rectangle > m_aVisibleItemBoundRects; + std::vector< sal_uInt16 > m_aLineItemIds; + std::vector< sal_uInt16 > m_aLineItemPositions; + std::map< sal_uInt16, Rectangle > m_aVisibleItemBoundRects; }; } @@ -104,32 +104,32 @@ DBG_NAME( Menu ) #include <xwphook.h> -// return TRUE if hilite should be executed: left mouse button down +// return sal_True if hilite should be executed: left mouse button down // or xwp mouse hook enabled -static BOOL ImplHilite( const MouseEvent& rMEvt ) +static sal_Bool ImplHilite( const MouseEvent& rMEvt ) { - static BOOL init = FALSE; + static sal_Bool init = sal_False; static HOOKCONFIG hc; // read XWP settings at program startup - if (init == FALSE) { - BOOL rc; - ULONG cb = sizeof(HOOKCONFIG); + if (init == sal_False) { + sal_Bool rc; + sal_uIntPtr cb = sizeof(HOOKCONFIG); memset(&hc, 0, sizeof(HOOKCONFIG)); rc = PrfQueryProfileData( HINI_USER, INIAPP_XWPHOOK, INIKEY_HOOK_CONFIG, &hc, &cb); - init = TRUE; + init = sal_True; } // check mouse left button if (rMEvt.GetButtons() == MOUSE_LEFT) - return TRUE; + return sal_True; // return xwp flag return hc.fSlidingMenus; } #endif -static BOOL ImplAccelDisabled() +static sal_Bool ImplAccelDisabled() { // display of accelerator strings may be suppressed via configuration static int nAccelDisabled = -1; @@ -142,12 +142,12 @@ static BOOL ImplAccelDisabled() rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuppressAccelerators" ) ) ); nAccelDisabled = aStr.equalsIgnoreAsciiCaseAscii( "true" ) ? 1 : 0; } - return (nAccelDisabled == 1) ? TRUE : FALSE; + return (nAccelDisabled == 1) ? sal_True : sal_False; } struct MenuItemData { - USHORT nId; // SV Id + sal_uInt16 nId; // SV Id MenuItemType eType; // MenuItem-Type MenuItemBits nBits; // MenuItem-Bits Menu* pSubMenu; // Pointer auf das SubMenu @@ -157,15 +157,15 @@ struct MenuItemData XubString aTipHelpText; // TipHelp-String (eg, expanded filenames) XubString aCommandStr; // CommandString XubString aHelpCommandStr; // Help command string (to reference external help) - ULONG nHelpId; // Help-Id - ULONG nUserValue; // User value + sal_uIntPtr nHelpId; // Help-Id + sal_uIntPtr nUserValue; // User value Image aImage; // Image KeyCode aAccelKey; // Accelerator-Key - BOOL bChecked; // Checked - BOOL bEnabled; // Enabled - BOOL bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true) - BOOL bIsTemporary; // Temporary inserted ('No selection possible') - BOOL bMirrorMode; + sal_Bool bChecked; // Checked + sal_Bool bEnabled; // Enabled + sal_Bool bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true) + sal_Bool bIsTemporary; // Temporary inserted ('No selection possible') + sal_Bool bMirrorMode; long nItemImageAngle; Size aSz; // nur temporaer gueltig XubString aAccessibleName; // accessible name @@ -210,22 +210,22 @@ public: MenuItemList() : List( 16, 4 ) {} ~MenuItemList(); - MenuItemData* Insert( USHORT nId, MenuItemType eType, MenuItemBits nBits, + MenuItemData* Insert( sal_uInt16 nId, MenuItemType eType, MenuItemBits nBits, const XubString& rStr, const Image& rImage, - Menu* pMenu, USHORT nPos ); - void InsertSeparator( USHORT nPos ); - void Remove( USHORT nPos ); + Menu* pMenu, sal_uInt16 nPos ); + void InsertSeparator( sal_uInt16 nPos ); + void Remove( sal_uInt16 nPos ); - MenuItemData* GetData( USHORT nSVId, USHORT& rPos ) const; - MenuItemData* GetData( USHORT nSVId ) const - { USHORT nTemp; return GetData( nSVId, nTemp ); } - MenuItemData* GetDataFromPos( ULONG nPos ) const + MenuItemData* GetData( sal_uInt16 nSVId, sal_uInt16& rPos ) const; + MenuItemData* GetData( sal_uInt16 nSVId ) const + { sal_uInt16 nTemp; return GetData( nSVId, nTemp ); } + MenuItemData* GetDataFromPos( sal_uIntPtr nPos ) const { return (MenuItemData*)List::GetObject( nPos ); } - MenuItemData* SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, USHORT& rPos, USHORT& nDuplicates, USHORT nCurrentPos ) const; - USHORT GetItemCount( xub_Unicode cSelectChar ) const; - USHORT GetItemCount( KeyCode aKeyCode ) const; + MenuItemData* SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, sal_uInt16& rPos, sal_uInt16& nDuplicates, sal_uInt16 nCurrentPos ) const; + sal_uInt16 GetItemCount( xub_Unicode cSelectChar ) const; + sal_uInt16 GetItemCount( KeyCode aKeyCode ) const; uno::Reference< i18n::XCharacterClassification > GetCharClass() const; }; @@ -234,17 +234,17 @@ public: MenuItemList::~MenuItemList() { - for ( ULONG n = Count(); n; ) + for ( sal_uIntPtr n = Count(); n; ) { MenuItemData* pData = GetDataFromPos( --n ); delete pData; } } -MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType, +MenuItemData* MenuItemList::Insert( sal_uInt16 nId, MenuItemType eType, MenuItemBits nBits, const XubString& rStr, const Image& rImage, - Menu* pMenu, USHORT nPos ) + Menu* pMenu, sal_uInt16 nPos ) { MenuItemData* pData = new MenuItemData( rStr, rImage ); pData->nId = nId; @@ -254,11 +254,11 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType, pData->pAutoSubMenu = NULL; pData->nHelpId = 0; pData->nUserValue = 0; - pData->bChecked = FALSE; - pData->bEnabled = TRUE; - pData->bVisible = TRUE; - pData->bIsTemporary = FALSE; - pData->bMirrorMode = FALSE; + pData->bChecked = sal_False; + pData->bEnabled = sal_True; + pData->bVisible = sal_True; + pData->bIsTemporary = sal_False; + pData->bMirrorMode = sal_False; pData->nItemImageAngle = 0; SalItemParams aSalMIData; @@ -276,7 +276,7 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType, return pData; } -void MenuItemList::InsertSeparator( USHORT nPos ) +void MenuItemList::InsertSeparator( sal_uInt16 nPos ) { MenuItemData* pData = new MenuItemData; pData->nId = 0; @@ -286,11 +286,11 @@ void MenuItemList::InsertSeparator( USHORT nPos ) pData->pAutoSubMenu = NULL; pData->nHelpId = 0; pData->nUserValue = 0; - pData->bChecked = FALSE; - pData->bEnabled = TRUE; - pData->bVisible = TRUE; - pData->bIsTemporary = FALSE; - pData->bMirrorMode = FALSE; + pData->bChecked = sal_False; + pData->bEnabled = sal_True; + pData->bVisible = sal_True; + pData->bIsTemporary = sal_False; + pData->bMirrorMode = sal_False; pData->nItemImageAngle = 0; SalItemParams aSalMIData; @@ -307,14 +307,14 @@ void MenuItemList::InsertSeparator( USHORT nPos ) List::Insert( (void*)pData, nPos ); } -void MenuItemList::Remove( USHORT nPos ) +void MenuItemList::Remove( sal_uInt16 nPos ) { - MenuItemData* pData = (MenuItemData*)List::Remove( (ULONG)nPos ); + MenuItemData* pData = (MenuItemData*)List::Remove( (sal_uIntPtr)nPos ); if ( pData ) delete pData; } -MenuItemData* MenuItemList::GetData( USHORT nSVId, USHORT& rPos ) const +MenuItemData* MenuItemList::GetData( sal_uInt16 nSVId, sal_uInt16& rPos ) const { rPos = 0; MenuItemData* pData = (MenuItemData*)GetObject( rPos ); @@ -330,11 +330,11 @@ MenuItemData* MenuItemList::GetData( USHORT nSVId, USHORT& rPos ) const return NULL; } -MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, USHORT& rPos, USHORT& nDuplicates, USHORT nCurrentPos ) const +MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, sal_uInt16& rPos, sal_uInt16& nDuplicates, sal_uInt16 nCurrentPos ) const { const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - USHORT nListCount = (USHORT)Count(); + sal_uInt16 nListCount = (sal_uInt16)Count(); // try character code first nDuplicates = GetItemCount( cSelectChar ); // return number of duplicates @@ -367,7 +367,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod MenuItemData* pData = GetDataFromPos( rPos ); if ( pData->bEnabled ) { - USHORT n = pData->aText.Search( '~' ); + sal_uInt16 n = pData->aText.Search( '~' ); if ( n != STRING_NOTFOUND ) { KeyCode mnKeyCode; @@ -391,13 +391,13 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod return NULL; } -USHORT MenuItemList::GetItemCount( xub_Unicode cSelectChar ) const +sal_uInt16 MenuItemList::GetItemCount( xub_Unicode cSelectChar ) const { // returns number of entries with same mnemonic const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - USHORT nItems = 0, nPos; - for ( nPos = (USHORT)Count(); nPos; ) + sal_uInt16 nItems = 0, nPos; + for ( nPos = (sal_uInt16)Count(); nPos; ) { MenuItemData* pData = GetDataFromPos( --nPos ); if ( pData->bEnabled && rI18nHelper.MatchMnemonic( pData->aText, cSelectChar ) ) @@ -407,7 +407,7 @@ USHORT MenuItemList::GetItemCount( xub_Unicode cSelectChar ) const return nItems; } -USHORT MenuItemList::GetItemCount( KeyCode aKeyCode ) const +sal_uInt16 MenuItemList::GetItemCount( KeyCode aKeyCode ) const { // returns number of entries with same mnemonic // uses key codes instead of character codes @@ -416,13 +416,13 @@ USHORT MenuItemList::GetItemCount( KeyCode aKeyCode ) const if( aKeyCode.GetCode() >= KEY_A && aKeyCode.GetCode() <= KEY_Z ) ascii = sal::static_int_cast<char>('A' + (aKeyCode.GetCode() - KEY_A)); - USHORT nItems = 0, nPos; - for ( nPos = (USHORT)Count(); nPos; ) + sal_uInt16 nItems = 0, nPos; + for ( nPos = (sal_uInt16)Count(); nPos; ) { MenuItemData* pData = GetDataFromPos( --nPos ); if ( pData->bEnabled ) { - USHORT n = pData->aText.Search( '~' ); + sal_uInt16 n = pData->aText.Search( '~' ); if ( n != STRING_NOTFOUND ) { KeyCode mnKeyCode; @@ -464,21 +464,21 @@ private: Timer aHighlightChangedTimer; Timer aSubmenuCloseTimer; Timer aScrollTimer; - ULONG nSaveFocusId; + sal_uIntPtr nSaveFocusId; // long nStartY; - USHORT nHighlightedItem; // gehighlightetes/selektiertes Item - USHORT nMBDownPos; - USHORT nScrollerHeight; - USHORT nFirstEntry; - USHORT nBorder; - USHORT nPosInParent; - BOOL bInExecute; - - BOOL bScrollMenu; - BOOL bScrollUp; - BOOL bScrollDown; - BOOL bIgnoreFirstMove; - BOOL bKeyInput; + sal_uInt16 nHighlightedItem; // gehighlightetes/selektiertes Item + sal_uInt16 nMBDownPos; + sal_uInt16 nScrollerHeight; + sal_uInt16 nFirstEntry; + sal_uInt16 nBorder; + sal_uInt16 nPosInParent; + sal_Bool bInExecute; + + sal_Bool bScrollMenu; + sal_Bool bScrollUp; + sal_Bool bScrollDown; + sal_Bool bIgnoreFirstMove; + sal_Bool bKeyInput; DECL_LINK( PopupEnd, FloatingWindow* ); DECL_LINK( HighlightChanged, Timer* ); @@ -489,16 +489,16 @@ private: void StateChanged( StateChangedType nType ); void DataChanged( const DataChangedEvent& rDCEvt ); protected: - Region ImplCalcClipRegion( BOOL bIncludeLogo = TRUE ) const; + Region ImplCalcClipRegion( sal_Bool bIncludeLogo = sal_True ) const; void ImplInitClipRegion(); - void ImplDrawScroller( BOOL bUp ); + void ImplDrawScroller( sal_Bool bUp ); using Window::ImplScroll; void ImplScroll( const Point& rMousePos ); - void ImplScroll( BOOL bUp ); - void ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd = FALSE ); - void ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDown ); + void ImplScroll( sal_Bool bUp ); + void ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd = sal_False ); + void ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown ); long ImplGetStartY() const; - Rectangle ImplGetItemRect( USHORT nPos ); + Rectangle ImplGetItemRect( sal_uInt16 nPos ); public: MenuFloatingWindow( Menu* pMenu, Window* pParent, WinBits nStyle ); @@ -515,27 +515,27 @@ public: virtual void RequestHelp( const HelpEvent& rHEvt ); virtual void Resize(); - void SetFocusId( ULONG nId ) { nSaveFocusId = nId; } - ULONG GetFocusId() const { return nSaveFocusId; } + void SetFocusId( sal_uIntPtr nId ) { nSaveFocusId = nId; } + sal_uIntPtr GetFocusId() const { return nSaveFocusId; } - void EnableScrollMenu( BOOL b ); - BOOL IsScrollMenu() const { return bScrollMenu; } - USHORT GetScrollerHeight() const { return nScrollerHeight; } + void EnableScrollMenu( sal_Bool b ); + sal_Bool IsScrollMenu() const { return bScrollMenu; } + sal_uInt16 GetScrollerHeight() const { return nScrollerHeight; } void Execute(); - void StopExecute( ULONG nFocusId = 0 ); + void StopExecute( sal_uIntPtr nFocusId = 0 ); void EndExecute(); - void EndExecute( USHORT nSelectId ); + void EndExecute( sal_uInt16 nSelectId ); PopupMenu* GetActivePopup() const { return pActivePopup; } void KillActivePopup( PopupMenu* pThisOnly = NULL ); - void HighlightItem( USHORT nPos, BOOL bHighlight ); - void ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer ); - USHORT GetHighlightedItem() const { return nHighlightedItem; } + void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ); + void ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer ); + sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; } - void SetPosInParent( USHORT nPos ) { nPosInParent = nPos; } - USHORT GetPosInParent() const { return nPosInParent; } + void SetPosInParent( sal_uInt16 nPos ) { nPosInParent = nPos; } + sal_uInt16 GetPosInParent() const { return nPosInParent; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); }; @@ -607,10 +607,10 @@ void DecoToolBox::calcMinSize() } else { - USHORT nItems = GetItemCount(); - for( USHORT i = 0; i < nItems; i++ ) + sal_uInt16 nItems = GetItemCount(); + for( sal_uInt16 i = 0; i < nItems; i++ ) { - USHORT nId = GetItemId( i ); + sal_uInt16 nId = GetItemId( i ); aTbx.InsertItem( nId, GetItemImage( nId ) ); } } @@ -672,7 +672,7 @@ class MenuBarWindow : public Window private: struct AddButtonEntry { - USHORT m_nId; + sal_uInt16 m_nId; Link m_aSelectLink; Link m_aHighlightLink; @@ -681,25 +681,25 @@ private: Menu* pMenu; PopupMenu* pActivePopup; - USHORT nHighlightedItem; - ULONG nSaveFocusId; - BOOL mbAutoPopup; - BOOL bIgnoreFirstMove; - BOOL bStayActive; + sal_uInt16 nHighlightedItem; + sal_uIntPtr nSaveFocusId; + sal_Bool mbAutoPopup; + sal_Bool bIgnoreFirstMove; + sal_Bool bStayActive; DecoToolBox aCloser; PushButton aFloatBtn; PushButton aHideBtn; - std::map< USHORT, AddButtonEntry > m_aAddButtons; + std::map< sal_uInt16, AddButtonEntry > m_aAddButtons; - void HighlightItem( USHORT nPos, BOOL bHighlight ); - void ChangeHighlightItem( USHORT n, BOOL bSelectPopupEntry, BOOL bAllowRestoreFocus = TRUE, BOOL bDefaultToDocument = TRUE ); + void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ); + void ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectPopupEntry, sal_Bool bAllowRestoreFocus = sal_True, sal_Bool bDefaultToDocument = sal_True ); - USHORT ImplFindEntry( const Point& rMousePos ) const; - void ImplCreatePopup( BOOL bPreSelectFirst ); - BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE ); - Rectangle ImplGetItemRect( USHORT nPos ); + sal_uInt16 ImplFindEntry( const Point& rMousePos ) const; + void ImplCreatePopup( sal_Bool bPreSelectFirst ); + sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu = sal_True ); + Rectangle ImplGetItemRect( sal_uInt16 nPos ); void ImplInitStyleSettings(); @@ -718,7 +718,7 @@ public: MenuBarWindow( Window* pParent ); ~MenuBarWindow(); - void ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide ); + void ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ); virtual void MouseMove( const MouseEvent& rMEvt ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -728,26 +728,26 @@ public: virtual void Resize(); virtual void RequestHelp( const HelpEvent& rHEvt ); - void SetFocusId( ULONG nId ) { nSaveFocusId = nId; } - ULONG GetFocusId() const { return nSaveFocusId; } + void SetFocusId( sal_uIntPtr nId ) { nSaveFocusId = nId; } + sal_uIntPtr GetFocusId() const { return nSaveFocusId; } void SetMenu( MenuBar* pMenu ); void KillActivePopup(); PopupMenu* GetActivePopup() const { return pActivePopup; } void PopupClosed( Menu* pMenu ); - USHORT GetHighlightedItem() const { return nHighlightedItem; } + sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - void SetAutoPopup( BOOL bAuto ) { mbAutoPopup = bAuto; } + void SetAutoPopup( sal_Bool bAuto ) { mbAutoPopup = bAuto; } void ImplLayoutChanged(); Size MinCloseButtonSize(); // add an arbitrary button to the menubar (will appear next to closer) - USHORT AddMenuBarButton( const Image&, const Link&, const String&, USHORT nPos ); - void SetMenuBarButtonHighlightHdl( USHORT nId, const Link& ); - Rectangle GetMenuBarButtonRectPixel( USHORT nId ); - void RemoveMenuBarButton( USHORT nId ); - bool HandleMenuButtonEvent( USHORT i_nButtonId ); + sal_uInt16 AddMenuBarButton( const Image&, const Link&, const String&, sal_uInt16 nPos ); + void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& ); + Rectangle GetMenuBarButtonRectPixel( sal_uInt16 nId ); + void RemoveMenuBarButton( sal_uInt16 nId ); + bool HandleMenuButtonEvent( sal_uInt16 i_nButtonId ); }; static void ImplAddNWFSeparator( Window *pThis, const MenubarValue& rMenubarValue ) @@ -777,24 +777,24 @@ static void ImplSetMenuItemData( MenuItemData* pData ) pData->eType = MENUITEM_STRINGIMAGE; } -static ULONG ImplChangeTipTimeout( ULONG nTimeout, Window *pWindow ) +static sal_uIntPtr ImplChangeTipTimeout( sal_uIntPtr nTimeout, Window *pWindow ) { AllSettings aAllSettings( pWindow->GetSettings() ); HelpSettings aHelpSettings( aAllSettings.GetHelpSettings() ); - ULONG nRet = aHelpSettings.GetTipTimeout(); + sal_uIntPtr nRet = aHelpSettings.GetTipTimeout(); aHelpSettings.SetTipTimeout( nTimeout ); aAllSettings.SetHelpSettings( aHelpSettings ); pWindow->SetSettings( aAllSettings ); return nRet; } -static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighlightedItem, const HelpEvent& rHEvt, const Rectangle &rHighlightRect ) +static sal_Bool ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, const HelpEvent& rHEvt, const Rectangle &rHighlightRect ) { if( ! pMenu ) - return FALSE; + return sal_False; - BOOL bDone = FALSE; - USHORT nId = 0; + sal_Bool bDone = sal_False; + sal_uInt16 nId = 0; if ( nHighlightedItem != ITEMPOS_INVALID ) { @@ -817,23 +817,23 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl else { // give user a chance to read the full filename - ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow ); + sal_uIntPtr oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow ); // call always, even when strlen==0 to correctly remove tip Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) ); ImplChangeTipTimeout( oldTimeout, pMenuWindow ); } - bDone = TRUE; + bDone = sal_True; } else if ( ( rHEvt.GetMode() & HELPMODE_QUICK ) && pMenuWindow ) { Point aPos = rHEvt.GetMousePosPixel(); Rectangle aRect( aPos, Size() ); // give user a chance to read the full filename - ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow ); + sal_uIntPtr oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow ); // call always, even when strlen==0 to correctly remove tip Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) ); ImplChangeTipTimeout( oldTimeout, pMenuWindow ); - bDone = TRUE; + bDone = sal_True; } else if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) ) { @@ -844,7 +844,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl // Ist eine ID vorhanden, dann Hilfe mit der ID aufrufen, sonst // den Hilfe-Index String aCommand = pMenu->GetItemCommand( nId ); - ULONG nHelpId = pMenu->GetHelpId( nId ); + sal_uIntPtr nHelpId = pMenu->GetHelpId( nId ); if ( aCommand.Len() ) pHelp->Start( aCommand, NULL ); @@ -853,7 +853,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl else pHelp->Start( OOO_HELP_INDEX, NULL ); } - bDone = TRUE; + bDone = sal_True; } return bDone; } @@ -863,7 +863,7 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) // find docking area that is top aligned and return its height // note: dockingareas are direct children of the SystemWindow int height=0; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if( pWindow->ImplGetFrameWindow() ) { Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( WINDOW_FIRSTCHILD); //mpWindowImpl->mpFirstChild; @@ -877,7 +877,7 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) DockingAreaWindow *pDockingArea = dynamic_cast< DockingAreaWindow* >( pWin ); if( pDockingArea && pDockingArea->GetAlign() == WINDOWALIGN_TOP ) { - bDone = TRUE; + bDone = sal_True; if( pDockingArea->IsVisible() ) height = pDockingArea->GetOutputSizePixel().Height(); } @@ -896,13 +896,13 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) Menu::Menu() { DBG_CTOR( Menu, NULL ); - bIsMenuBar = FALSE; + bIsMenuBar = sal_False; ImplInit(); } // this constructor makes sure we're creating the native menu // with the correct type (ie, MenuBar vs. PopupMenu) -Menu::Menu( BOOL bMenubar ) +Menu::Menu( sal_Bool bMenubar ) { DBG_CTOR( Menu, NULL ); bIsMenuBar = bMenubar; @@ -938,7 +938,7 @@ Menu::~Menu() if ( nEventId ) Application::RemoveUserEvent( nEventId ); - bKilled = TRUE; + bKilled = sal_True; delete pItemList; delete pLogo; @@ -959,16 +959,16 @@ void Menu::ImplInit() mpSalMenu = NULL; nMenuFlags = MENU_FLAG_SHOWCHECKIMAGES; nDefaultItem = 0; - //bIsMenuBar = FALSE; // this is now set in the ctor, must not be changed here!!! + //bIsMenuBar = sal_False; // this is now set in the ctor, must not be changed here!!! nSelectedId = 0; pItemList = new MenuItemList; pLogo = NULL; pStartedFrom = NULL; pWindow = NULL; nEventId = 0; - bCanceled = FALSE; - bInCallback = FALSE; - bKilled = FALSE; + bCanceled = sal_False; + bInCallback = sal_False; + bKilled = sal_False; mpLayoutData = NULL; // Native-support: returns NULL if not supported @@ -989,13 +989,13 @@ void Menu::ImplLoadRes( const ResId& rResId ) rResId.SetRT( RSC_MENU ); GetRes( rResId ); - ULONG nObjMask = ReadLongRes(); + sal_uIntPtr nObjMask = ReadLongRes(); if( nObjMask & RSC_MENU_ITEMS ) { - ULONG nObjFollows = ReadLongRes(); + sal_uIntPtr nObjFollows = ReadLongRes(); // MenuItems einfuegen - for( ULONG i = 0; i < nObjFollows; i++ ) + for( sal_uIntPtr i = 0; i < nObjFollows; i++ ) { InsertItem( ResId( (RSHEADER_TYPE*)GetClassRes(), *pMgr ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); @@ -1010,13 +1010,13 @@ void Menu::ImplLoadRes( const ResId& rResId ) aTitleText = ReadStringRes(); } if( nObjMask & RSC_MENU_DEFAULTITEMID ) - SetDefaultItem( sal::static_int_cast<USHORT>(ReadLongRes()) ); + SetDefaultItem( sal::static_int_cast<sal_uInt16>(ReadLongRes()) ); } void Menu::CreateAutoMnemonics() { MnemonicGenerator aMnemonicGenerator; - ULONG n; + sal_uIntPtr n; for ( n = 0; n < pItemList->Count(); n++ ) { MenuItemData* pData = pItemList->GetDataFromPos(n); @@ -1033,44 +1033,44 @@ void Menu::CreateAutoMnemonics() void Menu::Activate() { - bInCallback = TRUE; + bInCallback = sal_True; ImplCallEventListeners( VCLEVENT_MENU_ACTIVATE, ITEMPOS_INVALID ); if ( !aActivateHdl.Call( this ) ) { Menu* pStartMenu = ImplGetStartMenu(); if ( pStartMenu && ( pStartMenu != this ) ) { - pStartMenu->bInCallback = TRUE; + pStartMenu->bInCallback = sal_True; // MT 11/01: Call EventListener here? I don't know... pStartMenu->aActivateHdl.Call( this ); - pStartMenu->bInCallback = FALSE; + pStartMenu->bInCallback = sal_False; } } - bInCallback = FALSE; + bInCallback = sal_False; } void Menu::Deactivate() { - for ( USHORT n = (USHORT)pItemList->Count(); n; ) + for ( sal_uInt16 n = (sal_uInt16)pItemList->Count(); n; ) { MenuItemData* pData = pItemList->GetDataFromPos( --n ); if ( pData->bIsTemporary ) pItemList->Remove( n ); } - bInCallback = TRUE; + bInCallback = sal_True; Menu* pStartMenu = ImplGetStartMenu(); ImplCallEventListeners( VCLEVENT_MENU_DEACTIVATE, ITEMPOS_INVALID ); if ( !aDeactivateHdl.Call( this ) ) { if ( pStartMenu && ( pStartMenu != this ) ) { - pStartMenu->bInCallback = TRUE; + pStartMenu->bInCallback = sal_True; pStartMenu->aDeactivateHdl.Call( this ); - pStartMenu->bInCallback = FALSE; + pStartMenu->bInCallback = sal_False; } } - bInCallback = FALSE; + bInCallback = sal_False; if ( this == pStartMenu ) GetpApp()->HideHelpStatusText(); @@ -1094,11 +1094,11 @@ void Menu::ImplSelect() MenuItemData* pData = GetItemList()->GetData( nSelectedId ); if ( pData && (pData->nBits & MIB_AUTOCHECK) ) { - BOOL bChecked = IsItemChecked( nSelectedId ); + sal_Bool bChecked = IsItemChecked( nSelectedId ); if ( pData->nBits & MIB_RADIOCHECK ) { if ( !bChecked ) - CheckItem( nSelectedId, TRUE ); + CheckItem( nSelectedId, sal_True ); } else CheckItem( nSelectedId, !bChecked ); @@ -1139,7 +1139,7 @@ void Menu::RequestHelp( const HelpEvent& ) { } -void Menu::ImplCallEventListeners( ULONG nEvent, USHORT nPos ) +void Menu::ImplCallEventListeners( sal_uIntPtr nEvent, sal_uInt16 nPos ) { VclMenuEvent aEvent( this, nEvent, nPos ); @@ -1186,14 +1186,14 @@ void Menu::RemoveEventListener( const Link& rEventListener ) // mpDummy4_WindowChildEventListeners->remove( rEventListener ); //} -void Menu::InsertItem( USHORT nItemId, const XubString& rStr, MenuItemBits nItemBits, USHORT nPos ) +void Menu::InsertItem( sal_uInt16 nItemId, const XubString& rStr, MenuItemBits nItemBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "Menu::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == MENU_ITEM_NOTFOUND, "Menu::InsertItem(): ItemId already exists" ); // if Position > ItemCount, append - if ( nPos >= (USHORT)pItemList->Count() ) + if ( nPos >= (sal_uInt16)pItemList->Count() ) nPos = MENU_APPEND; // put Item in MenuItemList @@ -1215,39 +1215,39 @@ void Menu::InsertItem( USHORT nItemId, const XubString& rStr, MenuItemBits nItem ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos ); } -void Menu::InsertItem( USHORT nItemId, const Image& rImage, - MenuItemBits nItemBits, USHORT nPos ) +void Menu::InsertItem( sal_uInt16 nItemId, const Image& rImage, + MenuItemBits nItemBits, sal_uInt16 nPos ) { InsertItem( nItemId, ImplGetSVEmptyStr(), nItemBits, nPos ); SetItemImage( nItemId, rImage ); } -void Menu::InsertItem( USHORT nItemId, +void Menu::InsertItem( sal_uInt16 nItemId, const XubString& rStr, const Image& rImage, - MenuItemBits nItemBits, USHORT nPos ) + MenuItemBits nItemBits, sal_uInt16 nPos ) { InsertItem( nItemId, rStr, nItemBits, nPos ); SetItemImage( nItemId, rImage ); } -void Menu::InsertItem( const ResId& rResId, USHORT nPos ) +void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos ) { ResMgr* pMgr = rResId.GetResMgr(); if( ! pMgr ) return; - ULONG nObjMask; + sal_uIntPtr nObjMask; GetRes( rResId.SetRT( RSC_MENUITEM ) ); nObjMask = ReadLongRes(); - BOOL bSep = FALSE; + sal_Bool bSep = sal_False; if ( nObjMask & RSC_MENUITEM_SEPARATOR ) - bSep = (BOOL)ReadShortRes(); + bSep = (sal_Bool)ReadShortRes(); - USHORT nItemId = 1; + sal_uInt16 nItemId = 1; if ( nObjMask & RSC_MENUITEM_ID ) - nItemId = sal::static_int_cast<USHORT>(ReadLongRes()); + nItemId = sal::static_int_cast<sal_uInt16>(ReadLongRes()); MenuItemBits nStatus = 0; if ( nObjMask & RSC_MENUITEM_STATUS ) @@ -1283,7 +1283,7 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos ) SetHelpText( nItemId, aHelpText ); } - ULONG nHelpId = 0; + sal_uIntPtr nHelpId = 0; if ( nObjMask & RSC_MENUITEM_HELPID ) { nHelpId = ReadLongRes(); @@ -1303,12 +1303,12 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos ) if( nObjMask & RSC_MENUITEM_CHECKED ) { if ( !bSep ) - CheckItem( nItemId, (BOOL)ReadShortRes() ); + CheckItem( nItemId, (sal_Bool)ReadShortRes() ); } if ( nObjMask & RSC_MENUITEM_DISABLE ) { if ( !bSep ) - EnableItem( nItemId, !(BOOL)ReadShortRes() ); + EnableItem( nItemId, !(sal_Bool)ReadShortRes() ); } if ( nObjMask & RSC_MENUITEM_COMMAND ) { @@ -1335,21 +1335,21 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos ) delete mpLayoutData, mpLayoutData = NULL; } -void Menu::InsertSeparator( USHORT nPos ) +void Menu::InsertSeparator( sal_uInt16 nPos ) { // do nothing if its a menu bar if ( bIsMenuBar ) return; // if position > ItemCount, append - if ( nPos >= (USHORT)pItemList->Count() ) + if ( nPos >= (sal_uInt16)pItemList->Count() ) nPos = MENU_APPEND; // put separator in item list pItemList->InsertSeparator( nPos ); // update native menu - USHORT itemPos = nPos != MENU_APPEND ? nPos : (USHORT)pItemList->Count() - 1; + sal_uInt16 itemPos = nPos != MENU_APPEND ? nPos : (sal_uInt16)pItemList->Count() - 1; MenuItemData *pData = pItemList->GetDataFromPos( itemPos ); if( ImplGetSalMenu() && pData && pData->pSalMenuItem ) ImplGetSalMenu()->InsertItem( pData->pSalMenuItem, nPos ); @@ -1359,9 +1359,9 @@ void Menu::InsertSeparator( USHORT nPos ) ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos ); } -void Menu::RemoveItem( USHORT nPos ) +void Menu::RemoveItem( sal_uInt16 nPos ) { - BOOL bRemove = FALSE; + sal_Bool bRemove = sal_False; if ( nPos < GetItemCount() ) { @@ -1370,7 +1370,7 @@ void Menu::RemoveItem( USHORT nPos ) ImplGetSalMenu()->RemoveItem( nPos ); pItemList->Remove( nPos ); - bRemove = TRUE; + bRemove = sal_True; } Window* pWin = ImplGetWindow(); @@ -1386,8 +1386,8 @@ void Menu::RemoveItem( USHORT nPos ) ImplCallEventListeners( VCLEVENT_MENU_REMOVEITEM, nPos ); } -void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos, - USHORT nMode = 0 ) +void ImplCopyItem( Menu* pThis, const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 nNewPos, + sal_uInt16 nMode = 0 ) { MenuItemType eType = rMenu.GetItemType( nPos ); @@ -1398,7 +1398,7 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos, pThis->InsertSeparator( nNewPos ); else { - USHORT nId = rMenu.GetItemId( nPos ); + sal_uInt16 nId = rMenu.GetItemId( nPos ); DBG_ASSERT( pThis->GetItemPos( nId ) == MENU_ITEM_NOTFOUND, "Menu::CopyItem(): ItemId already exists" ); @@ -1413,9 +1413,9 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos, pThis->InsertItem( nId, pData->aImage, pData->nBits, nNewPos ); if ( rMenu.IsItemChecked( nId ) ) - pThis->CheckItem( nId, TRUE ); + pThis->CheckItem( nId, sal_True ); if ( !rMenu.IsItemEnabled( nId ) ) - pThis->EnableItem( nId, FALSE ); + pThis->EnableItem( nId, sal_False ); pThis->SetHelpId( nId, pData->nHelpId ); pThis->SetHelpText( nId, pData->aHelpText ); pThis->SetAccelKey( nId, pData->aAccelKey ); @@ -1438,26 +1438,26 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos, } } -void Menu::CopyItem( const Menu& rMenu, USHORT nPos, USHORT nNewPos ) +void Menu::CopyItem( const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 nNewPos ) { ImplCopyItem( this, rMenu, nPos, nNewPos ); } void Menu::Clear() { - for ( USHORT i = GetItemCount(); i; i-- ) + for ( sal_uInt16 i = GetItemCount(); i; i-- ) RemoveItem( 0 ); } -USHORT Menu::GetItemCount() const +sal_uInt16 Menu::GetItemCount() const { - return (USHORT)pItemList->Count(); + return (sal_uInt16)pItemList->Count(); } -USHORT Menu::ImplGetVisibleItemCount() const +sal_uInt16 Menu::ImplGetVisibleItemCount() const { - USHORT nItems = 0; - for ( USHORT n = (USHORT)pItemList->Count(); n; ) + sal_uInt16 nItems = 0; + for ( sal_uInt16 n = (sal_uInt16)pItemList->Count(); n; ) { if ( ImplIsVisible( --n ) ) nItems++; @@ -1465,9 +1465,9 @@ USHORT Menu::ImplGetVisibleItemCount() const return nItems; } -USHORT Menu::ImplGetFirstVisible() const +sal_uInt16 Menu::ImplGetFirstVisible() const { - for ( USHORT n = 0; n < pItemList->Count(); n++ ) + for ( sal_uInt16 n = 0; n < pItemList->Count(); n++ ) { if ( ImplIsVisible( n ) ) return n; @@ -1475,9 +1475,9 @@ USHORT Menu::ImplGetFirstVisible() const return ITEMPOS_INVALID; } -USHORT Menu::ImplGetPrevVisible( USHORT nPos ) const +sal_uInt16 Menu::ImplGetPrevVisible( sal_uInt16 nPos ) const { - for ( USHORT n = nPos; n; ) + for ( sal_uInt16 n = nPos; n; ) { if ( n && ImplIsVisible( --n ) ) return n; @@ -1485,9 +1485,9 @@ USHORT Menu::ImplGetPrevVisible( USHORT nPos ) const return ITEMPOS_INVALID; } -USHORT Menu::ImplGetNextVisible( USHORT nPos ) const +sal_uInt16 Menu::ImplGetNextVisible( sal_uInt16 nPos ) const { - for ( USHORT n = nPos+1; n < pItemList->Count(); n++ ) + for ( sal_uInt16 n = nPos+1; n < pItemList->Count(); n++ ) { if ( ImplIsVisible( n ) ) return n; @@ -1495,7 +1495,7 @@ USHORT Menu::ImplGetNextVisible( USHORT nPos ) const return ITEMPOS_INVALID; } -USHORT Menu::GetItemId( USHORT nPos ) const +sal_uInt16 Menu::GetItemId( sal_uInt16 nPos ) const { MenuItemData* pData = pItemList->GetDataFromPos( nPos ); @@ -1505,9 +1505,9 @@ USHORT Menu::GetItemId( USHORT nPos ) const return 0; } -USHORT Menu::GetItemPos( USHORT nItemId ) const +sal_uInt16 Menu::GetItemPos( sal_uInt16 nItemId ) const { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( pData ) @@ -1516,7 +1516,7 @@ USHORT Menu::GetItemPos( USHORT nItemId ) const return MENU_ITEM_NOTFOUND; } -MenuItemType Menu::GetItemType( USHORT nPos ) const +MenuItemType Menu::GetItemType( sal_uInt16 nPos ) const { MenuItemData* pData = pItemList->GetDataFromPos( nPos ); @@ -1526,19 +1526,19 @@ MenuItemType Menu::GetItemType( USHORT nPos ) const return MENUITEM_DONTKNOW; } -USHORT Menu::GetCurItemId() const +sal_uInt16 Menu::GetCurItemId() const { return nSelectedId; } -void Menu::SetItemBits( USHORT nItemId, MenuItemBits nBits ) +void Menu::SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits ) { MenuItemData* pData = pItemList->GetData( nItemId ); if ( pData ) pData->nBits = nBits; } -MenuItemBits Menu::GetItemBits( USHORT nItemId ) const +MenuItemBits Menu::GetItemBits( sal_uInt16 nItemId ) const { MenuItemBits nBits = 0; MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1547,22 +1547,22 @@ MenuItemBits Menu::GetItemBits( USHORT nItemId ) const return nBits; } -void Menu::SetUserValue( USHORT nItemId, ULONG nValue ) +void Menu::SetUserValue( sal_uInt16 nItemId, sal_uIntPtr nValue ) { MenuItemData* pData = pItemList->GetData( nItemId ); if ( pData ) pData->nUserValue = nValue; } -ULONG Menu::GetUserValue( USHORT nItemId ) const +sal_uIntPtr Menu::GetUserValue( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); return pData ? pData->nUserValue : 0; } -void Menu::SetPopupMenu( USHORT nItemId, PopupMenu* pMenu ) +void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); // Item does not exist -> return NULL @@ -1592,7 +1592,7 @@ void Menu::SetPopupMenu( USHORT nItemId, PopupMenu* pMenu ) ImplCallEventListeners( VCLEVENT_MENU_SUBMENUCHANGED, nPos ); } -PopupMenu* Menu::GetPopupMenu( USHORT nItemId ) const +PopupMenu* Menu::GetPopupMenu( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1602,9 +1602,9 @@ PopupMenu* Menu::GetPopupMenu( USHORT nItemId ) const return NULL; } -void Menu::SetAccelKey( USHORT nItemId, const KeyCode& rKeyCode ) +void Menu::SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) @@ -1620,7 +1620,7 @@ void Menu::SetAccelKey( USHORT nItemId, const KeyCode& rKeyCode ) ImplGetSalMenu()->SetAccelerator( nPos, pData->pSalMenuItem, rKeyCode, rKeyCode.GetName() ); } -KeyCode Menu::GetAccelKey( USHORT nItemId ) const +KeyCode Menu::GetAccelKey( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1630,16 +1630,16 @@ KeyCode Menu::GetAccelKey( USHORT nItemId ) const return KeyCode(); } -KeyEvent Menu::GetActivationKey( USHORT nItemId ) const +KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const { KeyEvent aRet; MenuItemData* pData = pItemList->GetData( nItemId ); if( pData ) { - USHORT nPos = pData->aText.Search( '~' ); + sal_uInt16 nPos = pData->aText.Search( '~' ); if( nPos != STRING_NOTFOUND && nPos < pData->aText.Len()-1 ) { - USHORT nCode = 0; + sal_uInt16 nCode = 0; sal_Unicode cAccel = pData->aText.GetChar( nPos+1 ); if( cAccel >= 'a' && cAccel <= 'z' ) nCode = KEY_A + (cAccel-'a'); @@ -1655,9 +1655,9 @@ KeyEvent Menu::GetActivationKey( USHORT nItemId ) const return aRet; } -void Menu::CheckItem( USHORT nItemId, BOOL bCheck ) +void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData || pData->bChecked == bCheck ) @@ -1668,9 +1668,9 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck ) (pData->nBits & MIB_RADIOCHECK) ) { MenuItemData* pGroupData; - USHORT nGroupPos; - USHORT nItemCount = GetItemCount(); - BOOL bFound = FALSE; + sal_uInt16 nGroupPos; + sal_uInt16 nItemCount = GetItemCount(); + sal_Bool bFound = sal_False; nGroupPos = nPos; while ( nGroupPos ) @@ -1680,8 +1680,8 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck ) { if ( IsItemChecked( pGroupData->nId ) ) { - CheckItem( pGroupData->nId, FALSE ); - bFound = TRUE; + CheckItem( pGroupData->nId, sal_False ); + bFound = sal_True; break; } } @@ -1700,7 +1700,7 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck ) { if ( IsItemChecked( pGroupData->nId ) ) { - CheckItem( pGroupData->nId, FALSE ); + CheckItem( pGroupData->nId, sal_False ); break; } } @@ -1720,20 +1720,20 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck ) ImplCallEventListeners( bCheck ? VCLEVENT_MENU_ITEMCHECKED : VCLEVENT_MENU_ITEMUNCHECKED, nPos ); } -BOOL Menu::IsItemChecked( USHORT nItemId ) const +sal_Bool Menu::IsItemChecked( sal_uInt16 nItemId ) const { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) - return FALSE; + return sal_False; return pData->bChecked; } -void Menu::EnableItem( USHORT nItemId, BOOL bEnable ) +void Menu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pItemData = pItemList->GetData( nItemId, nPos ); if ( pItemData && ( pItemData->bEnabled != bEnable ) ) @@ -1745,8 +1745,8 @@ void Menu::EnableItem( USHORT nItemId, BOOL bEnable ) { DBG_ASSERT( bIsMenuBar, "Menu::EnableItem - Popup visible!" ); long nX = 0; - ULONG nCount = pItemList->Count(); - for ( ULONG n = 0; n < nCount; n++ ) + sal_uIntPtr nCount = pItemList->Count(); + for ( sal_uIntPtr n = 0; n < nCount; n++ ) { MenuItemData* pData = pItemList->GetDataFromPos( n ); if ( n == nPos ) @@ -1765,20 +1765,20 @@ void Menu::EnableItem( USHORT nItemId, BOOL bEnable ) } } -BOOL Menu::IsItemEnabled( USHORT nItemId ) const +sal_Bool Menu::IsItemEnabled( sal_uInt16 nItemId ) const { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) - return FALSE; + return sal_False; return pData->bEnabled; } -void Menu::ShowItem( USHORT nItemId, BOOL bVisible ) +void Menu::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); DBG_ASSERT( !bIsMenuBar, "Menu::ShowItem - ignored for menu bar entries!" ); @@ -1800,9 +1800,9 @@ void Menu::ShowItem( USHORT nItemId, BOOL bVisible ) } } -void Menu::SetItemText( USHORT nItemId, const XubString& rStr ) +void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) @@ -1829,9 +1829,9 @@ void Menu::SetItemText( USHORT nItemId, const XubString& rStr ) } } -XubString Menu::GetItemText( USHORT nItemId ) const +XubString Menu::GetItemText( sal_uInt16 nItemId ) const { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( pData ) @@ -1840,9 +1840,9 @@ XubString Menu::GetItemText( USHORT nItemId ) const return ImplGetSVEmptyStr(); } -void Menu::SetItemImage( USHORT nItemId, const Image& rImage ) +void Menu::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) @@ -1866,9 +1866,9 @@ static inline Image ImplRotImage( const Image& rImage, long nAngle10 ) return Image( aBmpEx ); } -void Menu::SetItemImageAngle( USHORT nItemId, long nAngle10 ) +void Menu::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( pData ) @@ -1893,9 +1893,9 @@ static inline Image ImplMirrorImage( const Image& rImage ) return Image( aBmpEx ); } -void Menu::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror ) +void Menu::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( pData ) @@ -1911,7 +1911,7 @@ void Menu::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror ) } } -Image Menu::GetItemImage( USHORT nItemId ) const +Image Menu::GetItemImage( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1921,7 +1921,7 @@ Image Menu::GetItemImage( USHORT nItemId ) const return Image(); } -long Menu::GetItemImageAngle( USHORT nItemId ) const +long Menu::GetItemImageAngle( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1931,17 +1931,17 @@ long Menu::GetItemImageAngle( USHORT nItemId ) const return 0; } -BOOL Menu::GetItemImageMirrorMode( USHORT nItemId ) const +sal_Bool Menu::GetItemImageMirrorMode( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); if ( pData ) return pData->bMirrorMode; else - return FALSE; + return sal_False; } -void Menu::SetItemCommand( USHORT nItemId, const String& rCommand ) +void Menu::SetItemCommand( sal_uInt16 nItemId, const String& rCommand ) { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1949,7 +1949,7 @@ void Menu::SetItemCommand( USHORT nItemId, const String& rCommand ) pData->aCommandStr = rCommand; } -const XubString& Menu::GetItemCommand( USHORT nItemId ) const +const XubString& Menu::GetItemCommand( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1959,7 +1959,7 @@ const XubString& Menu::GetItemCommand( USHORT nItemId ) const return ImplGetSVEmptyStr(); } -void Menu::SetHelpCommand( USHORT nItemId, const XubString& rStr ) +void Menu::SetHelpCommand( sal_uInt16 nItemId, const XubString& rStr ) { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1967,7 +1967,7 @@ void Menu::SetHelpCommand( USHORT nItemId, const XubString& rStr ) pData->aHelpCommandStr = rStr; } -const XubString& Menu::GetHelpCommand( USHORT nItemId ) const +const XubString& Menu::GetHelpCommand( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1977,7 +1977,7 @@ const XubString& Menu::GetHelpCommand( USHORT nItemId ) const return ImplGetSVEmptyStr(); } -void Menu::SetHelpText( USHORT nItemId, const XubString& rStr ) +void Menu::SetHelpText( sal_uInt16 nItemId, const XubString& rStr ) { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -1985,7 +1985,7 @@ void Menu::SetHelpText( USHORT nItemId, const XubString& rStr ) pData->aHelpText = rStr; } -const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const +const XubString& Menu::ImplGetHelpText( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -2011,12 +2011,12 @@ const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const return ImplGetSVEmptyStr(); } -const XubString& Menu::GetHelpText( USHORT nItemId ) const +const XubString& Menu::GetHelpText( sal_uInt16 nItemId ) const { return ImplGetHelpText( nItemId ); } -void Menu::SetTipHelpText( USHORT nItemId, const XubString& rStr ) +void Menu::SetTipHelpText( sal_uInt16 nItemId, const XubString& rStr ) { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -2024,7 +2024,7 @@ void Menu::SetTipHelpText( USHORT nItemId, const XubString& rStr ) pData->aTipHelpText = rStr; } -const XubString& Menu::GetTipHelpText( USHORT nItemId ) const +const XubString& Menu::GetTipHelpText( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -2034,7 +2034,7 @@ const XubString& Menu::GetTipHelpText( USHORT nItemId ) const return ImplGetSVEmptyStr(); } -void Menu::SetHelpId( USHORT nItemId, ULONG nHelpId ) +void Menu::SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId ) { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -2042,7 +2042,7 @@ void Menu::SetHelpId( USHORT nItemId, ULONG nHelpId ) pData->nHelpId = nHelpId; } -ULONG Menu::GetHelpId( USHORT nItemId ) const +sal_uIntPtr Menu::GetHelpId( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -2058,8 +2058,8 @@ Menu& Menu::operator=( const Menu& rMenu ) Clear(); // Items kopieren - USHORT nCount = rMenu.GetItemCount(); - for ( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = rMenu.GetItemCount(); + for ( sal_uInt16 i = 0; i < nCount; i++ ) ImplCopyItem( this, rMenu, i, MENU_APPEND, 1 ); nDefaultItem = rMenu.nDefaultItem; @@ -2073,24 +2073,24 @@ Menu& Menu::operator=( const Menu& rMenu ) return *this; } -BOOL Menu::ImplIsVisible( USHORT nPos ) const +sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const { - BOOL bVisible = TRUE; + sal_Bool bVisible = sal_True; MenuItemData* pData = pItemList->GetDataFromPos( nPos ); // check general visibility first if( pData && !pData->bVisible ) - bVisible = FALSE; + bVisible = sal_False; if ( bVisible && pData && pData->eType == MENUITEM_SEPARATOR ) { if( nPos == 0 ) // no separator should be shown at the very beginning - bVisible = FALSE; + bVisible = sal_False; else { // always avoid adjacent separators - USHORT nCount = (USHORT) pItemList->Count(); - USHORT n; + sal_uInt16 nCount = (sal_uInt16) pItemList->Count(); + sal_uInt16 n; MenuItemData* pNextData = NULL; // search next visible item for( n = nPos + 1; n < nCount; n++ ) @@ -2103,10 +2103,10 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const } } if( n == nCount ) // no next visible item - bVisible = FALSE; + bVisible = sal_False; // check for separator if( pNextData && pNextData->bVisible && pNextData->eType == MENUITEM_SEPARATOR ) - bVisible = FALSE; + bVisible = sal_False; if( bVisible ) { @@ -2120,7 +2120,7 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const } } if( n == 0 ) // no previous visible item - bVisible = FALSE; + bVisible = sal_False; } } } @@ -2131,10 +2131,10 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const !( nMenuFlags & MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ) ) { if( !pData ) // e.g. nPos == ITEMPOS_INVALID - bVisible = FALSE; + bVisible = sal_False; else if ( pData->eType != MENUITEM_SEPARATOR ) // separators handled above { - // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( TRUE ) ); + // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( sal_True ) ); bVisible = pData->bEnabled; // SubMenus nicht pruefen, weil sie ggf. erst im Activate() gefuellt werden. } } @@ -2142,34 +2142,34 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const return bVisible; } -BOOL Menu::IsItemVisible( USHORT nItemId ) const +sal_Bool Menu::IsItemVisible( sal_uInt16 nItemId ) const { return IsMenuVisible() && ImplIsVisible( GetItemPos( nItemId ) ); } -BOOL Menu::IsItemPosVisible( USHORT nItemPos ) const +sal_Bool Menu::IsItemPosVisible( sal_uInt16 nItemPos ) const { return IsMenuVisible() && ImplIsVisible( nItemPos ); } -BOOL Menu::IsMenuVisible() const +sal_Bool Menu::IsMenuVisible() const { return pWindow && pWindow->IsReallyVisible(); } -BOOL Menu::ImplIsSelectable( USHORT nPos ) const +sal_Bool Menu::ImplIsSelectable( sal_uInt16 nPos ) const { - BOOL bSelectable = TRUE; + sal_Bool bSelectable = sal_True; MenuItemData* pData = pItemList->GetDataFromPos( nPos ); // check general visibility first if ( pData && ( pData->nBits & MIB_NOSELECT ) ) - bSelectable = FALSE; + bSelectable = sal_False; return bSelectable; } -void Menu::SelectItem( USHORT nItemId ) +void Menu::SelectItem( sal_uInt16 nItemId ) { if( bIsMenuBar ) static_cast<MenuBar*>(this)->SelectEntry( nItemId ); @@ -2284,7 +2284,7 @@ Size Menu::ImplCalcSize( Window* pWin ) if ( rSettings.GetUseImagesInMenus() ) { nMinMenuItemHeight = 16; - for ( USHORT i = (USHORT)pItemList->Count(); i; ) + for ( sal_uInt16 i = (sal_uInt16)pItemList->Count(); i; ) { MenuItemData* pData = pItemList->GetDataFromPos( --i ); if ( ImplIsVisible( i ) && (( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE ))) @@ -2299,7 +2299,7 @@ Size Menu::ImplCalcSize( Window* pWin ) } } - for ( USHORT n = (USHORT)pItemList->Count(); n; ) + for ( sal_uInt16 n = (sal_uInt16)pItemList->Count(); n; ) { MenuItemData* pData = pItemList->GetDataFromPos( --n ); @@ -2397,8 +2397,8 @@ Size Menu::ImplCalcSize( Window* pWin ) if ( !bIsMenuBar ) { - USHORT gfxExtra = (USHORT) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text - nCheckPos = (USHORT)nExtra; + sal_uInt16 gfxExtra = (sal_uInt16) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text + nCheckPos = (sal_uInt16)nExtra; if (nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES) { long nImgOrChkWidth = 0; @@ -2408,12 +2408,12 @@ Size Menu::ImplCalcSize( Window* pWin ) else // non NWF case nImgOrChkWidth = nFontHeight/2 + gfxExtra; nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra ); - nTextPos = (USHORT)(nImagePos + nImgOrChkWidth); + nTextPos = (sal_uInt16)(nImagePos + nImgOrChkWidth); } else { nImagePos = nCheckPos; - nTextPos = (USHORT)(nImagePos + Max( aMaxImgSz.Width(), nCheckWidth )); + nTextPos = (sal_uInt16)(nImagePos + Max( aMaxImgSz.Width(), nCheckWidth )); } nTextPos = nTextPos + gfxExtra; @@ -2426,7 +2426,7 @@ Size Menu::ImplCalcSize( Window* pWin ) } else { - nTextPos = (USHORT)(2*nExtra); + nTextPos = (sal_uInt16)(2*nExtra); aSz.Height() = nFontHeight+6; // get menubar height from native methods if supported @@ -2468,7 +2468,7 @@ Size Menu::ImplCalcSize( Window* pWin ) static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight ) { - BOOL bNativeOk = FALSE; + sal_Bool bNativeOk = sal_False; if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; @@ -2486,11 +2486,11 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec { const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings(); Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() ); - i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, TRUE, FALSE, 2, NULL, &aColor ); + i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor ); } } -void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* pThisItemOnly, BOOL bHighlighted, bool bLayout ) const +void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, sal_Bool bHighlighted, bool bLayout ) const { // Fuer Symbole: nFontHeight x nFontHeight long nFontHeight = pWin->GetTextHeight(); @@ -2516,10 +2516,10 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* } Size aOutSz = pWin->GetOutputSizePixel(); - USHORT nCount = (USHORT)pItemList->Count(); + sal_uInt16 nCount = (sal_uInt16)pItemList->Count(); if( bLayout ) mpLayoutData->m_aVisibleItemBoundRects.clear(); - for ( USHORT n = 0; n < nCount; n++ ) + for ( sal_uInt16 n = 0; n < nCount; n++ ) { MenuItemData* pData = pItemList->GetDataFromPos( n ); if ( ImplIsVisible( n ) && ( !pThisItemOnly || ( pData == pThisItemOnly ) ) ) @@ -2536,9 +2536,9 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* long nTextOffsetY = ((pData->aSz.Height()-nFontHeight)/2); if( bIsMenuBar ) nTextOffsetY += (aOutSz.Height()-pData->aSz.Height()) / 2; - USHORT nTextStyle = 0; - USHORT nSymbolStyle = 0; - USHORT nImageStyle = 0; + sal_uInt16 nTextStyle = 0; + sal_uInt16 nSymbolStyle = 0; + sal_uInt16 nImageStyle = 0; // SubMenus ohne Items werden nicht mehr disablte dargestellt, // wenn keine Items enthalten sind, da die Anwendung selber // darauf achten muss. Ansonsten gibt es Faelle, wo beim @@ -2656,7 +2656,7 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* aTmpPos.X() = aPos.X() + nTextPos; aTmpPos.Y() = aPos.Y(); aTmpPos.Y() += nTextOffsetY; - USHORT nStyle = nTextStyle|TEXT_DRAW_MNEMONIC; + sal_uInt16 nStyle = nTextStyle|TEXT_DRAW_MNEMONIC; if ( pData->bIsTemporary ) nStyle |= TEXT_DRAW_DISABLE; MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : NULL; @@ -2788,7 +2788,7 @@ Menu* Menu::ImplGetStartMenu() return pStart; } -void Menu::ImplCallHighlight( USHORT nHighlightedItem ) +void Menu::ImplCallHighlight( sal_uInt16 nHighlightedItem ) { nSelectedId = 0; MenuItemData* pData = pItemList->GetDataFromPos( nHighlightedItem ); @@ -2810,7 +2810,7 @@ Menu* Menu::ImplFindSelectMenu() { Menu* pSelMenu = nEventId ? this : NULL; - for ( ULONG n = GetItemList()->Count(); n && !pSelMenu; ) + for ( sal_uIntPtr n = GetItemList()->Count(); n && !pSelMenu; ) { MenuItemData* pData = GetItemList()->GetDataFromPos( --n ); @@ -2821,11 +2821,11 @@ Menu* Menu::ImplFindSelectMenu() return pSelMenu; } -Menu* Menu::ImplFindMenu( USHORT nItemId ) +Menu* Menu::ImplFindMenu( sal_uInt16 nItemId ) { Menu* pSelMenu = NULL; - for ( ULONG n = GetItemList()->Count(); n && !pSelMenu; ) + for ( sal_uIntPtr n = GetItemList()->Count(); n && !pSelMenu; ) { MenuItemData* pData = GetItemList()->GetDataFromPos( --n ); @@ -2838,25 +2838,25 @@ Menu* Menu::ImplFindMenu( USHORT nItemId ) return pSelMenu; } -void Menu::RemoveDisabledEntries( BOOL bCheckPopups, BOOL bRemoveEmptyPopups ) +void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPopups ) { - for ( USHORT n = 0; n < GetItemCount(); n++ ) + for ( sal_uInt16 n = 0; n < GetItemCount(); n++ ) { - BOOL bRemove = FALSE; + sal_Bool bRemove = sal_False; MenuItemData* pItem = pItemList->GetDataFromPos( n ); if ( pItem->eType == MENUITEM_SEPARATOR ) { if ( !n || ( GetItemType( n-1 ) == MENUITEM_SEPARATOR ) ) - bRemove = TRUE; + bRemove = sal_True; } else bRemove = !pItem->bEnabled; if ( bCheckPopups && pItem->pSubMenu ) { - pItem->pSubMenu->RemoveDisabledEntries( TRUE ); + pItem->pSubMenu->RemoveDisabledEntries( sal_True ); if ( bRemoveEmptyPopups && !pItem->pSubMenu->GetItemCount() ) - bRemove = TRUE; + bRemove = sal_True; } if ( bRemove ) @@ -2865,7 +2865,7 @@ void Menu::RemoveDisabledEntries( BOOL bCheckPopups, BOOL bRemoveEmptyPopups ) if ( GetItemCount() ) { - USHORT nLast = GetItemCount() - 1; + sal_uInt16 nLast = GetItemCount() - 1; MenuItemData* pItem = pItemList->GetDataFromPos( nLast ); if ( pItem->eType == MENUITEM_SEPARATOR ) RemoveItem( nLast ); @@ -2873,19 +2873,19 @@ void Menu::RemoveDisabledEntries( BOOL bCheckPopups, BOOL bRemoveEmptyPopups ) delete mpLayoutData, mpLayoutData = NULL; } -BOOL Menu::HasValidEntries( BOOL bCheckPopups ) +sal_Bool Menu::HasValidEntries( sal_Bool bCheckPopups ) { - BOOL bValidEntries = FALSE; - USHORT nCount = GetItemCount(); - for ( USHORT n = 0; !bValidEntries && ( n < nCount ); n++ ) + sal_Bool bValidEntries = sal_False; + sal_uInt16 nCount = GetItemCount(); + for ( sal_uInt16 n = 0; !bValidEntries && ( n < nCount ); n++ ) { MenuItemData* pItem = pItemList->GetDataFromPos( n ); if ( pItem->bEnabled && ( pItem->eType != MENUITEM_SEPARATOR ) ) { if ( bCheckPopups && pItem->pSubMenu ) - bValidEntries = pItem->pSubMenu->HasValidEntries( TRUE ); + bValidEntries = pItem->pSubMenu->HasValidEntries( sal_True ); else - bValidEntries = TRUE; + bValidEntries = sal_True; } } return bValidEntries; @@ -2923,12 +2923,12 @@ void Menu::ImplFillLayoutData() const mpLayoutData = new MenuLayoutData(); if( bIsMenuBar ) { - ImplPaint( pWindow, 0, 0, 0, FALSE, true ); + ImplPaint( pWindow, 0, 0, 0, sal_False, true ); } else { MenuFloatingWindow* pFloat = (MenuFloatingWindow*)pWindow; - ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, FALSE, true ); + ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, sal_False, true ); } } } @@ -2940,7 +2940,7 @@ String Menu::GetDisplayText() const return mpLayoutData ? mpLayoutData->m_aDisplayText : String(); } -Rectangle Menu::GetCharacterBounds( USHORT nItemID, long nIndex ) const +Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const { long nItemIndex = -1; if( ! mpLayoutData ) @@ -2960,7 +2960,7 @@ Rectangle Menu::GetCharacterBounds( USHORT nItemID, long nIndex ) const } -long Menu::GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const +long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const { long nIndex = -1; rItemID = 0; @@ -2998,7 +2998,7 @@ Pair Menu::GetLineStartEnd( long nLine ) const return mpLayoutData ? mpLayoutData->GetLineStartEnd( nLine ) : Pair( -1, -1 ); } -Pair Menu::GetItemStartEnd( USHORT nItem ) const +Pair Menu::GetItemStartEnd( sal_uInt16 nItem ) const { if( ! mpLayoutData ) ImplFillLayoutData(); @@ -3010,9 +3010,9 @@ Pair Menu::GetItemStartEnd( USHORT nItem ) const return Pair( -1, -1 ); } -USHORT Menu::GetDisplayItemId( long nLine ) const +sal_uInt16 Menu::GetDisplayItemId( long nLine ) const { - USHORT nItemId = 0; + sal_uInt16 nItemId = 0; if( ! mpLayoutData ) ImplFillLayoutData(); if( mpLayoutData && ( nLine >= 0 ) && ( nLine < (long)mpLayoutData->m_aLineItemIds.size() ) ) @@ -3020,19 +3020,19 @@ USHORT Menu::GetDisplayItemId( long nLine ) const return nItemId; } -BOOL Menu::ConvertPoint( Point& rPoint, Window* pReferenceWindow ) const +sal_Bool Menu::ConvertPoint( Point& rPoint, Window* pReferenceWindow ) const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pWindow && pReferenceWindow ) { rPoint = pReferenceWindow->OutputToAbsoluteScreenPixel( rPoint ); rPoint = pWindow->AbsoluteScreenToOutputPixel( rPoint ); - bRet = TRUE; + bRet = sal_True; } return bRet; } -Rectangle Menu::GetBoundingRectangle( USHORT nPos ) const +Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const { Rectangle aRet; @@ -3040,16 +3040,16 @@ Rectangle Menu::GetBoundingRectangle( USHORT nPos ) const ImplFillLayoutData(); if( mpLayoutData ) { - std::map< USHORT, Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos ); + std::map< sal_uInt16, Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos ); if( it != mpLayoutData->m_aVisibleItemBoundRects.end() ) aRet = it->second; } return aRet; } -void Menu::SetAccessibleName( USHORT nItemId, const XubString& rStr ) +void Menu::SetAccessibleName( sal_uInt16 nItemId, const XubString& rStr ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( pData && !rStr.Equals( pData->aAccessibleName ) ) @@ -3059,7 +3059,7 @@ void Menu::SetAccessibleName( USHORT nItemId, const XubString& rStr ) } } -XubString Menu::GetAccessibleName( USHORT nItemId ) const +XubString Menu::GetAccessibleName( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -3069,7 +3069,7 @@ XubString Menu::GetAccessibleName( USHORT nItemId ) const return ImplGetSVEmptyStr(); } -void Menu::SetAccessibleDescription( USHORT nItemId, const XubString& rStr ) +void Menu::SetAccessibleDescription( sal_uInt16 nItemId, const XubString& rStr ) { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -3077,7 +3077,7 @@ void Menu::SetAccessibleDescription( USHORT nItemId, const XubString& rStr ) pData->aAccessibleDescription = rStr; } -XubString Menu::GetAccessibleDescription( USHORT nItemId ) const +XubString Menu::GetAccessibleDescription( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); @@ -3094,19 +3094,19 @@ void Menu::ImplSetSalMenu( SalMenu *pSalMenu ) mpSalMenu = pSalMenu; } -BOOL Menu::GetSystemMenuData( SystemMenuData* pData ) const +sal_Bool Menu::GetSystemMenuData( SystemMenuData* pData ) const { Menu* pMenu = (Menu*)this; if( pData && pMenu->ImplGetSalMenu() ) { pMenu->ImplGetSalMenu()->GetSystemMenuData( pData ); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } -bool Menu::IsHighlighted( USHORT nItemPos ) const +bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const { bool bRet = false; @@ -3121,19 +3121,19 @@ bool Menu::IsHighlighted( USHORT nItemPos ) const return bRet; } -void Menu::HighlightItem( USHORT nItemPos ) +void Menu::HighlightItem( sal_uInt16 nItemPos ) { if ( pWindow ) { if ( bIsMenuBar ) { MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( pWindow ); - pMenuWin->SetAutoPopup( FALSE ); - pMenuWin->ChangeHighlightItem( nItemPos, FALSE ); + pMenuWin->SetAutoPopup( sal_False ); + pMenuWin->ChangeHighlightItem( nItemPos, sal_False ); } else { - static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, FALSE ); + static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, sal_False ); } } } @@ -3142,54 +3142,54 @@ void Menu::HighlightItem( USHORT nItemPos ) // - MenuBar - // ----------- -MenuBar::MenuBar() : Menu( TRUE ) +MenuBar::MenuBar() : Menu( sal_True ) { - mbDisplayable = TRUE; - mbCloserVisible = FALSE; - mbFloatBtnVisible = FALSE; - mbHideBtnVisible = FALSE; + mbDisplayable = sal_True; + mbCloserVisible = sal_False; + mbFloatBtnVisible = sal_False; + mbHideBtnVisible = sal_False; } -MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( TRUE ) +MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( sal_True ) { - mbDisplayable = TRUE; - mbCloserVisible = FALSE; - mbFloatBtnVisible = FALSE; - mbHideBtnVisible = FALSE; + mbDisplayable = sal_True; + mbCloserVisible = sal_False; + mbFloatBtnVisible = sal_False; + mbHideBtnVisible = sal_False; *this = rMenu; - bIsMenuBar = TRUE; + bIsMenuBar = sal_True; } -MenuBar::MenuBar( const ResId& rResId ) : Menu ( TRUE ) +MenuBar::MenuBar( const ResId& rResId ) : Menu ( sal_True ) { - mbDisplayable = TRUE; - mbCloserVisible = FALSE; - mbFloatBtnVisible = FALSE; - mbHideBtnVisible = FALSE; + mbDisplayable = sal_True; + mbCloserVisible = sal_False; + mbFloatBtnVisible = sal_False; + mbHideBtnVisible = sal_False; ImplLoadRes( rResId ); } MenuBar::~MenuBar() { - ImplDestroy( this, TRUE ); + ImplDestroy( this, sal_True ); } -void MenuBar::ShowCloser( BOOL bShow ) +void MenuBar::ShowCloser( sal_Bool bShow ) { ShowButtons( bShow, mbFloatBtnVisible, mbHideBtnVisible ); } -void MenuBar::ShowFloatButton( BOOL bShow ) +void MenuBar::ShowFloatButton( sal_Bool bShow ) { ShowButtons( mbCloserVisible, bShow, mbHideBtnVisible ); } -void MenuBar::ShowHideButton( BOOL bShow ) +void MenuBar::ShowHideButton( sal_Bool bShow ) { ShowButtons( mbCloserVisible, mbFloatBtnVisible, bShow ); } -void MenuBar::ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide ) +void MenuBar::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) { if ( (bClose != mbCloserVisible) || (bFloat != mbFloatBtnVisible) || @@ -3203,7 +3203,7 @@ void MenuBar::ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide ) } } -void MenuBar::SetDisplayable( BOOL bDisplayable ) +void MenuBar::SetDisplayable( sal_Bool bDisplayable ) { if( bDisplayable != mbDisplayable ) { @@ -3234,7 +3234,7 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu ) return pWindow; } -void MenuBar::ImplDestroy( MenuBar* pMenu, BOOL bDelete ) +void MenuBar::ImplDestroy( MenuBar* pMenu, sal_Bool bDelete ) { MenuBarWindow* pWindow = (MenuBarWindow*) pMenu->ImplGetWindow(); if ( pWindow && bDelete ) @@ -3245,9 +3245,9 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, BOOL bDelete ) pMenu->pWindow = NULL; } -BOOL MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu ) +sal_Bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // No keyboard processing when system handles the menu or our menubar is invisible if( !IsDisplayable() || @@ -3263,7 +3263,7 @@ BOOL MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu ) // ----------------------------------------------------------------------- -void MenuBar::SelectEntry( USHORT nId ) +void MenuBar::SelectEntry( sal_uInt16 nId ) { MenuBarWindow* pMenuWin = (MenuBarWindow*) ImplGetWindow(); @@ -3273,14 +3273,14 @@ void MenuBar::SelectEntry( USHORT nId ) nId = GetItemPos( nId ); // #99705# popup the selected menu - pMenuWin->SetAutoPopup( TRUE ); + pMenuWin->SetAutoPopup( sal_True ); if( ITEMPOS_INVALID != pMenuWin->nHighlightedItem ) { pMenuWin->KillActivePopup(); - pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, FALSE ); + pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); } if( nId != ITEMPOS_INVALID ) - pMenuWin->ChangeHighlightItem( nId, FALSE ); + pMenuWin->ChangeHighlightItem( nId, sal_False ); } } @@ -3288,31 +3288,31 @@ void MenuBar::SelectEntry( USHORT nId ) // handler for native menu selection and command events -BOOL MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const +sal_Bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const { if( pMenu ) { pMenu->pStartedFrom = (Menu*)this; - pMenu->bInCallback = TRUE; + pMenu->bInCallback = sal_True; pMenu->Activate(); - pMenu->bInCallback = FALSE; + pMenu->bInCallback = sal_False; } - return TRUE; + return sal_True; } -BOOL MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const +sal_Bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const { if( pMenu ) { pMenu->pStartedFrom = (Menu*)this; - pMenu->bInCallback = TRUE; + pMenu->bInCallback = sal_True; pMenu->Deactivate(); - pMenu->bInCallback = FALSE; + pMenu->bInCallback = sal_False; } - return TRUE; + return sal_True; } -BOOL MenuBar::HandleMenuHighlightEvent( Menu *pMenu, USHORT nHighlightEventId ) const +sal_Bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventId ) const { if( !pMenu ) pMenu = ((Menu*) this)->ImplFindMenu( nHighlightEventId ); @@ -3325,13 +3325,13 @@ BOOL MenuBar::HandleMenuHighlightEvent( Menu *pMenu, USHORT nHighlightEventId ) pMenu->nSelectedId = nHighlightEventId; pMenu->pStartedFrom = (Menu*)this; pMenu->ImplCallHighlight( pMenu->mnHighlightedItemPos ); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } -BOOL MenuBar::HandleMenuCommandEvent( Menu *pMenu, USHORT nCommandEventId ) const +sal_Bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const { if( !pMenu ) pMenu = ((Menu*) this)->ImplFindMenu( nCommandEventId ); @@ -3340,47 +3340,47 @@ BOOL MenuBar::HandleMenuCommandEvent( Menu *pMenu, USHORT nCommandEventId ) cons pMenu->nSelectedId = nCommandEventId; pMenu->pStartedFrom = (Menu*)this; pMenu->ImplSelect(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } -USHORT MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, USHORT i_nPos ) +sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, sal_uInt16 i_nPos ) { return AddMenuBarButton( i_rImage, i_rLink, String(), i_nPos ); } -USHORT MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, USHORT i_nPos ) +sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, sal_uInt16 i_nPos ) { return pWindow ? static_cast<MenuBarWindow*>(pWindow)->AddMenuBarButton( i_rImage, i_rLink, i_rToolTip, i_nPos ) : 0; } -void MenuBar::SetMenuBarButtonHighlightHdl( USHORT nId, const Link& rLink ) +void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& rLink ) { if( pWindow ) static_cast<MenuBarWindow*>(pWindow)->SetMenuBarButtonHighlightHdl( nId, rLink ); } -Rectangle MenuBar::GetMenuBarButtonRectPixel( USHORT nId ) +Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId ) { return pWindow ? static_cast<MenuBarWindow*>(pWindow)->GetMenuBarButtonRectPixel( nId ) : Rectangle(); } -void MenuBar::RemoveMenuBarButton( USHORT nId ) +void MenuBar::RemoveMenuBarButton( sal_uInt16 nId ) { if( pWindow ) static_cast<MenuBarWindow*>(pWindow)->RemoveMenuBarButton( nId ); } -BOOL MenuBar::HandleMenuButtonEvent( Menu *, USHORT i_nButtonId ) const +sal_Bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) const { return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId ); } // ----------------------------------------------------------------------- -// BOOL PopupMenu::bAnyPopupInExecute = FALSE; +// sal_Bool PopupMenu::bAnyPopupInExecute = sal_False; PopupMenu::PopupMenu() { @@ -3405,9 +3405,9 @@ PopupMenu::~PopupMenu() *pRefAutoSubMenu = NULL; // #111060# avoid second delete in ~MenuItemData } -BOOL PopupMenu::IsInExecute() +sal_Bool PopupMenu::IsInExecute() { - return GetActivePopupMenu() ? TRUE : FALSE; + return GetActivePopupMenu() ? sal_True : sal_False; } PopupMenu* PopupMenu::GetActivePopupMenu() @@ -3416,22 +3416,22 @@ PopupMenu* PopupMenu::GetActivePopupMenu() return pSVData->maAppData.mpActivePopupMenu; } -void PopupMenu::EndExecute( USHORT nSelectId ) +void PopupMenu::EndExecute( sal_uInt16 nSelectId ) { if ( ImplGetWindow() ) ImplGetFloatingWindow()->EndExecute( nSelectId ); } -void PopupMenu::SelectEntry( USHORT nId ) +void PopupMenu::SelectEntry( sal_uInt16 nId ) { if ( ImplGetWindow() ) { if( nId != ITEMPOS_INVALID ) { - USHORT nPos; + sal_uInt16 nPos; MenuItemData* pData = GetItemList()->GetData( nId, nPos ); if ( pData->pSubMenu ) - ImplGetFloatingWindow()->ChangeHighlightItem( nPos, TRUE ); + ImplGetFloatingWindow()->ChangeHighlightItem( nPos, sal_True ); else ImplGetFloatingWindow()->EndExecute( nId ); } @@ -3439,7 +3439,7 @@ void PopupMenu::SelectEntry( USHORT nId ) { MenuFloatingWindow* pFloat = ImplGetFloatingWindow(); pFloat->GrabFocus(); - USHORT nPos; + sal_uInt16 nPos; for( nPos = 0; nPos < GetItemList()->Count(); nPos++ ) { MenuItemData* pData = (MenuItemData*)GetItemList()->GetObject( nPos ); @@ -3448,27 +3448,27 @@ void PopupMenu::SelectEntry( USHORT nId ) pFloat->KillActivePopup(); } } - pFloat->ChangeHighlightItem( ITEMPOS_INVALID, FALSE ); + pFloat->ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); } } } -void PopupMenu::SetSelectedEntry( USHORT nId ) +void PopupMenu::SetSelectedEntry( sal_uInt16 nId ) { nSelectedId = nId; } -USHORT PopupMenu::Execute( Window* pExecWindow, const Point& rPopupPos ) +sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Point& rPopupPos ) { return Execute( pExecWindow, Rectangle( rPopupPos, rPopupPos ), POPUPMENU_EXECUTE_DOWN ); } -USHORT PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, USHORT nFlags ) +sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, sal_uInt16 nFlags ) { ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 ); - ULONG nPopupModeFlags = 0; + sal_uIntPtr nPopupModeFlags = 0; if ( nFlags & POPUPMENU_EXECUTE_DOWN ) nPopupModeFlags = FLOATWIN_POPUPMODE_DOWN; else if ( nFlags & POPUPMENU_EXECUTE_UP ) @@ -3483,10 +3483,10 @@ USHORT PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, USHORT n if (nFlags & POPUPMENU_NOMOUSEUPCLOSE ) // allow popup menus to stay open on mouse button up nPopupModeFlags |= FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE; // useful if the menu was opened on mousebutton down (eg toolbox configuration) - return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, FALSE ); + return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, sal_False ); } -USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupModeFlags, Menu* pSFrom, BOOL bPreSelectFirst ) +sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uIntPtr nPopupModeFlags, Menu* pSFrom, sal_Bool bPreSelectFirst ) { if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) return 0; @@ -3497,15 +3497,15 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM pStartedFrom = pSFrom; nSelectedId = 0; - bCanceled = FALSE; + bCanceled = sal_False; - ULONG nFocusId = 0; - BOOL bRealExecute = FALSE; + sal_uIntPtr nFocusId = 0; + sal_Bool bRealExecute = sal_False; if ( !pStartedFrom ) { - pSVData->maWinData.mbNoDeactivate = TRUE; + pSVData->maWinData.mbNoDeactivate = sal_True; nFocusId = Window::SaveFocus(); - bRealExecute = TRUE; + bRealExecute = sal_True; } else { @@ -3532,9 +3532,9 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM ImplDelData aDelData; pW->ImplAddDel( &aDelData ); - bInCallback = TRUE; // hier schon setzen, falls Activate ueberladen + bInCallback = sal_True; // hier schon setzen, falls Activate ueberladen Activate(); - bInCallback = FALSE; + bInCallback = sal_False; if ( aDelData.IsDelete() ) return 0; // Error @@ -3560,7 +3560,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM nMenuFlags |= MENU_FLAG_HIDEDISABLEDENTRIES; - USHORT nVisibleEntries = ImplGetVisibleItemCount(); + sal_uInt16 nVisibleEntries = ImplGetVisibleItemCount(); if ( !nVisibleEntries ) { ResMgr* pResMgr = ImplGetResMgr(); @@ -3569,7 +3569,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM String aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) ); MenuItemData* pData = pItemList->Insert( 0xFFFF, MENUITEM_STRING, 0, aTmpEntryText, Image(), NULL, 0xFFFF ); - pData->bIsTemporary = TRUE; + pData->bIsTemporary = sal_True; } } else if ( Application::GetSettings().GetStyleSettings().GetAutoMnemonic() && !( nMenuFlags & MENU_FLAG_NOAUTOMNEMONICS ) ) @@ -3604,9 +3604,9 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM nMaxHeight -= nTop+nBottom; if ( aSz.Height() > nMaxHeight ) { - pWin->EnableScrollMenu( TRUE ); - USHORT nStart = ImplGetFirstVisible(); - USHORT nEntries = ImplCalcVisEntries( nMaxHeight, nStart ); + pWin->EnableScrollMenu( sal_True ); + sal_uInt16 nStart = ImplGetFirstVisible(); + sal_uInt16 nEntries = ImplCalcVisEntries( nMaxHeight, nStart ); aSz.Height() = ImplCalcHeight( nEntries ); } @@ -3635,7 +3635,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM } if( pSFrom ) { - USHORT aPos; + sal_uInt16 aPos; if( pSFrom->bIsMenuBar ) aPos = ((MenuBarWindow *) pSFrom->pWindow)->GetHighlightedItem(); else @@ -3647,14 +3647,14 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM } if ( bPreSelectFirst ) { - USHORT nCount = (USHORT)pItemList->Count(); - for ( USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nCount = (sal_uInt16)pItemList->Count(); + for ( sal_uInt16 n = 0; n < nCount; n++ ) { MenuItemData* pData = pItemList->GetDataFromPos( n ); if ( ( pData->bEnabled || !Application::GetSettings().GetStyleSettings().GetSkipDisabledInMenus() ) && ( pData->eType != MENUITEM_SEPARATOR ) && ImplIsVisible( n ) && ImplIsSelectable( n ) ) { - pWin->ChangeHighlightItem( n, FALSE ); + pWin->ChangeHighlightItem( n, sal_False ); break; } } @@ -3684,7 +3684,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM if ( nFocusId ) { pWin->SetFocusId( 0 ); - pSVData->maWinData.mbNoDeactivate = FALSE; + pSVData->maWinData.mbNoDeactivate = sal_False; } pWin->ImplEndPopupMode( 0, nFocusId ); @@ -3715,18 +3715,18 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM return bRealExecute ? nSelectedId : 0; } -USHORT PopupMenu::ImplCalcVisEntries( long nMaxHeight, USHORT nStartEntry, USHORT* pLastVisible ) const +sal_uInt16 PopupMenu::ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible ) const { nMaxHeight -= 2 * ImplGetFloatingWindow()->GetScrollerHeight(); long nHeight = 0; - USHORT nEntries = (USHORT) pItemList->Count(); - USHORT nVisEntries = 0; + sal_uInt16 nEntries = (sal_uInt16) pItemList->Count(); + sal_uInt16 nVisEntries = 0; if ( pLastVisible ) *pLastVisible = 0; - for ( USHORT n = nStartEntry; n < nEntries; n++ ) + for ( sal_uInt16 n = nStartEntry; n < nEntries; n++ ) { if ( ImplIsVisible( n ) ) { @@ -3743,14 +3743,14 @@ USHORT PopupMenu::ImplCalcVisEntries( long nMaxHeight, USHORT nStartEntry, USHOR return nVisEntries; } -long PopupMenu::ImplCalcHeight( USHORT nEntries ) const +long PopupMenu::ImplCalcHeight( sal_uInt16 nEntries ) const { long nHeight = 0; - USHORT nFound = 0; - for ( USHORT n = 0; ( nFound < nEntries ) && ( n < pItemList->Count() ); n++ ) + sal_uInt16 nFound = 0; + for ( sal_uInt16 n = 0; ( nFound < nEntries ) && ( n < pItemList->Count() ); n++ ) { - if ( ImplIsVisible( (USHORT) n ) ) + if ( ImplIsVisible( (sal_uInt16) n ) ) { MenuItemData* pData = pItemList->GetDataFromPos( n ); nHeight += pData->aSz.Height(); @@ -3764,7 +3764,7 @@ long PopupMenu::ImplCalcHeight( USHORT nEntries ) const } -static void ImplInitMenuWindow( Window* pWin, BOOL bFont, BOOL bMenuBar ) +static void ImplInitMenuWindow( Window* pWin, sal_Bool bFont, sal_Bool bMenuBar ) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -3781,7 +3781,7 @@ static void ImplInitMenuWindow( Window* pWin, BOOL bFont, BOOL bMenuBar ) Wallpaper aWallpaper; aWallpaper.SetStyle( WALLPAPER_APPLICATIONGRADIENT ); pWin->SetBackground( aWallpaper ); - pWin->SetPaintTransparent( FALSE ); + pWin->SetPaintTransparent( sal_False ); pWin->SetParentClipMode( 0 ); } } @@ -3806,12 +3806,12 @@ static void ImplInitMenuWindow( Window* pWin, BOOL bFont, BOOL bMenuBar ) MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nStyle ) : FloatingWindow( pParent, nStyle ) { - mpWindowImpl->mbMenuFloatingWindow= TRUE; + mpWindowImpl->mbMenuFloatingWindow= sal_True; pMenu = pMen; pActivePopup = 0; nSaveFocusId = 0; - bInExecute = FALSE; - bScrollMenu = FALSE; + bInExecute = sal_False; + bScrollMenu = sal_False; nHighlightedItem = ITEMPOS_INVALID; nMBDownPos = ITEMPOS_INVALID; nPosInParent = ITEMPOS_INVALID; @@ -3819,13 +3819,13 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nSt // nStartY = 0; nBorder = EXTRASPACEY; nFirstEntry = 0; - bScrollUp = FALSE; - bScrollDown = FALSE; - bIgnoreFirstMove = TRUE; - bKeyInput = FALSE; + bScrollUp = sal_False; + bScrollDown = sal_False; + bIgnoreFirstMove = sal_True; + bKeyInput = sal_False; EnableSaveBackground(); - ImplInitMenuWindow( this, TRUE, FALSE ); + ImplInitMenuWindow( this, sal_True, sal_False ); SetPopupModeEndHdl( LINK( this, MenuFloatingWindow, PopupEnd ) ); @@ -3851,7 +3851,7 @@ void MenuFloatingWindow::doShutdown() { // #102461# remove highlight in parent MenuItemData* pData; - USHORT i, nCount = (USHORT)pMenu->pStartedFrom->pItemList->Count(); + sal_uInt16 i, nCount = (sal_uInt16)pMenu->pStartedFrom->pItemList->Count(); for(i = 0; i < nCount; i++) { pData = pMenu->pStartedFrom->pItemList->GetDataFromPos( i ); @@ -3862,7 +3862,7 @@ void MenuFloatingWindow::doShutdown() { MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow(); if( pPWin ) - pPWin->HighlightItem( i, FALSE ); + pPWin->HighlightItem( i, sal_False ); } } @@ -3898,13 +3898,13 @@ long MenuFloatingWindow::ImplGetStartY() const long nY = 0; if( pMenu ) { - for ( USHORT n = 0; n < nFirstEntry; n++ ) + for ( sal_uInt16 n = 0; n < nFirstEntry; n++ ) nY += pMenu->GetItemList()->GetDataFromPos( n )->aSz.Height(); } return -nY; } -Region MenuFloatingWindow::ImplCalcClipRegion( BOOL bIncludeLogo ) const +Region MenuFloatingWindow::ImplCalcClipRegion( sal_Bool bIncludeLogo ) const { Size aOutSz = GetOutputSizePixel(); Point aPos; @@ -3934,7 +3934,7 @@ void MenuFloatingWindow::ImplInitClipRegion() } } -void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDown ) +void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown ) { if( ! pMenu ) return; @@ -3944,10 +3944,10 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow Size aOutSz = GetOutputSizePixel(); if ( ( nMouseY >= nY ) && ( nMouseY < ( aOutSz.Height() - nY ) ) ) { - BOOL bHighlighted = FALSE; - USHORT nCount = (USHORT)pMenu->pItemList->Count(); + sal_Bool bHighlighted = sal_False; + sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count(); nY += ImplGetStartY(); // ggf. gescrollt. - for ( USHORT n = 0; !bHighlighted && ( n < nCount ); n++ ) + for ( sal_uInt16 n = 0; !bHighlighted && ( n < nCount ); n++ ) { if ( pMenu->ImplIsVisible( n ) ) { @@ -3956,7 +3956,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow nY += pItemData->aSz.Height(); if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) && pMenu->ImplIsSelectable( n ) ) { - BOOL bPopupArea = TRUE; + sal_Bool bPopupArea = sal_True; if ( pItemData->nBits & MIB_POPUPSELECT ) { // Nur wenn ueber dem Pfeil geklickt wurde... @@ -3969,10 +3969,10 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow { if ( n != nHighlightedItem ) { - ChangeHighlightItem( (USHORT)n, FALSE ); + ChangeHighlightItem( (sal_uInt16)n, sal_False ); } - BOOL bAllowNewPopup = TRUE; + sal_Bool bAllowNewPopup = sal_True; if ( pActivePopup ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); @@ -3990,7 +3990,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow { if ( n != nHighlightedItem ) { - ChangeHighlightItem( (USHORT)n, TRUE ); + ChangeHighlightItem( (sal_uInt16)n, sal_True ); } else if ( pItemData->nBits & MIB_POPUPSELECT ) { @@ -3998,17 +3998,17 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow HighlightChanged( NULL ); } } - bHighlighted = TRUE; + bHighlighted = sal_True; } } } if ( !bHighlighted ) - ChangeHighlightItem( ITEMPOS_INVALID, TRUE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); } else { ImplScroll( rMEvt.GetPosPixel() ); - ChangeHighlightItem( ITEMPOS_INVALID, TRUE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); } } @@ -4022,12 +4022,12 @@ IMPL_LINK( MenuFloatingWindow, PopupEnd, FloatingWindow*, EMPTYARG ) { //DBG_ASSERT( !pActivePopup->ImplGetWindow(), "PopupEnd, obwohl pActivePopup MIT Window!" ); KillActivePopup(); // should be ok to just remove it - //pActivePopup->bCanceled = TRUE; + //pActivePopup->bCanceled = sal_True; } - bInExecute = FALSE; - pMenu->bInCallback = TRUE; + bInExecute = sal_False; + pMenu->bInCallback = sal_True; pMenu->Deactivate(); - pMenu->bInCallback = FALSE; + pMenu->bInCallback = sal_False; } else { @@ -4077,7 +4077,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer ) { if ( pActivePopup && ( pActivePopup != pItemData->pSubMenu ) ) { - ULONG nOldFlags = GetPopupModeFlags(); + sal_uIntPtr nOldFlags = GetPopupModeFlags(); SetPopupModeFlags( GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ); KillActivePopup(); SetPopupModeFlags( nOldFlags ); @@ -4087,7 +4087,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer ) pActivePopup = (PopupMenu*)pItemData->pSubMenu; long nY = nScrollerHeight+ImplGetStartY(); MenuItemData* pData = 0; - for ( ULONG n = 0; n < nHighlightedItem; n++ ) + for ( sal_uIntPtr n = 0; n < nHighlightedItem; n++ ) { pData = pMenu->pItemList->GetDataFromPos( n ); nY += pData->aSz.Height(); @@ -4118,9 +4118,9 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer ) // die lange im Activate Rescheduled haben und jetzt schon nicht mehr // angezeigt werden sollen. Menu* pTest = pActivePopup; - ULONG nOldFlags = GetPopupModeFlags(); + sal_uIntPtr nOldFlags = GetPopupModeFlags(); SetPopupModeFlags( GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ); - USHORT nRet = pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FLOATWIN_POPUPMODE_RIGHT, pMenu, pTimer ? FALSE : TRUE ); + sal_uInt16 nRet = pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FLOATWIN_POPUPMODE_RIGHT, pMenu, pTimer ? sal_False : sal_True ); SetPopupModeFlags( nOldFlags ); // nRet != 0, wenn es waerend Activate() abgeschossen wurde... @@ -4155,11 +4155,11 @@ IMPL_LINK( MenuFloatingWindow, ShowHideListener, VclWindowEvent*, pEvent ) return 0; } -void MenuFloatingWindow::EnableScrollMenu( BOOL b ) +void MenuFloatingWindow::EnableScrollMenu( sal_Bool b ) { bScrollMenu = b; - nScrollerHeight = b ? (USHORT) GetSettings().GetStyleSettings().GetScrollBarSize() /2 : 0; - bScrollDown = TRUE; + nScrollerHeight = b ? (sal_uInt16) GetSettings().GetStyleSettings().GetScrollBarSize() /2 : 0; + bScrollDown = sal_True; ImplInitClipRegion(); } @@ -4169,8 +4169,8 @@ void MenuFloatingWindow::Execute() pSVData->maAppData.mpActivePopupMenu = (PopupMenu*)pMenu; - bInExecute = TRUE; -// bCallingSelect = FALSE; + bInExecute = sal_True; +// bCallingSelect = sal_False; while ( bInExecute ) Application::Yield(); @@ -4181,24 +4181,24 @@ void MenuFloatingWindow::Execute() // Application::Yield(); } -void MenuFloatingWindow::StopExecute( ULONG nFocusId ) +void MenuFloatingWindow::StopExecute( sal_uIntPtr nFocusId ) { // Focus wieder herstellen // (kann schon im Select wieder hergestellt wurden sein) if ( nSaveFocusId ) { - Window::EndSaveFocus( nFocusId, FALSE ); + Window::EndSaveFocus( nFocusId, sal_False ); nFocusId = nSaveFocusId; if ( nFocusId ) { nSaveFocusId = 0; - ImplGetSVData()->maWinData.mbNoDeactivate = FALSE; + ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; } } ImplEndPopupMode( 0, nFocusId ); aHighlightChangedTimer.Stop(); - bInExecute = FALSE; + bInExecute = sal_False; if ( pActivePopup ) { KillActivePopup(); @@ -4216,15 +4216,15 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly ) if( ((FloatingWindow *) pActivePopup->pWindow)->IsInCleanUp() ) return; // kill it later if ( pActivePopup->bInCallback ) - pActivePopup->bCanceled = TRUE; + pActivePopup->bCanceled = sal_True; // Vor allen Aktionen schon pActivePopup = 0, falls z.B. // PopupModeEndHdl des zu zerstoerenden Popups mal synchron gerufen wird. PopupMenu* pPopup = pActivePopup; pActivePopup = NULL; - pPopup->bInCallback = TRUE; + pPopup->bInCallback = sal_True; pPopup->Deactivate(); - pPopup->bInCallback = FALSE; + pPopup->bInCallback = sal_False; if ( pPopup->ImplGetWindow() ) { pPopup->ImplGetFloatingWindow()->StopExecute(); @@ -4240,14 +4240,14 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly ) void MenuFloatingWindow::EndExecute() { Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : NULL; - ULONG nFocusId = 0; + sal_uIntPtr nFocusId = 0; if ( pStart && pStart->bIsMenuBar ) { nFocusId = ((MenuBarWindow*)((MenuBar*)pStart)->ImplGetWindow())->GetFocusId(); if ( nFocusId ) { ((MenuBarWindow*)((MenuBar*)pStart)->ImplGetWindow())->SetFocusId( 0 ); - ImplGetSVData()->maWinData.mbNoDeactivate = FALSE; + ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; } } @@ -4264,7 +4264,7 @@ void MenuFloatingWindow::EndExecute() // Dies Fenster wird gleich zerstoert => Daten lokal merken... Menu* pM = pMenu; - USHORT nItem = nHighlightedItem; + sal_uInt16 nItem = nHighlightedItem; pCleanUpFrom->StopExecute( nFocusId ); @@ -4282,9 +4282,9 @@ void MenuFloatingWindow::EndExecute() } } -void MenuFloatingWindow::EndExecute( USHORT nId ) +void MenuFloatingWindow::EndExecute( sal_uInt16 nId ) { - USHORT nPos; + sal_uInt16 nPos; if ( pMenu && pMenu->GetItemList()->GetData( nId, nPos ) ) nHighlightedItem = nPos; else @@ -4301,7 +4301,7 @@ void MenuFloatingWindow::MouseButtonDown( const MouseEvent& rMEvt ) //if ( pActivePopup && pActivePopup->ImplGetWindow() && !pActivePopup->ImplGetFloatingWindow()->pActivePopup ) // pActivePopup->ImplGetFloatingWindow()->ToTop( TOTOP_NOGRABFOCUS ); - ImplHighlightItem( rMEvt, TRUE ); + ImplHighlightItem( rMEvt, sal_True ); nMBDownPos = nHighlightedItem; } @@ -4311,7 +4311,7 @@ void MenuFloatingWindow::MouseButtonUp( const MouseEvent& rMEvt ) MenuItemData* pData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL; // nMBDownPos in lokaler Variable merken und gleich zuruecksetzen, // weil nach EndExecute zu spaet - USHORT _nMBDownPos = nMBDownPos; + sal_uInt16 _nMBDownPos = nMBDownPos; nMBDownPos = ITEMPOS_INVALID; if ( pData && pData->bEnabled && ( pData->eType != MENUITEM_SEPARATOR ) ) { @@ -4349,7 +4349,7 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt ) pActivePopup->ImplGetFloatingWindow()->aSubmenuCloseTimer.Start(); if( !pActivePopup || (pData && pData->pSubMenu != pActivePopup ) ) - ChangeHighlightItem( ITEMPOS_INVALID, FALSE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); #ifdef OS2 } #endif @@ -4364,13 +4364,13 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt ) { aSubmenuCloseTimer.Stop(); if( bIgnoreFirstMove ) - bIgnoreFirstMove = FALSE; + bIgnoreFirstMove = sal_False; else - ImplHighlightItem( rMEvt, FALSE ); + ImplHighlightItem( rMEvt, sal_False ); } } -void MenuFloatingWindow::ImplScroll( BOOL bUp ) +void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) { KillActivePopup(); Update(); @@ -4378,7 +4378,7 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp ) if( ! pMenu ) return; - HighlightItem( nHighlightedItem, FALSE ); + HighlightItem( nHighlightedItem, sal_False ); pMenu->ImplKillLayoutData(); @@ -4393,17 +4393,17 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp ) if ( !bScrollDown ) { - bScrollDown = TRUE; - ImplDrawScroller( FALSE ); + bScrollDown = sal_True; + ImplDrawScroller( sal_False ); } if ( pMenu->ImplGetPrevVisible( nFirstEntry ) == ITEMPOS_INVALID ) { - bScrollUp = FALSE; - ImplDrawScroller( TRUE ); + bScrollUp = sal_False; + ImplDrawScroller( sal_True ); } - Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( FALSE ).GetBoundRect(), SCROLL_CLIP ); + Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP ); } else if ( bScrollDown && !bUp ) { @@ -4415,24 +4415,24 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp ) if ( !bScrollUp ) { - bScrollUp = TRUE; - ImplDrawScroller( TRUE ); + bScrollUp = sal_True; + ImplDrawScroller( sal_True ); } long nHeight = GetOutputSizePixel().Height(); - USHORT nLastVisible; + sal_uInt16 nLastVisible; ((PopupMenu*)pMenu)->ImplCalcVisEntries( nHeight, nFirstEntry, &nLastVisible ); if ( pMenu->ImplGetNextVisible( nLastVisible ) == ITEMPOS_INVALID ) { - bScrollDown = FALSE; - ImplDrawScroller( FALSE ); + bScrollDown = sal_False; + ImplDrawScroller( sal_False ); } // nStartY -= nEntryHeight; - Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( FALSE ).GetBoundRect(), SCROLL_CLIP ); + Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP ); } - HighlightItem( nHighlightedItem, TRUE ); + HighlightItem( nHighlightedItem, sal_True ); } void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) @@ -4445,12 +4445,12 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) if ( bScrollUp && ( nMouseY < nY ) ) { - ImplScroll( TRUE ); + ImplScroll( sal_True ); nDelta = nY - nMouseY; } else if ( bScrollDown && ( nMouseY > ( aOutSz.Height() - nY ) ) ) { - ImplScroll( FALSE ); + ImplScroll( sal_False ); nDelta = nMouseY - ( aOutSz.Height() - nY ); } @@ -4472,7 +4472,7 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) aScrollTimer.Start(); } } -void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer ) +void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer ) { // #57934# ggf. das aktive Popup sofort schliessen, damit TH's Hintergrundsicherung funktioniert. // #65750# Dann verzichten wir lieber auf den schmalen Streifen Hintergrundsicherung. @@ -4487,11 +4487,11 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer ) if ( nHighlightedItem != ITEMPOS_INVALID ) { - HighlightItem( nHighlightedItem, FALSE ); + HighlightItem( nHighlightedItem, sal_False ); pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem ); } - nHighlightedItem = (USHORT)n; + nHighlightedItem = (sal_uInt16)n; DBG_ASSERT( pMenu->ImplIsVisible( nHighlightedItem ) || nHighlightedItem == ITEMPOS_INVALID, "ChangeHighlightItem: Not visible!" ); if( nHighlightedItem != ITEMPOS_INVALID ) { @@ -4499,7 +4499,7 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer ) { // #102461# make sure parent entry is highlighted as well MenuItemData* pData; - USHORT i, nCount = (USHORT)pMenu->pStartedFrom->pItemList->Count(); + sal_uInt16 i, nCount = (sal_uInt16)pMenu->pStartedFrom->pItemList->Count(); for(i = 0; i < nCount; i++) { pData = pMenu->pStartedFrom->pItemList->GetDataFromPos( i ); @@ -4511,12 +4511,12 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer ) MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow(); if( pPWin && pPWin->nHighlightedItem != i ) { - pPWin->HighlightItem( i, TRUE ); + pPWin->HighlightItem( i, sal_True ); pPWin->nHighlightedItem = i; } } } - HighlightItem( nHighlightedItem, TRUE ); + HighlightItem( nHighlightedItem, sal_True ); pMenu->ImplCallHighlight( nHighlightedItem ); } else @@ -4535,7 +4535,7 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer ) } } -void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) +void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) { if( ! pMenu ) return; @@ -4551,8 +4551,8 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) int nOuterSpace = ImplGetSVData()->maNWFData.mnMenuFormatExtraBorder; nY += nOuterSpace; - USHORT nCount = (USHORT)pMenu->pItemList->Count(); - for ( USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count(); + for ( sal_uInt16 n = 0; n < nCount; n++ ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); if ( n == nPos ) @@ -4560,7 +4560,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) DBG_ASSERT( pMenu->ImplIsVisible( n ), "Highlight: Item not visible!" ); if ( pData->eType != MENUITEM_SEPARATOR ) { - BOOL bRestoreLineColor = FALSE; + sal_Bool bRestoreLineColor = sal_False; Color oldLineColor; bool bDrawItemRect = true; @@ -4586,7 +4586,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) ) { bDrawItemRect = false; - if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, + if( sal_False == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, Region( aItemRect ), CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ), ImplControlValue(), @@ -4610,7 +4610,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) SetFillColor(); oldLineColor = GetLineColor(); SetLineColor( GetSettings().GetStyleSettings().GetMenuHighlightColor() ); - bRestoreLineColor = TRUE; + bRestoreLineColor = sal_True; } } else @@ -4629,7 +4629,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) } } -Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos ) +Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos ) { if( ! pMenu ) return Rectangle(); @@ -4643,8 +4643,8 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos ) if ( pMenu->pLogo ) nX = pMenu->pLogo->aBitmap.GetSizePixel().Width(); - USHORT nCount = (USHORT)pMenu->pItemList->Count(); - for ( USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count(); + for ( sal_uInt16 n = 0; n < nCount; n++ ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); if ( n == nPos ) @@ -4667,14 +4667,14 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos ) } -void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd ) +void MenuFloatingWindow::ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd ) { if( ! pMenu ) return; const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - USHORT n = nHighlightedItem; + sal_uInt16 n = nHighlightedItem; if ( n == ITEMPOS_INVALID ) { if ( bUp ) @@ -4683,7 +4683,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd ) n = pMenu->GetItemCount()-1; } - USHORT nLoop = n; + sal_uInt16 nLoop = n; if( bHomeEnd ) { @@ -4695,7 +4695,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd ) } else { - n = (USHORT)-1; + n = (sal_uInt16)-1; nLoop = n+1; } } @@ -4731,21 +4731,21 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd ) // Selektion noch im sichtbaren Bereich? if ( IsScrollMenu() ) { - ChangeHighlightItem( ITEMPOS_INVALID, FALSE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); while ( n < nFirstEntry ) - ImplScroll( TRUE ); + ImplScroll( sal_True ); Size aOutSz = GetOutputSizePixel(); - USHORT nLastVisible; + sal_uInt16 nLastVisible; ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); while ( n > nLastVisible ) { - ImplScroll( FALSE ); + ImplScroll( sal_False ); ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); } } - ChangeHighlightItem( n, FALSE ); + ChangeHighlightItem( n, sal_False ); break; } } while ( n != nLoop ); @@ -4756,8 +4756,8 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) ImplDelData aDelData; ImplAddDel( &aDelData ); - USHORT nCode = rKEvent.GetKeyCode().GetCode(); - bKeyInput = TRUE; + sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode(); + bKeyInput = sal_True; switch ( nCode ) { case KEY_UP: @@ -4769,7 +4769,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) case KEY_END: case KEY_HOME: { - ImplCursorUpDown( nCode == KEY_END, TRUE ); + ImplCursorUpDown( nCode == KEY_END, sal_True ); } break; case KEY_F6: @@ -4825,14 +4825,14 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) { if( pMenu ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( nHighlightedItem != ITEMPOS_INVALID ) { MenuItemData* pData = pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ); if ( pData && pData->pSubMenu ) { HighlightChanged( 0 ); - bDone = TRUE; + bDone = sal_True; } } if ( !bDone ) @@ -4880,14 +4880,14 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) default: { xub_Unicode nCharCode = rKEvent.GetCharCode(); - USHORT nPos = 0; - USHORT nDuplicates = 0; + sal_uInt16 nPos = 0; + sal_uInt16 nDuplicates = 0; MenuItemData* pData = (nCharCode && pMenu) ? pMenu->GetItemList()->SearchItem( nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem ) : NULL; if ( pData ) { if ( pData->pSubMenu || nDuplicates > 1 ) { - ChangeHighlightItem( nPos, FALSE ); + ChangeHighlightItem( nPos, sal_False ); HighlightChanged( 0 ); } else @@ -4909,7 +4909,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) if ( !aDelData.IsDelete() ) { ImplRemoveDel( &aDelData ); - bKeyInput = FALSE; + bKeyInput = sal_False; } } @@ -4933,16 +4933,16 @@ void MenuFloatingWindow::Paint( const Rectangle& ) } if ( IsScrollMenu() ) { - ImplDrawScroller( TRUE ); - ImplDrawScroller( FALSE ); + ImplDrawScroller( sal_True ); + ImplDrawScroller( sal_False ); } SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); pMenu->ImplPaint( this, nScrollerHeight, ImplGetStartY() ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, TRUE ); + HighlightItem( nHighlightedItem, sal_True ); } -void MenuFloatingWindow::ImplDrawScroller( BOOL bUp ) +void MenuFloatingWindow::ImplDrawScroller( sal_Bool bUp ) { if( ! pMenu ) return; @@ -4957,7 +4957,7 @@ void MenuFloatingWindow::ImplDrawScroller( BOOL bUp ) DecorationView aDecoView( this ); SymbolType eSymbol = bUp ? SYMBOL_SPIN_UP : SYMBOL_SPIN_DOWN; - USHORT nStyle = 0; + sal_uInt16 nStyle = 0; if ( ( bUp && !bScrollUp ) || ( !bUp && !bScrollDown ) ) nStyle |= SYMBOL_DRAW_DISABLE; @@ -4968,7 +4968,7 @@ void MenuFloatingWindow::ImplDrawScroller( BOOL bUp ) void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt ) { - USHORT nId = nHighlightedItem; + sal_uInt16 nId = nHighlightedItem; Menu* pM = pMenu; Window* pW = this; @@ -4992,7 +4992,7 @@ void MenuFloatingWindow::StateChanged( StateChangedType nType ) if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || ( nType == STATE_CHANGE_CONTROLBACKGROUND ) ) { - ImplInitMenuWindow( this, FALSE, FALSE ); + ImplInitMenuWindow( this, sal_False, sal_False ); Invalidate(); } } @@ -5006,7 +5006,7 @@ void MenuFloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitMenuWindow( this, FALSE, FALSE ); + ImplInitMenuWindow( this, sal_False, sal_False ); Invalidate(); } } @@ -5046,10 +5046,10 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : pActivePopup = NULL; nSaveFocusId = 0; nHighlightedItem = ITEMPOS_INVALID; - mbAutoPopup = TRUE; + mbAutoPopup = sal_True; nSaveFocusId = 0; - bIgnoreFirstMove = TRUE; - bStayActive = FALSE; + bIgnoreFirstMove = sal_True; + bStayActive = sal_False; ResMgr* pResMgr = ImplGetResMgr(); @@ -5063,7 +5063,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : aCloser.SetOutStyle( TOOLBOX_STYLE_FLAT ); aCloser.SetBackground(); - aCloser.SetPaintTransparent( TRUE ); + aCloser.SetPaintTransparent( sal_True ); aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP ); aCloser.InsertItem( IID_DOCUMENTCLOSE, @@ -5097,7 +5097,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen ) pMenu = pMen; KillActivePopup(); nHighlightedItem = ITEMPOS_INVALID; - ImplInitMenuWindow( this, TRUE, TRUE ); + ImplInitMenuWindow( this, sal_True, sal_True ); if ( pMen ) { aCloser.ShowItem( IID_DOCUMENTCLOSE, pMen->HasCloser() ); @@ -5117,7 +5117,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen ) } } -void MenuBarWindow::ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide ) +void MenuBarWindow::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) { aCloser.ShowItem( IID_DOCUMENTCLOSE, bClose ); aCloser.Show( bClose || ! m_aAddButtons.empty() ); @@ -5145,7 +5145,7 @@ IMPL_LINK( MenuBarWindow, CloserHdl, PushButton*, EMPTYARG ) } else { - std::map<USHORT,AddButtonEntry>::iterator it = m_aAddButtons.find( aCloser.GetCurItemId() ); + std::map<sal_uInt16,AddButtonEntry>::iterator it = m_aAddButtons.find( aCloser.GetCurItemId() ); if( it != m_aAddButtons.end() ) { MenuBar::MenuBarButtonCallbackArg aArg; @@ -5171,10 +5171,10 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent ) aArg.nId = aCloser.GetHighlightItemId(); else if( pEvent->GetId() == VCLEVENT_TOOLBOX_HIGHLIGHTOFF ) { - USHORT nPos = static_cast< USHORT >(reinterpret_cast<sal_IntPtr>(pEvent->GetData())); + sal_uInt16 nPos = static_cast< sal_uInt16 >(reinterpret_cast<sal_IntPtr>(pEvent->GetData())); aArg.nId = aCloser.GetItemId( nPos ); } - std::map< USHORT, AddButtonEntry >::iterator it = m_aAddButtons.find( aArg.nId ); + std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( aArg.nId ); if( it != m_aAddButtons.end() ) { it->second.m_aHighlightLink.Call( &aArg ); @@ -5204,12 +5204,12 @@ IMPL_LINK( MenuBarWindow, HideHdl, PushButton*, EMPTYARG ) return pMenu ? ((MenuBar*)pMenu)->GetHideButtonClickHdl().Call( pMenu ) : 0; } -void MenuBarWindow::ImplCreatePopup( BOOL bPreSelectFirst ) +void MenuBarWindow::ImplCreatePopup( sal_Bool bPreSelectFirst ) { MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL; if ( pItemData ) { - bIgnoreFirstMove = TRUE; + bIgnoreFirstMove = sal_True; if ( pActivePopup && ( pActivePopup != pItemData->pSubMenu ) ) { KillActivePopup(); @@ -5219,7 +5219,7 @@ void MenuBarWindow::ImplCreatePopup( BOOL bPreSelectFirst ) pActivePopup = (PopupMenu*)pItemData->pSubMenu; long nX = 0; MenuItemData* pData = 0; - for ( ULONG n = 0; n < nHighlightedItem; n++ ) + for ( sal_uIntPtr n = 0; n < nHighlightedItem; n++ ) { pData = pMenu->GetItemList()->GetDataFromPos( n ); nX += pData->aSz.Width(); @@ -5266,11 +5266,11 @@ void MenuBarWindow::KillActivePopup() return; // kill it later if ( pActivePopup->bInCallback ) - pActivePopup->bCanceled = TRUE; + pActivePopup->bCanceled = sal_True; - pActivePopup->bInCallback = TRUE; + pActivePopup->bInCallback = sal_True; pActivePopup->Deactivate(); - pActivePopup->bInCallback = FALSE; + pActivePopup->bInCallback = sal_False; // Abfrage auf pActivePopup, falls im Deactivate abgeschossen... if ( pActivePopup && pActivePopup->ImplGetWindow() ) { @@ -5288,22 +5288,22 @@ void MenuBarWindow::PopupClosed( Menu* pPopup ) if ( pPopup == pActivePopup ) { KillActivePopup(); - ChangeHighlightItem( ITEMPOS_INVALID, FALSE, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, FALSE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_False, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, sal_False ); } } void MenuBarWindow::MouseButtonDown( const MouseEvent& rMEvt ) { - mbAutoPopup = TRUE; - USHORT nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); + mbAutoPopup = sal_True; + sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); if ( ( nEntry != ITEMPOS_INVALID ) && ( nEntry != nHighlightedItem ) ) { - ChangeHighlightItem( nEntry, FALSE ); + ChangeHighlightItem( nEntry, sal_False ); } else { KillActivePopup(); - ChangeHighlightItem( ITEMPOS_INVALID, FALSE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); } } @@ -5319,20 +5319,20 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if( bIgnoreFirstMove ) { - bIgnoreFirstMove = FALSE; + bIgnoreFirstMove = sal_False; return; } - USHORT nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); + sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); if ( ( nEntry != ITEMPOS_INVALID ) #ifdef OS2 && ( ImplHilite(rMEvt) ) #endif && ( nEntry != nHighlightedItem ) ) - ChangeHighlightItem( nEntry, FALSE ); + ChangeHighlightItem( nEntry, sal_False ); } -void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllowRestoreFocus, BOOL bDefaultToDocument) +void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sal_Bool bAllowRestoreFocus, sal_Bool bDefaultToDocument) { if( ! pMenu ) return; @@ -5343,21 +5343,21 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo KillActivePopup(); // pActivePopup ggf. ohne pWin, wenn in Activate() Rescheduled wurde // Activate am MenuBar immer nur einmal pro Vorgang... - BOOL bJustActivated = FALSE; + sal_Bool bJustActivated = sal_False; if ( ( nHighlightedItem == ITEMPOS_INVALID ) && ( n != ITEMPOS_INVALID ) ) { - ImplGetSVData()->maWinData.mbNoDeactivate = TRUE; + ImplGetSVData()->maWinData.mbNoDeactivate = sal_True; if( !bStayActive ) { // #105406# avoid saving the focus when we already have the focus - BOOL bNoSaveFocus = (this == ImplGetSVData()->maWinData.mpFocusWin ); + sal_Bool bNoSaveFocus = (this == ImplGetSVData()->maWinData.mpFocusWin ); if( nSaveFocusId ) { if( !ImplGetSVData()->maWinData.mbNoSaveFocus ) { // we didn't clean up last time - Window::EndSaveFocus( nSaveFocusId, FALSE ); // clean up + Window::EndSaveFocus( nSaveFocusId, sal_False ); // clean up nSaveFocusId = 0; if( !bNoSaveFocus ) nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated @@ -5373,21 +5373,21 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo } } else - bStayActive = FALSE; - pMenu->bInCallback = TRUE; // hier schon setzen, falls Activate ueberladen + bStayActive = sal_False; + pMenu->bInCallback = sal_True; // hier schon setzen, falls Activate ueberladen pMenu->Activate(); - pMenu->bInCallback = FALSE; - bJustActivated = TRUE; + pMenu->bInCallback = sal_False; + bJustActivated = sal_True; } else if ( ( nHighlightedItem != ITEMPOS_INVALID ) && ( n == ITEMPOS_INVALID ) ) { - pMenu->bInCallback = TRUE; + pMenu->bInCallback = sal_True; pMenu->Deactivate(); - pMenu->bInCallback = FALSE; - ImplGetSVData()->maWinData.mbNoDeactivate = FALSE; + pMenu->bInCallback = sal_False; + ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; if( !ImplGetSVData()->maWinData.mbNoSaveFocus ) { - ULONG nTempFocusId = nSaveFocusId; + sal_uIntPtr nTempFocusId = nSaveFocusId; nSaveFocusId = 0; Window::EndSaveFocus( nTempFocusId, bAllowRestoreFocus ); // #105406# restore focus to document if we could not save focus before @@ -5398,13 +5398,13 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo if ( nHighlightedItem != ITEMPOS_INVALID ) { - HighlightItem( nHighlightedItem, FALSE ); + HighlightItem( nHighlightedItem, sal_False ); pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem ); } - nHighlightedItem = (USHORT)n; + nHighlightedItem = (sal_uInt16)n; DBG_ASSERT( ( nHighlightedItem == ITEMPOS_INVALID ) || pMenu->ImplIsVisible( nHighlightedItem ), "ChangeHighlightItem: Not visible!" ); - HighlightItem( nHighlightedItem, TRUE ); + HighlightItem( nHighlightedItem, sal_True ); pMenu->ImplCallHighlight( nHighlightedItem ); if( mbAutoPopup ) @@ -5415,14 +5415,14 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo GrabFocus(); } -void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) +void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) { if( ! pMenu ) return; long nX = 0; - ULONG nCount = pMenu->pItemList->Count(); - for ( ULONG n = 0; n < nCount; n++ ) + sal_uIntPtr nCount = pMenu->pItemList->Count(); + for ( sal_uIntPtr n = 0; n < nCount; n++ ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); if ( n == nPos ) @@ -5498,14 +5498,14 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) } } -Rectangle MenuBarWindow::ImplGetItemRect( USHORT nPos ) +Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos ) { Rectangle aRect; if( pMenu ) { long nX = 0; - ULONG nCount = pMenu->pItemList->Count(); - for ( ULONG n = 0; n < nCount; n++ ) + sal_uIntPtr nCount = pMenu->pItemList->Count(); + for ( sal_uIntPtr n = 0; n < nCount; n++ ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); if ( n == nPos ) @@ -5528,16 +5528,16 @@ void MenuBarWindow::KeyInput( const KeyEvent& rKEvent ) Window::KeyInput( rKEvent ); } -BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu ) +sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu ) { if( ! pMenu ) - return FALSE; + return sal_False; if ( pMenu->bInCallback ) - return TRUE; // schlucken + return sal_True; // schlucken - BOOL bDone = FALSE; - USHORT nCode = rKEvent.GetKeyCode().GetCode(); + sal_Bool bDone = sal_False; + sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode(); if( GetParent() ) { @@ -5546,7 +5546,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu SystemWindow *pSysWin = (SystemWindow*)GetParent()->GetWindow( WINDOW_CLIENT ); if( pSysWin->GetTaskPaneList() ) if( pSysWin->GetTaskPaneList()->HandleKeyEvent( rKEvent ) ) - return TRUE; + return sal_True; } } @@ -5555,22 +5555,22 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu mbAutoPopup = ImplGetSVData()->maNWFData.mbOpenMenuOnF10; if ( nHighlightedItem == ITEMPOS_INVALID ) { - ChangeHighlightItem( 0, FALSE ); + ChangeHighlightItem( 0, sal_False ); GrabFocus(); } else { - ChangeHighlightItem( ITEMPOS_INVALID, FALSE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); nSaveFocusId = 0; } - bDone = TRUE; + bDone = sal_True; } else if ( bFromMenu ) { if ( ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) || ( nCode == KEY_HOME ) || ( nCode == KEY_END ) ) { - USHORT n = nHighlightedItem; + sal_uInt16 n = nHighlightedItem; if ( n == ITEMPOS_INVALID ) { if ( nCode == KEY_LEFT) @@ -5590,10 +5590,10 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu bWasHighlight = (pSubWindow->GetHighlightedItem() != ITEMPOS_INVALID); } - USHORT nLoop = n; + sal_uInt16 nLoop = n; if( nCode == KEY_HOME ) - { n = (USHORT)-1; nLoop = n+1; } + { n = (sal_uInt16)-1; nLoop = n+1; } if( nCode == KEY_END ) { n = pMenu->GetItemCount(); nLoop = n-1; } @@ -5616,14 +5616,14 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu MenuItemData* pData = (MenuItemData*)pMenu->GetItemList()->GetDataFromPos( n ); if ( ( pData->eType != MENUITEM_SEPARATOR ) && pMenu->ImplIsVisible( n ) ) { - BOOL bDoSelect = TRUE; + sal_Bool bDoSelect = sal_True; if( ImplGetSVData()->maNWFData.mbOpenMenuOnF10 ) bDoSelect = bWasHighlight; ChangeHighlightItem( n, bDoSelect ); break; } } while ( n != nLoop ); - bDone = TRUE; + bDone = sal_True; } else if ( nCode == KEY_RETURN ) { @@ -5631,36 +5631,36 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu else if ( !mbAutoPopup ) { - ImplCreatePopup( TRUE ); - mbAutoPopup = TRUE; + ImplCreatePopup( sal_True ); + mbAutoPopup = sal_True; } - bDone = TRUE; + bDone = sal_True; } else if ( ( nCode == KEY_UP ) || ( nCode == KEY_DOWN ) ) { if ( !mbAutoPopup ) { - ImplCreatePopup( TRUE ); - mbAutoPopup = TRUE; + ImplCreatePopup( sal_True ); + mbAutoPopup = sal_True; } - bDone = TRUE; + bDone = sal_True; } else if ( nCode == KEY_ESCAPE || ( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() ) ) { if( pActivePopup ) { // bring focus to menu bar without any open popup - mbAutoPopup = FALSE; - USHORT n = nHighlightedItem; + mbAutoPopup = sal_False; + sal_uInt16 n = nHighlightedItem; nHighlightedItem = ITEMPOS_INVALID; - bStayActive = TRUE; - ChangeHighlightItem( n, FALSE ); - bStayActive = FALSE; + bStayActive = sal_True; + ChangeHighlightItem( n, sal_False ); + bStayActive = sal_False; KillActivePopup(); GrabFocus(); } else - ChangeHighlightItem( ITEMPOS_INVALID, FALSE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); if( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() ) { @@ -5668,7 +5668,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu GrabFocusToDocument(); } - bDone = TRUE; + bDone = sal_True; } } @@ -5677,19 +5677,19 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu xub_Unicode nCharCode = rKEvent.GetCharCode(); if ( nCharCode ) { - USHORT nEntry, nDuplicates; + sal_uInt16 nEntry, nDuplicates; MenuItemData* pData = pMenu->GetItemList()->SearchItem( nCharCode, rKEvent.GetKeyCode(), nEntry, nDuplicates, nHighlightedItem ); if ( pData && (nEntry != ITEMPOS_INVALID) ) { - mbAutoPopup = TRUE; - ChangeHighlightItem( nEntry, TRUE ); - bDone = TRUE; + mbAutoPopup = sal_True; + ChangeHighlightItem( nEntry, sal_True ); + bDone = sal_True; } else { // Wegen Systemmenu und anderen System-HotKeys, nur // eigenstaendige Character-Kombinationen auswerten - USHORT nKeyCode = rKEvent.GetKeyCode().GetCode(); + sal_uInt16 nKeyCode = rKEvent.GetKeyCode().GetCode(); if ( ((nKeyCode >= KEY_A) && (nKeyCode <= KEY_Z)) ) Sound::Beep(); } @@ -5726,7 +5726,7 @@ void MenuBarWindow::Paint( const Rectangle& ) SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); pMenu->ImplPaint( this, 0 ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, TRUE ); + HighlightItem( nHighlightedItem, sal_True ); // in high contrast mode draw a separating line on the lower edge if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) && @@ -5778,20 +5778,20 @@ void MenuBarWindow::Resize() Invalidate(); } -USHORT MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const +sal_uInt16 MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const { if( pMenu ) { long nX = 0; - USHORT nCount = (USHORT)pMenu->pItemList->Count(); - for ( USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count(); + for ( sal_uInt16 n = 0; n < nCount; n++ ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); if ( pMenu->ImplIsVisible( n ) ) { nX += pData->aSz.Width(); if ( nX > rMousePos.X() ) - return (USHORT)n; + return (sal_uInt16)n; } } } @@ -5800,9 +5800,9 @@ USHORT MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt ) { - USHORT nId = nHighlightedItem; + sal_uInt16 nId = nHighlightedItem; if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) ) - ChangeHighlightItem( ITEMPOS_INVALID, TRUE ); + ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) ) @@ -5816,7 +5816,7 @@ void MenuBarWindow::StateChanged( StateChangedType nType ) if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || ( nType == STATE_CHANGE_CONTROLBACKGROUND ) ) { - ImplInitMenuWindow( this, FALSE, TRUE ); + ImplInitMenuWindow( this, sal_False, sal_True ); Invalidate(); } else if( pMenu ) @@ -5828,7 +5828,7 @@ void MenuBarWindow::ImplLayoutChanged() { if( pMenu ) { - ImplInitMenuWindow( this, TRUE, TRUE ); + ImplInitMenuWindow( this, sal_True, sal_True ); // Falls sich der Font geaendert hat. long nHeight = pMenu->ImplCalcSize( this ).Height(); @@ -5880,16 +5880,16 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt ) void MenuBarWindow::LoseFocus() { - if ( !HasChildPathFocus( TRUE ) ) - ChangeHighlightItem( ITEMPOS_INVALID, FALSE, FALSE ); + if ( !HasChildPathFocus( sal_True ) ) + ChangeHighlightItem( ITEMPOS_INVALID, sal_False, sal_False ); } void MenuBarWindow::GetFocus() { if ( nHighlightedItem == ITEMPOS_INVALID ) { - mbAutoPopup = FALSE; // do not open menu when activated by focus handling like taskpane cycling - ChangeHighlightItem( 0, FALSE ); + mbAutoPopup = sal_False; // do not open menu when activated by focus handling like taskpane cycling + ChangeHighlightItem( 0, sal_False ); } } @@ -5903,13 +5903,13 @@ void MenuBarWindow::GetFocus() return xAcc; } -USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, USHORT i_nPos ) +sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, sal_uInt16 i_nPos ) { // find first free button id - USHORT nId = IID_DOCUMENTCLOSE; - std::map< USHORT, AddButtonEntry >::const_iterator it; + sal_uInt16 nId = IID_DOCUMENTCLOSE; + std::map< sal_uInt16, AddButtonEntry >::const_iterator it; if( i_nPos > m_aAddButtons.size() ) - i_nPos = static_cast<USHORT>(m_aAddButtons.size()); + i_nPos = static_cast<sal_uInt16>(m_aAddButtons.size()); do { nId++; @@ -5932,14 +5932,14 @@ USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLi return nId; } -void MenuBarWindow::SetMenuBarButtonHighlightHdl( USHORT nId, const Link& rLink ) +void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& rLink ) { - std::map< USHORT, AddButtonEntry >::iterator it = m_aAddButtons.find( nId ); + std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( nId ); if( it != m_aAddButtons.end() ) it->second.m_aHighlightLink = rLink; } -Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( USHORT nId ) +Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId ) { Rectangle aRect; if( m_aAddButtons.find( nId ) != m_aAddButtons.end() ) @@ -5964,9 +5964,9 @@ Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( USHORT nId ) return aRect; } -void MenuBarWindow::RemoveMenuBarButton( USHORT nId ) +void MenuBarWindow::RemoveMenuBarButton( sal_uInt16 nId ) { - USHORT nPos = aCloser.GetItemPos( nId ); + sal_uInt16 nPos = aCloser.GetItemPos( nId ); aCloser.RemoveItem( nPos ); m_aAddButtons.erase( nId ); aCloser.calcMinSize(); @@ -5976,9 +5976,9 @@ void MenuBarWindow::RemoveMenuBarButton( USHORT nId ) pMenu->mpSalMenu->RemoveMenuBarButton( nId ); } -bool MenuBarWindow::HandleMenuButtonEvent( USHORT i_nButtonId ) +bool MenuBarWindow::HandleMenuButtonEvent( sal_uInt16 i_nButtonId ) { - std::map< USHORT, AddButtonEntry >::iterator it = m_aAddButtons.find( i_nButtonId ); + std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( i_nButtonId ); if( it != m_aAddButtons.end() ) { MenuBar::MenuBarButtonCallbackArg aArg; @@ -5987,5 +5987,5 @@ bool MenuBarWindow::HandleMenuButtonEvent( USHORT i_nButtonId ) aArg.pMenuBar = dynamic_cast<MenuBar*>(pMenu); return it->second.m_aSelectLink.Call( &aArg ); } - return FALSE; + return sal_False; } diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx index c2c6c18135f2..c6d6afa4a2d2 100644 --- a/vcl/source/window/mnemonic.cxx +++ b/vcl/source/window/mnemonic.cxx @@ -48,9 +48,9 @@ MnemonicGenerator::MnemonicGenerator() // ----------------------------------------------------------------------- -USHORT MnemonicGenerator::ImplGetMnemonicIndex( sal_Unicode c ) +sal_uInt16 MnemonicGenerator::ImplGetMnemonicIndex( sal_Unicode c ) { - static USHORT const aImplMnemonicRangeTab[MNEMONIC_RANGES*2] = + static sal_uInt16 const aImplMnemonicRangeTab[MNEMONIC_RANGES*2] = { MNEMONIC_RANGE_1_START, MNEMONIC_RANGE_1_END, MNEMONIC_RANGE_2_START, MNEMONIC_RANGE_2_END, @@ -58,8 +58,8 @@ USHORT MnemonicGenerator::ImplGetMnemonicIndex( sal_Unicode c ) MNEMONIC_RANGE_4_START, MNEMONIC_RANGE_4_END }; - USHORT nMnemonicIndex = 0; - for ( USHORT i = 0; i < MNEMONIC_RANGES; i++ ) + sal_uInt16 nMnemonicIndex = 0; + for ( sal_uInt16 i = 0; i < MNEMONIC_RANGES; i++ ) { if ( (c >= aImplMnemonicRangeTab[i*2]) && (c <= aImplMnemonicRangeTab[i*2+1]) ) @@ -106,7 +106,7 @@ void MnemonicGenerator::RegisterMnemonic( const XubString& rKey ) sal_Unicode cMnemonic = ImplFindMnemonic( aKey ); if ( cMnemonic ) { - USHORT nMnemonicIndex = ImplGetMnemonicIndex( cMnemonic ); + sal_uInt16 nMnemonicIndex = ImplGetMnemonicIndex( cMnemonic ); if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND ) maMnemonics[nMnemonicIndex] = 0; } @@ -118,7 +118,7 @@ void MnemonicGenerator::RegisterMnemonic( const XubString& rKey ) { sal_Unicode c = aKey.GetChar( nIndex ); - USHORT nMnemonicIndex = ImplGetMnemonicIndex( c ); + sal_uInt16 nMnemonicIndex = ImplGetMnemonicIndex( c ); if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND ) { if ( maMnemonics[nMnemonicIndex] && (maMnemonics[nMnemonicIndex] < 0xFF) ) @@ -132,24 +132,24 @@ void MnemonicGenerator::RegisterMnemonic( const XubString& rKey ) // ----------------------------------------------------------------------- -BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) +sal_Bool MnemonicGenerator::CreateMnemonic( XubString& rKey ) { if ( !rKey.Len() || ImplFindMnemonic( rKey ) ) - return FALSE; + return sal_False; const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale(); uno::Reference < i18n::XCharacterClassification > xCharClass = GetCharClass(); // Don't crash even when we don't have access to i18n service if ( !xCharClass.is() ) - return FALSE; + return sal_False; XubString aKey = xCharClass->toUpper( rKey, 0, rKey.Len(), rLocale ); - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; xub_StrLen nLen = aKey.Len(); - BOOL bCJK = FALSE; + sal_Bool bCJK = sal_False; switch( Application::GetSettings().GetUILanguage() ) { case LANGUAGE_JAPANESE: @@ -160,7 +160,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) case LANGUAGE_CHINESE_MACAU: case LANGUAGE_KOREAN: case LANGUAGE_KOREAN_JOHAB: - bCJK = TRUE; + bCJK = sal_True; break; default: break; @@ -172,8 +172,8 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) // #110720#, avoid CJK-style mnemonics for latin-only strings that do not contain useful mnemonic chars if( bCJK ) { - BOOL bLatinOnly = TRUE; - BOOL bMnemonicIndexFound = FALSE; + sal_Bool bLatinOnly = sal_True; + sal_Bool bMnemonicIndexFound = sal_False; sal_Unicode c; xub_StrLen nIndex; @@ -183,19 +183,19 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) if ( ((c >= 0x3000) && (c <= 0xD7FF)) || // cjk ((c >= 0xFF61) && (c <= 0xFFDC)) ) // halfwidth forms { - bLatinOnly = FALSE; + bLatinOnly = sal_False; break; } if( ImplGetMnemonicIndex( c ) != MNEMONIC_INDEX_NOTFOUND ) - bMnemonicIndexFound = TRUE; + bMnemonicIndexFound = sal_True; } if( bLatinOnly && !bMnemonicIndexFound ) - return FALSE; + return sal_False; } int nCJK = 0; - USHORT nMnemonicIndex; + sal_uInt16 nMnemonicIndex; sal_Unicode c; xub_StrLen nIndex = 0; if( !bCJK ) @@ -225,7 +225,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) { maMnemonics[nMnemonicIndex] = 0; rKey.Insert( MNEMONIC_CHAR, nIndex ); - bChanged = TRUE; + bChanged = sal_True; break; } } @@ -246,8 +246,8 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) // 2) search for a unique/uncommon character if ( !bChanged ) { - USHORT nBestCount = 0xFFFF; - USHORT nBestMnemonicIndex = 0; + sal_uInt16 nBestCount = 0xFFFF; + sal_uInt16 nBestMnemonicIndex = 0; xub_StrLen nBestIndex = 0; nIndex = 0; do @@ -277,7 +277,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) { maMnemonics[nBestMnemonicIndex] = 0; rKey.Insert( MNEMONIC_CHAR, nBestIndex ); - bChanged = TRUE; + bChanged = sal_True; } } } @@ -325,7 +325,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) nIndex--; } rKey.Insert( aStr, nIndex ); - bChanged = TRUE; + bChanged = sal_True; break; } } @@ -350,7 +350,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey ) // { // maMnemonics[nMnemonicIndex] = 0; // rKey.Insert( MNEMONIC_CHAR, nIndex ); -// bChanged = TRUE; +// bChanged = sal_True; // break; // } // diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx index 241aea1cf336..f277ee0c1265 100644 --- a/vcl/source/window/mnemonicengine.cxx +++ b/vcl/source/window/mnemonicengine.cxx @@ -102,7 +102,7 @@ namespace vcl //-------------------------------------------------------------------- bool MnemonicEngine::HandleKeyEvent( const KeyEvent& _rKEvt ) { - BOOL bAccelKey = _rKEvt.GetKeyCode().IsMod2(); + sal_Bool bAccelKey = _rKEvt.GetKeyCode().IsMod2(); if ( !bAccelKey ) return false; diff --git a/vcl/source/window/mouseevent.cxx b/vcl/source/window/mouseevent.cxx index 4bfe08b3f3d8..afb0b5f68a07 100644 --- a/vcl/source/window/mouseevent.cxx +++ b/vcl/source/window/mouseevent.cxx @@ -38,7 +38,7 @@ MouseEvent::MouseEvent( const ::com::sun::star::awt::MouseEvent& rEvent ) : maPos( rEvent.X, rEvent.Y ) , mnMode( 0 ) -, mnClicks( static_cast< USHORT >( rEvent.ClickCount ) ) +, mnClicks( static_cast< sal_uInt16 >( rEvent.ClickCount ) ) , mnCode( 0 ) { if( rEvent.Modifiers ) diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 7f7a65cd7fb9..487476e97fc2 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -76,10 +76,10 @@ void MessBox::ImplInitMessBoxData() mpFixedText = NULL; mpFixedImage = NULL; mnSoundType = 0; - mbHelpBtn = FALSE; - mbSound = TRUE; + mbHelpBtn = sal_False; + mbSound = sal_True; mpCheckBox = NULL; - mbCheck = FALSE; + mbCheck = sal_False; } // ----------------------------------------------------------------------- @@ -87,11 +87,11 @@ void MessBox::ImplInitMessBoxData() void MessBox::ImplInitButtons() { WinBits nStyle = GetStyle(); - USHORT nOKFlags = BUTTONDIALOG_OKBUTTON; - USHORT nCancelFlags = BUTTONDIALOG_CANCELBUTTON; - USHORT nRetryFlags = 0; - USHORT nYesFlags = 0; - USHORT nNoFlags = 0; + sal_uInt16 nOKFlags = BUTTONDIALOG_OKBUTTON; + sal_uInt16 nCancelFlags = BUTTONDIALOG_CANCELBUTTON; + sal_uInt16 nRetryFlags = 0; + sal_uInt16 nYesFlags = 0; + sal_uInt16 nNoFlags = 0; if ( nStyle & WB_OK_CANCEL ) { @@ -139,8 +139,8 @@ void MessBox::ImplInitButtons() } else if ( nStyle & WB_ABORT_RETRY_IGNORE ) { - USHORT nAbortFlags = 0; - USHORT nIgnoreFlags = 0; + sal_uInt16 nAbortFlags = 0; + sal_uInt16 nIgnoreFlags = 0; if ( nStyle & WB_DEF_CANCEL ) nAbortFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON; @@ -192,16 +192,16 @@ MessBox::MessBox( Window* pParent, const ResId& rResId ) : ImplInitMessBoxData(); GetRes( rResId.SetRT( RSC_MESSBOX ) ); - USHORT nHiButtons = ReadShortRes(); - USHORT nLoButtons = ReadShortRes(); - USHORT nHiDefButton = ReadShortRes(); - USHORT nLoDefButton = ReadShortRes(); - USHORT nHiHelpId = ReadShortRes(); - USHORT nLoHelpId = ReadShortRes(); - /* USHORT bSysModal = */ ReadShortRes(); - SetHelpId( ((ULONG)nHiHelpId << 16) + nLoHelpId ); - WinBits nBits = (((ULONG)nHiButtons << 16) + nLoButtons) | - (((ULONG)nHiDefButton << 16) + nLoDefButton); + sal_uInt16 nHiButtons = ReadShortRes(); + sal_uInt16 nLoButtons = ReadShortRes(); + sal_uInt16 nHiDefButton = ReadShortRes(); + sal_uInt16 nLoDefButton = ReadShortRes(); + sal_uInt16 nHiHelpId = ReadShortRes(); + sal_uInt16 nLoHelpId = ReadShortRes(); + /* sal_uInt16 bSysModal = */ ReadShortRes(); + SetHelpId( ((sal_uIntPtr)nHiHelpId << 16) + nLoHelpId ); + WinBits nBits = (((sal_uIntPtr)nHiButtons << 16) + nLoButtons) | + (((sal_uIntPtr)nHiDefButton << 16) + nLoDefButton); ImplInit( pParent, nBits | WB_MOVEABLE | WB_HORZ | WB_CENTER ); ImplLoadRes( rResId ); @@ -238,7 +238,7 @@ void MessBox::ImplPosControls() if ( !mbHelpBtn ) { AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 3 ); - mbHelpBtn = TRUE; + mbHelpBtn = sal_True; } } else @@ -246,7 +246,7 @@ void MessBox::ImplPosControls() if ( mbHelpBtn ) { RemoveButton( BUTTONID_HELP ); - mbHelpBtn = FALSE; + mbHelpBtn = sal_False; } } @@ -264,7 +264,7 @@ void MessBox::ImplPosControls() long nMaxLineWidth; long nWidth; WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL | WB_INFO; - USHORT nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT; + sal_uInt16 nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT; if ( mpFixedText ) delete mpFixedText; @@ -283,7 +283,7 @@ void MessBox::ImplPosControls() // Message-Text um Tabs bereinigen XubString aTabStr( RTL_CONSTASCII_USTRINGPARAM( " " ) ); - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( nIndex != STRING_NOTFOUND ) nIndex = aMessText.SearchAndReplace( '\t', aTabStr, nIndex ); @@ -444,14 +444,14 @@ void MessBox::StateChanged( StateChangedType nType ) // ----------------------------------------------------------------------- -BOOL MessBox::GetCheckBoxState() const +sal_Bool MessBox::GetCheckBoxState() const { return mpCheckBox ? mpCheckBox->IsChecked() : mbCheck; } // ----------------------------------------------------------------------- -void MessBox::SetCheckBoxState( BOOL bCheck ) +void MessBox::SetCheckBoxState( sal_Bool bCheck ) { if( mpCheckBox ) mpCheckBox->Check( bCheck ); mbCheck = bCheck; @@ -468,15 +468,15 @@ void MessBox::SetDefaultCheckBoxText() // ----------------------------------------------------------------------- -BOOL MessBox::SetModeImage( const Image& rImage, BmpColorMode eMode ) +sal_Bool MessBox::SetModeImage( const Image& rImage, BmpColorMode eMode ) { if( eMode == BMP_COLOR_NORMAL ) SetImage( rImage ); else if( eMode == BMP_COLOR_HIGHCONTRAST ) maImageHC = rImage; else - return FALSE; - return TRUE; + return sal_False; + return sal_True; } // ----------------------------------------------------------------------- @@ -499,7 +499,7 @@ void InfoBox::ImplInitInfoBoxData() SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? InfoBox::GetStandardImageHC() : InfoBox::GetStandardImage() ); - mnSoundType = ((USHORT)SOUND_INFO)+1; + mnSoundType = ((sal_uInt16)SOUND_INFO)+1; } // ----------------------------------------------------------------------- @@ -543,7 +543,7 @@ void WarningBox::ImplInitWarningBoxData() SetText( Application::GetDisplayName() ); SetImage( WarningBox::GetStandardImage() ); - mnSoundType = ((USHORT)SOUND_WARNING)+1; + mnSoundType = ((sal_uInt16)SOUND_WARNING)+1; } // ----------------------------------------------------------------------- @@ -590,7 +590,7 @@ void ErrorBox::ImplInitErrorBoxData() SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() ); - mnSoundType = ((USHORT)SOUND_ERROR)+1; + mnSoundType = ((sal_uInt16)SOUND_ERROR)+1; } // ----------------------------------------------------------------------- @@ -636,7 +636,7 @@ void QueryBox::ImplInitQueryBoxData() SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() ); - mnSoundType = ((USHORT)SOUND_QUERY)+1; + mnSoundType = ((sal_uInt16)SOUND_QUERY)+1; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 35077b1cff0e..875dd7950780 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -70,7 +70,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const Re , maPageVDev( *this ) , maToolTipString( String( VclResId( SV_PRINT_PRINTPREVIEW_TXT ) ) ) { - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetBackground(); if( useHCColorReplacement() ) maPageVDev.SetBackground( GetSettings().GetStyleSettings().GetWindowColor() ); @@ -205,7 +205,7 @@ void PrintDialog::PrintPreviewWindow::Resize() fZoom /= 2.0; } - maPageVDev.SetOutputSizePixel( aScaledSize, FALSE ); + maPageVDev.SetOutputSizePixel( aScaledSize, sal_False ); } void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& ) @@ -311,7 +311,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi maOrigSize = i_rOrigSize; maReplacementString = i_rReplacement; maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY ); - maPageVDev.EnableOutput( TRUE ); + maPageVDev.EnableOutput( sal_True ); Resize(); Invalidate(); } @@ -409,13 +409,13 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId ) FreeResource(); maNupOrderWin.Show(); - maPagesBtn.Check( TRUE ); - maBrochureBtn.Show( FALSE ); + maPagesBtn.Check( sal_True ); + maBrochureBtn.Show( sal_False ); // setup field units for metric fields const LocaleDataWrapper& rLocWrap( maPageMarginEdt.GetLocaleDataWrapper() ); FieldUnit eUnit = FUNIT_MM; - USHORT nDigits = 0; + sal_uInt16 nDigits = 0; if( rLocWrap.getMeasurementSystemEnum() == MEASURE_US ) { eUnit = FUNIT_INCH; @@ -460,7 +460,7 @@ PrintDialog::NUpTabPage::~NUpTabPage() void PrintDialog::NUpTabPage::enableNupControls( bool bEnable ) { - maNupPagesBox.Enable( TRUE ); + maNupPagesBox.Enable( sal_True ); maNupNumPagesTxt.Enable( bEnable ); maNupColEdt.Enable( bEnable ); maNupTimesTxt.Enable( bEnable ); @@ -714,8 +714,8 @@ void PrintDialog::JobTabPage::readFromSettings() if( aValue.equalsIgnoreAsciiCaseAscii( "alwaysoff" ) ) { mnCollateUIMode = 1; - maCollateBox.Check( FALSE ); - maCollateBox.Enable( FALSE ); + maCollateBox.Check( sal_False ); + maCollateBox.Enable( sal_False ); } else { @@ -847,8 +847,8 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont // set symbols on forward and backward button maBackwardBtn.SetSymbol( SYMBOL_PREV ); maForwardBtn.SetSymbol( SYMBOL_NEXT ); - maBackwardBtn.ImplSetSmallSymbol( TRUE ); - maForwardBtn.ImplSetSmallSymbol( TRUE ); + maBackwardBtn.ImplSetSmallSymbol( sal_True ); + maForwardBtn.ImplSetSmallSymbol( sal_True ); maPageStr = maNumPagesText.GetText(); @@ -1072,10 +1072,10 @@ void PrintDialog::readFromSettings() SettingsConfigItem* pItem = SettingsConfigItem::get(); rtl::OUString aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPage" ) ) ); - USHORT nCount = maTabCtrl.GetPageCount(); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = maTabCtrl.GetPageCount(); + for( sal_uInt16 i = 0; i < nCount; i++ ) { - USHORT nPageId = maTabCtrl.GetPageId( i ); + sal_uInt16 nPageId = maTabCtrl.GetPageId( i ); if( aValue.equals( maTabCtrl.GetPageText( nPageId ) ) ) { maTabCtrl.SelectTabPage( nPageId ); @@ -1115,7 +1115,7 @@ int PrintDialog::getCopyCount() bool PrintDialog::isCollate() { - return maJobPage.maCopyCountField.GetValue() > 1 ? maJobPage.maCollateBox.IsChecked() : FALSE; + return maJobPage.maCopyCountField.GetValue() > 1 ? maJobPage.maCollateBox.IsChecked() : sal_False; } bool PrintDialog::isSingleJobs() @@ -1174,7 +1174,7 @@ void PrintDialog::setupOptionalUI() vcl::RowOrColumn* pCurColumn = 0; Window* pCurParent = 0, *pDynamicPageParent = 0; - USHORT nOptPageId = 9, nCurSubGroup = 0; + sal_uInt16 nOptPageId = 9, nCurSubGroup = 0; bool bOnStaticPage = false; bool bSubgroupOnStaticPage = false; @@ -1552,9 +1552,9 @@ void PrintDialog::setupOptionalUI() PropertyValue* pVal = maPController->getValue( aPropertyName ); if( pVal && pVal->Value.hasValue() ) pVal->Value >>= nSelectVal; - pList->SelectEntryPos( static_cast<USHORT>(nSelectVal) ); + pList->SelectEntryPos( static_cast<sal_uInt16>(nSelectVal) ); pList->SetSelectHdl( LINK( this, PrintDialog, UIOption_SelectHdl ) ); - pList->SetDropDownLineCount( static_cast<USHORT>(aChoices.getLength()) ); + pList->SetDropDownLineCount( static_cast<sal_uInt16>(aChoices.getLength()) ); pList->Show(); // set help id @@ -1648,9 +1648,9 @@ void PrintDialog::setupOptionalUI() if( maNUpPage.mxPagesBtnLabel.get() ) { maNUpPage.maPagesBoxTitleTxt.SetText( maNUpPage.maPagesBtn.GetText() ); - maNUpPage.maPagesBoxTitleTxt.Show( TRUE ); + maNUpPage.maPagesBoxTitleTxt.Show( sal_True ); maNUpPage.mxPagesBtnLabel->setLabel( &maNUpPage.maPagesBoxTitleTxt ); - maNUpPage.maPagesBtn.Show( FALSE ); + maNUpPage.maPagesBtn.Show( sal_False ); } } @@ -1661,7 +1661,7 @@ void PrintDialog::setupOptionalUI() if( maJobPage.mxPrintRange->countElements() == 0 ) { maJobPage.mxPrintRange->show( false, false ); - maJobPage.maCopySpacer.Show( FALSE ); + maJobPage.maCopySpacer.Show( sal_False ); } #ifdef WNT @@ -1745,7 +1745,7 @@ void PrintDialog::checkControlDependencies() if( maJobPage.maCopyCountField.GetValue() > 1 ) maJobPage.maCollateBox.Enable( maJobPage.mnCollateUIMode == 0 ); else - maJobPage.maCollateBox.Enable( FALSE ); + maJobPage.maCollateBox.Enable( sal_False ); Image aImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateImg : maJobPage.maNoCollateImg ); Image aHCImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateHCImg : maJobPage.maNoCollateHCImg ); @@ -2315,7 +2315,7 @@ void PrintDialog::updateWindowFromProperty( const rtl::OUString& i_rProperty ) ListBox* pList = dynamic_cast< ListBox* >( rWindows.front() ); if( pList ) { - pList->SelectEntryPos( static_cast< USHORT >(nVal) ); + pList->SelectEntryPos( static_cast< sal_uInt16 >(nVal) ); } else if( nVal >= 0 && nVal < sal_Int32(rWindows.size() ) ) { @@ -2580,9 +2580,9 @@ void PrintProgressDialog::Paint( const Rectangle& ) nOffset, nWidth, mnProgressHeight, - static_cast<USHORT>(0), - static_cast<USHORT>(10000*mnCur/mnMax), - static_cast<USHORT>(10000/nMaxCount), + static_cast<sal_uInt16>(0), + static_cast<sal_uInt16>(10000*mnCur/mnMax), + static_cast<sal_uInt16>(10000/nMaxCount), maProgressRect ); Pop(); diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index 735add842518..9ed6103e5b01 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -77,12 +77,12 @@ ImplWheelWindow::ImplWheelWindow( Window* pParent ) : DBG_ASSERT( pParent, "ImplWheelWindow::ImplWheelWindow(): Parent not set!" ); const Size aSize( pParent->GetOutputSizePixel() ); - const USHORT nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; - const BOOL bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; - const BOOL bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; + const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; + const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; + const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; // calculate maximum speed distance - mnMaxWidth = (ULONG) ( 0.4 * hypot( (double) aSize.Width(), aSize.Height() ) ); + mnMaxWidth = (sal_uIntPtr) ( 0.4 * hypot( (double) aSize.Width(), aSize.Height() ) ); // create wheel window SetTitleType( FLOATWIN_TITLE_NONE ); @@ -124,7 +124,7 @@ void ImplWheelWindow::ImplStop() { ReleaseMouse(); mpTimer->Stop(); - Show(FALSE); + Show(sal_False); } // ------------------------------------------------------------------------ @@ -156,7 +156,7 @@ void ImplWheelWindow::ImplCreateImageList() // ------------------------------------------------------------------------ -void ImplWheelWindow::ImplSetWheelMode( ULONG nWheelMode ) +void ImplWheelWindow::ImplSetWheelMode( sal_uIntPtr nWheelMode ) { if( nWheelMode != mnWheelMode ) { @@ -181,7 +181,7 @@ void ImplWheelWindow::ImplSetWheelMode( ULONG nWheelMode ) void ImplWheelWindow::ImplDrawWheel() { - USHORT nId; + sal_uInt16 nId; switch( mnWheelMode ) { @@ -209,13 +209,13 @@ void ImplWheelWindow::ImplRecalcScrollValues() } else { - ULONG nCurTime; + sal_uIntPtr nCurTime; // calc current time if( mnMaxWidth ) { const double fExp = ( (double) mnActDist / mnMaxWidth ) * log10( (double) MAX_TIME / MIN_TIME ); - nCurTime = (ULONG) ( MAX_TIME / pow( 10., fExp ) ); + nCurTime = (sal_uIntPtr) ( MAX_TIME / pow( 10., fExp ) ); } else nCurTime = MAX_TIME; @@ -259,9 +259,9 @@ void ImplWheelWindow::ImplRecalcScrollValues() PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY ) { PointerStyle eStyle; - const USHORT nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; - const BOOL bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; - const BOOL bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; + const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; + const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; + const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; if( bHorz || bVert ) { @@ -339,13 +339,13 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt ) const long nDistX = aMousePos.X() - maCenter.X(); const long nDistY = aMousePos.Y() - maCenter.Y(); - mnActDist = (ULONG) hypot( (double) nDistX, nDistY ); + mnActDist = (sal_uIntPtr) hypot( (double) nDistX, nDistY ); const PointerStyle eActStyle = ImplGetMousePointer( nDistX, nDistY ); - const USHORT nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; - const BOOL bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; - const BOOL bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; - const BOOL bOuter = mnActDist > WHEEL_RADIUS; + const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; + const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; + const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; + const sal_Bool bOuter = mnActDist > WHEEL_RADIUS; if( bOuter && ( maLastMousePos != aMousePos ) ) { @@ -397,12 +397,12 @@ IMPL_LINK( ImplWheelWindow, ImplScrollHdl, Timer*, EMPTYARG ) const Point aMousePos( pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() ) ); Point aCmdMousePos( pWindow->ImplFrameToOutput( aMousePos ) ); CommandScrollData aScrollData( mnActDeltaX, mnActDeltaY ); - CommandEvent aCEvt( aCmdMousePos, COMMAND_AUTOSCROLL, TRUE, &aScrollData ); + CommandEvent aCEvt( aCmdMousePos, COMMAND_AUTOSCROLL, sal_True, &aScrollData ); NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, &aCEvt ); if ( !ImplCallPreNotify( aNCmdEvt ) ) { - const ULONG nTime = Time::GetSystemTicks(); + const sal_uIntPtr nTime = Time::GetSystemTicks(); ImplDelData aDel( this ); pWindow->Command( aCEvt ); if( aDel.IsDead() ) diff --git a/vcl/source/window/scrwnd.hxx b/vcl/source/window/scrwnd.hxx index d808fa73e321..a4a95e8b3c48 100644 --- a/vcl/source/window/scrwnd.hxx +++ b/vcl/source/window/scrwnd.hxx @@ -57,12 +57,12 @@ private: Point maLastMousePos; Point maCenter; Timer* mpTimer; - ULONG mnRepaintTime; - ULONG mnTimeout; - ULONG mnWheelMode; - ULONG mnMaxWidth; - ULONG mnActWidth; - ULONG mnActDist; + sal_uIntPtr mnRepaintTime; + sal_uIntPtr mnTimeout; + sal_uIntPtr mnWheelMode; + sal_uIntPtr mnMaxWidth; + sal_uIntPtr mnActWidth; + sal_uIntPtr mnActDist; long mnActDeltaX; long mnActDeltaY; @@ -87,6 +87,6 @@ public: ~ImplWheelWindow(); void ImplStop(); - void ImplSetWheelMode( ULONG nWheelMode ); - ULONG ImplGetWheelMode() const { return mnWheelMode; } + void ImplSetWheelMode( sal_uIntPtr nWheelMode ); + sal_uIntPtr ImplGetWheelMode() const { return mnWheelMode; } }; diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index d4ee01c26d61..a61d2e7290bf 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -36,7 +36,7 @@ -inline BOOL SelectionEngine::ShouldDeselect( BOOL bModifierKey1 ) const +inline sal_Bool SelectionEngine::ShouldDeselect( sal_Bool bModifierKey1 ) const { // return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 ); return eSelMode != MULTIPLE_SELECTION || !bModifierKey1; @@ -139,7 +139,7 @@ void SelectionEngine::ActivateDragMode() |* *************************************************************************/ -void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL bMod1 ) +void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 ) { if ( !pFunctionSet ) return; @@ -197,19 +197,19 @@ void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL bMod1 ) |* *************************************************************************/ -BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_CMDEVT); if ( !pFunctionSet || !pWin ) - return FALSE; + return sal_False; const bool bRightClickCursorPositioning = rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection(); if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning ) - return FALSE; + return sal_False; - USHORT nModifier = rMEvt.GetModifier() | nLockedMods; + sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; if ( nModifier & KEY_MOD2 ) - return FALSE; + return sal_False; // in SingleSelection: Control-Taste filtern (damit auch // mit Ctrl-Click ein D&D gestartet werden kann) if ( nModifier == KEY_MOD1 && eSelMode == SINGLE_SELECTION ) @@ -225,14 +225,14 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { case 0: // KEY_NO_KEY { - BOOL bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos ); + sal_Bool bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos ); nFlags &= (~SELENG_IN_ADD); if ( (nFlags & SELENG_DRG_ENAB) && bSelAtPoint ) { nFlags |= SELENG_WAIT_UPEVT; nFlags &= ~(SELENG_IN_SEL); pWin->ReleaseMouse(); - return TRUE; //auf STARTDRAG-Command-Event warten + return sal_True; //auf STARTDRAG-Command-Event warten } if ( eSelMode != SINGLE_SELECTION ) { @@ -240,14 +240,14 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) pFunctionSet->DeselectAll(); else pFunctionSet->DestroyAnchor(); - nFlags &= (~SELENG_HAS_ANCH); // bHasAnchor = FALSE; + nFlags &= (~SELENG_HAS_ANCH); // bHasAnchor = sal_False; } pFunctionSet->SetCursorAtPoint( aPos ); // Sonderbehandlung Single-Selection, damit Select+Drag // in einem Zug moeglich ist if (eSelMode == SINGLE_SELECTION && (nFlags & SELENG_DRG_ENAB)) nFlags |= SELENG_WAIT_UPEVT; - return TRUE; + return sal_True; } case KEY_SHIFT: @@ -255,7 +255,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { pWin->ReleaseMouse(); nFlags &= (~SELENG_IN_SEL); - return FALSE; + return sal_False; } if ( nFlags & SELENG_ADD_ALW ) nFlags |= SELENG_IN_ADD; @@ -270,7 +270,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) nFlags |= SELENG_HAS_ANCH; } pFunctionSet->SetCursorAtPoint( aPos ); - return TRUE; + return sal_True; case KEY_MOD1: // Control nur bei Mehrfachselektion erlaubt @@ -278,7 +278,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_IN_SEL); pWin->ReleaseMouse(); - return TRUE; // Mausclick verschlucken + return sal_True; // Mausclick verschlucken } if ( nFlags & SELENG_HAS_ANCH ) { @@ -289,32 +289,32 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) if ( pFunctionSet->IsSelectionAtPoint( aPos ) ) { pFunctionSet->DeselectAtPoint( aPos ); - pFunctionSet->SetCursorAtPoint( aPos, TRUE ); + pFunctionSet->SetCursorAtPoint( aPos, sal_True ); } else { pFunctionSet->SetCursorAtPoint( aPos ); } - return TRUE; + return sal_True; case KEY_SHIFT + KEY_MOD1: if ( eSelMode != MULTIPLE_SELECTION ) { pWin->ReleaseMouse(); nFlags &= (~SELENG_IN_SEL); - return FALSE; + return sal_False; } - nFlags |= SELENG_IN_ADD; //bIsInAddMode = TRUE; + nFlags |= SELENG_IN_ADD; //bIsInAddMode = sal_True; if ( !(nFlags & SELENG_HAS_ANCH) ) { pFunctionSet->CreateAnchor(); nFlags |= SELENG_HAS_ANCH; } pFunctionSet->SetCursorAtPoint( aPos ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /************************************************************************* @@ -327,14 +327,14 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) |* *************************************************************************/ -BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ ) +sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ ) { aWTimer.Stop(); //DbgOut("Up"); if( !pFunctionSet || !pWin ) { nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL); - return FALSE; + return sal_False; } pWin->ReleaseMouse(); @@ -343,7 +343,7 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ ) { // MouseButtonDown in Sel aber kein CommandEvent eingetrudelt // ==> deselektieren - USHORT nModifier = aLastMove.GetModifier() | nLockedMods; + sal_uInt16 nModifier = aLastMove.GetModifier() | nLockedMods; if( nModifier == KEY_MOD1 || IsAlwaysAdding() ) { if( !(nModifier & KEY_SHIFT) ) @@ -353,7 +353,7 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ ) } pFunctionSet->DeselectAtPoint( aLastMove.GetPosPixel() ); nFlags &= (~SELENG_HAS_ANCH); // nix Anker - pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel(), TRUE ); + pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel(), sal_True ); } else { @@ -364,7 +364,7 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ ) } nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL); - return TRUE; + return sal_True; } /************************************************************************* @@ -377,21 +377,21 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ ) |* *************************************************************************/ -BOOL SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) +sal_Bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) { if ( !pFunctionSet || !(nFlags & SELENG_IN_SEL) || (nFlags & (SELENG_CMDEVT | SELENG_WAIT_UPEVT)) ) - return FALSE; + return sal_False; if( !(nFlags & SELENG_EXPANDONMOVE) ) - return FALSE; // auf DragEvent warten! + return sal_False; // auf DragEvent warten! aLastMove = rMEvt; // wenn die Maus ausserhalb der Area steht, dann wird die // Frequenz des SetCursorAtPoint() nur durch den Timer bestimmt if( aWTimer.IsActive() && !aArea.IsInside( rMEvt.GetPosPixel() )) - return TRUE; + return sal_True; aWTimer.Start(); @@ -408,7 +408,7 @@ BOOL SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) //DbgOut("Move:SetCursor"); pFunctionSet->SetCursorAtPoint( rMEvt.GetPosPixel() ); - return TRUE; + return sal_True; } /************************************************************************* diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index b4553a4cf8a7..face35a179d8 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -62,13 +62,13 @@ namespace void Splitter::ImplInitSplitterData() { - ImplGetWindowImpl()->mbSplitter = TRUE; + ImplGetWindowImpl()->mbSplitter = sal_True; mpRefWin = NULL; mnSplitPos = 0; mnLastSplitPos = 0; mnStartSplitPos = 0; - mbDragFull = FALSE; - mbKbdSplitting = FALSE; + mbDragFull = sal_False; + mbKbdSplitting = sal_False; mbInKeyEvent = 0; mnKeyboardStepSize = SPLITTER_DEFAULTSTEPSIZE; } @@ -90,13 +90,13 @@ void Splitter::ImplInit( Window* pParent, WinBits nWinStyle ) if ( nWinStyle & WB_HSCROLL ) { ePointerStyle = POINTER_HSPLIT; - mbHorzSplit = TRUE; + mbHorzSplit = sal_True; SetSizePixel( Size( nB, nA ) ); } else { ePointerStyle = POINTER_VSPLIT; - mbHorzSplit = FALSE; + mbHorzSplit = sal_False; SetSizePixel( Size( nA, nB ) ); } @@ -219,11 +219,11 @@ Splitter* Splitter::ImplFindSibling() // ----------------------------------------------------------------------- -BOOL Splitter::ImplSplitterActive() +sal_Bool Splitter::ImplSplitterActive() { // is splitter in document or at scrollbar handle ? - BOOL bActive = TRUE; + sal_Bool bActive = sal_True; const StyleSettings& rSettings = GetSettings().GetStyleSettings(); long nA = rSettings.GetScrollBarSize(); long nB = rSettings.GetSplitSize(); @@ -232,12 +232,12 @@ BOOL Splitter::ImplSplitterActive() if ( mbHorzSplit ) { if( aSize.Width() == nB && aSize.Height() == nA ) - bActive = FALSE; + bActive = sal_False; } else { if( aSize.Width() == nA && aSize.Height() == nB ) - bActive = FALSE; + bActive = sal_False; } return bActive; } @@ -353,13 +353,13 @@ void Splitter::Tracking( const TrackingEvent& rTEvt ) void Splitter::ImplKbdTracking( KeyCode aKeyCode ) { - USHORT nCode = aKeyCode.GetCode(); + sal_uInt16 nCode = aKeyCode.GetCode(); if ( nCode == KEY_ESCAPE || nCode == KEY_RETURN ) { if( !mbKbdSplitting ) return; else - mbKbdSplitting = FALSE; + mbKbdSplitting = sal_False; if ( nCode != KEY_ESCAPE ) { @@ -554,7 +554,7 @@ void Splitter::ImplStartKbdSplitting() if( mbKbdSplitting ) return; - mbKbdSplitting = TRUE; + mbKbdSplitting = sal_True; StartSplit(); @@ -626,7 +626,7 @@ void Splitter::LoseFocus() { KeyCode aReturnKey( KEY_RETURN ); ImplKbdTracking( aReturnKey ); - mbKbdSplitting = FALSE; + mbKbdSplitting = sal_False; } Invalidate(); } @@ -642,7 +642,7 @@ void Splitter::KeyInput( const KeyEvent& rKEvt ) Splitter *pSibling = ImplFindSibling(); KeyCode aKeyCode = rKEvt.GetKeyCode(); - USHORT nCode = aKeyCode.GetCode(); + sal_uInt16 nCode = aKeyCode.GetCode(); switch ( nCode ) { case KEY_UP: diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 689c56cbe619..a698e13c7695 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -67,10 +67,10 @@ struct ImplSplitItem ImplSplitSet* mpSet; Window* mpWindow; Window* mpOrgParent; - USHORT mnId; + sal_uInt16 mnId; SplitWindowItemBits mnBits; - BOOL mbFixed; - BOOL mbSubSize; + sal_Bool mbFixed; + sal_Bool mbSubSize; }; struct ImplSplitSet @@ -80,9 +80,9 @@ struct ImplSplitSet Bitmap* mpBitmap; long mnLastSize; long mnSplitSize; - USHORT mnItems; - USHORT mnId; - BOOL mbCalcPix; + sal_uInt16 mnItems; + sal_uInt16 mnId; + sal_Bool mbCalcPix; }; #define SPLITWIN_SPLITSIZE 3 @@ -91,10 +91,10 @@ struct ImplSplitSet #define SPLITWIN_SPLITSIZEAUTOHIDE 36 #define SPLITWIN_SPLITSIZEFADE 36 -#define SPLIT_HORZ ((USHORT)0x0001) -#define SPLIT_VERT ((USHORT)0x0002) -#define SPLIT_WINDOW ((USHORT)0x0004) -#define SPLIT_NOSPLIT ((USHORT)0x8000) +#define SPLIT_HORZ ((sal_uInt16)0x0001) +#define SPLIT_VERT ((sal_uInt16)0x0002) +#define SPLIT_WINDOW ((sal_uInt16)0x0004) +#define SPLIT_NOSPLIT ((sal_uInt16)0x8000) // ----------------------------------------------------------------------- @@ -102,7 +102,7 @@ DECLARE_LIST( ImplSplitList, SplitWindow* ) // ======================================================================= -static void ImplCalcBorder( WindowAlign eAlign, BOOL bNoAlign, +static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign, long& rLeft, long& rTop, long& rRight, long& rBottom ) { @@ -292,13 +292,13 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin ) // ----------------------------------------------------------------------- -static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId ) +static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, sal_uInt16 nId ) { if ( pSet->mnId == nId ) return pSet; - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; ImplSplitItem* pItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) @@ -322,10 +322,10 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId ) // ----------------------------------------------------------------------- -static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos ) +static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt16& rPos ) { - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; ImplSplitItem* pItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) @@ -352,10 +352,10 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos // ----------------------------------------------------------------------- -static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) +static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) { - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; ImplSplitItem* pItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) @@ -366,7 +366,7 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) { if ( pItems[i].mpSet ) { - USHORT nId = ImplFindItem( pItems[i].mpSet, pWindow ); + sal_uInt16 nId = ImplFindItem( pItems[i].mpSet, pWindow ); if ( nId ) return nId; } @@ -378,11 +378,11 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) // ----------------------------------------------------------------------- -static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos, - BOOL bRows, BOOL bDown = TRUE ) +static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, + sal_Bool bRows, sal_Bool bDown = sal_True ) { - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; ImplSplitItem* pItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) @@ -428,8 +428,8 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos, static void ImplDeleteSet( ImplSplitSet* pSet ) { - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; ImplSplitItem* pItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) @@ -453,7 +453,7 @@ static void ImplDeleteSet( ImplSplitSet* pSet ) static void ImplSetSplitSize( ImplSplitSet* pSet, long nNewSize ) { pSet->mnSplitSize = nNewSize; - for ( USHORT i = 0; i < pSet->mnItems; i++ ) + for ( sal_uInt16 i = 0; i < pSet->mnItems; i++ ) { if ( pSet->mpItems[i].mpSet ) ImplSetSplitSize( pSet->mpItems[i].mpSet, nNewSize ); @@ -465,18 +465,18 @@ static void ImplSetSplitSize( ImplSplitSet* pSet, long nNewSize ) static void ImplCalcSet( ImplSplitSet* pSet, long nSetLeft, long nSetTop, long nSetWidth, long nSetHeight, - BOOL bRows, BOOL bDown = TRUE ) + sal_Bool bRows, sal_Bool bDown = sal_True ) { if ( !pSet->mpItems ) return; - USHORT i; - USHORT j; - USHORT nMins; - USHORT nCalcItems; - USHORT nItems = pSet->mnItems; - USHORT nVisItems; - USHORT nAbsItems; + sal_uInt16 i; + sal_uInt16 j; + sal_uInt16 nMins; + sal_uInt16 nCalcItems; + sal_uInt16 nItems = pSet->mnItems; + sal_uInt16 nVisItems; + sal_uInt16 nAbsItems; long nCalcSize; long nSizeDelta; long nCurSize; @@ -490,7 +490,7 @@ static void ImplCalcSet( ImplSplitSet* pSet, long nMaxPos; long* pSize; ImplSplitItem* pItems = pSet->mpItems; - BOOL bEmpty; + sal_Bool bEmpty; // Anzahl sichtbarer Items ermitteln nVisItems = 0; @@ -570,7 +570,7 @@ static void ImplCalcSet( ImplSplitSet* pSet, nCurSize += pItems[i].mnPixSize; } - pSet->mbCalcPix = FALSE; + pSet->mbCalcPix = sal_False; pSet->mnLastSize = nCalcSize; // Fenster einpassen @@ -594,7 +594,7 @@ static void ImplCalcSet( ImplSplitSet* pSet, } } // Rundungsfehler werden hier nicht ausgelichen - if ( (nAbsItems < (USHORT)(Abs( nSizeDelta ))) && nSizeWinSize ) + if ( (nAbsItems < (sal_uInt16)(Abs( nSizeDelta ))) && nSizeWinSize ) { for ( i = 0; i < nItems; i++ ) { @@ -621,10 +621,10 @@ static void ImplCalcSet( ImplSplitSet* pSet, { for ( i = 0; i < nItems; i++ ) { - pItems[i].mbSubSize = FALSE; + pItems[i].mbSubSize = sal_False; if ( j >= 2 ) - pItems[i].mbSubSize = TRUE; + pItems[i].mbSubSize = sal_True; else { if ( !(pItems[i].mnBits & SWIB_INVISIBLE) ) @@ -632,11 +632,11 @@ static void ImplCalcSet( ImplSplitSet* pSet, if ( (nSizeDelta > 0) || pItems[i].mnPixSize ) { if ( j >= 1 ) - pItems[i].mbSubSize = TRUE; + pItems[i].mbSubSize = sal_True; else { if ( (j == 0) && (pItems[i].mnBits & (SWIB_RELATIVESIZE | SWIB_PERCENTSIZE)) ) - pItems[i].mbSubSize = TRUE; + pItems[i].mbSubSize = sal_True; } } } @@ -733,20 +733,20 @@ static void ImplCalcSet( ImplSplitSet* pSet, pItems[i].mnOldHeight = pItems[i].mnHeight; if ( pItems[i].mnBits & SWIB_INVISIBLE ) - bEmpty = TRUE; + bEmpty = sal_True; else { - bEmpty = FALSE; + bEmpty = sal_False; if ( bDown ) { if ( nPos+pItems[i].mnPixSize > nMaxPos ) - bEmpty = TRUE; + bEmpty = sal_True; } else { nPos -= pItems[i].mnPixSize; if ( nPos < nMaxPos ) - bEmpty = TRUE; + bEmpty = sal_True; } } @@ -817,9 +817,9 @@ static void ImplCalcSet( ImplSplitSet* pSet, // Fixed setzen for ( i = 0; i < nItems; i++ ) { - pItems[i].mbFixed = FALSE; + pItems[i].mbFixed = sal_False; if ( pItems[i].mnBits & SWIB_FIXED ) - pItems[i].mbFixed = TRUE; + pItems[i].mbFixed = sal_True; else { // Wenn Child-Set vorhanden, ist dieses Item auch Fixed, wenn @@ -830,7 +830,7 @@ static void ImplCalcSet( ImplSplitSet* pSet, { if ( pItems[i].mpSet->mpItems[j].mbFixed ) { - pItems[i].mbFixed = TRUE; + pItems[i].mbFixed = sal_True; break; } } @@ -841,11 +841,11 @@ static void ImplCalcSet( ImplSplitSet* pSet, // ----------------------------------------------------------------------- -void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL bHide, - BOOL bRows, BOOL /*bDown*/ ) +void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bHide, + sal_Bool bRows, sal_Bool /*bDown*/ ) { - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; ImplSplitItem* pItems = pSet->mpItems; if ( pWindow->IsReallyVisible() && pWindow->IsUpdateMode() && pWindow->mbInvalidate ) @@ -915,9 +915,9 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b { if ( pItems[i].mpSet ) { - BOOL bTempHide = bHide; + sal_Bool bTempHide = bHide; if ( !pItems[i].mnWidth || !pItems[i].mnHeight ) - bTempHide = TRUE; + bTempHide = sal_True; ImplCalcSet2( pWindow, pItems[i].mpSet, bTempHide, ((pItems[i].mnBits & SWIB_COLSET) == 0) ); } @@ -944,10 +944,10 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b // ----------------------------------------------------------------------- -static void ImplCalcLogSize( ImplSplitItem* pItems, USHORT nItems ) +static void ImplCalcLogSize( ImplSplitItem* pItems, sal_uInt16 nItems ) { // Original-Groessen updaten - USHORT i; + sal_uInt16 i; long nRelSize = 0; long nPerSize = 0; for ( i = 0; i < nItems; i++ ) @@ -1012,8 +1012,8 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect, void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet ) { - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; ImplSplitItem* pItems = pSet->mpItems; // Beim Mainset auch den Hintergrund zeichnen @@ -1055,20 +1055,20 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet ) // ----------------------------------------------------------------------- static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, - BOOL bRows, BOOL bDown = TRUE ) + sal_Bool bRows, sal_Bool bDown = sal_True ) { if ( !pSet->mpItems ) return; - USHORT i; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nItems = pSet->mnItems; long nPos; long nTop; long nBottom; ImplSplitItem* pItems = pSet->mpItems; const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings(); - BOOL bFlat = (pWindow->GetStyle() & WB_FLATSPLITDRAW) == WB_FLATSPLITDRAW; + sal_Bool bFlat = (pWindow->GetStyle() & WB_FLATSPLITDRAW) == WB_FLATSPLITDRAW; for ( i = 0; i < nItems-1; i++ ) { @@ -1149,16 +1149,16 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, // ----------------------------------------------------------------------- -USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, - long& rMouseOff, ImplSplitSet** ppFoundSet, USHORT& rFoundPos, - BOOL bRows, BOOL /*bDown*/ ) +sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, + long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos, + sal_Bool bRows, sal_Bool /*bDown*/ ) { if ( !pSet->mpItems ) return 0; - USHORT i; - USHORT nSplitTest; - USHORT nItems = pSet->mnItems; + sal_uInt16 i; + sal_uInt16 nSplitTest; + sal_uInt16 nItems = pSet->mnItems; long nMPos1; long nMPos2; long nPos; @@ -1229,8 +1229,8 @@ USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, // ----------------------------------------------------------------------- -USHORT SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, - long& rMouseOff, ImplSplitSet** ppFoundSet, USHORT& rFoundPos ) +sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, + long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos ) { // Resizeable SplitWindow muss anders behandelt werden if ( pWindow->mnWinStyle & WB_SIZEABLE ) @@ -1342,7 +1342,7 @@ void SplitWindow::ImplInit( Window* pParent, WinBits nStyle ) pNewSet->mnItems = 0; pNewSet->mnId = 0; pNewSet->mnSplitSize = SPLITWIN_SPLITSIZE; - pNewSet->mbCalcPix = TRUE; + pNewSet->mbCalcPix = sal_True; mpMainSet = pNewSet; mpBaseSet = pNewSet; @@ -1363,29 +1363,29 @@ void SplitWindow::ImplInit( Window* pParent, WinBits nStyle ) mnMouseModifier = 0; mnMStartPos = 0; mnMSplitPos = 0; - mbDragFull = FALSE; - mbHorz = TRUE; - mbBottomRight = FALSE; - mbCalc = FALSE; - mbRecalc = TRUE; - mbInvalidate = TRUE; - mbAutoHide = FALSE; - mbFadeIn = FALSE; - mbFadeOut = FALSE; - mbAutoHideIn = FALSE; - mbAutoHideDown = FALSE; - mbFadeInDown = FALSE; - mbFadeOutDown = FALSE; - mbAutoHidePressed = FALSE; - mbFadeInPressed = FALSE; - mbFadeOutPressed = FALSE; - mbFadeNoButtonMode = FALSE; - mbNoAlign = FALSE; + mbDragFull = sal_False; + mbHorz = sal_True; + mbBottomRight = sal_False; + mbCalc = sal_False; + mbRecalc = sal_True; + mbInvalidate = sal_True; + mbAutoHide = sal_False; + mbFadeIn = sal_False; + mbFadeOut = sal_False; + mbAutoHideIn = sal_False; + mbAutoHideDown = sal_False; + mbFadeInDown = sal_False; + mbFadeOutDown = sal_False; + mbAutoHidePressed = sal_False; + mbFadeInPressed = sal_False; + mbFadeOutPressed = sal_False; + mbFadeNoButtonMode = sal_False; + mbNoAlign = sal_False; if ( nStyle & WB_NOSPLITDRAW ) { pNewSet->mnSplitSize -= 2; - mbInvalidate = FALSE; + mbInvalidate = sal_False; } if ( nStyle & WB_BORDER ) @@ -1518,7 +1518,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize ) { long nCurSize; long nCalcSize = 0; - USHORT i; + sal_uInt16 i; for ( i = 0; i < mpMainSet->mnItems; i++ ) { @@ -1586,7 +1586,7 @@ void SplitWindow::ImplCalcLayout() { long nCurSize; long nCalcSize = 0; - USHORT i; + sal_uInt16 i; for ( i = 0; i < mpMainSet->mnItems; i++ ) { @@ -1605,9 +1605,9 @@ void SplitWindow::ImplCalcLayout() nCurSize -= nSplitSize; nCurSize -= (mpMainSet->mnItems-1)*mpMainSet->mnSplitSize; - mbRecalc = FALSE; + mbRecalc = sal_False; ImplSetWindowSize( nCalcSize-nCurSize ); - mbRecalc = TRUE; + mbRecalc = sal_True; } } @@ -1648,15 +1648,15 @@ void SplitWindow::ImplCalcLayout() // Sets rekursiv berechnen ImplCalcSet( mpMainSet, nL, nT, nW, nH, mbHorz, !mbBottomRight ); - ImplCalcSet2( this, mpMainSet, FALSE, mbHorz, !mbBottomRight ); - mbCalc = FALSE; + ImplCalcSet2( this, mpMainSet, sal_False, mbHorz, !mbBottomRight ); + mbCalc = sal_False; } // ----------------------------------------------------------------------- void SplitWindow::ImplUpdate() { - mbCalc = TRUE; + mbCalc = sal_True; if ( IsReallyShown() && IsUpdateMode() && mbRecalc ) { @@ -1696,7 +1696,7 @@ void SplitWindow::ImplUpdateSet( ImplSplitSet* pSet ) else { ImplSplitItem* pItem; - USHORT nPos; + sal_uInt16 nPos; pSet = ImplFindItem( mpMainSet, pSet->mnId, nPos ); pItem = &(pSet->mpItems[nPos]); @@ -1736,7 +1736,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos ) // ----------------------------------------------------------------------- -void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) const +void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const { long nSplitSize = mpMainSet->mnSplitSize-2; if ( mbAutoHide || mbFadeOut || mbFadeIn ) @@ -1809,7 +1809,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) co // ----------------------------------------------------------------------- -void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest ) const +void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const { Rectangle aRect; @@ -1826,7 +1826,7 @@ void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest ) const // ----------------------------------------------------------------------- -void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, BOOL bTest ) const +void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const { Rectangle aRect; @@ -1838,12 +1838,12 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, BOOL bTest ) const // ----------------------------------------------------------------------- -void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, BOOL ) const +void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, sal_Bool ) const { Rectangle aRect; if ( mbFadeOut ) - ImplGetButtonRect( aRect, 0, FALSE ); + ImplGetButtonRect( aRect, 0, sal_False ); rRect = aRect; } @@ -1918,7 +1918,7 @@ void SplitWindow::ImplDrawButtonRect( const Rectangle& rRect, long nSize ) // ----------------------------------------------------------------------- -void SplitWindow::ImplDrawAutoHide( BOOL bInPaint ) +void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint ) { if ( mbAutoHide ) { @@ -1963,7 +1963,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint ) } // Image ermitteln und zurueckgeben - USHORT nId; + sal_uInt16 nId; if ( mbAutoHidePressed ) { if ( mbAutoHideIn ) @@ -1995,7 +1995,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint ) // ----------------------------------------------------------------------- -void SplitWindow::ImplDrawFadeArrow( const Point& rPt, BOOL bHorz, BOOL bLeft ) +void SplitWindow::ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool bLeft ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -2051,14 +2051,14 @@ void SplitWindow::ImplDrawFadeArrow( const Point& rPt, BOOL bHorz, BOOL bLeft ) } } -void SplitWindow::ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft ) +void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool bLeft ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( rRect.IsInside( GetPointerPosPixel() ) ) { DrawWallpaper( rRect, Wallpaper( Color( COL_WHITE ) ) ); - DrawSelectionBackground( rRect, 2, FALSE, FALSE, FALSE ); + DrawSelectionBackground( rRect, 2, sal_False, sal_False, sal_False ); } if( bHorz ) @@ -2109,7 +2109,7 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft ) } } -void SplitWindow::ImplDrawFadeIn( BOOL bInPaint ) +void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint ) { if ( mbFadeIn ) { @@ -2117,17 +2117,17 @@ void SplitWindow::ImplDrawFadeIn( BOOL bInPaint ) Image aImage; ImplGetFadeInRect( aTempRect ); - BOOL bLeft; + sal_Bool bLeft; if ( meAlign == WINDOWALIGN_TOP ) - bLeft = FALSE; + bLeft = sal_False; else if ( meAlign == WINDOWALIGN_BOTTOM ) - bLeft = TRUE; + bLeft = sal_True; else if ( meAlign == WINDOWALIGN_LEFT ) - bLeft = FALSE; + bLeft = sal_False; else if ( meAlign == WINDOWALIGN_RIGHT ) - bLeft = TRUE; + bLeft = sal_True; else - bLeft = TRUE; + bLeft = sal_True; if ( !bInPaint ) Erase( aTempRect ); @@ -2138,7 +2138,7 @@ void SplitWindow::ImplDrawFadeIn( BOOL bInPaint ) // ----------------------------------------------------------------------- -void SplitWindow::ImplDrawFadeOut( BOOL bInPaint ) +void SplitWindow::ImplDrawFadeOut( sal_Bool bInPaint ) { if ( mbFadeOut ) { @@ -2146,17 +2146,17 @@ void SplitWindow::ImplDrawFadeOut( BOOL bInPaint ) Image aImage; ImplGetFadeOutRect( aTempRect ); - BOOL bLeft; + sal_Bool bLeft; if ( meAlign == WINDOWALIGN_TOP ) - bLeft = TRUE; + bLeft = sal_True; else if ( meAlign == WINDOWALIGN_BOTTOM ) - bLeft = FALSE; + bLeft = sal_False; else if ( meAlign == WINDOWALIGN_LEFT ) - bLeft = TRUE; + bLeft = sal_True; else if ( meAlign == WINDOWALIGN_RIGHT ) - bLeft = FALSE; + bLeft = sal_False; else - bLeft = TRUE; + bLeft = sal_True; if ( !bInPaint ) Erase( aTempRect ); @@ -2175,15 +2175,15 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) { ImplSplitItem* pSplitItem; long nCurMaxSize; - USHORT nTemp; - BOOL bDown; - BOOL bPropSmaller; + sal_uInt16 nTemp; + sal_Bool bDown; + sal_Bool bPropSmaller; mnMouseModifier = rMEvt.GetModifier(); if ( !(mnMouseModifier & KEY_SHIFT) || (mnSplitPos+1 >= mpSplitSet->mnItems) ) - bPropSmaller = FALSE; + bPropSmaller = sal_False; else - bPropSmaller = TRUE; + bPropSmaller = sal_True; // Hier kann noch die maximale Groesse gesetzt werden StartSplit(); @@ -2201,9 +2201,9 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) if ( mpSplitSet->mpItems ) { - bDown = TRUE; + bDown = sal_True; if ( (mpSplitSet == mpMainSet) && mbBottomRight ) - bDown = FALSE; + bDown = sal_False; pSplitItem = &(mpSplitSet->mpItems[mnSplitPos]); maDragRect.Left() = pSplitItem->mnLeft; @@ -2334,9 +2334,9 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) else { ImplSplitItem* pItems = mpSplitSet->mpItems; - USHORT nItems = mpSplitSet->mnItems; + sal_uInt16 nItems = mpSplitSet->mnItems; mpLastSizes = new long[nItems*2]; - for ( USHORT i = 0; i < nItems; i++ ) + for ( sal_uInt16 i = 0; i < nItems; i++ ) { mpLastSizes[i*2] = pItems[i].mnSize; mpLastSizes[i*2+1] = pItems[i].mnPixSize; @@ -2411,35 +2411,35 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) Point aMousePosPixel = rMEvt.GetPosPixel(); Rectangle aTestRect; - mbFadeNoButtonMode = FALSE; - ImplGetAutoHideRect( aTestRect, TRUE ); + mbFadeNoButtonMode = sal_False; + ImplGetAutoHideRect( aTestRect, sal_True ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbAutoHideDown = TRUE; - mbAutoHidePressed = TRUE; - ImplDrawAutoHide( FALSE ); + mbAutoHideDown = sal_True; + mbAutoHidePressed = sal_True; + ImplDrawAutoHide( sal_False ); } else { - ImplGetFadeOutRect( aTestRect, TRUE ); + ImplGetFadeOutRect( aTestRect, sal_True ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbFadeOutDown = TRUE; - mbFadeOutPressed = TRUE; - ImplDrawFadeOut( FALSE ); + mbFadeOutDown = sal_True; + mbFadeOutPressed = sal_True; + ImplDrawFadeOut( sal_False ); } else { - ImplGetFadeInRect( aTestRect, TRUE ); + ImplGetFadeInRect( aTestRect, sal_True ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbFadeInDown = TRUE; - mbFadeInPressed = TRUE; - ImplDrawFadeIn( FALSE ); + mbFadeInDown = sal_True; + mbFadeInPressed = sal_True; + ImplDrawFadeIn( sal_False ); } else if ( !aTestRect.IsEmpty() && !(mnWinStyle & WB_SIZEABLE) ) { - mbFadeNoButtonMode = TRUE; + mbFadeNoButtonMode = sal_True; FadeIn(); return; } @@ -2461,8 +2461,8 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt ) Point aPos = rMEvt.GetPosPixel(); long nTemp; ImplSplitSet* pTempSplitSet; - USHORT nTempSplitPos; - USHORT nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos ); + sal_uInt16 nTempSplitPos; + sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos ); PointerStyle eStyle = POINTER_ARROW; Rectangle aAutoHideRect; Rectangle aFadeInRect; @@ -2499,30 +2499,30 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbAutoHideDown = FALSE; + mbAutoHideDown = sal_False; if ( mbAutoHidePressed ) { - mbAutoHidePressed = FALSE; + mbAutoHidePressed = sal_False; if ( !rTEvt.IsTrackingCanceled() ) { mbAutoHideIn = !mbAutoHideIn; - ImplDrawAutoHide( FALSE ); + ImplDrawAutoHide( sal_False ); AutoHide(); } else - ImplDrawAutoHide( FALSE ); + ImplDrawAutoHide( sal_False ); } } else { Rectangle aTestRect; - ImplGetAutoHideRect( aTestRect, TRUE ); - BOOL bNewPressed = aTestRect.IsInside( aMousePosPixel ); + ImplGetAutoHideRect( aTestRect, sal_True ); + sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( bNewPressed != mbAutoHidePressed ) { mbAutoHidePressed = bNewPressed; - ImplDrawAutoHide( FALSE ); + ImplDrawAutoHide( sal_False ); } } } @@ -2530,11 +2530,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbFadeInDown = FALSE; + mbFadeInDown = sal_False; if ( mbFadeInPressed ) { - mbFadeInPressed = FALSE; - ImplDrawFadeIn( FALSE ); + mbFadeInPressed = sal_False; + ImplDrawFadeIn( sal_False ); if ( !rTEvt.IsTrackingCanceled() ) FadeIn(); @@ -2543,12 +2543,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { Rectangle aTestRect; - ImplGetFadeInRect( aTestRect, TRUE ); - BOOL bNewPressed = aTestRect.IsInside( aMousePosPixel ); + ImplGetFadeInRect( aTestRect, sal_True ); + sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( bNewPressed != mbFadeInPressed ) { mbFadeInPressed = bNewPressed; - ImplDrawFadeIn( FALSE ); + ImplDrawFadeIn( sal_False ); } } } @@ -2556,11 +2556,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbFadeOutDown = FALSE; + mbFadeOutDown = sal_False; if ( mbFadeOutPressed ) { - mbFadeOutPressed = FALSE; - ImplDrawFadeOut( FALSE ); + mbFadeOutPressed = sal_False; + ImplDrawFadeOut( sal_False ); if ( !rTEvt.IsTrackingCanceled() ) FadeOut(); @@ -2569,12 +2569,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { Rectangle aTestRect; - ImplGetFadeOutRect( aTestRect, TRUE ); - BOOL bNewPressed = aTestRect.IsInside( aMousePosPixel ); - if ( bNewPressed == FALSE ) + ImplGetFadeOutRect( aTestRect, sal_True ); + sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); + if ( bNewPressed == sal_False ) { mbFadeOutPressed = bNewPressed; - ImplDrawFadeOut( FALSE ); + ImplDrawFadeOut( sal_False ); // We need a mouseevent with a position inside the button for the // ImplStartSplit function! @@ -2584,14 +2584,14 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) aOrgMEvt.GetModifier() ); ImplStartSplit( aNewMEvt ); - mbFadeOutDown = FALSE; + mbFadeOutDown = sal_False; } } } else { ImplSplitMousePos( aMousePosPixel ); - BOOL bSplit = TRUE; + sal_Bool bSplit = sal_True; if ( mbDragFull ) { if ( rTEvt.IsTrackingEnded() ) @@ -2599,8 +2599,8 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) if ( rTEvt.IsTrackingCanceled() ) { ImplSplitItem* pItems = mpSplitSet->mpItems; - USHORT nItems = mpSplitSet->mnItems; - for ( USHORT i = 0; i < nItems; i++ ) + sal_uInt16 nItems = mpSplitSet->mnItems; + for ( sal_uInt16 i = 0; i < nItems; i++ ) { pItems[i].mnSize = mpLastSizes[i*2]; pItems[i].mnPixSize = mpLastSizes[i*2+1]; @@ -2608,7 +2608,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) ImplUpdate(); Split(); } - bSplit = FALSE; + bSplit = sal_False; } } else @@ -2621,14 +2621,14 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { ImplDrawSplitTracking( this, aMousePosPixel ); - bSplit = FALSE; + bSplit = sal_False; } } if ( bSplit ) { - BOOL bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? TRUE : FALSE; - BOOL bPropGreater = (mnMouseModifier & KEY_MOD1) ? TRUE : FALSE; + sal_Bool bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? sal_True : sal_False; + sal_Bool bPropGreater = (mnMouseModifier & KEY_MOD1) ? sal_True : sal_False; long nDelta = mnMSplitPos-mnMStartPos; if ( (mnSplitTest & SPLIT_WINDOW) && !mpMainSet->mpItems ) @@ -2712,9 +2712,9 @@ void SplitWindow::Paint( const Rectangle& ) ImplDrawBorder( this ); ImplDrawBorderLine( this ); - ImplDrawFadeOut( TRUE ); - ImplDrawFadeIn( TRUE ); - ImplDrawAutoHide( TRUE ); + ImplDrawFadeOut( sal_True ); + ImplDrawFadeIn( sal_True ); + ImplDrawAutoHide( sal_True ); // FrameSet-Hintergruende zeichnen ImplDrawBack( this, mpMainSet ); @@ -2752,9 +2752,9 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) { Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() ); Rectangle aHelpRect; - USHORT nHelpResId = 0; + sal_uInt16 nHelpResId = 0; - ImplGetAutoHideRect( aHelpRect, TRUE ); + ImplGetAutoHideRect( aHelpRect, sal_True ); if ( aHelpRect.IsInside( aMousePosPixel ) ) { if ( mbAutoHideIn ) @@ -2764,12 +2764,12 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) } else { - ImplGetFadeInRect( aHelpRect, TRUE ); + ImplGetFadeInRect( aHelpRect, sal_True ); if ( aHelpRect.IsInside( aMousePosPixel ) ) nHelpResId = SV_HELPTEXT_FADEIN; else { - ImplGetFadeOutRect( aHelpRect, TRUE ); + ImplGetFadeOutRect( aHelpRect, sal_True ); if ( aHelpRect.IsInside( aMousePosPixel ) ) nHelpResId = SV_HELPTEXT_FADEOUT; } @@ -2840,12 +2840,12 @@ void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize, - USHORT nPos, USHORT nSetId, +void SplitWindow::InsertItem( sal_uInt16 nId, Window* pWindow, long nSize, + sal_uInt16 nPos, sal_uInt16 nSetId, SplitWindowItemBits nBits ) { #ifdef DBG_UTIL - USHORT nDbgDummy; + sal_uInt16 nDbgDummy; DBG_ASSERT( ImplFindSet( mpMainSet, nSetId ), "SplitWindow::InsertItem() - Set not exists" ); DBG_ASSERT( !ImplFindItem( mpMainSet, nId, nDbgDummy ), "SplitWindow::InsertItem() - Id already exists" ); #endif @@ -2869,7 +2869,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize, delete[] pSet->mpItems; pSet->mpItems = pNewItems; pSet->mnItems++; - pSet->mbCalcPix = TRUE; + pSet->mbCalcPix = sal_True; // Item anlegen und erweitern pItem = &(pSet->mpItems[nPos]); @@ -2897,7 +2897,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize, pNewSet->mnItems = 0; pNewSet->mnId = nId; pNewSet->mnSplitSize = pSet->mnSplitSize; - pNewSet->mbCalcPix = TRUE; + pNewSet->mbCalcPix = sal_True; pItem->mpSet = pNewSet; } @@ -2907,8 +2907,8 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize, // ----------------------------------------------------------------------- -void SplitWindow::InsertItem( USHORT nId, long nSize, - USHORT nPos, USHORT nSetId, +void SplitWindow::InsertItem( sal_uInt16 nId, long nSize, + sal_uInt16 nPos, sal_uInt16 nSetId, SplitWindowItemBits nBits ) { InsertItem( nId, NULL, nSize, nPos, nSetId, nBits ); @@ -2916,15 +2916,15 @@ void SplitWindow::InsertItem( USHORT nId, long nSize, // ----------------------------------------------------------------------- -void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId ) +void SplitWindow::MoveItem( sal_uInt16 nId, sal_uInt16 nNewPos, sal_uInt16 nNewSetId ) { #ifdef DBG_UTIL - USHORT nDbgDummy; + sal_uInt16 nDbgDummy; DBG_ASSERT( ImplFindItem( mpMainSet, nId, nDbgDummy ), "SplitWindow::MoveItem() - Id not found" ); DBG_ASSERT( ImplFindSet( mpMainSet, nNewSetId ), "SplitWindow::MoveItem() - Set not exists" ); #endif - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pNewSet = ImplFindSet( mpMainSet, nNewSetId ); ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos ); ImplSplitItem aTempItem; @@ -2957,7 +2957,7 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId ) nNewPos = pNewSet->mnItems; memcpy( &aTempItem, &(pSet->mpItems[nPos]), sizeof( aTempItem ) ); pSet->mnItems--; - pSet->mbCalcPix = TRUE; + pSet->mbCalcPix = sal_True; if ( pSet->mnItems ) { memmove( pSet->mpItems+nPos, pSet->mpItems+nPos+1, @@ -2979,7 +2979,7 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId ) delete[] pNewSet->mpItems; pNewSet->mpItems = pNewItems; pNewSet->mnItems++; - pNewSet->mbCalcPix = TRUE; + pNewSet->mbCalcPix = sal_True; memcpy( &(pNewSet->mpItems[nNewPos]), &aTempItem, sizeof( aTempItem ) ); ImplUpdate(); } @@ -2987,15 +2987,15 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId ) // ----------------------------------------------------------------------- -void SplitWindow::RemoveItem( USHORT nId, BOOL bHide ) +void SplitWindow::RemoveItem( sal_uInt16 nId, sal_Bool bHide ) { #ifdef DBG_UTIL - USHORT nDbgDummy; + sal_uInt16 nDbgDummy; DBG_ASSERT( ImplFindItem( mpMainSet, nId, nDbgDummy ), "SplitWindow::RemoveItem() - Id not found" ); #endif // Set suchen - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos ); ImplSplitItem* pItem = &(pSet->mpItems[nPos]); Window* pWindow = pItem->mpWindow; @@ -3007,7 +3007,7 @@ void SplitWindow::RemoveItem( USHORT nId, BOOL bHide ) // Item entfernen pSet->mnItems--; - pSet->mbCalcPix = TRUE; + pSet->mbCalcPix = sal_True; if ( pSet->mnItems ) { memmove( pSet->mpItems+nPos, pSet->mpItems+nPos+1, @@ -3049,7 +3049,7 @@ void SplitWindow::Clear() mpMainSet->mnItems = 0; mpMainSet->mnId = 0; mpMainSet->mnSplitSize = SPLITWIN_SPLITSIZE; - mpMainSet->mbCalcPix = TRUE; + mpMainSet->mbCalcPix = sal_True; if ( mnWinStyle & WB_NOSPLITDRAW ) mpMainSet->mnSplitSize -= 2; mpBaseSet = mpMainSet; @@ -3060,22 +3060,22 @@ void SplitWindow::Clear() // ----------------------------------------------------------------------- -void SplitWindow::SetBaseSet( USHORT nSetId ) +void SplitWindow::SetBaseSet( sal_uInt16 nSetId ) { mpBaseSet = ImplFindSet( mpMainSet, nSetId ); } // ----------------------------------------------------------------------- -USHORT SplitWindow::GetBaseSet() const +sal_uInt16 SplitWindow::GetBaseSet() const { return mpBaseSet->mnId; } // ----------------------------------------------------------------------- -void SplitWindow::SetSplitSize( USHORT nSetId, long nSplitSize, - BOOL bWithChilds ) +void SplitWindow::SetSplitSize( sal_uInt16 nSetId, long nSplitSize, + sal_Bool bWithChilds ) { ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId ); if ( pSet ) @@ -3090,7 +3090,7 @@ void SplitWindow::SetSplitSize( USHORT nSetId, long nSplitSize, // ----------------------------------------------------------------------- -long SplitWindow::GetSplitSize( USHORT nSetId ) const +long SplitWindow::GetSplitSize( sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId ); if ( pSet ) @@ -3101,7 +3101,7 @@ long SplitWindow::GetSplitSize( USHORT nSetId ) const // ----------------------------------------------------------------------- -void SplitWindow::SetItemBackground( USHORT nSetId ) +void SplitWindow::SetItemBackground( sal_uInt16 nSetId ) { Wallpaper aWall; SetItemBackground( nSetId, aWall ); @@ -3109,13 +3109,13 @@ void SplitWindow::SetItemBackground( USHORT nSetId ) // ----------------------------------------------------------------------- -void SplitWindow::SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper ) +void SplitWindow::SetItemBackground( sal_uInt16 nSetId, const Wallpaper& rWallpaper ) { ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId ); if ( pSet ) { - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( rWallpaper.GetStyle() == WALLPAPER_NULL ) { @@ -3125,12 +3125,12 @@ void SplitWindow::SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper pSet->mpWallpaper = NULL; } else - bUpdate = FALSE; + bUpdate = sal_False; } else { // Ab jetzt muss immer invalidiert werden - mbInvalidate = TRUE; + mbInvalidate = sal_True; if ( !pSet->mpWallpaper ) pSet->mpWallpaper = new Wallpaper( rWallpaper ); @@ -3149,7 +3149,7 @@ void SplitWindow::SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper // ----------------------------------------------------------------------- -Wallpaper SplitWindow::GetItemBackground( USHORT nSetId ) const +Wallpaper SplitWindow::GetItemBackground( sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId ); @@ -3164,25 +3164,25 @@ Wallpaper SplitWindow::GetItemBackground( USHORT nSetId ) const // ----------------------------------------------------------------------- -BOOL SplitWindow::IsItemBackground( USHORT nSetId ) const +sal_Bool SplitWindow::IsItemBackground( sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId ); if ( pSet && pSet->mpWallpaper ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void SplitWindow::SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap ) +void SplitWindow::SetItemBitmap( sal_uInt16 nSetId, const Bitmap& rBitmap ) { ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId ); if ( pSet ) { - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( !rBitmap ) { @@ -3192,12 +3192,12 @@ void SplitWindow::SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap ) pSet->mpBitmap = NULL; } else - bUpdate = FALSE; + bUpdate = sal_False; } else { // Ab jetzt muss immer invalidiert werden - mbInvalidate = TRUE; + mbInvalidate = sal_True; if ( !pSet->mpBitmap ) pSet->mpBitmap = new Bitmap( rBitmap ); @@ -3216,7 +3216,7 @@ void SplitWindow::SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap ) // ----------------------------------------------------------------------- -Bitmap SplitWindow::GetItemBitmap( USHORT nSetId ) const +Bitmap SplitWindow::GetItemBitmap( sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId ); @@ -3231,15 +3231,15 @@ Bitmap SplitWindow::GetItemBitmap( USHORT nSetId ) const // ----------------------------------------------------------------------- -void SplitWindow::SplitItem( USHORT nId, long nNewSize, - BOOL bPropSmall, BOOL bPropGreat ) +void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, + sal_Bool bPropSmall, sal_Bool bPropGreat ) { - USHORT nItems; - USHORT nPos; - USHORT nMin; - USHORT nMax; - USHORT i; - USHORT n; + sal_uInt16 nItems; + sal_uInt16 nPos; + sal_uInt16 nMin; + sal_uInt16 nMax; + sal_uInt16 i; + sal_uInt16 n; long nDelta; long nTempDelta; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); @@ -3276,8 +3276,8 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize, } // Wenn das Fenster sizeable ist, wird das TopSet anders behandelt - BOOL bSmall = TRUE; - BOOL bGreat = TRUE; + sal_Bool bSmall = sal_True; + sal_Bool bGreat = sal_True; if ( (pSet == mpMainSet) && (mnWinStyle & WB_SIZEABLE) ) { if ( nPos < pSet->mnItems-1 ) @@ -3287,29 +3287,29 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize, ((nDelta < 0) && bPropGreat)) ) { if ( nDelta < 0 ) - bGreat = FALSE; + bGreat = sal_False; else - bSmall = FALSE; + bSmall = sal_False; } } else { if ( nDelta < 0 ) - bGreat = FALSE; + bGreat = sal_False; else - bSmall = FALSE; + bSmall = sal_False; } } else if ( nPos >= nMax ) { - bSmall = FALSE; - bGreat = FALSE; + bSmall = sal_False; + bGreat = sal_False; } else if ( nPos && (nPos >= pSet->mnItems-1) ) { nPos--; nDelta *= -1; - BOOL bTemp = bPropSmall; + sal_Bool bTemp = bPropSmall; bPropSmall = bPropGreat; bPropGreat = bTemp; } @@ -3462,9 +3462,9 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize, // ----------------------------------------------------------------------- -void SplitWindow::SetItemSize( USHORT nId, long nNewSize ) +void SplitWindow::SetItemSize( sal_uInt16 nId, long nNewSize ) { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); ImplSplitItem* pItem; @@ -3477,16 +3477,16 @@ void SplitWindow::SetItemSize( USHORT nId, long nNewSize ) { // Neue Groesse setzen und neu durchrechnen pItem->mnSize = nNewSize; - pSet->mbCalcPix = TRUE; + pSet->mbCalcPix = sal_True; ImplUpdate(); } } // ----------------------------------------------------------------------- -long SplitWindow::GetItemSize( USHORT nId ) const +long SplitWindow::GetItemSize( sal_uInt16 nId ) const { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); if ( pSet ) @@ -3497,9 +3497,9 @@ long SplitWindow::GetItemSize( USHORT nId ) const // ----------------------------------------------------------------------- -long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const +long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); if ( pSet ) @@ -3513,9 +3513,9 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const long nRelSize = 0; long nPerSize = 0; ImplSplitItem* pItems; - USHORT nItems; + sal_uInt16 nItems; SplitWindowItemBits nTempBits; - USHORT i; + sal_uInt16 i; nItems = pSet->mnItems; pItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) @@ -3554,9 +3554,9 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const // ----------------------------------------------------------------------- -void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits ) +void SplitWindow::SetItemBits( sal_uInt16 nId, SplitWindowItemBits nNewBits ) { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); ImplSplitItem* pItem; @@ -3571,16 +3571,16 @@ void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits ) { // Neue Bits setzen und neu durchrechnen pItem->mnBits = nNewBits; - pSet->mbCalcPix = TRUE; + pSet->mbCalcPix = sal_True; ImplUpdate(); } } // ----------------------------------------------------------------------- -SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const +SplitWindowItemBits SplitWindow::GetItemBits( sal_uInt16 nId ) const { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); if ( pSet ) @@ -3591,9 +3591,9 @@ SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const // ----------------------------------------------------------------------- -Window* SplitWindow::GetItemWindow( USHORT nId ) const +Window* SplitWindow::GetItemWindow( sal_uInt16 nId ) const { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); if ( pSet ) @@ -3604,9 +3604,9 @@ Window* SplitWindow::GetItemWindow( USHORT nId ) const // ----------------------------------------------------------------------- -USHORT SplitWindow::GetSet( USHORT nId ) const +sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); if ( pSet ) @@ -3617,55 +3617,55 @@ USHORT SplitWindow::GetSet( USHORT nId ) const // ----------------------------------------------------------------------- -BOOL SplitWindow::GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const +sal_Bool SplitWindow::GetSet( sal_uInt16 nId, sal_uInt16& rSetId, sal_uInt16& rPos ) const { ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, rPos ); if ( pSet ) { rSetId = pSet->mnId; - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL SplitWindow::IsItemValid( USHORT nId ) const +sal_Bool SplitWindow::IsItemValid( sal_uInt16 nId ) const { - USHORT nPos; + sal_uInt16 nPos; ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos ); if ( pSet ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -USHORT SplitWindow::GetItemId( Window* pWindow ) const +sal_uInt16 SplitWindow::GetItemId( Window* pWindow ) const { return ImplFindItem( mpBaseSet, pWindow ); } // ----------------------------------------------------------------------- -USHORT SplitWindow::GetItemId( const Point& rPos ) const +sal_uInt16 SplitWindow::GetItemId( const Point& rPos ) const { return ImplFindItem( mpBaseSet, rPos, mbHorz, !mbBottomRight ); } // ----------------------------------------------------------------------- -USHORT SplitWindow::GetItemPos( USHORT nId, USHORT nSetId ) const +sal_uInt16 SplitWindow::GetItemPos( sal_uInt16 nId, sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId ); - USHORT nPos = SPLITWINDOW_ITEM_NOTFOUND; + sal_uInt16 nPos = SPLITWINDOW_ITEM_NOTFOUND; if ( pSet ) { - for ( USHORT i = 0; i < pSet->mnItems; i++ ) + for ( sal_uInt16 i = 0; i < pSet->mnItems; i++ ) { if ( pSet->mpItems[i].mnId == nId ) { @@ -3680,7 +3680,7 @@ USHORT SplitWindow::GetItemPos( USHORT nId, USHORT nSetId ) const // ----------------------------------------------------------------------- -USHORT SplitWindow::GetItemId( USHORT nPos, USHORT nSetId ) const +sal_uInt16 SplitWindow::GetItemId( sal_uInt16 nPos, sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId ); if ( pSet && (nPos < pSet->mnItems) ) @@ -3691,7 +3691,7 @@ USHORT SplitWindow::GetItemId( USHORT nPos, USHORT nSetId ) const // ----------------------------------------------------------------------- -USHORT SplitWindow::GetItemCount( USHORT nSetId ) const +sal_uInt16 SplitWindow::GetItemCount( sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId ); if ( pSet ) @@ -3706,28 +3706,28 @@ void SplitWindow::ImplNewAlign() { if ( mbNoAlign ) { - mbHorz = FALSE; - mbBottomRight = FALSE; + mbHorz = sal_False; + mbBottomRight = sal_False; } else if ( meAlign == WINDOWALIGN_TOP ) { - mbHorz = TRUE; - mbBottomRight = FALSE; + mbHorz = sal_True; + mbBottomRight = sal_False; } else if ( meAlign == WINDOWALIGN_BOTTOM ) { - mbHorz = TRUE; - mbBottomRight = TRUE; + mbHorz = sal_True; + mbBottomRight = sal_True; } else if ( meAlign == WINDOWALIGN_LEFT ) { - mbHorz = FALSE; - mbBottomRight = FALSE; + mbHorz = sal_False; + mbBottomRight = sal_False; } else if ( meAlign == WINDOWALIGN_RIGHT ) { - mbHorz = FALSE; - mbBottomRight = TRUE; + mbHorz = sal_False; + mbBottomRight = sal_True; } if ( mnWinStyle & WB_BORDER ) @@ -3743,7 +3743,7 @@ void SplitWindow::ImplNewAlign() // ----------------------------------------------------------------------- -void SplitWindow::SetNoAlign( BOOL bNoAlign ) +void SplitWindow::SetNoAlign( sal_Bool bNoAlign ) { bNoAlign = bNoAlign != 0; if ( mbNoAlign != bNoAlign ) @@ -3767,7 +3767,7 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign ) // ----------------------------------------------------------------------- Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign, - WinBits nWinStyle, BOOL bExtra ) + WinBits nWinStyle, sal_Bool bExtra ) { long nLeft; long nTop; @@ -3775,7 +3775,7 @@ Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign, long nBottom; Size aSize = rSize; - ImplCalcBorder( eAlign, FALSE, nLeft, nTop, nRight, nBottom ); + ImplCalcBorder( eAlign, sal_False, nLeft, nTop, nRight, nBottom ); aSize.Width() += nLeft+nRight; aSize.Height() += nTop+nBottom; @@ -3800,7 +3800,7 @@ Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign, // ----------------------------------------------------------------------- -void SplitWindow::ShowAutoHideButton( BOOL bShow ) +void SplitWindow::ShowAutoHideButton( sal_Bool bShow ) { mbAutoHide = bShow; ImplUpdate(); @@ -3808,7 +3808,7 @@ void SplitWindow::ShowAutoHideButton( BOOL bShow ) // ----------------------------------------------------------------------- -void SplitWindow::ShowFadeInHideButton( BOOL bShow ) +void SplitWindow::ShowFadeInHideButton( sal_Bool bShow ) { mbFadeIn = bShow; ImplUpdate(); @@ -3816,7 +3816,7 @@ void SplitWindow::ShowFadeInHideButton( BOOL bShow ) // ----------------------------------------------------------------------- -void SplitWindow::ShowFadeOutButton( BOOL bShow ) +void SplitWindow::ShowFadeOutButton( sal_Bool bShow ) { mbFadeOut = bShow; ImplUpdate(); @@ -3824,7 +3824,7 @@ void SplitWindow::ShowFadeOutButton( BOOL bShow ) // ----------------------------------------------------------------------- -void SplitWindow::SetAutoHideState( BOOL bAutoHide ) +void SplitWindow::SetAutoHideState( sal_Bool bAutoHide ) { mbAutoHideIn = bAutoHide; if ( IsReallyVisible() ) @@ -3854,7 +3854,7 @@ long SplitWindow::GetFadeInSize() const Rectangle SplitWindow::GetAutoHideRect() const { Rectangle aRect; - ImplGetAutoHideRect( aRect, TRUE ); + ImplGetAutoHideRect( aRect, sal_True ); return aRect; } @@ -3863,7 +3863,7 @@ Rectangle SplitWindow::GetAutoHideRect() const Rectangle SplitWindow::GetFadeInRect() const { Rectangle aRect; - ImplGetFadeInRect( aRect, TRUE ); + ImplGetFadeInRect( aRect, sal_True ); return aRect; } @@ -3872,6 +3872,6 @@ Rectangle SplitWindow::GetFadeInRect() const Rectangle SplitWindow::GetFadeOutRect() const { Rectangle aRect; - ImplGetFadeOutRect( aRect, TRUE ); + ImplGetFadeOutRect( aRect, sal_True ); return aRect; } diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index c139ae1ffb30..69f87705e7a4 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -80,7 +80,7 @@ StatusBar::ImplData::~ImplData() struct ImplStatusItem { - USHORT mnId; + sal_uInt16 mnId; StatusBarItemBits mnBits; long mnWidth; long mnOffset; @@ -89,9 +89,9 @@ struct ImplStatusItem XubString maText; XubString maHelpText; XubString maQuickHelpText; - ULONG mnHelpId; + sal_uIntPtr mnHelpId; void* mpUserData; - BOOL mbVisible; + sal_Bool mbVisible; XubString maAccessibleName; XubString maCommand; }; @@ -100,7 +100,7 @@ DECLARE_LIST( ImplStatusItemList, ImplStatusItem* ) // ======================================================================= -inline long ImplCalcProgessWidth( USHORT nMax, long nSize ) +inline long ImplCalcProgessWidth( sal_uInt16 nMax, long nSize ) { return ((nMax*(nSize+(nSize/2)))-(nSize/2)+(STATUSBAR_PRGS_OFFSET*2)); } @@ -108,7 +108,7 @@ inline long ImplCalcProgessWidth( USHORT nMax, long nSize ) // ----------------------------------------------------------------------- static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize, - USHORT nStyle ) + sal_uInt16 nStyle ) { long nX; long nY; @@ -128,12 +128,12 @@ static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize, // ----------------------------------------------------------------------- -BOOL StatusBar::ImplIsItemUpdate() +sal_Bool StatusBar::ImplIsItemUpdate() { if ( !mbProgressMode && mbVisibleItems && IsReallyVisible() && IsUpdateMode() ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -152,11 +152,11 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) mpItemList = new ImplStatusItemList; mpImplData->mpVirDev = new VirtualDevice( *this ); mnCurItemId = 0; - mbFormat = TRUE; - mbVisibleItems = TRUE; - mbProgressMode = FALSE; - mbInUserDraw = FALSE; - mbBottomBorder = FALSE; + mbFormat = sal_True; + mbVisibleItems = sal_True; + mbProgressMode = sal_False; + mbInUserDraw = sal_False; + mbBottomBorder = sal_False; mnItemsWidth = STATUSBAR_OFFSET_X; mnDX = 0; mnDY = 0; @@ -164,7 +164,7 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) mnItemY = STATUSBAR_OFFSET_Y; mnTextY = STATUSBAR_OFFSET_TEXTY; - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); SetLineColor(); SetOutputSizePixel( CalcWindowSizePixel() ); @@ -214,8 +214,8 @@ StatusBar::~StatusBar() // ----------------------------------------------------------------------- -void StatusBar::ImplInitSettings( BOOL bFont, - BOOL bForeground, BOOL bBackground ) +void StatusBar::ImplInitSettings( sal_Bool bFont, + sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -262,7 +262,7 @@ void StatusBar::ImplInitSettings( BOOL bFont, IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_WINDOW ) ) { ImplGetWindowImpl()->mnNativeBackground = PART_BACKGROUND_WINDOW; - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); } } } @@ -275,7 +275,7 @@ void StatusBar::ImplFormat() long nExtraWidth; long nExtraWidth2; long nX; - USHORT nAutoSizeItems = 0; + sal_uInt16 nAutoSizeItems = 0; // Breiten zusammenrechnen mnItemsWidth = STATUSBAR_OFFSET_X; @@ -346,12 +346,12 @@ void StatusBar::ImplFormat() pItem = mpItemList->Next(); } - mbFormat = FALSE; + mbFormat = sal_False; } // ----------------------------------------------------------------------- -Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const +Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const { Rectangle aRect; ImplStatusItem* pItem; @@ -374,11 +374,11 @@ Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const // ----------------------------------------------------------------------- -USHORT StatusBar::ImplGetFirstVisiblePos() const +sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const { ImplStatusItem* pItem; - for( USHORT nPos = 0; nPos < mpItemList->Count(); nPos++ ) + for( sal_uInt16 nPos = 0; nPos < mpItemList->Count(); nPos++ ) { pItem = mpItemList->GetObject( nPos ); if ( pItem ) @@ -393,7 +393,7 @@ USHORT StatusBar::ImplGetFirstVisiblePos() const // ----------------------------------------------------------------------- -void StatusBar::ImplDrawText( BOOL bOffScreen, long nOldTextWidth ) +void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth ) { // Das ueberschreiben der Item-Box verhindern Rectangle aTextRect; @@ -407,7 +407,7 @@ void StatusBar::ImplDrawText( BOOL bOffScreen, long nOldTextWidth ) { // Position ermitteln XubString aStr = GetText(); - USHORT nPos = aStr.Search( _LF ); + sal_uInt16 nPos = aStr.Search( _LF ); if ( nPos != STRING_NOTFOUND ) aStr.Erase( nPos ); @@ -430,7 +430,7 @@ void StatusBar::ImplDrawText( BOOL bOffScreen, long nOldTextWidth ) // ----------------------------------------------------------------------- -void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL bDrawFrame ) +void StatusBar::ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDrawText, sal_Bool bDrawFrame ) { Rectangle aRect = ImplGetItemRectPos( nPos ); @@ -472,12 +472,12 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL { if ( bOffScreen ) { - mbInUserDraw = TRUE; + mbInUserDraw = sal_True; mpImplData->mpVirDev->EnableRTL( IsRTLEnabled() ); UserDrawEvent aODEvt( mpImplData->mpVirDev, Rectangle( Point(), aTextRectSize ), pItem->mnId ); UserDraw( aODEvt ); - mpImplData->mpVirDev->EnableRTL( FALSE ); - mbInUserDraw = FALSE; + mpImplData->mpVirDev->EnableRTL( sal_False ); + mbInUserDraw = sal_False; } else { @@ -498,7 +498,7 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL { if( !(pItem->mnBits & SIB_FLAT) ) { - USHORT nStyle; + sal_uInt16 nStyle; if ( pItem->mnBits & SIB_IN ) nStyle = FRAME_DRAW_IN; @@ -532,7 +532,7 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL void DrawProgress( Window* pWindow, const Point& rPos, long nOffset, long nPrgsWidth, long nPrgsHeight, - USHORT nPercent1, USHORT nPercent2, USHORT nPercentCount, + sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount, const Rectangle& rFramePosSize ) { @@ -570,7 +570,7 @@ void DrawProgress( Window* pWindow, const Point& rPos, pWindow->Push( PUSH_CLIPREGION ); pWindow->IntersectClipRegion( rFramePosSize ); } - BOOL bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, + sal_Bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, rtl::OUString() ); if( bNeedErase ) pWindow->Pop(); @@ -582,8 +582,8 @@ void DrawProgress( Window* pWindow, const Point& rPos, } // Werte vorberechnen - USHORT nPerc1 = nPercent1 / nPercentCount; - USHORT nPerc2 = nPercent2 / nPercentCount; + sal_uInt16 nPerc1 = nPercent1 / nPercentCount; + sal_uInt16 nPerc2 = nPercent2 / nPercentCount; if ( nPerc1 > nPerc2 ) { @@ -648,8 +648,8 @@ void DrawProgress( Window* pWindow, const Point& rPos, // ----------------------------------------------------------------------- -void StatusBar::ImplDrawProgress( BOOL bPaint, - USHORT nPercent1, USHORT nPercent2 ) +void StatusBar::ImplDrawProgress( sal_Bool bPaint, + sal_uInt16 nPercent1, sal_uInt16 nPercent2 ) { bool bNative = IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ); // bPaint: draw text also, else only update progress @@ -692,7 +692,7 @@ void StatusBar::ImplCalcProgressRect() // calculate size of progress rects mnPrgsSize = maPrgsFrameRect.Bottom()-maPrgsFrameRect.Top()-(STATUSBAR_PRGS_OFFSET*2); - USHORT nMaxPercent = STATUSBAR_PRGS_COUNT; + sal_uInt16 nMaxPercent = STATUSBAR_PRGS_COUNT; long nMaxWidth = mnDX-STATUSBAR_OFFSET-1; @@ -707,7 +707,7 @@ void StatusBar::ImplCalcProgressRect() // save the divisor for later mnPercentCount = 10000 / nMaxPercent; - BOOL bNativeOK = FALSE; + sal_Bool bNativeOK = sal_False; if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) ) { ImplControlValue aValue; @@ -715,7 +715,7 @@ void StatusBar::ImplCalcProgressRect() Region aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, rtl::OUString(), - aNativeControlRegion, aNativeContentRegion ) ) != FALSE ) + aNativeControlRegion, aNativeContentRegion ) ) != sal_False ) { long nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight(); if( nProgressHeight > maPrgsFrameRect.GetHeight() ) @@ -741,7 +741,7 @@ void StatusBar::MouseButtonDown( const MouseEvent& rMEvt ) if ( mbVisibleItems ) { Point aMousePos = rMEvt.GetPosPixel(); - USHORT i = 0; + sal_uInt16 i = 0; // Item suchen, das geklickt wurde ImplStatusItem* pItem = mpItemList->First(); @@ -781,22 +781,22 @@ void StatusBar::Paint( const Rectangle& ) if ( mbFormat ) ImplFormat(); - USHORT nItemCount = (USHORT)mpItemList->Count(); + sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count(); if ( mbProgressMode ) - ImplDrawProgress( TRUE, 0, mnPercent ); + ImplDrawProgress( sal_True, 0, mnPercent ); else { // Text zeichen if ( !mbVisibleItems || (GetStyle() & WB_RIGHT) ) - ImplDrawText( FALSE, 0 ); + ImplDrawText( sal_False, 0 ); // Items zeichnen if ( mbVisibleItems ) { // Items zeichnen - for ( USHORT i = 0; i < nItemCount; i++ ) - ImplDrawItem( FALSE, i, TRUE, TRUE ); + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) + ImplDrawItem( sal_False, i, sal_True, sal_True ); } } @@ -850,7 +850,7 @@ void StatusBar::Resize() mnTextY += 2; // Formatierung neu ausloesen - mbFormat = TRUE; + mbFormat = sal_True; if ( mbProgressMode ) ImplCalcProgressRect(); @@ -866,7 +866,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt ) if( rHEvt.KeyboardActivated() ) return; - USHORT nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); + sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); if ( nItemId ) { @@ -904,7 +904,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt ) else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { String aCommand = GetItemCommand( nItemId ); - ULONG nHelpId = GetHelpId( nItemId ); + sal_uIntPtr nHelpId = GetHelpId( nItemId ); if ( aCommand.Len() || nHelpId ) { @@ -938,18 +938,18 @@ void StatusBar::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - mbFormat = TRUE; - ImplInitSettings( TRUE, FALSE, FALSE ); + mbFormat = sal_True; + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } } @@ -966,8 +966,8 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - mbFormat = TRUE; - ImplInitSettings( TRUE, TRUE, TRUE ); + mbFormat = sal_True; + ImplInitSettings( sal_True, sal_True, sal_True ); ImplStatusItem* pItem = mpItemList->First(); long nFudge = GetTextHeight() / 4; while ( pItem ) @@ -1010,9 +1010,9 @@ void StatusBar::UserDraw( const UserDrawEvent& ) // ----------------------------------------------------------------------- -void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth, +void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uIntPtr nWidth, StatusBarItemBits nBits, - long nOffset, USHORT nPos ) + long nOffset, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "StatusBar::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == STATUSBAR_ITEM_NOTFOUND, @@ -1033,12 +1033,12 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth, pItem->mnOffset = nOffset; pItem->mnHelpId = 0; pItem->mpUserData = 0; - pItem->mbVisible = TRUE; + pItem->mbVisible = sal_True; // Item in die Liste einfuegen mpItemList->Insert( pItem, nPos ); - mbFormat = TRUE; + mbFormat = sal_True; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1047,15 +1047,15 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth, // ----------------------------------------------------------------------- -void StatusBar::RemoveItem( USHORT nItemId ) +void StatusBar::RemoveItem( sal_uInt16 nItemId ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { ImplStatusItem* pItem = mpItemList->Remove( nPos ); delete pItem; - mbFormat = TRUE; + mbFormat = sal_True; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1065,18 +1065,18 @@ void StatusBar::RemoveItem( USHORT nItemId ) // ----------------------------------------------------------------------- -void StatusBar::ShowItem( USHORT nItemId ) +void StatusBar::ShowItem( sal_uInt16 nItemId ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { ImplStatusItem* pItem = mpItemList->GetObject( nPos ); if ( !pItem->mbVisible ) { - pItem->mbVisible = TRUE; + pItem->mbVisible = sal_True; - mbFormat = TRUE; + mbFormat = sal_True; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1087,18 +1087,18 @@ void StatusBar::ShowItem( USHORT nItemId ) // ----------------------------------------------------------------------- -void StatusBar::HideItem( USHORT nItemId ) +void StatusBar::HideItem( sal_uInt16 nItemId ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { ImplStatusItem* pItem = mpItemList->GetObject( nPos ); if ( pItem->mbVisible ) { - pItem->mbVisible = FALSE; + pItem->mbVisible = sal_False; - mbFormat = TRUE; + mbFormat = sal_True; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1109,14 +1109,14 @@ void StatusBar::HideItem( USHORT nItemId ) // ----------------------------------------------------------------------- -BOOL StatusBar::IsItemVisible( USHORT nItemId ) const +sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->mbVisible; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -1125,7 +1125,7 @@ void StatusBar::ShowItems() { if ( !mbVisibleItems ) { - mbVisibleItems = TRUE; + mbVisibleItems = sal_True; if ( !mbProgressMode ) Invalidate(); @@ -1139,7 +1139,7 @@ void StatusBar::HideItems() { if ( mbVisibleItems ) { - mbVisibleItems = FALSE; + mbVisibleItems = sal_False; if ( !mbProgressMode ) Invalidate(); @@ -1163,7 +1163,7 @@ void StatusBar::CopyItems( const StatusBar& rStatusBar ) mpItemList->Clear(); // Items kopieren - ULONG i = 0; + sal_uIntPtr i = 0; pItem = rStatusBar.mpItemList->GetObject( i ); while ( pItem ) { @@ -1172,7 +1172,7 @@ void StatusBar::CopyItems( const StatusBar& rStatusBar ) pItem = rStatusBar.mpItemList->GetObject( i ); } - mbFormat = TRUE; + mbFormat = sal_True; if ( ImplIsItemUpdate() ) Invalidate(); } @@ -1192,7 +1192,7 @@ void StatusBar::Clear() // Items aus der Liste loeschen mpItemList->Clear(); - mbFormat = TRUE; + mbFormat = sal_True; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1201,14 +1201,14 @@ void StatusBar::Clear() // ----------------------------------------------------------------------- -USHORT StatusBar::GetItemCount() const +sal_uInt16 StatusBar::GetItemCount() const { - return (USHORT)mpItemList->Count(); + return (sal_uInt16)mpItemList->Count(); } // ----------------------------------------------------------------------- -USHORT StatusBar::GetItemId( USHORT nPos ) const +sal_uInt16 StatusBar::GetItemId( sal_uInt16 nPos ) const { ImplStatusItem* pItem = mpItemList->GetObject( nPos ); if ( pItem ) @@ -1219,13 +1219,13 @@ USHORT StatusBar::GetItemId( USHORT nPos ) const // ----------------------------------------------------------------------- -USHORT StatusBar::GetItemPos( USHORT nItemId ) const +sal_uInt16 StatusBar::GetItemPos( sal_uInt16 nItemId ) const { ImplStatusItem* pItem = mpItemList->First(); while ( pItem ) { if ( pItem->mnId == nItemId ) - return (USHORT)mpItemList->GetCurPos(); + return (sal_uInt16)mpItemList->GetCurPos(); pItem = mpItemList->Next(); } @@ -1235,12 +1235,12 @@ USHORT StatusBar::GetItemPos( USHORT nItemId ) const // ----------------------------------------------------------------------- -USHORT StatusBar::GetItemId( const Point& rPos ) const +sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const { if ( AreItemsVisible() && !mbFormat ) { - USHORT nItemCount = GetItemCount(); - USHORT nPos; + sal_uInt16 nItemCount = GetItemCount(); + sal_uInt16 nPos; for ( nPos = 0; nPos < nItemCount; nPos++ ) { // Rechteck holen @@ -1255,13 +1255,13 @@ USHORT StatusBar::GetItemId( const Point& rPos ) const // ----------------------------------------------------------------------- -Rectangle StatusBar::GetItemRect( USHORT nItemId ) const +Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const { Rectangle aRect; if ( AreItemsVisible() && !mbFormat ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { // Rechteck holen und Rahmen abziehen @@ -1280,11 +1280,11 @@ Rectangle StatusBar::GetItemRect( USHORT nItemId ) const // ----------------------------------------------------------------------- -Point StatusBar::GetItemTextPos( USHORT nItemId ) const +Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const { if ( !mbFormat ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { // Rechteck holen @@ -1310,9 +1310,9 @@ Point StatusBar::GetItemTextPos( USHORT nItemId ) const // ----------------------------------------------------------------------- -ULONG StatusBar::GetItemWidth( USHORT nItemId ) const +sal_uIntPtr StatusBar::GetItemWidth( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->mnWidth; @@ -1322,9 +1322,9 @@ ULONG StatusBar::GetItemWidth( USHORT nItemId ) const // ----------------------------------------------------------------------- -StatusBarItemBits StatusBar::GetItemBits( USHORT nItemId ) const +StatusBarItemBits StatusBar::GetItemBits( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->mnBits; @@ -1334,9 +1334,9 @@ StatusBarItemBits StatusBar::GetItemBits( USHORT nItemId ) const // ----------------------------------------------------------------------- -long StatusBar::GetItemOffset( USHORT nItemId ) const +long StatusBar::GetItemOffset( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->mnOffset; @@ -1346,9 +1346,9 @@ long StatusBar::GetItemOffset( USHORT nItemId ) const // ----------------------------------------------------------------------- -void StatusBar::SetItemText( USHORT nItemId, const XubString& rText ) +void StatusBar::SetItemText( sal_uInt16 nItemId, const XubString& rText ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { @@ -1374,7 +1374,7 @@ void StatusBar::SetItemText( USHORT nItemId, const XubString& rText ) if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( TRUE, nPos, TRUE, FALSE ); + ImplDrawItem( sal_True, nPos, sal_True, sal_False ); Flush(); } } @@ -1383,9 +1383,9 @@ void StatusBar::SetItemText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetItemText( USHORT nItemId ) const +const XubString& StatusBar::GetItemText( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->maText; @@ -1395,9 +1395,9 @@ const XubString& StatusBar::GetItemText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void StatusBar::SetItemCommand( USHORT nItemId, const XubString& rCommand ) +void StatusBar::SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { @@ -1410,9 +1410,9 @@ void StatusBar::SetItemCommand( USHORT nItemId, const XubString& rCommand ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetItemCommand( USHORT nItemId ) +const XubString& StatusBar::GetItemCommand( sal_uInt16 nItemId ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->maCommand; @@ -1422,9 +1422,9 @@ const XubString& StatusBar::GetItemCommand( USHORT nItemId ) // ----------------------------------------------------------------------- -void StatusBar::SetItemData( USHORT nItemId, void* pNewData ) +void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { @@ -1436,7 +1436,7 @@ void StatusBar::SetItemData( USHORT nItemId, void* pNewData ) !mbFormat && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( TRUE, nPos, FALSE, FALSE ); + ImplDrawItem( sal_True, nPos, sal_False, sal_False ); Flush(); } } @@ -1444,9 +1444,9 @@ void StatusBar::SetItemData( USHORT nItemId, void* pNewData ) // ----------------------------------------------------------------------- -void* StatusBar::GetItemData( USHORT nItemId ) const +void* StatusBar::GetItemData( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->mpUserData; @@ -1456,9 +1456,9 @@ void* StatusBar::GetItemData( USHORT nItemId ) const // ----------------------------------------------------------------------- -void StatusBar::SetHelpText( USHORT nItemId, const XubString& rText ) +void StatusBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) mpItemList->GetObject( nPos )->maHelpText = rText; @@ -1466,9 +1466,9 @@ void StatusBar::SetHelpText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetHelpText( USHORT nItemId ) const +const XubString& StatusBar::GetHelpText( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { @@ -1493,9 +1493,9 @@ const XubString& StatusBar::GetHelpText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void StatusBar::SetQuickHelpText( USHORT nItemId, const XubString& rText ) +void StatusBar::SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) mpItemList->GetObject( nPos )->maQuickHelpText = rText; @@ -1503,9 +1503,9 @@ void StatusBar::SetQuickHelpText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetQuickHelpText( USHORT nItemId ) const +const XubString& StatusBar::GetQuickHelpText( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { @@ -1518,9 +1518,9 @@ const XubString& StatusBar::GetQuickHelpText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void StatusBar::SetHelpId( USHORT nItemId, ULONG nHelpId ) +void StatusBar::SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) mpItemList->GetObject( nPos )->mnHelpId = nHelpId; @@ -1528,9 +1528,9 @@ void StatusBar::SetHelpId( USHORT nItemId, ULONG nHelpId ) // ----------------------------------------------------------------------- -ULONG StatusBar::GetHelpId( USHORT nItemId ) const +sal_uIntPtr StatusBar::GetHelpId( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->mnHelpId; @@ -1552,11 +1552,11 @@ void StatusBar::ImplCalcBorder( ) } if ( IsBottomBorder() ) mnCalcHeight -= 2; - mbFormat = TRUE; + mbFormat = sal_True; Invalidate(); } -void StatusBar::SetBottomBorder( BOOL bBottomBorder ) +void StatusBar::SetBottomBorder( sal_Bool bBottomBorder ) { if ( mbBottomBorder != bBottomBorder ) { @@ -1565,7 +1565,7 @@ void StatusBar::SetBottomBorder( BOOL bBottomBorder ) } } -void StatusBar::SetTopBorder( BOOL bTopBorder ) +void StatusBar::SetTopBorder( sal_Bool bTopBorder ) { if ( mpImplData->mbTopBorder != static_cast<bool>(bTopBorder) ) { @@ -1574,7 +1574,7 @@ void StatusBar::SetTopBorder( BOOL bTopBorder ) } } -BOOL StatusBar::IsTopBorder() const +sal_Bool StatusBar::IsTopBorder() const { return mpImplData->mbTopBorder; } @@ -1585,7 +1585,7 @@ void StatusBar::StartProgressMode( const XubString& rText ) { DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" ); - mbProgressMode = TRUE; + mbProgressMode = sal_True; mnPercent = 0; maPrgsTxt = rText; @@ -1609,7 +1609,7 @@ void StatusBar::StartProgressMode( const XubString& rText ) // ----------------------------------------------------------------------- -void StatusBar::SetProgressValue( USHORT nNewPercent ) +void StatusBar::SetProgressValue( sal_uInt16 nNewPercent ) { DBG_ASSERT( mbProgressMode, "StatusBar::SetProgressValue(): no progrss mode" ); DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" ); @@ -1620,7 +1620,7 @@ void StatusBar::SetProgressValue( USHORT nNewPercent ) { Update(); SetLineColor(); - ImplDrawProgress( FALSE, mnPercent, nNewPercent ); + ImplDrawProgress( sal_False, mnPercent, nNewPercent ); Flush(); } mnPercent = nNewPercent; @@ -1632,7 +1632,7 @@ void StatusBar::EndProgressMode() { DBG_ASSERT( mbProgressMode, "StatusBar::EndProgressMode(): no progress mode" ); - mbProgressMode = FALSE; + mbProgressMode = sal_False; maPrgsTxt.Erase(); // Paint neu ausloesen um StatusBar wieder herzustellen @@ -1679,7 +1679,7 @@ void StatusBar::SetText( const XubString& rText ) Update(); long nOldTextWidth = GetTextWidth( GetText() ); Window::SetText( rText ); - ImplDrawText( TRUE, nOldTextWidth ); + ImplDrawText( sal_True, nOldTextWidth ); Flush(); } } @@ -1701,8 +1701,8 @@ void StatusBar::SetText( const XubString& rText ) Size StatusBar::CalcWindowSizePixel() const { - ULONG i = 0; - ULONG nCount = mpItemList->Count(); + sal_uIntPtr i = 0; + sal_uIntPtr nCount = mpItemList->Count(); long nOffset = 0; long nCalcWidth = (STATUSBAR_OFFSET_X*2); long nCalcHeight; @@ -1764,9 +1764,9 @@ Size StatusBar::CalcWindowSizePixel() const // ----------------------------------------------------------------------- -void StatusBar::SetAccessibleName( USHORT nItemId, const XubString& rName ) +void StatusBar::SetAccessibleName( sal_uInt16 nItemId, const XubString& rName ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { @@ -1782,9 +1782,9 @@ void StatusBar::SetAccessibleName( USHORT nItemId, const XubString& rName ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetAccessibleName( USHORT nItemId ) const +const XubString& StatusBar::GetAccessibleName( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return mpItemList->GetObject( nPos )->maAccessibleName; diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index ef71f83df1ee..7e24afc38092 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -51,7 +51,7 @@ // ======================================================================= long ImplSysChildProc( void* pInst, SalObject* /* pObject */, - USHORT nEvent, const void* /* pEvent */ ) + sal_uInt16 nEvent, const void* /* pEvent */ ) { SystemChildWindow* pWindow = (SystemChildWindow*)pInst; long nRet = 0; @@ -63,33 +63,33 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, // Focus holen und zwar so, das alle Handler gerufen // werden, als ob dieses Fenster den Focus bekommt, // ohne das der Frame den Focus wieder klaut - pWindow->ImplGetFrameData()->mbSysObjFocus = TRUE; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = TRUE; + pWindow->ImplGetFrameData()->mbSysObjFocus = sal_True; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True; pWindow->ToTop( TOTOP_NOGRABFOCUS ); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = FALSE; - pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = TRUE; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False; + pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_True; pWindow->GrabFocus(); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = FALSE; + pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_False; break; case SALOBJ_EVENT_LOSEFOCUS: // Hintenrum einen LoseFocus ausloesen, das der Status // der Fenster dem entsprechenden Activate-Status // entspricht - pWindow->ImplGetFrameData()->mbSysObjFocus = FALSE; + pWindow->ImplGetFrameData()->mbSysObjFocus = sal_False; if ( !pWindow->ImplGetFrameData()->mnFocusId ) { - pWindow->ImplGetFrameData()->mbStartFocusState = TRUE; + pWindow->ImplGetFrameData()->mbStartFocusState = sal_True; Application::PostUserEvent( pWindow->ImplGetFrameData()->mnFocusId, LINK( pWindow->ImplGetFrameWindow(), Window, ImplAsyncFocusHdl ) ); } break; case SALOBJ_EVENT_TOTOP: - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = TRUE; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True; if ( !Application::GetFocusWindow() || pWindow->HasChildPathFocus() ) pWindow->ToTop( TOTOP_NOGRABFOCUS ); else @@ -99,7 +99,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, pWindow->GrabFocus(); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = FALSE; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False; break; } @@ -108,7 +108,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, // ======================================================================= -void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow ) +void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow ) { mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateObject( pParent->ImplGetFrame(), pData, bShow ); @@ -133,7 +133,7 @@ SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle ) : // ----------------------------------------------------------------------- -SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow ) : +SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow ) : Window( WINDOW_SYSTEMCHILDWINDOW ) { ImplInitSysChild( pParent, nStyle, pData, bShow ); @@ -177,16 +177,16 @@ const SystemEnvData* SystemChildWindow::GetSystemData() const // ----------------------------------------------------------------------- -void SystemChildWindow::EnableEraseBackground( BOOL bEnable ) +void SystemChildWindow::EnableEraseBackground( sal_Bool bEnable ) { if ( mpWindowImpl->mpSysObj ) mpWindowImpl->mpSysObj->EnableEraseBackground( bEnable ); } -BOOL SystemChildWindow::IsEraseBackgroundEnabled() +sal_Bool SystemChildWindow::IsEraseBackgroundEnabled() { if ( mpWindowImpl->mpSysObj ) return mpWindowImpl->mpSysObj->IsEraseBackgroundEnabled(); else - return FALSE; + return sal_False; } diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index f3624ef56f59..019ad941e5d6 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -80,16 +80,16 @@ SystemWindow::SystemWindow( WindowType nType ) : Window( nType ) { mpImplData = new ImplData; - mpWindowImpl->mbSysWin = TRUE; + mpWindowImpl->mbSysWin = sal_True; mpWindowImpl->mnActivateMode = ACTIVATE_MODE_GRABFOCUS; mpMenuBar = NULL; - mbPined = FALSE; - mbRollUp = FALSE; - mbRollFunc = FALSE; - mbDockBtn = FALSE; - mbHideBtn = FALSE; - mbSysChild = FALSE; + mbPined = sal_False; + mbRollUp = sal_False; + mbRollFunc = sal_False; + mbDockBtn = sal_False; + mbHideBtn = sal_False; + mbSysChild = sal_False; mnMenuBarMode = MENUBAR_MODE_NORMAL; mnIcon = 0; } @@ -114,8 +114,8 @@ long SystemWindow::Notify( NotifyEvent& rNEvt ) if( pWin && pWin->IsSystemWindow() ) pMBar = ((SystemWindow*)pWin)->GetMenuBar(); } - if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), FALSE ) ) - return TRUE; + if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), sal_False ) ) + return sal_True; } return Window::Notify( rNEvt ); @@ -134,7 +134,7 @@ long SystemWindow::PreNotify( NotifyEvent& rNEvt ) { // Ctrl-F6 goes directly to the document GrabFocusToDocument(); - return TRUE; + return sal_True; } else { @@ -159,7 +159,7 @@ long SystemWindow::PreNotify( NotifyEvent& rNEvt ) pTList = pSysWin->mpImplData->mpTaskPaneList; } if( pTList && pTList->HandleKeyEvent( *rNEvt.GetKeyEvent() ) ) - return TRUE; + return sal_True; } } return Window::PreNotify( rNEvt ); @@ -189,17 +189,17 @@ TaskPaneList* SystemWindow::GetTaskPaneList() // ----------------------------------------------------------------------- -BOOL SystemWindow::Close() +sal_Bool SystemWindow::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) - return FALSE; + return sal_False; // Is Window not closeable, ignore close Window* pBorderWin = ImplGetBorderWindow(); @@ -211,17 +211,17 @@ BOOL SystemWindow::Close() if ( !(nStyle & WB_CLOSEABLE) ) { Sound::Beep( SOUND_DISABLE, this ); - return FALSE; + return sal_False; } Hide(); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -void SystemWindow::TitleButtonClick( USHORT ) +void SystemWindow::TitleButtonClick( sal_uInt16 ) { } @@ -245,14 +245,14 @@ void SystemWindow::Resizing( Size& ) // ----------------------------------------------------------------------- -void SystemWindow::SetZLevel( BYTE nLevel ) +void SystemWindow::SetZLevel( sal_uInt8 nLevel ) { Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; if ( pWindow->mpWindowImpl->mbOverlapWin && !pWindow->mpWindowImpl->mbFrame ) { - BYTE nOldLevel = pWindow->mpWindowImpl->mpOverlapData->mnTopLevel; + sal_uInt8 nOldLevel = pWindow->mpWindowImpl->mpOverlapData->mnTopLevel; pWindow->mpWindowImpl->mpOverlapData->mnTopLevel = nLevel; // Wenn der neue Level groesser als der alte ist, schieben // wir das Fenster nach hinten @@ -298,7 +298,7 @@ const rtl::OUString& SystemWindow::GetRepresentedURL() const // ----------------------------------------------------------------------- -void SystemWindow::SetIcon( USHORT nIcon ) +void SystemWindow::SetIcon( sal_uInt16 nIcon ) { if ( mnIcon == nIcon ) return; @@ -318,7 +318,7 @@ void SystemWindow::SetIcon( USHORT nIcon ) // ----------------------------------------------------------------------- -BYTE SystemWindow::GetZLevel() const +sal_uInt8 SystemWindow::GetZLevel() const { const Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) @@ -326,12 +326,12 @@ BYTE SystemWindow::GetZLevel() const if ( pWindow->mpWindowImpl->mpOverlapData ) return pWindow->mpWindowImpl->mpOverlapData->mnTopLevel; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void SystemWindow::EnableSaveBackground( BOOL bSave ) +void SystemWindow::EnableSaveBackground( sal_Bool bSave ) { if( ImplGetSVData()->maWinData.mbNoSaveBackground ) bSave = false; @@ -349,7 +349,7 @@ void SystemWindow::EnableSaveBackground( BOOL bSave ) // ----------------------------------------------------------------------- -BOOL SystemWindow::IsSaveBackgroundEnabled() const +sal_Bool SystemWindow::IsSaveBackgroundEnabled() const { const Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) @@ -357,12 +357,12 @@ BOOL SystemWindow::IsSaveBackgroundEnabled() const if ( pWindow->mpWindowImpl->mpOverlapData ) return pWindow->mpWindowImpl->mpOverlapData->mbSaveBack; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void SystemWindow::ShowTitleButton( USHORT nButton, BOOL bVisible ) +void SystemWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) { if ( nButton == TITLE_BUTTON_DOCKING ) { @@ -393,7 +393,7 @@ void SystemWindow::ShowTitleButton( USHORT nButton, BOOL bVisible ) // ----------------------------------------------------------------------- -BOOL SystemWindow::IsTitleButtonVisible( USHORT nButton ) const +sal_Bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const { if ( nButton == TITLE_BUTTON_DOCKING ) return mbDockBtn; @@ -403,7 +403,7 @@ BOOL SystemWindow::IsTitleButtonVisible( USHORT nButton ) const // ----------------------------------------------------------------------- -void SystemWindow::SetPin( BOOL bPin ) +void SystemWindow::SetPin( sal_Bool bPin ) { if ( bPin != mbPined ) { @@ -420,16 +420,16 @@ void SystemWindow::RollUp() if ( !mbRollUp ) { maOrgSize = GetOutputSizePixel(); - mbRollFunc = TRUE; + mbRollFunc = sal_True; Size aSize = maRollUpOutSize; if ( !aSize.Width() ) aSize.Width() = GetOutputSizePixel().Width(); - mbRollUp = TRUE; + mbRollUp = sal_True; if ( mpWindowImpl->mpBorderWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( TRUE, aSize ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_True, aSize ); else SetOutputSizePixel( aSize ); - mbRollFunc = FALSE; + mbRollFunc = sal_False; } } @@ -439,9 +439,9 @@ void SystemWindow::RollDown() { if ( mbRollUp ) { - mbRollUp = FALSE; + mbRollUp = sal_False; if ( mpWindowImpl->mpBorderWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( FALSE, maOrgSize ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_False, maOrgSize ); else SetOutputSizePixel( maOrgSize ); } @@ -503,7 +503,7 @@ Size SystemWindow::GetResizeOutputSizePixel() const static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rStr ) { - ULONG nValidMask = 0; + sal_uIntPtr nValidMask = 0; xub_StrLen nIndex = 0; ByteString aTokenStr; @@ -556,7 +556,7 @@ static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rS { // #94144# allow Minimize again, should be masked out when read from configuration // 91625 - ignore Minimize - ULONG nState = (ULONG)aTokenStr.ToInt32(); + sal_uIntPtr nState = (sal_uIntPtr)aTokenStr.ToInt32(); //nState &= ~(WINDOWSTATE_STATE_MINIMIZED); rData.SetState( nState ); nValidMask |= WINDOWSTATE_MASK_STATE; @@ -618,7 +618,7 @@ static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rS static void ImplWindowStateToStr( const WindowStateData& rData, ByteString& rStr ) { - ULONG nValidMask = rData.GetMask(); + sal_uIntPtr nValidMask = rData.GetMask(); if ( !nValidMask ) return; @@ -638,7 +638,7 @@ static void ImplWindowStateToStr( const WindowStateData& rData, ByteString& rStr { // #94144# allow Minimize again, should be masked out when read from configuration // 91625 - ignore Minimize - ULONG nState = rData.GetState(); + sal_uIntPtr nState = rData.GetState(); //nState &= ~(WINDOWSTATE_STATE_MINIMIZED); rStr.Append( ByteString::CreateFromInt32( (long)nState ) ); } @@ -718,7 +718,7 @@ void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, lo void SystemWindow::SetWindowStateData( const WindowStateData& rData ) { - ULONG nValidMask = rData.GetMask(); + sal_uIntPtr nValidMask = rData.GetMask(); if ( !nValidMask ) return; @@ -731,7 +731,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) if ( pWindow->mpWindowImpl->mbFrame ) { - ULONG nState = rData.GetState(); + sal_uIntPtr nState = rData.GetState(); SalFrameState aState; aState.mnMask = rData.GetMask(); aState.mnX = rData.GetX(); @@ -770,7 +770,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) Rectangle aDesktop = GetDesktopRectPixel(); ImplSVData *pSVData = ImplGetSVData(); Window *pWin = pSVData->maWinData.mpFirstFrame; - BOOL bWrapped = FALSE; + sal_Bool bWrapped = sal_False; while( pWin ) { if( !pWin->ImplIsRealParentPath( this ) && @@ -791,7 +791,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom ) break; // further displacement not possible -> break // avoid endless testing - bWrapped = TRUE; + bWrapped = sal_True; } else { @@ -828,7 +828,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) } else { - USHORT nPosSize = 0; + sal_uInt16 nPosSize = 0; if ( nValidMask & WINDOWSTATE_MASK_X ) nPosSize |= WINDOW_POSSIZE_X; if ( nValidMask & WINDOWSTATE_MASK_Y ) @@ -860,7 +860,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) // 91625 - ignore Minimize if ( nValidMask & WINDOWSTATE_MASK_STATE ) { - ULONG nState = rData.GetState(); + sal_uIntPtr nState = rData.GetState(); if ( nState & WINDOWSTATE_STATE_ROLLUP ) RollUp(); else @@ -873,7 +873,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) void SystemWindow::GetWindowStateData( WindowStateData& rData ) const { - ULONG nValidMask = rData.GetMask(); + sal_uIntPtr nValidMask = rData.GetMask(); if ( !nValidMask ) return; @@ -935,7 +935,7 @@ void SystemWindow::GetWindowStateData( WindowStateData& rData ) const { Point aPos = GetPosPixel(); Size aSize = GetSizePixel(); - ULONG nState = 0; + sal_uIntPtr nState = 0; if ( IsRollUp() ) { @@ -970,7 +970,7 @@ void SystemWindow::SetWindowState( const ByteString& rStr ) // ----------------------------------------------------------------------- -ByteString SystemWindow::GetWindowState( ULONG nMask ) const +ByteString SystemWindow::GetWindowState( sal_uIntPtr nMask ) const { WindowStateData aData; aData.SetMask( nMask ); @@ -1014,7 +1014,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar ) ImplToBottomChild(); if ( pOldMenuBar ) { - BOOL bDelete = (pMenuBar == 0) ? TRUE : FALSE; + sal_Bool bDelete = (pMenuBar == 0) ? sal_True : sal_False; if( bDelete && pOldWindow ) { if( mpImplData->mpTaskPaneList ) @@ -1047,7 +1047,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar ) // ----------------------------------------------------------------------- -void SystemWindow::SetMenuBarMode( USHORT nMode ) +void SystemWindow::SetMenuBarMode( sal_uInt16 nMode ) { if ( mnMenuBarMode != nMode ) { @@ -1055,20 +1055,20 @@ void SystemWindow::SetMenuBarMode( USHORT nMode ) if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) ) { if ( nMode == MENUBAR_MODE_HIDE ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_True ); else - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( FALSE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_False ); } } } // ----------------------------------------------------------------------- -BOOL SystemWindow::ImplIsInTaskPaneList( Window* pWin ) +sal_Bool SystemWindow::ImplIsInTaskPaneList( Window* pWin ) { if( mpImplData && mpImplData->mpTaskPaneList ) return mpImplData->mpTaskPaneList->IsInList( pWin ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index 874881c0c5ef..92c013218286 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -43,7 +43,7 @@ void TabDialog::ImplInitTabDialogData() mpFixedLine = NULL; mpViewWindow = NULL; meViewAlign = WINDOWALIGN_LEFT; - mbPosControls = TRUE; + mbPosControls = sal_True; } // ----------------------------------------------------------------------- @@ -105,7 +105,7 @@ void TabDialog::ImplPosControls() long nViewOffY = 0; long nViewWidth = 0; long nViewHeight = 0; - USHORT nViewPosFlags = WINDOW_POSSIZE_POS; + sal_uInt16 nViewPosFlags = WINDOW_POSSIZE_POS; Size aViewSize = mpViewWindow->GetSizePixel(); if ( meViewAlign == WINDOWALIGN_TOP ) { @@ -153,7 +153,7 @@ void TabDialog::ImplPosControls() pTabControl->SetPosPixel( aTabOffset ); // Alle anderen Childs positionieren - BOOL bTabCtrl = FALSE; + sal_Bool bTabCtrl = sal_False; int nLines = 0; long nX; long nY = aDlgSize.Height(); @@ -171,7 +171,7 @@ void TabDialog::ImplPosControls() if ( pChild2->IsVisible() && (pChild2 != mpViewWindow) ) { if ( pChild2 == pTabControl ) - bTabCtrl = TRUE; + bTabCtrl = sal_True; else if ( bTabCtrl ) { if ( !nLines ) @@ -213,7 +213,7 @@ void TabDialog::ImplPosControls() mpFixedLine->Show(); } - mbPosControls = FALSE; + mbPosControls = sal_False; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 7bfd115af8f9..26e9b9ec309a 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -58,7 +58,7 @@ void TabPage::ImplInit( Window* pParent, WinBits nStyle ) // if the tabpage is drawn (ie filled) by a native widget, make sure all contols will have transparent background // otherwise they will paint with a wrong background if( IsNativeControlSupported(CTRL_TAB_BODY, PART_ENTIRE_CONTROL) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) ) - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); } // ----------------------------------------------------------------------- @@ -68,16 +68,16 @@ void TabPage::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetBackground(); } else { - EnableChildTransparentMode( FALSE ); + EnableChildTransparentMode( sal_False ); SetParentClipMode( 0 ); - SetPaintTransparent( FALSE ); + SetPaintTransparent( sal_False ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -167,7 +167,7 @@ void TabPage::Paint( const Rectangle& ) } // ----------------------------------------------------------------------- -void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG ) +void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index c09dc464b809..2ecaf93f4e93 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -159,7 +159,7 @@ void TaskPaneList::AddWindow( Window *pWindow ) } mTaskPanes.insert( insertionPos, pWindow ); - pWindow->ImplIsInTaskPaneList( TRUE ); + pWindow->ImplIsInTaskPaneList( sal_True ); } } @@ -172,25 +172,25 @@ void TaskPaneList::RemoveWindow( Window *pWindow ) if( p != mTaskPanes.end() ) { mTaskPanes.erase( p ); - pWindow->ImplIsInTaskPaneList( FALSE ); + pWindow->ImplIsInTaskPaneList( sal_False ); } } // -------------------------------------------------- -BOOL TaskPaneList::IsInList( Window *pWindow ) +sal_Bool TaskPaneList::IsInList( Window *pWindow ) { ::std::vector< Window* >::iterator p; p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow ); if( p != mTaskPanes.end() ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } // -------------------------------------------------- -BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) +sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { // F6 cycles through everything and works always @@ -202,10 +202,10 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) // // Since the design of Ctrl-Tab looks to be inconsistent ( non-modal dialogs are not reachable // and the shortcut conflicts with tab-control shortcut ), it is no more supported - BOOL bSplitterOnly = FALSE; - BOOL bFocusInList = FALSE; + sal_Bool bSplitterOnly = sal_False; + sal_Bool bFocusInList = sal_False; KeyCode aKeyCode = aKeyEvent.GetKeyCode(); - BOOL bForward = !aKeyCode.IsShift(); + sal_Bool bForward = !aKeyCode.IsShift(); if( aKeyCode.GetCode() == KEY_F6 ) // F6 { bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift(); @@ -215,43 +215,43 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) while( p != mTaskPanes.end() ) { Window *pWin = *p; - if( pWin->HasChildPathFocus( TRUE ) ) + if( pWin->HasChildPathFocus( sal_True ) ) { - bFocusInList = TRUE; + bFocusInList = sal_True; // Ctrl-F6 goes directly to the document if( !pWin->IsDialog() && aKeyCode.IsMod1() && !aKeyCode.IsShift() ) { pWin->GrabFocusToDocument(); - return TRUE; + return sal_True; } // activate next task pane Window *pNextWin = NULL; if( bSplitterOnly ) - pNextWin = FindNextSplitter( *p, TRUE ); + pNextWin = FindNextSplitter( *p, sal_True ); else pNextWin = FindNextFloat( *p, bForward ); if( pNextWin != pWin ) { - ImplGetSVData()->maWinData.mbNoSaveFocus = TRUE; + ImplGetSVData()->maWinData.mbNoSaveFocus = sal_True; ImplTaskPaneListGrabFocus( pNextWin ); - ImplGetSVData()->maWinData.mbNoSaveFocus = FALSE; + ImplGetSVData()->maWinData.mbNoSaveFocus = sal_False; } else { // forward key if no splitter found if( bSplitterOnly ) - return FALSE; + return sal_False; // we did not find another taskpane, so // put focus back into document pWin->GrabFocusToDocument(); } - return TRUE; + return sal_True; } else p++; @@ -262,24 +262,24 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { Window *pWin; if( bSplitterOnly ) - pWin = FindNextSplitter( NULL, TRUE ); + pWin = FindNextSplitter( NULL, sal_True ); else pWin = FindNextFloat( NULL, bForward ); if( pWin ) { ImplTaskPaneListGrabFocus( pWin ); - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } // -------------------------------------------------- // returns next valid pane -Window* TaskPaneList::FindNextPane( Window *pWindow, BOOL bForward ) +Window* TaskPaneList::FindNextPane( Window *pWindow, sal_Bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); @@ -314,7 +314,7 @@ Window* TaskPaneList::FindNextPane( Window *pWindow, BOOL bForward ) // -------------------------------------------------- // returns next splitter -Window* TaskPaneList::FindNextSplitter( Window *pWindow, BOOL bForward ) +Window* TaskPaneList::FindNextSplitter( Window *pWindow, sal_Bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); @@ -353,7 +353,7 @@ Window* TaskPaneList::FindNextSplitter( Window *pWindow, BOOL bForward ) // -------------------------------------------------- // returns first valid item (regardless of type) if pWindow==0, otherwise returns next valid float -Window* TaskPaneList::FindNextFloat( Window *pWindow, BOOL bForward ) +Window* TaskPaneList::FindNextFloat( Window *pWindow, sal_Bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 9ad0b8734437..a3b3a1dfdbe4 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -112,24 +112,24 @@ DBG_NAMEEX( Window ) #define TB_MAX_GROUPS 100 -#define DOCK_LINEHSIZE ((USHORT)0x0001) -#define DOCK_LINEVSIZE ((USHORT)0x0002) -#define DOCK_LINERIGHT ((USHORT)0x1000) -#define DOCK_LINEBOTTOM ((USHORT)0x2000) -#define DOCK_LINELEFT ((USHORT)0x4000) -#define DOCK_LINETOP ((USHORT)0x8000) +#define DOCK_LINEHSIZE ((sal_uInt16)0x0001) +#define DOCK_LINEVSIZE ((sal_uInt16)0x0002) +#define DOCK_LINERIGHT ((sal_uInt16)0x1000) +#define DOCK_LINEBOTTOM ((sal_uInt16)0x2000) +#define DOCK_LINELEFT ((sal_uInt16)0x4000) +#define DOCK_LINETOP ((sal_uInt16)0x8000) #define DOCK_LINEOFFSET 3 // ----------------------------------------------------------------------- -static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highlight, BOOL bChecked, BOOL bEnabled, BOOL bIsWindow ); +static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow ); // ----------------------------------------------------------------------- struct ImplToolSize { long mnWidth; long mnHeight; - USHORT mnLines; + sal_uInt16 mnLines; }; struct ImplToolSizeArray @@ -157,12 +157,12 @@ private: Accelerator maAccel; long mnMinWidth; long mnMaxWidth; - USHORT mnLineMode; - USHORT mnStartLines; + sal_uInt16 mnLineMode; + sal_uInt16 mnStartLines; void* mpCustomizeData; - BOOL mbCustomizeMode; - BOOL mbResizeMode; - BOOL mbShowDragRect; + sal_Bool mbCustomizeMode; + sal_Bool mbResizeMode; + sal_Bool mbShowDragRect; public: ImplTBDragMgr(); @@ -172,25 +172,25 @@ public: { mpBoxList->Insert( pBox ); } void Remove( ToolBox* pBox ) { mpBoxList->Remove( pBox ); } - ULONG Count() const + sal_uIntPtr Count() const { return mpBoxList->Count(); } ToolBox* FindToolBox( const Rectangle& rRect ); void StartDragging( ToolBox* pDragBox, const Point& rPos, const Rectangle& rRect, - USHORT nLineMode, BOOL bResizeItem, + sal_uInt16 nLineMode, sal_Bool bResizeItem, void* pData = NULL ); void Dragging( const Point& rPos ); - void EndDragging( BOOL bOK = TRUE ); + void EndDragging( sal_Bool bOK = sal_True ); void HideDragRect() { if ( mbShowDragRect ) mpDragBox->HideTracking(); } void UpdateDragRect(); DECL_LINK( SelectHdl, Accelerator* ); void StartCustomizeMode(); void EndCustomizeMode(); - BOOL IsCustomizeMode() { return mbCustomizeMode; } - BOOL IsResizeMode() { return mbResizeMode; } + sal_Bool IsCustomizeMode() { return mbCustomizeMode; } + sal_Bool IsResizeMode() { return mbResizeMode; } }; // ----------------------------------------------------------------------- @@ -335,7 +335,7 @@ void ToolBox::ImplDrawGrip( ToolBox* pThis ) // execute pending paint requests ImplCheckUpdate( pThis ); - BOOL bNativeOk = FALSE; + sal_Bool bNativeOk = sal_False; if( pThis->IsNativeControlSupported( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_HORZ : PART_THUMB_VERT ) ) { ImplControlValue aControlValue; @@ -421,7 +421,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp g.SetStartColor( startCol ); g.SetEndColor( endCol ); - BOOL bLineColor = pThis->IsLineColor(); + sal_Bool bLineColor = pThis->IsLineColor(); Color aOldCol = pThis->GetLineColor(); pThis->SetLineColor( pThis->GetSettings().GetStyleSettings().GetShadowColor() ); @@ -511,7 +511,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp if( pThis->mbHorz ) { long y = 0; - BOOL bDrawSep = FALSE; // pThis->ImplIsFloatingMode() && ( pThis->mnWinStyle & WB_LINESPACING ); + sal_Bool bDrawSep = sal_False; // pThis->ImplIsFloatingMode() && ( pThis->mnWinStyle & WB_LINESPACING ); pThis->DrawGradient( Rectangle( 0, y, aTopLineSz.Width(), y+aTopLineSz.Height()), g ); y += aTopLineSz.Height(); @@ -553,7 +553,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp } -BOOL ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) +sal_Bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) { // use NWF Point aPt; @@ -577,7 +577,7 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi pThis->mpData->mbIsPaintLocked = bOldPaintLock; } -void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, BOOL bIsInPopupMode ) +void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, sal_Bool bIsInPopupMode ) { // draw a constant color if( !bIsInPopupMode ) @@ -598,7 +598,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) ImplCheckUpdate( pThis ); ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( pThis ); - BOOL bIsInPopupMode = pThis->ImplIsInPopupMode(); + sal_Bool bIsInPopupMode = pThis->ImplIsInPopupMode(); Region aPaintRegion( rRect ); @@ -623,7 +623,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) // toolbars known to the dockingmanager will be drawn using NWF or a gradient // docked toolbars are transparent and NWF is already used in the docking area which is their common background // so NWF is used here for floating toolbars only - BOOL bNativeOk = FALSE; + sal_Bool bNativeOk = sal_False; if( pThis->ImplIsFloatingMode() && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL) ) bNativeOk = ImplDrawNativeBackground( pThis, aPaintRegion ); @@ -643,7 +643,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) pThis->Pop(); } -void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, BOOL bHighlight, BOOL bHasOpenPopup ) +void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, sal_Bool bHighlight, sal_Bool bHasOpenPopup ) { // the background of non NWF buttons is painted in a constant color // to have the same highlight color (transparency in DrawSelectionBackground()) @@ -762,7 +762,7 @@ const ImplToolItem *ToolBox::ImplGetFirstClippedItem( const ToolBox* pThis ) // ----------------------------------------------------------------------- -Size ToolBox::ImplCalcSize( const ToolBox* pThis, USHORT nCalcLines, USHORT nCalcMode ) +Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uInt16 nCalcMode ) { long nMax; long nLeft = 0; @@ -771,45 +771,45 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, USHORT nCalcLines, USHORT nCal long nBottom = 0; Size aSize; WindowAlign eOldAlign = pThis->meAlign; - BOOL bOldHorz = pThis->mbHorz; - BOOL bOldAssumeDocked = pThis->mpData->mbAssumeDocked; - BOOL bOldAssumeFloating = pThis->mpData->mbAssumeFloating; + sal_Bool bOldHorz = pThis->mbHorz; + sal_Bool bOldAssumeDocked = pThis->mpData->mbAssumeDocked; + sal_Bool bOldAssumeFloating = pThis->mpData->mbAssumeFloating; if ( nCalcMode ) { - BOOL bOldFloatingMode = pThis->ImplIsFloatingMode(); + sal_Bool bOldFloatingMode = pThis->ImplIsFloatingMode(); - pThis->mpData->mbAssumeDocked = FALSE; - pThis->mpData->mbAssumeFloating = FALSE; + pThis->mpData->mbAssumeDocked = sal_False; + pThis->mpData->mbAssumeFloating = sal_False; if ( nCalcMode == TB_CALCMODE_HORZ ) { - pThis->mpData->mbAssumeDocked = TRUE; // force non-floating mode during calculation + pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation ImplCalcBorder( WINDOWALIGN_TOP, nLeft, nTop, nRight, nBottom, pThis ); - ((ToolBox*)pThis)->mbHorz = TRUE; + ((ToolBox*)pThis)->mbHorz = sal_True; if ( pThis->mbHorz != bOldHorz ) ((ToolBox*)pThis)->meAlign = WINDOWALIGN_TOP; } else if ( nCalcMode == TB_CALCMODE_VERT ) { - pThis->mpData->mbAssumeDocked = TRUE; // force non-floating mode during calculation + pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation ImplCalcBorder( WINDOWALIGN_LEFT, nLeft, nTop, nRight, nBottom, pThis ); - ((ToolBox*)pThis)->mbHorz = FALSE; + ((ToolBox*)pThis)->mbHorz = sal_False; if ( pThis->mbHorz != bOldHorz ) ((ToolBox*)pThis)->meAlign = WINDOWALIGN_LEFT; } else if ( nCalcMode == TB_CALCMODE_FLOAT ) { - pThis->mpData->mbAssumeFloating = TRUE; // force non-floating mode during calculation + pThis->mpData->mbAssumeFloating = sal_True; // force non-floating mode during calculation nLeft = nTop = nRight = nBottom = 0; - ((ToolBox*)pThis)->mbHorz = TRUE; + ((ToolBox*)pThis)->mbHorz = sal_True; if ( pThis->mbHorz != bOldHorz ) ((ToolBox*)pThis)->meAlign = WINDOWALIGN_TOP; } if ( (pThis->meAlign != eOldAlign) || (pThis->mbHorz != bOldHorz) || (pThis->ImplIsFloatingMode() != bOldFloatingMode ) ) - ((ToolBox*)pThis)->mbCalc = TRUE; + ((ToolBox*)pThis)->mbCalc = sal_True; } else ImplCalcBorder( pThis->meAlign, nLeft, nTop, nRight, nBottom, pThis ); @@ -871,7 +871,7 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, USHORT nCalcLines, USHORT nCal { ((ToolBox*)pThis)->meAlign = eOldAlign; ((ToolBox*)pThis)->mbHorz = bOldHorz; - ((ToolBox*)pThis)->mbCalc = TRUE; + ((ToolBox*)pThis)->mbCalc = sal_True; } } @@ -917,13 +917,13 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis ) // calc an upper bound for ImplCalcBreaks below long upperBoundWidth = nCalcSize * pThis->mpData->m_aItems.size(); - USHORT i; - USHORT nLines; - USHORT nCalcLines; - USHORT nTempLines; + sal_uInt16 i; + sal_uInt16 nLines; + sal_uInt16 nCalcLines; + sal_uInt16 nTempLines; long nHeight; long nMaxLineWidth; - nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, TRUE ); + nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True ); pThis->mpFloatSizeAry = new ImplToolSizeArray; pThis->mpFloatSizeAry->mpSize = new ImplToolSize[nCalcLines]; @@ -945,7 +945,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis ) do { nCalcSize += pThis->mnMaxItemWidth; - nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, TRUE ); + nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True ); } while ( (nCalcSize < upperBoundWidth) && (nLines < nTempLines) && (nTempLines != 1) ); if ( nTempLines < nLines ) @@ -957,7 +957,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis ) // ----------------------------------------------------------------------- -Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, USHORT& rLines ) +Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, sal_uInt16& rLines ) { ImplCalcFloatSizes( pThis ); @@ -968,7 +968,7 @@ Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, USHORT& rLines ) rLines = pThis->mnLines; } - USHORT i = 0; + sal_uInt16 i = 0; while ( i < pThis->mpFloatSizeAry->mnLastEntry && rLines < pThis->mpFloatSizeAry->mpSize[i].mnLines ) i++; @@ -987,7 +987,7 @@ void ToolBox::ImplCalcMinMaxFloatSize( ToolBox* pThis, Size& rMinSize, Size& rMa { ImplCalcFloatSizes( pThis ); - USHORT i = 0; + sal_uInt16 i = 0; rMinSize = Size( pThis->mpFloatSizeAry->mpSize[i].mnWidth, pThis->mpFloatSizeAry->mpSize[i].mnHeight ); rMaxSize = Size( pThis->mpFloatSizeAry->mpSize[i].mnWidth, pThis->mpFloatSizeAry->mpSize[i].mnHeight ); while ( ++i <= pThis->mpFloatSizeAry->mnLastEntry ) @@ -1013,7 +1013,7 @@ void ToolBox::ImplSetMinMaxFloatSize( ToolBox *pThis ) { pWrapper->SetMinOutputSizePixel( aMinSize ); pWrapper->SetMaxOutputSizePixel( aMaxSize ); - pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( pThis->GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE) ? TRUE : FALSE ); + pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( pThis->GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE) ? sal_True : sal_False ); } else { @@ -1026,7 +1026,7 @@ void ToolBox::ImplSetMinMaxFloatSize( ToolBox *pThis ) // ----------------------------------------------------------------------- -USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize ) +sal_uInt16 ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize ) { long nLineHeight; @@ -1054,12 +1054,12 @@ USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize ) if( nLines < 1 ) nLines = 1; - return static_cast<USHORT>(nLines); + return static_cast<sal_uInt16>(nLines); } // ----------------------------------------------------------------------- -USHORT ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos ) +sal_uInt16 ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos ) { if ( !pThis->ImplIsFloatingMode() && (!pThis->mbScroll || (pThis->mnLines > 1) || (pThis->mnCurLines > pThis->mnVisLines)) ) @@ -1094,9 +1094,9 @@ USHORT ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos ) // ----------------------------------------------------------------------- void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRect, - USHORT nLineMode ) + sal_uInt16 nLineMode ) { - BOOL mbHorz; + sal_Bool mbHorz; long nOneLineSize; long nCurSize; long nMaxSize; @@ -1106,31 +1106,31 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec if ( nLineMode & DOCK_LINERIGHT ) { nCurSize = rPos.X() - rRect.Left(); - mbHorz = FALSE; + mbHorz = sal_False; } else if ( nLineMode & DOCK_LINEBOTTOM ) { nCurSize = rPos.Y() - rRect.Top(); - mbHorz = TRUE; + mbHorz = sal_True; } else if ( nLineMode & DOCK_LINELEFT ) { nCurSize = rRect.Right() - rPos.X(); - mbHorz = FALSE; + mbHorz = sal_False; } else if ( nLineMode & DOCK_LINETOP ) { nCurSize = rRect.Bottom() - rPos.Y(); - mbHorz = TRUE; + mbHorz = sal_True; } else { DBG_ERROR( "ImplLineSizing: Trailing else" ); nCurSize = 0; - mbHorz = FALSE; + mbHorz = sal_False; } Size aWinSize = pThis->GetSizePixel(); - USHORT nMaxLines = (pThis->mnLines > pThis->mnCurLines) ? pThis->mnLines : pThis->mnCurLines; + sal_uInt16 nMaxLines = (pThis->mnLines > pThis->mnCurLines) ? pThis->mnLines : pThis->mnCurLines; if ( nMaxLines > TB_MAXLINES ) nMaxLines = TB_MAXLINES; if ( mbHorz ) @@ -1148,7 +1148,7 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec nMaxSize = aWinSize.Width(); } - USHORT i = 1; + sal_uInt16 i = 1; if ( nCurSize <= nOneLineSize ) nSize = nOneLineSize; else @@ -1189,9 +1189,9 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec // ----------------------------------------------------------------------- -USHORT ToolBox::ImplFindItemPos( ToolBox* pBox, const Point& rPos ) +sal_uInt16 ToolBox::ImplFindItemPos( ToolBox* pBox, const Point& rPos ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; long nLast = 0; Point aPos = rPos; Size aSize( pBox->mnDX, pBox->mnDY ); @@ -1258,9 +1258,9 @@ ImplTBDragMgr::ImplTBDragMgr() mpBoxList = new ImplTBList( 4, 4 ); mnLineMode = 0; mnStartLines = 0; - mbCustomizeMode = FALSE; - mbResizeMode = FALSE; - mbShowDragRect = FALSE; + mbCustomizeMode = sal_False; + mbResizeMode = sal_False; + mbShowDragRect = sal_False; mpDragBox = NULL; maAccel.InsertItem( KEY_RETURN, KeyCode( KEY_RETURN ) ); @@ -1311,12 +1311,12 @@ ToolBox* ImplTBDragMgr::FindToolBox( const Rectangle& rRect ) void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, const Point& rPos, const Rectangle& rRect, - USHORT nDragLineMode, BOOL bResizeItem, + sal_uInt16 nDragLineMode, sal_Bool bResizeItem, void* pData ) { mpDragBox = pToolBox; pToolBox->CaptureMouse(); - pToolBox->mbDragging = TRUE; + pToolBox->mbDragging = sal_True; Application::InsertAccel( &maAccel ); if ( nDragLineMode ) @@ -1348,7 +1348,7 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, maMouseOff.Y() = rRect.Top() - rPos.Y(); maRect = rRect; maStartRect = rRect; - mbShowDragRect = TRUE; + mbShowDragRect = sal_True; pToolBox->ShowTracking( maRect ); } @@ -1388,12 +1388,12 @@ void ImplTBDragMgr::Dragging( const Point& rPos ) // ----------------------------------------------------------------------- -void ImplTBDragMgr::EndDragging( BOOL bOK ) +void ImplTBDragMgr::EndDragging( sal_Bool bOK ) { mpDragBox->HideTracking(); mpDragBox->ReleaseMouse(); - mpDragBox->mbDragging = FALSE; - mbShowDragRect = FALSE; + mpDragBox->mbDragging = sal_False; + mbShowDragRect = sal_False; Application::RemoveAccel( &maAccel ); if ( mnLineMode ) @@ -1401,16 +1401,16 @@ void ImplTBDragMgr::EndDragging( BOOL bOK ) if ( !bOK ) { mpDragBox->mnDockLines = mnStartLines; - mpDragBox->EndDocking( maStartRect, FALSE ); + mpDragBox->EndDocking( maStartRect, sal_False ); } else - mpDragBox->EndDocking( maRect, FALSE ); + mpDragBox->EndDocking( maRect, sal_False ); mnLineMode = 0; mnStartLines = 0; } else { - USHORT nTempItem = mpDragBox->mnConfigItem; + sal_uInt16 nTempItem = mpDragBox->mnConfigItem; if ( nTempItem ) { mpDragBox->mnConfigItem = 0; @@ -1428,7 +1428,7 @@ void ImplTBDragMgr::EndDragging( BOOL bOK ) pItem->mpWindow->SetSizePixel( aSize ); // ToolBox neu brechnen und neu ausgeben - mpDragBox->ImplInvalidate( TRUE ); + mpDragBox->ImplInvalidate( sal_True ); mpDragBox->Customize( ToolBoxCustomizeEvent( mpDragBox, nTempItem, TOOLBOX_CUSTOMIZE_RESIZE, mpCustomizeData ) ); @@ -1455,7 +1455,7 @@ void ImplTBDragMgr::EndDragging( BOOL bOK ) } aPos = pDropBox->ScreenToOutputPixel( aPos ); - USHORT nPos = ToolBox::ImplFindItemPos( pDropBox, aPos ); + sal_uInt16 nPos = ToolBox::ImplFindItemPos( pDropBox, aPos ); mpDragBox->Customize( ToolBoxCustomizeEvent( pDropBox, nTempItem, nPos, mpCustomizeData ) ); } @@ -1467,7 +1467,7 @@ void ImplTBDragMgr::EndDragging( BOOL bOK ) } } mpCustomizeData = NULL; - mbResizeMode = FALSE; + mbResizeMode = sal_False; mpDragBox->Deactivate(); } @@ -1490,18 +1490,18 @@ void ImplTBDragMgr::UpdateDragRect() IMPL_LINK( ImplTBDragMgr, SelectHdl, Accelerator*, pAccel ) { if ( pAccel->GetCurItemId() == KEY_ESCAPE ) - EndDragging( FALSE ); + EndDragging( sal_False ); else - EndDragging( TRUE ); + EndDragging( sal_True ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- void ImplTBDragMgr::StartCustomizeMode() { - mbCustomizeMode = TRUE; + mbCustomizeMode = sal_True; ToolBox* pBox = mpBoxList->First(); while ( pBox ) @@ -1515,7 +1515,7 @@ void ImplTBDragMgr::StartCustomizeMode() void ImplTBDragMgr::EndCustomizeMode() { - mbCustomizeMode = FALSE; + mbCustomizeMode = sal_False; ToolBox* pBox = mpBoxList->First(); while ( pBox ) @@ -1529,7 +1529,7 @@ void ImplTBDragMgr::EndCustomizeMode() static void ImplDrawOutButton( OutputDevice* pOutDev, const Rectangle& rRect, - USHORT nStyle ) + sal_uInt16 nStyle ) { const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings(); Color aShadowColor = rStyleSettings.GetShadowColor(); @@ -1577,7 +1577,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle ) { // Variablen initialisieren - ImplGetWindowImpl()->mbToolBox = TRUE; + ImplGetWindowImpl()->mbToolBox = sal_True; mpBtnDev = NULL; mpFloatSizeAry = NULL; mpData = new ImplToolBoxPrivateData; @@ -1608,26 +1608,26 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle ) mnConfigItem = 0; mnMouseClicks = 0; mnMouseModifier = 0; - mbDrag = FALSE; - mbSelection = FALSE; - mbCommandDrag = FALSE; - mbUpper = FALSE; - mbLower = FALSE; - mbNextTool = FALSE; - mbIn = FALSE; - mbCalc = TRUE; - mbFormat = FALSE; - mbFullPaint = FALSE; - mbHorz = TRUE; + mbDrag = sal_False; + mbSelection = sal_False; + mbCommandDrag = sal_False; + mbUpper = sal_False; + mbLower = sal_False; + mbNextTool = sal_False; + mbIn = sal_False; + mbCalc = sal_True; + mbFormat = sal_False; + mbFullPaint = sal_False; + mbHorz = sal_True; mbScroll = (nStyle & WB_SCROLL) != 0; - mbCustomize = FALSE; - mbCustomizeMode = FALSE; - mbDragging = FALSE; - mbHideStatusText = FALSE; - mbMenuStrings = FALSE; - mbIsShift = FALSE; - mbIsKeyEvent = FALSE; - mbChangingHighlight = FALSE; + mbCustomize = sal_False; + mbCustomizeMode = sal_False; + mbDragging = sal_False; + mbHideStatusText = sal_False; + mbMenuStrings = sal_False; + mbIsShift = sal_False; + mbIsKeyEvent = sal_False; + mbChangingHighlight = sal_False; meButtonType = BUTTON_SYMBOL; meAlign = WINDOWALIGN_TOP; meLastStyle = POINTER_ARROW; @@ -1654,13 +1654,13 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle ) ImplGetWindowImpl()->mnStyle &= ~WB_DIALOGCONTROL; } - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); } // ----------------------------------------------------------------------- -void ToolBox::ImplInitSettings( BOOL bFont, - BOOL bForeground, BOOL bBackground ) +void ToolBox::ImplInitSettings( sal_Bool bFont, + sal_Bool bForeground, sal_Bool bBackground ) { mpData->mbNativeButtons = IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ); @@ -1694,7 +1694,7 @@ void ToolBox::ImplInitSettings( BOOL bFont, { aColor = GetControlBackground(); SetBackground( aColor ); - SetPaintTransparent( FALSE ); + SetPaintTransparent( sal_False ); SetParentClipMode( 0 ); } else @@ -1702,7 +1702,7 @@ void ToolBox::ImplInitSettings( BOOL bFont, if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) ) { SetBackground(); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); mpData->maDisplayBackground = Wallpaper( rStyleSettings.GetFaceColor() ); } @@ -1714,7 +1714,7 @@ void ToolBox::ImplInitSettings( BOOL bFont, aColor = rStyleSettings.GetWindowColor(); SetBackground( aColor ); - SetPaintTransparent( FALSE ); + SetPaintTransparent( sal_False ); SetParentClipMode( 0 ); ImplUpdateImageList(); @@ -1733,7 +1733,7 @@ void ToolBox::ImplLoadRes( const ResId& rResId ) DockingWindow::ImplLoadRes( rResId ); - ULONG nObjMask; + sal_uIntPtr nObjMask; nObjMask = ReadLongRes(); @@ -1744,17 +1744,17 @@ void ToolBox::ImplLoadRes( const ResId& rResId ) SetAlign( (WindowAlign)ReadLongRes() ); if ( nObjMask & RSC_TOOLBOX_LINECOUNT ) - SetLineCount( sal::static_int_cast<USHORT>(ReadLongRes()) ); + SetLineCount( sal::static_int_cast<sal_uInt16>(ReadLongRes()) ); if ( nObjMask & RSC_TOOLBOX_CUSTOMIZE ) { - BOOL bCust = (BOOL)ReadShortRes(); + sal_Bool bCust = (sal_Bool)ReadShortRes(); EnableCustomize( bCust ); } if ( nObjMask & RSC_TOOLBOX_MENUSTRINGS ) { - BOOL bCust = (BOOL)ReadShortRes(); + sal_Bool bCust = (sal_Bool)ReadShortRes(); EnableMenuStrings( bCust ); } @@ -1769,10 +1769,10 @@ void ToolBox::ImplLoadRes( const ResId& rResId ) if ( nObjMask & RSC_TOOLBOX_ITEMLIST ) { - ULONG nEle = ReadLongRes(); + sal_uIntPtr nEle = ReadLongRes(); // Item hinzufuegen - for ( ULONG i = 0; i < nEle; i++ ) + for ( sal_uIntPtr i = 0; i < nEle; i++ ) { InsertItem( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) ); @@ -1803,7 +1803,7 @@ ToolBox::ToolBox( Window* pParent, const ResId& rResId ) : // Groesse des FloatingWindows berechnen und umschalten, wenn die // ToolBox initial im FloatingModus ist if ( ImplIsFloatingMode() ) - mbHorz = TRUE; + mbHorz = sal_True; else Resize(); @@ -1854,7 +1854,7 @@ ToolBox::~ToolBox() // ----------------------------------------------------------------------- -ImplToolItem* ToolBox::ImplGetItem( USHORT nItemId ) const +ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const { std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while ( it != mpData->m_aItems.end() ) @@ -1868,7 +1868,7 @@ ImplToolItem* ToolBox::ImplGetItem( USHORT nItemId ) const } // ----------------------------------------------------------------------- -static void ImplAddButtonBorder( long &rWidth, long& rHeight, USHORT aOutStyle, BOOL bNativeButtons ) +static void ImplAddButtonBorder( long &rWidth, long& rHeight, sal_uInt16 aOutStyle, sal_Bool bNativeButtons ) { if ( aOutStyle & TOOLBOX_STYLE_OUTBUTTON ) { @@ -1891,13 +1891,13 @@ static void ImplAddButtonBorder( long &rWidth, long& rHeight, USHORT aOutStyle, // ----------------------------------------------------------------------- -BOOL ToolBox::ImplCalcItem() +sal_Bool ToolBox::ImplCalcItem() { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); // recalc required ? if ( !mbCalc ) - return FALSE; + return sal_False; ImplDisableFlatButtons(); @@ -1989,27 +1989,27 @@ BOOL ToolBox::ImplCalcItem() std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while ( it != mpData->m_aItems.end() ) { - BOOL bImage; - BOOL bText; + sal_Bool bImage; + sal_Bool bText; - it->mbVisibleText = FALSE; // indicates if text will definitely be drawn, influences dropdown pos + it->mbVisibleText = sal_False; // indicates if text will definitely be drawn, influences dropdown pos if ( it->meType == TOOLBOXITEM_BUTTON ) { // check if image and/or text exists if ( !(it->maImage) ) - bImage = FALSE; + bImage = sal_False; else - bImage = TRUE; + bImage = sal_True; if ( !it->maText.Len() ) - bText = FALSE; + bText = sal_False; else - bText = TRUE; + bText = sal_True; ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting if ( bImage || bText ) { - it->mbEmptyBtn = FALSE; + it->mbEmptyBtn = sal_False; if ( tmpButtonType == BUTTON_SYMBOL ) { @@ -2022,7 +2022,7 @@ BOOL ToolBox::ImplCalcItem() { it->maItemSize = Size( GetCtrlTextWidth( it->maText )+TB_TEXTOFFSET, GetTextHeight() ); - it->mbVisibleText = TRUE; + it->mbVisibleText = sal_True; } } else if ( tmpButtonType == BUTTON_TEXT ) @@ -2032,7 +2032,7 @@ BOOL ToolBox::ImplCalcItem() { it->maItemSize = Size( GetCtrlTextWidth( it->maText )+TB_TEXTOFFSET, GetTextHeight() ); - it->mbVisibleText = TRUE; + it->mbVisibleText = sal_True; } else { @@ -2060,7 +2060,7 @@ BOOL ToolBox::ImplCalcItem() else { // no image and no text it->maItemSize = Size( nDefWidth, nDefHeight ); - it->mbEmptyBtn = TRUE; + it->mbEmptyBtn = sal_True; } // Gegebenenfalls die Fensterhoehe mit beruecksichtigen @@ -2140,8 +2140,8 @@ BOOL ToolBox::ImplCalcItem() nMaxWidth = nFixedWidth; } - mbCalc = FALSE; - mbFormat = TRUE; + mbCalc = sal_False; + mbFormat = sal_True; // do we have to recalc the sizes ? if ( (nMaxWidth != mnMaxItemWidth) || (nMaxHeight != mnMaxItemHeight) ) @@ -2149,25 +2149,25 @@ BOOL ToolBox::ImplCalcItem() mnMaxItemWidth = nMaxWidth; mnMaxItemHeight = nMaxHeight; - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz ) +sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool bCalcHorz ) { - ULONG nLineStart = 0; - ULONG nGroupStart = 0; + sal_uIntPtr nLineStart = 0; + sal_uIntPtr nGroupStart = 0; long nLineWidth = 0; long nCurWidth; long nLastGroupLineWidth = 0; long nMaxLineWidth = 0; - USHORT nLines = 1; - BOOL bWindow; - BOOL bBreak = FALSE; + sal_uInt16 nLines = 1; + sal_Bool bWindow; + sal_Bool bBreak = sal_False; long nWidthTotal = nWidth; // when docked the menubutton will be in the first line @@ -2179,12 +2179,12 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz while ( it != mpData->m_aItems.end() ) { it->mbBreak = bBreak; - bBreak = FALSE; + bBreak = sal_False; if ( it->mbVisible ) { - bWindow = FALSE; - bBreak = FALSE; + bWindow = sal_False; + bBreak = sal_False; nCurWidth = 0; if ( it->meType == TOOLBOXITEM_BUTTON || it->meType == TOOLBOXITEM_SPACE ) @@ -2200,7 +2200,7 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz if ( !mbScroll || (nWinItemWidth <= nWidthTotal) ) { nCurWidth = nWinItemWidth; - bWindow = TRUE; + bWindow = sal_True; } else { @@ -2213,13 +2213,13 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz // check for line break if ( (nLineWidth+nCurWidth > nWidthTotal) && mbScroll ) - bBreak = TRUE; + bBreak = sal_True; } else if ( it->meType == TOOLBOXITEM_SEPARATOR ) nCurWidth = it->mnSepSize; // treat breaks as separators, except when using old style toolbars (ie. no menu button) else if ( (it->meType == TOOLBOXITEM_BREAK) && !IsMenuEnabled() ) - bBreak = TRUE; + bBreak = sal_True; if ( bBreak ) { @@ -2235,8 +2235,8 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz nLineWidth = 0; nLineStart = it - mpData->m_aItems.begin(); nGroupStart = nLineStart; - it->mbBreak = TRUE; - bBreak = FALSE; + it->mbBreak = sal_True; + bBreak = sal_False; } else { @@ -2300,7 +2300,7 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz // ----------------------------------------------------------------------- namespace { - BOOL ImplFollowedByVisibleButton( std::vector< ImplToolItem >::iterator _aSeparator, std::vector< ImplToolItem >::iterator _aEnd ) + sal_Bool ImplFollowedByVisibleButton( std::vector< ImplToolItem >::iterator _aSeparator, std::vector< ImplToolItem >::iterator _aEnd ) { std::vector< ImplToolItem >::iterator aLookup = _aSeparator; while ( ++aLookup != _aEnd ) @@ -2309,9 +2309,9 @@ namespace return ImplFollowedByVisibleButton( aLookup, _aEnd ); if ( ( aLookup->meType == TOOLBOXITEM_BUTTON ) && aLookup->mbVisible ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } } @@ -2331,7 +2331,7 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode ) if( eMode == FSMODE_AUTO || eMode == FSMODE_FAVOURHEIGHT ) { // calc number of floating lines for current window height - USHORT nFloatLinesHeight = ImplCalcLines( this, mnDY ); + sal_uInt16 nFloatLinesHeight = ImplCalcLines( this, mnDY ); // calc window size according to this number aSize1 = ImplCalcFloatSize( this, nFloatLinesHeight ); @@ -2347,9 +2347,9 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode ) int nBorderY = 2*TB_BORDER_OFFSET2 + mnTopBorder + mnBottomBorder + 2*mnBorderY; Size aSz( aCurrentSize ); long maxX; - USHORT nLines = ImplCalcBreaks( aSz.Width()-nBorderX, &maxX, mbHorz ); + sal_uInt16 nLines = ImplCalcBreaks( aSz.Width()-nBorderX, &maxX, mbHorz ); - USHORT manyLines = 1000; + sal_uInt16 manyLines = 1000; Size aMinimalFloatSize = ImplCalcFloatSize( this, manyLines ); aSz.Height() = nBorderY + nLineHeight * nLines; @@ -2386,7 +2386,7 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode ) } -void ToolBox::ImplFormat( BOOL bResize ) +void ToolBox::ImplFormat( sal_Bool bResize ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -2406,15 +2406,15 @@ void ToolBox::ImplFormat( BOOL bResize ) long nMax; // width of layoutarea in pixels long nX; long nY; - USHORT nFormatLine; - BOOL bMustFullPaint; - BOOL bLastSep; + sal_uInt16 nFormatLine; + sal_Bool bMustFullPaint; + sal_Bool bLastSep; std::vector< ImplToolItem >::iterator it; std::vector< ImplToolItem >::iterator temp_it; ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); - BOOL bIsInPopupMode = ImplIsInPopupMode(); + sal_Bool bIsInPopupMode = ImplIsInPopupMode(); // FloatSizeAry gegebenenfalls loeschen if ( mpFloatSizeAry ) @@ -2433,9 +2433,9 @@ void ToolBox::ImplFormat( BOOL bResize ) ImplUpdateDragArea( this ); if ( ImplCalcItem() ) - bMustFullPaint = TRUE; + bMustFullPaint = sal_True; else - bMustFullPaint = FALSE; + bMustFullPaint = sal_False; // calculate new size during interactive resize or @@ -2578,7 +2578,7 @@ void ToolBox::ImplFormat( BOOL bResize ) nX = nLeft; // top-left offset nY = nTop; nFormatLine = 1; - bLastSep = TRUE; + bLastSep = sal_True; // save old scroll rectangles and reset them Rectangle aOldLowerRect = maLowerRect; @@ -2712,7 +2712,7 @@ void ToolBox::ImplFormat( BOOL bResize ) // hide double separators if ( it->meType == TOOLBOXITEM_SEPARATOR ) { - it->mbVisible = FALSE; + it->mbVisible = sal_False; if ( !bLastSep ) { // check if any visible items have to appear behind it @@ -2723,18 +2723,18 @@ void ToolBox::ImplFormat( BOOL bResize ) ((temp_it->meType == TOOLBOXITEM_BUTTON) && temp_it->mbVisible) ) { - it->mbVisible = TRUE; + it->mbVisible = sal_True; break; } ++temp_it; } } - bLastSep = TRUE; + bLastSep = sal_True; } else if ( it->mbVisible ) - bLastSep = FALSE; + bLastSep = sal_False; - it->mbShowWindow = FALSE; + it->mbShowWindow = sal_False; // check for line break and advance nX/nY accordingly if ( it->mbBreak ) @@ -2915,7 +2915,7 @@ void ToolBox::ImplFormat( BOOL bResize ) } // indicate formatting is done - mbFormat = FALSE; + mbFormat = sal_False; } // ----------------------------------------------------------------------- @@ -2926,7 +2926,7 @@ IMPL_LINK( ToolBox, ImplDropdownLongClickHdl, ToolBox*, EMPTYARG ) (mpData->m_aItems[ mnCurPos ].mnBits & TIB_DROPDOWN) ) { - mpData->mbDropDownByKeyboard = FALSE; + mpData->mbDropDownByKeyboard = sal_False; GetDropdownClickHdl().Call( this ); // do not reset data if the dropdown handler opened a floating window @@ -2935,7 +2935,7 @@ IMPL_LINK( ToolBox, ImplDropdownLongClickHdl, ToolBox*, EMPTYARG ) { // no floater was opened Deactivate(); - ImplDrawItem( mnCurPos, FALSE ); + ImplDrawItem( mnCurPos, sal_False ); mnCurPos = TOOLBOX_ITEM_NOTFOUND; mnCurItemId = 0; @@ -2963,7 +2963,7 @@ IMPL_LINK( ToolBox, ImplUpdateHdl, void*, EMPTYARG ) // ----------------------------------------------------------------------- -static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, BOOL bSetColor, BOOL bRotate ) +static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, sal_Bool bSetColor, sal_Bool bRotate ) { Color aOldFillColor = pBox->GetFillColor(); Color aOldLineColor = pBox->GetLineColor(); @@ -3018,10 +3018,10 @@ static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, BOOL b pBox->SetLineColor( aOldLineColor ); } -static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, BOOL bSetColor, BOOL bRotate ) +static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, sal_Bool bSetColor, sal_Bool bRotate ) { - BOOL bLineColor = pBox->IsLineColor(); - BOOL bFillColor = pBox->IsFillColor(); + sal_Bool bLineColor = pBox->IsLineColor(); + sal_Bool bFillColor = pBox->IsFillColor(); Color aOldFillColor = pBox->GetFillColor(); Color aOldLineColor = pBox->GetLineColor(); pBox->SetLineColor(); @@ -3071,8 +3071,8 @@ static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect pBox->SetLineColor( ); } -void ToolBox::ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, BOOL bBlack, BOOL bColTransform, - BOOL bLeft, BOOL bTop, long nSize ) +void ToolBox::ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, sal_Bool bBlack, sal_Bool bColTransform, + sal_Bool bLeft, sal_Bool bTop, long nSize ) { Color aOldFillColor = pBox->GetFillColor(); WindowAlign eAlign = pBox->meAlign; @@ -3167,7 +3167,7 @@ void ToolBox::ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, BOOL bBlack, B } void ToolBox::SetToolArrowClipregion( ToolBox* pBox, long nX, long nY, - BOOL bLeft, BOOL bTop, long nSize ) + sal_Bool bLeft, sal_Bool bTop, long nSize ) { WindowAlign eAlign = pBox->meAlign; long nHalfSize; @@ -3222,7 +3222,7 @@ void ToolBox::SetToolArrowClipregion( ToolBox* pBox, long nX, long nY, // ----------------------------------------------------------------------- -void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight ) +void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) { if( !pThis->mpData->maMenubuttonItem.maRect.IsEmpty() ) { @@ -3233,11 +3233,11 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight ) // execute pending paint requests ImplCheckUpdate( pThis ); - BOOL bFillColor = pThis->IsFillColor(); - BOOL bLineColor = pThis->IsLineColor(); + sal_Bool bFillColor = pThis->IsFillColor(); + sal_Bool bLineColor = pThis->IsLineColor(); Color aOldFillCol = pThis->GetFillColor(); Color aOldLineCol = pThis->GetLineColor(); - BOOL bNativeButtons = pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ); + sal_Bool bNativeButtons = pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ); Rectangle aInnerRect( pThis->mpData->maMenubuttonItem.maRect ); if( pThis->mpData->mnMenuButtonWidth > TB_MENUBUTTON_SIZE ) @@ -3277,9 +3277,9 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight ) if( bHighlight ) { if( bNativeButtons ) - ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, FALSE, TRUE, FALSE ); + ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, sal_False, sal_True, sal_False ); else - pThis->DrawSelectionBackground( aInnerRect, 2, FALSE, FALSE, FALSE ); + pThis->DrawSelectionBackground( aInnerRect, 2, sal_False, sal_False, sal_False ); } else { @@ -3301,7 +3301,7 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight ) aRect.Left() = aRect.Right() - aRect.getWidth()/3; if( pThis->mpData->maMenuType & TOOLBOX_MENUTYPE_CUSTOMIZE ) - ImplDrawDropdownArrow( pThis, aRect, TRUE, !pThis->mbHorz ); + ImplDrawDropdownArrow( pThis, aRect, sal_True, !pThis->mbHorz ); if( pThis->ImplHasClippedItems() ) { @@ -3311,7 +3311,7 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight ) else aRect.Right() = aRect.Left() + aRect.getWidth()/3; - ImplDrawMoreIndicator( pThis, aRect, TRUE, !pThis->mbHorz ); + ImplDrawMoreIndicator( pThis, aRect, sal_True, !pThis->mbHorz ); } // store highlight state @@ -3331,30 +3331,30 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight ) // ----------------------------------------------------------------------- -void ToolBox::ImplDrawSpin( BOOL bUpperIn, BOOL bLowerIn ) +void ToolBox::ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - BOOL bTmpUpper; - BOOL bTmpLower; + sal_Bool bTmpUpper; + sal_Bool bTmpLower; if ( maUpperRect.IsEmpty() || maLowerRect.IsEmpty() ) return; if ( mnCurLine > 1 ) - bTmpUpper = TRUE; + bTmpUpper = sal_True; else - bTmpUpper = FALSE; + bTmpUpper = sal_False; if ( mnCurLine+mnVisLines-1 < mnCurLines ) - bTmpLower = TRUE; + bTmpLower = sal_True; else - bTmpLower = FALSE; + bTmpLower = sal_False; if ( !IsEnabled() ) { - bTmpUpper = FALSE; - bTmpLower = FALSE; + bTmpUpper = sal_False; + bTmpLower = sal_False; } ImplDrawSpinButton( this, maUpperRect, maLowerRect, @@ -3363,7 +3363,7 @@ void ToolBox::ImplDrawSpin( BOOL bUpperIn, BOOL bLowerIn ) // ----------------------------------------------------------------------- -void ToolBox::ImplDrawNext( BOOL bIn ) +void ToolBox::ImplDrawNext( sal_Bool bIn ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -3375,7 +3375,7 @@ void ToolBox::ImplDrawNext( BOOL bIn ) // Button malen long nX = SMALLBUTTON_OFF_NORMAL_X; long nY = SMALLBUTTON_OFF_NORMAL_Y; - USHORT nStyle = 0; + sal_uInt16 nStyle = 0; if ( bIn == 1 ) { nStyle |= BUTTON_DRAW_PRESSED; @@ -3385,17 +3385,17 @@ void ToolBox::ImplDrawNext( BOOL bIn ) aDecoView.DrawButton( maNextToolRect, nStyle ); // Inhalt ausgeben - BOOL bLeft = FALSE; - BOOL bTop = FALSE; + sal_Bool bLeft = sal_False; + sal_Bool bTop = sal_False; if ( mbHorz ) { - bLeft = TRUE; + bLeft = sal_True; nX += (maNextToolRect.GetWidth()-6)/2-4; nY += (maNextToolRect.GetHeight()-6)/2-6; } else { - bTop = TRUE; + bTop = sal_True; nY += (maNextToolRect.GetHeight()-6)/2-4; nX += (maNextToolRect.GetWidth()-6)/2-6; } @@ -3404,17 +3404,17 @@ void ToolBox::ImplDrawNext( BOOL bIn ) nY += maNextToolRect.Top(); SetLineColor(); SetFillColor( COL_LIGHTBLUE ); - ImplDrawToolArrow( this, nX, nY, TRUE, FALSE, bLeft, bTop, 10 ); + ImplDrawToolArrow( this, nX, nY, sal_True, sal_False, bLeft, bTop, 10 ); } // ----------------------------------------------------------------------- -static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highlight, BOOL bChecked, BOOL bEnabled, BOOL bIsWindow ) +static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow ) { // draws toolbar button background either native or using a coloured selection - // if bIsWindow is TRUE, the corresponding item is a control and only a selection border will be drawn + // if bIsWindow is sal_True, the corresponding item is a control and only a selection border will be drawn - BOOL bNativeOk = FALSE; + sal_Bool bNativeOk = sal_False; if( !bIsWindow && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; @@ -3433,10 +3433,10 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highl } if( !bNativeOk ) - pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, TRUE, bIsWindow, 2, NULL, NULL ); + pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, sal_True, bIsWindow, 2, NULL, NULL ); } -void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLayout ) +void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHighlight, sal_Bool bPaint, sal_Bool bLayout ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -3461,13 +3461,13 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); // no gradient background for items that have a popup open - BOOL bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId); + sal_Bool bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId); - BOOL bHighContrastWhite = FALSE; + sal_Bool bHighContrastWhite = sal_False; // check the face color as highcontrast indicator // because the toolbox itself might have a gradient if( rStyleSettings.GetFaceColor() == Color( COL_WHITE ) ) - bHighContrastWhite = TRUE; + bHighContrastWhite = sal_True; // draw separators in flat style only if ( !bLayout && @@ -3534,18 +3534,18 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay Size aSize( GetCtrlTextWidth( pItem->maText ), GetTextHeight() ); Point aPos( pItem->maRect.Left()+2, pItem->maRect.Top() ); aPos.Y() += (pItem->maRect.GetHeight()-aSize.Height())/2; - BOOL bClip; + sal_Bool bClip; if ( (aSize.Width() > pItem->maRect.GetWidth()-2) || (aSize.Height() > pItem->maRect.GetHeight()-2) ) { - bClip = TRUE; + bClip = sal_True; Rectangle aTempRect( pItem->maRect.Left()+1, pItem->maRect.Top()+1, pItem->maRect.Right()-1, pItem->maRect.Bottom()-1 ); Region aTempRegion( aTempRect ); SetClipRegion( aTempRegion ); } else - bClip = FALSE; + bClip = sal_False; if( bLayout ) { mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.Len() ); @@ -3586,7 +3586,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay long nImageOffY=0; long nTextOffX=0; long nTextOffY=0; - USHORT nStyle = 0; + sal_uInt16 nStyle = 0; if ( pItem->meState == STATE_CHECK ) { @@ -3637,8 +3637,8 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay nOffY += pItem->maRect.Top(); // determine what has to be drawn on the button: image, text or both - BOOL bImage; - BOOL bText; + sal_Bool bImage; + sal_Bool bText; ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText ); @@ -3657,7 +3657,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay if ( bImage && ! bLayout ) { const Image* pImage; - if ( bHighlight && (!(pItem->maHighImage)) == FALSE ) + if ( bHighlight && (!(pItem->maHighImage)) == sal_False ) pImage = &(pItem->maHighImage); else pImage = &(pItem->maImage); @@ -3665,7 +3665,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay aImageSize = pImage->GetSizePixel(); // determine drawing flags - USHORT nImageStyle = 0; + sal_uInt16 nImageStyle = 0; if ( !pItem->mbEnabled || !IsEnabled() ) nImageStyle |= IMAGE_DRAW_DISABLE; @@ -3696,7 +3696,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay if( bHasOpenPopup ) ImplDrawFloatwinBorder( pItem ); else - ImplDrawButton( this, aButtonRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? TRUE : FALSE ); + ImplDrawButton( this, aButtonRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False ); if( bHighlight ) { @@ -3708,7 +3708,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay } // draw the text - BOOL bRotate = FALSE; + sal_Bool bRotate = sal_False; if ( bText ) { nTextOffX = nOffX; @@ -3719,7 +3719,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay if( pItem->mbVisibleText && !ImplIsFloatingMode() && ((meAlign == WINDOWALIGN_LEFT) || (meAlign == WINDOWALIGN_RIGHT)) ) { - bRotate = TRUE; + bRotate = sal_True; Font aRotateFont = aOldFont; /* @@ -3762,10 +3762,10 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay if( bHasOpenPopup ) ImplDrawFloatwinBorder( pItem ); else - ImplDrawButton( this, pItem->maRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? TRUE : FALSE ); + ImplDrawButton( this, pItem->maRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False ); } - USHORT nTextStyle = 0; + sal_uInt16 nTextStyle = 0; if ( !pItem->mbEnabled ) nTextStyle |= TEXT_DRAW_DISABLE; if( bLayout ) @@ -3787,10 +3787,10 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay if ( pItem->mnBits & TIB_DROPDOWN ) { Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz ) ); - BOOL bSetColor = TRUE; + sal_Bool bSetColor = sal_True; if ( !pItem->mbEnabled || !IsEnabled() ) { - bSetColor = FALSE; + bSetColor = sal_False; SetFillColor( rStyleSettings.GetShadowColor() ); } @@ -3804,7 +3804,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay if( bHasOpenPopup ) ImplDrawFloatwinBorder( pItem ); else - ImplDrawButton( this, aDropDownRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), FALSE ); + ImplDrawButton( this, aDropDownRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), sal_False ); } } ImplDrawDropdownArrow( this, aDropDownRect, bSetColor, bRotate ); @@ -3819,7 +3819,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay void ToolBox::ImplStartCustomizeMode() { - mbCustomizeMode = TRUE; + mbCustomizeMode = sal_True; mpData->ImplClearLayoutData(); @@ -3838,7 +3838,7 @@ void ToolBox::ImplStartCustomizeMode() } } -void ToolBox::SetCustomizeMode( BOOL bSet ) +void ToolBox::SetCustomizeMode( sal_Bool bSet ) { if ( bSet ) ImplStartCustomizeMode(); @@ -3850,7 +3850,7 @@ void ToolBox::SetCustomizeMode( BOOL bSet ) void ToolBox::ImplEndCustomizeMode() { - mbCustomizeMode = FALSE; + mbCustomizeMode = sal_False; mpData->ImplClearLayoutData(); @@ -3906,7 +3906,7 @@ void ToolBox::ImplDrawFloatwinBorder( ImplToolItem* pItem ) } } -void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow ) +void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -3915,9 +3915,9 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow ) mpFloatWin = pFloatWindow; // redraw item, to trigger drawing of a special border - ImplDrawItem( mnCurPos, TRUE ); + ImplDrawItem( mnCurPos, sal_True ); - mbDrag = FALSE; + mbDrag = sal_False; EndTracking(); ReleaseMouse(); } @@ -3927,7 +3927,7 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow ) // if focus is still in this toolbox, then the floater was opened by keyboard // draw current item with highlight and keep old state - BOOL bWasKeyboardActivate = mpData->mbDropDownByKeyboard; + sal_Bool bWasKeyboardActivate = mpData->mbDropDownByKeyboard; if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND ) @@ -3947,15 +3947,15 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow ) // ----------------------------------------------------------------------- -void ToolBox::ShowLine( BOOL bNext ) +void ToolBox::ShowLine( sal_Bool bNext ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - mbFormat = TRUE; + mbFormat = sal_True; if ( mpData->mbPageScroll ) { - USHORT delta = mnVisLines; + sal_uInt16 delta = mnVisLines; if ( bNext ) { mnCurLine = mnCurLine + delta; @@ -3983,7 +3983,7 @@ void ToolBox::ShowLine( BOOL bNext ) // ----------------------------------------------------------------------- -BOOL ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat ) +sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat ) { Point aMousePos = rMEvt.GetPosPixel(); @@ -3996,7 +3996,7 @@ BOOL ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat ) { if ( !mnCurItemId ) { - ImplDrawItem( mnCurPos, TRUE ); + ImplDrawItem( mnCurPos, sal_True ); mnCurItemId = pItem->mnId; Highlight(); } @@ -4015,48 +4015,48 @@ BOOL ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat ) } } - return TRUE; + return sal_True; } if ( mbUpper ) { - BOOL bNewIn = maUpperRect.IsInside( aMousePos ); + sal_Bool bNewIn = maUpperRect.IsInside( aMousePos ); if ( bNewIn != mbIn ) { mbIn = bNewIn; - ImplDrawSpin( mbIn, FALSE ); + ImplDrawSpin( mbIn, sal_False ); } - return TRUE; + return sal_True; } if ( mbLower ) { - BOOL bNewIn = maLowerRect.IsInside( aMousePos ); + sal_Bool bNewIn = maLowerRect.IsInside( aMousePos ); if ( bNewIn != mbIn ) { mbIn = bNewIn; - ImplDrawSpin( FALSE, mbIn ); + ImplDrawSpin( sal_False, mbIn ); } - return TRUE; + return sal_True; } if ( mbNextTool ) { - BOOL bNewIn = maNextToolRect.IsInside( aMousePos ); + sal_Bool bNewIn = maNextToolRect.IsInside( aMousePos ); if ( bNewIn != mbIn ) { mbIn = bNewIn; ImplDrawNext( mbIn ); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel ) +sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCancel ) { ImplDisableFlatButtons(); @@ -4080,12 +4080,12 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel ) Deactivate(); if ( mbDrag ) - mbDrag = FALSE; + mbDrag = sal_False; else { - mbSelection = FALSE; + mbSelection = sal_False; if ( mnCurPos == TOOLBOX_ITEM_NOTFOUND ) - return TRUE; + return sal_True; } // Wurde Maus ueber dem Item losgelassen @@ -4123,7 +4123,7 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel ) ImplAddDel( &aDelData ); Select(); if ( aDelData.IsDelete() ) - return TRUE; + return sal_True; ImplRemoveDel( &aDelData ); } } @@ -4135,11 +4135,11 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel ) // Items nicht geloescht, im Select-Handler if ( mnCurItemId ) { - BOOL bHighlight; + sal_Bool bHighlight; if ( (mnCurItemId == mnHighItemId) && (mnOutStyle & TOOLBOX_STYLE_FLAT) ) bHighlight = 2; else - bHighlight = FALSE; + bHighlight = sal_False; // Get current pos for the case that items are inserted/removed // in the toolBox mnCurPos = GetItemPos( mnCurItemId ); @@ -4157,28 +4157,28 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel ) mnDownItemId = 0; mnMouseClicks = 0; mnMouseModifier = 0; - return TRUE; + return sal_True; } else if ( mbUpper || mbLower ) { if ( mbIn ) ShowLine( !mbUpper ); - mbUpper = FALSE; - mbLower = FALSE; - mbIn = FALSE; - ImplDrawSpin( FALSE, FALSE ); - return TRUE; + mbUpper = sal_False; + mbLower = sal_False; + mbIn = sal_False; + ImplDrawSpin( sal_False, sal_False ); + return sal_True; } else if ( mbNextTool ) { - mbNextTool = FALSE; - mbIn = FALSE; - ImplDrawNext( FALSE ); + mbNextTool = sal_False; + mbIn = sal_False; + ImplDrawNext( sal_False ); NextToolBox(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -4200,10 +4200,10 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) // only highlight when the focus is not inside a child window of a toolbox // eg, in a edit control // and do not hilight when focus is in a different toolbox - BOOL bDrawHotSpot = TRUE; + sal_Bool bDrawHotSpot = sal_True; Window *pWin = Application::GetFocusWindow(); if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this ) - bDrawHotSpot = FALSE; + bDrawHotSpot = sal_False; /* else if( pWin && !pWin->ImplGetWindowImpl()->mbToolBox ) @@ -4212,7 +4212,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) pWin = pWin->GetParent(); if( pWin && pWin->ImplGetWindowImpl()->mbToolBox ) { - bDrawHotSpot = FALSE; + bDrawHotSpot = sal_False; break; } } @@ -4220,8 +4220,8 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( mbSelection && bDrawHotSpot ) { - USHORT i = 0; - USHORT nNewPos = TOOLBOX_ITEM_NOTFOUND; + sal_uInt16 i = 0; + sal_uInt16 nNewPos = TOOLBOX_ITEM_NOTFOUND; // Item suchen, das geklickt wurde std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -4264,7 +4264,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND ) { mnCurItemId = mnHighItemId = it->mnId; - ImplDrawItem( mnCurPos, 2 /*TRUE*/ ); // always use shadow effect (2) + ImplDrawItem( mnCurPos, 2 /*sal_True*/ ); // always use shadow effect (2) } else mnCurItemId = mnHighItemId = 0; @@ -4292,7 +4292,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) { if ( rMEvt.GetMode() & MOUSE_SIMPLEMOVE ) { - USHORT nLinePtr = ImplTestLineSize( this, rMEvt.GetPosPixel() ); + sal_uInt16 nLinePtr = ImplTestLineSize( this, rMEvt.GetPosPixel() ); if ( nLinePtr & DOCK_LINEHSIZE ) { if ( meAlign == WINDOWALIGN_LEFT ) @@ -4335,7 +4335,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( bDrawHotSpot && ( ((eStyle == POINTER_ARROW) && (mnOutStyle & TOOLBOX_STYLE_HANDPOINTER)) || (mnOutStyle & TOOLBOX_STYLE_FLAT) || !mnOutStyle ) ) { - BOOL bClearHigh = TRUE; + sal_Bool bClearHigh = sal_True; if ( !rMEvt.IsLeaveWindow() && (mnCurPos == TOOLBOX_ITEM_NOTFOUND) ) { std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -4347,21 +4347,21 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) { if ( !mnOutStyle || (mnOutStyle & TOOLBOX_STYLE_FLAT) ) { - bClearHigh = FALSE; + bClearHigh = sal_False; if ( mnHighItemId != it->mnId ) { - USHORT nTempPos = sal::static_int_cast<USHORT>(it - mpData->m_aItems.begin()); + sal_uInt16 nTempPos = sal::static_int_cast<sal_uInt16>(it - mpData->m_aItems.begin()); if ( mnHighItemId ) { ImplHideFocus(); - USHORT nPos = GetItemPos( mnHighItemId ); + sal_uInt16 nPos = GetItemPos( mnHighItemId ); ImplDrawItem( nPos ); ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nPos ) ); } if ( mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, FALSE ); + ImplDrawMenubutton( this, sal_False ); } mnHighItemId = it->mnId; ImplDrawItem( nTempPos, 2 ); @@ -4380,21 +4380,21 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) } // only clear highlight when focus is not in toolbar - BOOL bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos ); + sal_Bool bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos ); if ( bClearHigh || bMenuButtonHit ) { if ( !bMenuButtonHit && mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, FALSE ); + ImplDrawMenubutton( this, sal_False ); } if( mnHighItemId ) { - USHORT nClearPos = GetItemPos( mnHighItemId ); + sal_uInt16 nClearPos = GetItemPos( mnHighItemId ); if ( nClearPos != TOOLBOX_ITEM_NOTFOUND ) { - ImplDrawItem( nClearPos, (nClearPos == mnCurPos) ? TRUE : FALSE ); + ImplDrawItem( nClearPos, (nClearPos == mnCurPos) ? sal_True : sal_False ); if( nClearPos != mnCurPos ) ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nClearPos ) ); } @@ -4404,7 +4404,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if( bMenuButtonHit ) { - ImplDrawMenubutton( this, TRUE ); + ImplDrawMenubutton( this, sal_True ); } } } @@ -4439,8 +4439,8 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) } Point aMousePos = rMEvt.GetPosPixel(); - USHORT i = 0; - USHORT nNewPos = TOOLBOX_ITEM_NOTFOUND; + sal_uInt16 i = 0; + sal_uInt16 nNewPos = TOOLBOX_ITEM_NOTFOUND; // Item suchen, das geklickt wurde std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -4475,12 +4475,12 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) Rectangle aItemRect = GetItemRect( it->mnId ); mnConfigItem = it->mnId; - BOOL bResizeItem; + sal_Bool bResizeItem; if ( mbCustomizeMode && it->mbShowWindow && (it->maRect.Right()-TB_RESIZE_OFFSET <= aMousePos.X()) ) - bResizeItem = TRUE; + bResizeItem = sal_True; else - bResizeItem = FALSE; + bResizeItem = sal_False; pMgr->StartDragging( this, aMousePos, aItemRect, 0, bResizeItem ); return; } @@ -4494,7 +4494,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // Aktuelle Daten setzen - USHORT nTrackFlags = 0; + sal_uInt16 nTrackFlags = 0; mnCurPos = i; mnCurItemId = it->mnId; mnDownItemId = mnCurItemId; @@ -4506,13 +4506,13 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) if ( mbSelection ) { - ImplDrawItem( mnCurPos, TRUE ); + ImplDrawItem( mnCurPos, sal_True ); Highlight(); } else { // Hier schon bDrag setzen, da in EndSelection ausgewertet wird - mbDrag = TRUE; + mbDrag = sal_True; // Bei Doppelklick nur den Handler rufen, aber bevor der // Button gehiltet wird, da evt. in diesem Handler der @@ -4523,7 +4523,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) if ( mbDrag ) { - ImplDrawItem( mnCurPos, TRUE ); + ImplDrawItem( mnCurPos, sal_True ); Highlight(); } @@ -4535,7 +4535,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // dropdownonly always triggers the dropdown handler, over the whole button area // the drop down arrow should not trigger the item action - mpData->mbDropDownByKeyboard = FALSE; + mpData->mbDropDownByKeyboard = sal_False; GetDropdownClickHdl().Call( this ); // do not reset data if the dropdown handler opened a floating window @@ -4544,7 +4544,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) { // no floater was opened Deactivate(); - ImplDrawItem( mnCurPos, FALSE ); + ImplDrawItem( mnCurPos, sal_False ); mnCurPos = TOOLBOX_ITEM_NOTFOUND; mnCurItemId = 0; @@ -4594,9 +4594,9 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) if ( mnCurLine > 1 ) { StartTracking(); - mbUpper = TRUE; - mbIn = TRUE; - ImplDrawSpin( TRUE, FALSE ); + mbUpper = sal_True; + mbIn = sal_True; + ImplDrawSpin( sal_True, sal_False ); } return; } @@ -4605,25 +4605,25 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) if ( mnCurLine+mnVisLines-1 < mnCurLines ) { StartTracking(); - mbLower = TRUE; - mbIn = TRUE; - ImplDrawSpin( FALSE, TRUE ); + mbLower = sal_True; + mbIn = sal_True; + ImplDrawSpin( sal_False, sal_True ); } return; } if ( maNextToolRect.IsInside( aMousePos ) ) { StartTracking(); - mbNextTool = TRUE; - mbIn = TRUE; - ImplDrawNext( TRUE ); + mbNextTool = sal_True; + mbIn = sal_True; + ImplDrawNext( sal_True ); return; } // Linesizing testen if ( (mnWinStyle & TB_WBLINESIZING) == TB_WBLINESIZING ) { - USHORT nLineMode = ImplTestLineSize( this, aMousePos ); + sal_uInt16 nLineMode = ImplTestLineSize( this, aMousePos ); if ( nLineMode ) { ImplTBDragMgr* pMgr = ImplGetTBDragMgr(); @@ -4638,7 +4638,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // Dragging starten pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ), - nLineMode, FALSE ); + nLineMode, sal_False ); return; } } @@ -4667,7 +4667,7 @@ void ToolBox::MouseButtonUp( const MouseEvent& rMEvt ) pMgr->EndDragging(); return; } - mbCommandDrag = FALSE; + mbCommandDrag = sal_False; DockingWindow::MouseButtonUp( rMEvt ); } @@ -4698,9 +4698,9 @@ void ToolBox::Paint( const Rectangle& rPaintRect ) if( mpData->mbIsPaintLocked ) return; if ( rPaintRect == Rectangle( 0, 0, mnDX-1, mnDY-1 ) ) - mbFullPaint = TRUE; + mbFullPaint = sal_True; ImplFormat(); - mbFullPaint = FALSE; + mbFullPaint = sal_False; ImplDrawBackground( this, rPaintRect ); @@ -4717,28 +4717,28 @@ void ToolBox::Paint( const Rectangle& rPaintRect ) if ( mnWinStyle & WB_SCROLL ) { if ( mnCurLines > mnLines ) - ImplDrawSpin( FALSE, FALSE ); + ImplDrawSpin( sal_False, sal_False ); } // NextButton zeichnen - ImplDrawNext( FALSE ); + ImplDrawNext( sal_False ); // Buttons zeichnen - USHORT nHighPos; + sal_uInt16 nHighPos; if ( mnHighItemId ) nHighPos = GetItemPos( mnHighItemId ); else nHighPos = TOOLBOX_ITEM_NOTFOUND; - USHORT nCount = (USHORT)mpData->m_aItems.size(); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = (sal_uInt16)mpData->m_aItems.size(); + for( sal_uInt16 i = 0; i < nCount; i++ ) { ImplToolItem* pItem = &mpData->m_aItems[i]; // Nur malen, wenn Rechteck im PaintRectangle liegt if ( !pItem->maRect.IsEmpty() && rPaintRect.IsOver( pItem->maRect ) ) { - BOOL bHighlight = FALSE; + sal_Bool bHighlight = sal_False; if ( i == mnCurPos ) bHighlight = 1; else if ( i == nHighPos ) @@ -4781,9 +4781,9 @@ void ToolBox::Resize() { if ( !mbFormat ) { - mbFormat = TRUE; + mbFormat = sal_True; if( IsReallyVisible() ) - ImplFormat( TRUE ); + ImplFormat( sal_True ); } } @@ -4815,7 +4815,7 @@ void ToolBox::Resize() } // ----------------------------------------------------------------------- -const XubString& ToolBox::ImplGetHelpText( USHORT nItemId ) const +const XubString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -4843,7 +4843,7 @@ const XubString& ToolBox::ImplGetHelpText( USHORT nItemId ) const void ToolBox::RequestHelp( const HelpEvent& rHEvt ) { - USHORT nItemId; + sal_uInt16 nItemId; Point aHelpPos; if( !rHEvt.KeyboardActivated() ) @@ -4895,7 +4895,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt ) else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { String aCommand = GetItemCommand( nItemId ); - ULONG nHelpId = GetHelpId( nItemId ); + sal_uIntPtr nHelpId = GetHelpId( nItemId ); if ( aCommand.Len() || nHelpId ) { @@ -4944,20 +4944,20 @@ long ToolBox::Notify( NotifyEvent& rNEvt ) { KeyEvent aKEvt = *rNEvt.GetKeyEvent(); KeyCode aKeyCode = aKEvt.GetKeyCode(); - USHORT nKeyCode = aKeyCode.GetCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); switch( nKeyCode ) { case KEY_TAB: { // internal TAB cycling only if parent is not a dialog or if we are the ony child // otherwise the dialog control will take over - BOOL bNoTabCycling = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL && + sal_Bool bNoTabCycling = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL && ImplGetParent()->GetChildCount() != 1 ); if( bNoTabCycling && ! (GetStyle() & WB_FORCETABCYCLE) ) return DockingWindow::Notify( rNEvt ); - else if( ImplChangeHighlightUpDn( aKeyCode.IsShift() ? TRUE : FALSE , bNoTabCycling ) ) - return FALSE; + else if( ImplChangeHighlightUpDn( aKeyCode.IsShift() ? sal_True : sal_False , bNoTabCycling ) ) + return sal_False; else return DockingWindow::Notify( rNEvt ); } @@ -4978,9 +4978,9 @@ long ToolBox::Notify( NotifyEvent& rNEvt ) } else if( (GetGetFocusFlags() & (GETFOCUS_BACKWARD|GETFOCUS_TAB) ) == (GETFOCUS_BACKWARD|GETFOCUS_TAB)) // Shift-TAB was pressed in the parent - ImplChangeHighlightUpDn( FALSE ); + ImplChangeHighlightUpDn( sal_False ); else - ImplChangeHighlightUpDn( TRUE ); + ImplChangeHighlightUpDn( sal_True ); mnLastFocusItemId = 0; @@ -5045,7 +5045,7 @@ void ToolBox::Command( const CommandEvent& rCEvt ) // dann mache nichts if ( (it->meType == TOOLBOXITEM_BUTTON) && !it->mbShowWindow ) - mbCommandDrag = TRUE; + mbCommandDrag = sal_True; break; } @@ -5069,10 +5069,10 @@ void ToolBox::Command( const CommandEvent& rCEvt ) if ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) { if ( (mnCurLine > 1) && (pData->GetDelta() > 0) ) - ShowLine( FALSE ); + ShowLine( sal_False ); else if ( (mnCurLine+mnVisLines-1 < mnCurLines) && (pData->GetDelta() < 0) ) - ShowLine( TRUE ); - ImplDrawSpin( FALSE, FALSE ); + ShowLine( sal_True ); + ImplDrawSpin( sal_False, sal_False ); return; } } @@ -5099,19 +5099,19 @@ void ToolBox::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - mbCalc = TRUE; - mbFormat = TRUE; - ImplInitSettings( TRUE, FALSE, FALSE ); + mbCalc = sal_True; + mbFormat = sal_True; + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); // font, foreground, background + ImplInitSettings( sal_False, sal_False, sal_True ); // font, foreground, background Invalidate(); } } @@ -5128,16 +5128,16 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - mbCalc = TRUE; - mbFormat = TRUE; - ImplInitSettings( TRUE, TRUE, TRUE ); + mbCalc = sal_True; + mbFormat = sal_True; + ImplInitSettings( sal_True, sal_True, sal_True ); Invalidate(); } } // ----------------------------------------------------------------------- -BOOL ToolBox::PrepareToggleFloatingMode() +sal_Bool ToolBox::PrepareToggleFloatingMode() { return DockingWindow::PrepareToggleFloatingMode(); } @@ -5148,27 +5148,27 @@ void ToolBox::ToggleFloatingMode() { DockingWindow::ToggleFloatingMode(); - BOOL mbOldHorz = mbHorz; + sal_Bool mbOldHorz = mbHorz; if ( ImplIsFloatingMode() ) { - mbHorz = TRUE; + mbHorz = sal_True; meAlign = WINDOWALIGN_TOP; - mbScroll = TRUE; + mbScroll = sal_True; if( mbOldHorz != mbHorz ) - mbCalc = TRUE; // orientation was changed ! + mbCalc = sal_True; // orientation was changed ! ImplSetMinMaxFloatSize( this ); SetOutputSizePixel( ImplCalcFloatSize( this, mnFloatLines ) ); } else { - mbScroll = (mnWinStyle & WB_SCROLL) ? TRUE : FALSE; + mbScroll = (mnWinStyle & WB_SCROLL) ? sal_True : sal_False; if ( (meAlign == WINDOWALIGN_TOP) || (meAlign == WINDOWALIGN_BOTTOM) ) - mbHorz = TRUE; + mbHorz = sal_True; else - mbHorz = FALSE; + mbHorz = sal_False; // set focus back to document ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->GrabFocus(); @@ -5178,11 +5178,11 @@ void ToolBox::ToggleFloatingMode() { // if orientation changes, the toolbox has to be initialized again // to update the direction of the gradient - mbCalc = TRUE; - ImplInitSettings( TRUE, TRUE, TRUE ); + mbCalc = sal_True; + ImplInitSettings( sal_True, sal_True, sal_True ); } - mbFormat = TRUE; + mbFormat = sal_True; ImplFormat(); } @@ -5198,13 +5198,13 @@ void ToolBox::StartDocking() // ----------------------------------------------------------------------- -BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect ) +sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) { // Wenn Dragging, dann nicht machen, da vorher schon berechnet if ( mbDragging ) - return FALSE; + return sal_False; - BOOL bFloatMode = FALSE; + sal_Bool bFloatMode = sal_False; DockingWindow::Docking( rPos, rRect ); @@ -5217,7 +5217,7 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect ) // to get a floating mode as result - switch to floating size // so the calculation only depends on the position of the rectangle, not the current // docking state of the window - USHORT nTemp = 0; + sal_uInt16 nTemp = 0; aDockingRect.SetSize( ImplCalcFloatSize( this, nTemp ) ); // in this mode docking is never done by keyboard, so it's OK to use the mouse position @@ -5252,7 +5252,7 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect ) // FloatWindow werden Rectangle aIntersect = aInRect.GetIntersection( aDockingRect ); if ( aIntersect == aDockingRect ) - bFloatMode = TRUE; + bFloatMode = sal_True; else { // docking rectangle is in the "sensible area" @@ -5306,14 +5306,14 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect ) } } else - bFloatMode = TRUE; + bFloatMode = sal_True; if ( bFloatMode ) { meDockAlign = meAlign; if ( !mbLastFloatMode ) { - USHORT nTemp = 0; + sal_uInt16 nTemp = 0; aDockingRect.SetSize( ImplCalcFloatSize( this, nTemp ) ); } } @@ -5326,7 +5326,7 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect ) // ----------------------------------------------------------------------- -void ToolBox::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) +void ToolBox::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) { if ( !IsDockingCanceled() ) { @@ -5343,8 +5343,8 @@ void ToolBox::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) void ToolBox::Resizing( Size& rSize ) { - USHORT nCalcLines; - USHORT nTemp; + sal_uInt16 nCalcLines; + sal_uInt16 nTemp; // Alle Floatinggroessen berechnen ImplCalcFloatSizes( this ); @@ -5380,20 +5380,20 @@ void ToolBox::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -Size ToolBox::CalcWindowSizePixel( USHORT nCalcLines ) const +Size ToolBox::CalcWindowSizePixel( sal_uInt16 nCalcLines ) const { return ImplCalcSize( this, nCalcLines ); } -Size ToolBox::CalcWindowSizePixel( USHORT nCalcLines, WindowAlign eAlign ) const +Size ToolBox::CalcWindowSizePixel( sal_uInt16 nCalcLines, WindowAlign eAlign ) const { return ImplCalcSize( this, nCalcLines, (eAlign == WINDOWALIGN_TOP || eAlign == WINDOWALIGN_BOTTOM) ? TB_CALCMODE_HORZ : TB_CALCMODE_VERT ); } -USHORT ToolBox::ImplCountLineBreaks( const ToolBox *pThis ) +sal_uInt16 ToolBox::ImplCountLineBreaks( const ToolBox *pThis ) { - USHORT nLines = 0; + sal_uInt16 nLines = 0; std::vector< ImplToolItem >::const_iterator it = ((ToolBox*)pThis)->mpData->m_aItems.begin(); while ( it != ((ToolBox*)pThis)->mpData->m_aItems.end() ) @@ -5408,19 +5408,19 @@ USHORT ToolBox::ImplCountLineBreaks( const ToolBox *pThis ) Size ToolBox::CalcPopupWindowSizePixel() const { // count number of breaks and calc corresponding floating window size - USHORT nLines = ImplCountLineBreaks( this ); + sal_uInt16 nLines = ImplCountLineBreaks( this ); if( nLines ) nLines++; // add the first line else { // no breaks found: use quadratic layout - nLines = (USHORT) ceil( sqrt( (double) GetItemCount() ) ); + nLines = (sal_uInt16) ceil( sqrt( (double) GetItemCount() ) ); } - BOOL bPopup = mpData->mbAssumePopupMode; + sal_Bool bPopup = mpData->mbAssumePopupMode; ToolBox *pThis = (ToolBox*) this; - pThis->mpData->mbAssumePopupMode = TRUE; + pThis->mpData->mbAssumePopupMode = sal_True; Size aSize = CalcFloatingWindowSizePixel( nLines ); @@ -5430,24 +5430,24 @@ Size ToolBox::CalcPopupWindowSizePixel() const Size ToolBox::CalcFloatingWindowSizePixel() const { - USHORT nLines = ImplCountLineBreaks( this ); + sal_uInt16 nLines = ImplCountLineBreaks( this ); nLines++; // add the first line return CalcFloatingWindowSizePixel( nLines ); } -Size ToolBox::CalcFloatingWindowSizePixel( USHORT nCalcLines ) const +Size ToolBox::CalcFloatingWindowSizePixel( sal_uInt16 nCalcLines ) const { - BOOL bFloat = mpData->mbAssumeFloating; - BOOL bDocking = mpData->mbAssumeDocked; + sal_Bool bFloat = mpData->mbAssumeFloating; + sal_Bool bDocking = mpData->mbAssumeDocked; // simulate floating mode and force reformat before calculating ToolBox *pThis = (ToolBox*) this; - pThis->mpData->mbAssumeFloating = TRUE; - pThis->mpData->mbAssumeDocked = FALSE; + pThis->mpData->mbAssumeFloating = sal_True; + pThis->mpData->mbAssumeDocked = sal_False; Size aSize = ImplCalcFloatSize( (ToolBox*) this, nCalcLines ); - pThis->mbFormat = TRUE; + pThis->mbFormat = sal_True; pThis->mpData->mbAssumeFloating = bFloat; pThis->mpData->mbAssumeDocked = bDocking; @@ -5499,7 +5499,7 @@ Size ToolBox::CalcMinimumWindowSizePixel() const // ----------------------------------------------------------------------- -void ToolBox::EnableCustomize( BOOL bEnable ) +void ToolBox::EnableCustomize( sal_Bool bEnable ) { if ( bEnable != mbCustomize ) { @@ -5529,7 +5529,7 @@ void ToolBox::StartCustomize( const Rectangle& rRect, void* pData ) aMousePos = ScreenToOutputPixel( aPos ); Pointer aPtr; SetPointer( aPtr ); - pMgr->StartDragging( this, aMousePos, aRect, 0, FALSE, pData ); + pMgr->StartDragging( this, aMousePos, aRect, 0, sal_False, pData ); } // ----------------------------------------------------------------------- @@ -5550,7 +5550,7 @@ void ToolBox::EndCustomizeMode() // ----------------------------------------------------------------------- -BOOL ToolBox::IsCustomizeMode() +sal_Bool ToolBox::IsCustomizeMode() { ImplTBDragMgr* pMgr = ImplGetTBDragMgr(); return pMgr->IsCustomizeMode(); @@ -5567,7 +5567,7 @@ void ToolBox::GetFocus() void ToolBox::LoseFocus() { - ImplChangeHighlight( NULL, TRUE ); + ImplChangeHighlight( NULL, sal_True ); DockingWindow::LoseFocus(); } @@ -5575,10 +5575,10 @@ void ToolBox::LoseFocus() // ----------------------------------------------------------------------- // performs the action associated with an item, ie simulates clicking the item -void ToolBox::TriggerItem( USHORT nItemId, BOOL bShift, BOOL bCtrl ) +void ToolBox::TriggerItem( sal_uInt16 nItemId, sal_Bool bShift, sal_Bool bCtrl ) { mnHighItemId = nItemId; - USHORT nModifier = 0; + sal_uInt16 nModifier = 0; if( bShift ) nModifier |= KEY_SHIFT; if( bCtrl ) @@ -5590,24 +5590,24 @@ void ToolBox::TriggerItem( USHORT nItemId, BOOL bShift, BOOL bCtrl ) // ----------------------------------------------------------------------- // calls the button's action handler -// returns TRUE if action was called -BOOL ToolBox::ImplActivateItem( KeyCode aKeyCode ) +// returns sal_True if action was called +sal_Bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; if( mnHighItemId ) { ImplToolItem *pToolItem = ImplGetItem( mnHighItemId ); // #107712#, activate can also be called for disabled entries if( pToolItem && !pToolItem->mbEnabled ) - return TRUE; + return sal_True; if( pToolItem && pToolItem->mpWindow && HasFocus() ) { ImplHideFocus(); - mbChangingHighlight = TRUE; // avoid focus change due to loose focus + mbChangingHighlight = sal_True; // avoid focus change due to loose focus pToolItem->mpWindow->ImplControlFocus( GETFOCUS_TAB ); - mbChangingHighlight = FALSE; + mbChangingHighlight = sal_False; } else { @@ -5629,7 +5629,7 @@ BOOL ToolBox::ImplActivateItem( KeyCode aKeyCode ) } } mnMouseModifier = aKeyCode.GetModifier(); - mbIsKeyEvent = TRUE; + mbIsKeyEvent = sal_True; Activate(); Click(); @@ -5642,18 +5642,18 @@ BOOL ToolBox::ImplActivateItem( KeyCode aKeyCode ) ImplRemoveDel( &aDelData ); Deactivate(); - mbIsKeyEvent = FALSE; + mbIsKeyEvent = sal_False; mnMouseModifier = 0; } } else - bRet = FALSE; + bRet = sal_False; return bRet; } // ----------------------------------------------------------------------- -BOOL ImplCloseLastPopup( Window *pParent ) +sal_Bool ImplCloseLastPopup( Window *pParent ) { // close last popup toolbox (see also: // ImplHandleMouseFloatMode(...) in winproc.cxx ) @@ -5665,23 +5665,23 @@ BOOL ImplCloseLastPopup( Window *pParent ) if( pLastLevelFloat && pLastLevelFloat != pParent ) { pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } // opens a drop down toolbox item -// returns TRUE if item was opened -BOOL ToolBox::ImplOpenItem( KeyCode aKeyCode ) +// returns sal_True if item was opened +sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) { - USHORT nCode = aKeyCode.GetCode(); - BOOL bRet = TRUE; + sal_uInt16 nCode = aKeyCode.GetCode(); + sal_Bool bRet = sal_True; // arrow keys should work only in the opposite direction of alignment (to not break cursor travelling) if ( ((nCode == KEY_LEFT || nCode == KEY_RIGHT) && IsHorizontal()) || ((nCode == KEY_UP || nCode == KEY_DOWN) && !IsHorizontal()) ) - return FALSE; + return sal_False; if( IsMenuEnabled() && mpData->mbMenubuttonSelected ) { @@ -5701,19 +5701,19 @@ BOOL ToolBox::ImplOpenItem( KeyCode aKeyCode ) mnCurPos = GetItemPos( mnCurItemId ); mnLastFocusItemId = mnCurItemId; // save item id for possible later focus restore mnMouseModifier = aKeyCode.GetModifier(); - mbIsShift = TRUE; - mbIsKeyEvent = TRUE; + mbIsShift = sal_True; + mbIsKeyEvent = sal_True; Activate(); - mpData->mbDropDownByKeyboard = TRUE; + mpData->mbDropDownByKeyboard = sal_True; GetDropdownClickHdl().Call( this ); - mbIsKeyEvent = FALSE; - mbIsShift = FALSE; + mbIsKeyEvent = sal_False; + mbIsShift = sal_False; mnMouseModifier = 0; } else - bRet = FALSE; + bRet = sal_False; return bRet; } @@ -5724,10 +5724,10 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); mnKeyModifier = aKeyCode.GetModifier(); - USHORT nCode = aKeyCode.GetCode(); - BOOL bParentIsDialog = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL ); - BOOL bForwardKey = FALSE; - BOOL bGrabFocusToDocument = FALSE; + sal_uInt16 nCode = aKeyCode.GetCode(); + sal_Bool bParentIsDialog = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL ); + sal_Bool bForwardKey = sal_False; + sal_Bool bGrabFocusToDocument = sal_False; // #107776# we might be destroyed in the keyhandler ImplDelData aDelData; @@ -5741,7 +5741,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( !IsHorizontal() ) - ImplChangeHighlightUpDn( TRUE ); + ImplChangeHighlightUpDn( sal_True ); else ImplOpenItem( aKeyCode ); } @@ -5751,7 +5751,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( IsHorizontal() ) - ImplChangeHighlightUpDn( TRUE ); + ImplChangeHighlightUpDn( sal_True ); else ImplOpenItem( aKeyCode ); } @@ -5761,7 +5761,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( !IsHorizontal() ) - ImplChangeHighlightUpDn( FALSE ); + ImplChangeHighlightUpDn( sal_False ); else ImplOpenItem( aKeyCode ); } @@ -5771,7 +5771,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( IsHorizontal() ) - ImplChangeHighlightUpDn( FALSE ); + ImplChangeHighlightUpDn( sal_False ); else ImplOpenItem( aKeyCode ); } @@ -5783,9 +5783,9 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = mnCurLine - mnVisLines; else mnCurLine = 1; - mbFormat = TRUE; + mbFormat = sal_True; ImplFormat(); - ImplDrawSpin( FALSE, FALSE ); + ImplDrawSpin( sal_False, sal_False ); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; @@ -5796,22 +5796,22 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = mnCurLine + mnVisLines; else mnCurLine = mnCurLines; - mbFormat = TRUE; + mbFormat = sal_True; ImplFormat(); - ImplDrawSpin( FALSE, FALSE ); + ImplDrawSpin( sal_False, sal_False ); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; case KEY_END: { ImplChangeHighlight( NULL ); - ImplChangeHighlightUpDn( FALSE ); + ImplChangeHighlightUpDn( sal_False ); } break; case KEY_HOME: { ImplChangeHighlight( NULL ); - ImplChangeHighlightUpDn( TRUE ); + ImplChangeHighlightUpDn( sal_True ); } break; case KEY_ESCAPE: @@ -5844,7 +5844,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( !pItem->mbEnabled ) { Sound::Beep( SOUND_DISABLE, this ); - bGrabFocusToDocument = TRUE; + bGrabFocusToDocument = sal_True; } } if( !bGrabFocusToDocument ) @@ -5853,7 +5853,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) break; default: { - USHORT aKeyGroup = aKeyCode.GetGroup(); + sal_uInt16 aKeyGroup = aKeyCode.GetGroup(); ImplToolItem *pItem = NULL; if( mnHighItemId ) pItem = ImplGetItem( mnHighItemId ); @@ -5862,9 +5862,9 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) { Window *pFocusWindow = Application::GetFocusWindow(); ImplHideFocus(); - mbChangingHighlight = TRUE; // avoid focus change due to loose focus + mbChangingHighlight = sal_True; // avoid focus change due to loose focus pItem->mpWindow->ImplControlFocus( GETFOCUS_TAB ); - mbChangingHighlight = FALSE; + mbChangingHighlight = sal_False; if( pFocusWindow != Application::GetFocusWindow() ) Application::GetFocusWindow()->KeyInput( rKEvt ); } @@ -5874,7 +5874,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) // while the toolbox has the focus // just forward function and special keys and combinations with Alt-key if( aKeyGroup == KEYGROUP_FKEYS || aKeyGroup == KEYGROUP_MISC || aKeyCode.IsMod2() ) - bForwardKey = TRUE; + bForwardKey = sal_True; } } } @@ -5886,7 +5886,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) // #107251# move focus away if this toolbox was disabled during keyinput if( HasFocus() && mpData->mbKeyInputDisabled && (ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL) { - USHORT n = 0; + sal_uInt16 n = 0; Window *pFocusControl = ImplGetParent()->ImplGetDlgWindow( n, DLGWINDOW_FIRST ); if ( pFocusControl && pFocusControl != this ) pFocusControl->ImplControlFocus( GETFOCUS_INIT ); @@ -5908,10 +5908,10 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) // ----------------------------------------------------------------------- // returns the current toolbox line of the item -USHORT ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem ) +sal_uInt16 ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem ) { std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); - USHORT nLine = 1; + sal_uInt16 nLine = 1; while( it != mpData->m_aItems.end() ) { if ( it->mbBreak ) @@ -5924,7 +5924,7 @@ USHORT ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem ) } // returns the first displayable item in the given line -ImplToolItem* ToolBox::ImplGetFirstValidItem( USHORT nLine ) +ImplToolItem* ToolBox::ImplGetFirstValidItem( sal_uInt16 nLine ) { if( !nLine || nLine > mnCurLines ) return NULL; @@ -5956,7 +5956,7 @@ ImplToolItem* ToolBox::ImplGetFirstValidItem( USHORT nLine ) } // returns the last displayable item in the given line -ImplToolItem* ToolBox::ImplGetLastValidItem( USHORT nLine ) +ImplToolItem* ToolBox::ImplGetLastValidItem( sal_uInt16 nLine ) { if( !nLine || nLine > mnCurLines ) return NULL; @@ -5990,11 +5990,11 @@ ImplToolItem* ToolBox::ImplGetLastValidItem( USHORT nLine ) // ----------------------------------------------------------------------- -USHORT ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList ) +sal_uInt16 ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList ) { if( pItem ) { - USHORT nPos; + sal_uInt16 nPos; for( nPos = 0; nPos < rList.size(); nPos++ ) if( &rList[ nPos ] == pItem ) return nPos; @@ -6002,34 +6002,34 @@ USHORT ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< I return TOOLBOX_ITEM_NOTFOUND; } -void ToolBox::ChangeHighlight( USHORT nPos ) +void ToolBox::ChangeHighlight( sal_uInt16 nPos ) { if ( nPos < GetItemCount() ) { ImplGrabFocus( 0 ); - ImplChangeHighlight ( ImplGetItem ( GetItemId ( (USHORT) nPos ) ), FALSE ); + ImplChangeHighlight ( ImplGetItem ( GetItemId ( (sal_uInt16) nPos ) ), sal_False ); } } -void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus ) +void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus ) { // avoid recursion due to focus change if( mbChangingHighlight ) return; - mbChangingHighlight = TRUE; + mbChangingHighlight = sal_True; ImplToolItem* pOldItem = NULL; if ( mnHighItemId ) { ImplHideFocus(); - USHORT nPos = GetItemPos( mnHighItemId ); + sal_uInt16 nPos = GetItemPos( mnHighItemId ); pOldItem = ImplGetItem( mnHighItemId ); // #i89962# ImplDrawItem can cause Invalidate/Update // which will in turn ImplShowFocus again // set mnHighItemId to 0 already to prevent this hen/egg problem mnHighItemId = 0; - ImplDrawItem( nPos, FALSE ); + ImplDrawItem( nPos, sal_False ); ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nPos ) ); } @@ -6041,21 +6041,21 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus ) if( pItem ) { - USHORT aPos = ToolBox::ImplFindItemPos( pItem, mpData->m_aItems ); + sal_uInt16 aPos = ToolBox::ImplFindItemPos( pItem, mpData->m_aItems ); if( aPos != TOOLBOX_ITEM_NOTFOUND) { // check for line breaks - USHORT nLine = ImplGetItemLine( pItem ); + sal_uInt16 nLine = ImplGetItemLine( pItem ); if( nLine >= mnCurLine + mnVisLines ) { mnCurLine = nLine - mnVisLines + 1; - mbFormat = TRUE; + mbFormat = sal_True; } else if ( nLine < mnCurLine ) { mnCurLine = nLine; - mbFormat = TRUE; + mbFormat = sal_True; } if( mbFormat ) @@ -6080,23 +6080,23 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus ) mnCurPos = TOOLBOX_ITEM_NOTFOUND; } - mbChangingHighlight = FALSE; + mbChangingHighlight = sal_False; } // ----------------------------------------------------------------------- // check for keyboard accessible items -static BOOL ImplIsValidItem( const ImplToolItem* pItem, BOOL bNotClipped ) +static sal_Bool ImplIsValidItem( const ImplToolItem* pItem, sal_Bool bNotClipped ) { - BOOL bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem )); + sal_Bool bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem )); if( bValid && bNotClipped && pItem->IsClipped() ) - bValid = FALSE; + bValid = sal_False; return bValid; } // ----------------------------------------------------------------------- -BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) +sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) { ImplToolItem* pToolItem = ImplGetItem( mnHighItemId ); @@ -6113,13 +6113,13 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) while( it != mpData->m_aItems.begin() ) { --it; - if ( ImplIsValidItem( &(*it), TRUE ) ) + if ( ImplIsValidItem( &(*it), sal_True ) ) { pItem = &(*it); break; } } - ImplDrawMenubutton( this, FALSE ); + ImplDrawMenubutton( this, sal_False ); ImplChangeHighlight( pItem ); } else @@ -6128,17 +6128,17 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { - if ( ImplIsValidItem( &(*it), TRUE ) ) + if ( ImplIsValidItem( &(*it), sal_True ) ) break; ++it; } if( it != mpData->m_aItems.end() ) { - ImplDrawMenubutton( this, FALSE ); + ImplDrawMenubutton( this, sal_False ); ImplChangeHighlight( &(*it) ); } } - return TRUE; + return sal_True; } if( bUp ) @@ -6147,7 +6147,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { - if ( ImplIsValidItem( &(*it), FALSE ) ) + if ( ImplIsValidItem( &(*it), sal_False ) ) break; ++it; } @@ -6156,11 +6156,11 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) if( (it != mpData->m_aItems.end() && &(*it) == ImplGetFirstClippedItem( this )) && IsMenuEnabled() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, TRUE ); + ImplDrawMenubutton( this, sal_True ); } else ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : NULL ); - return TRUE; + return sal_True; } else { @@ -6170,7 +6170,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, TRUE ); + ImplDrawMenubutton( this, sal_True ); } else { @@ -6179,7 +6179,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) while( it != mpData->m_aItems.begin() ) { --it; - if ( ImplIsValidItem( &(*it), FALSE ) ) + if ( ImplIsValidItem( &(*it), sal_False ) ) { pItem = &(*it); break; @@ -6187,16 +6187,16 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) } ImplChangeHighlight( pItem ); } - return TRUE; + return sal_True; } } if( pToolItem ) { - ULONG pos = ToolBox::ImplFindItemPos( pToolItem, mpData->m_aItems ); - ULONG nCount = mpData->m_aItems.size(); + sal_uIntPtr pos = ToolBox::ImplFindItemPos( pToolItem, mpData->m_aItems ); + sal_uIntPtr nCount = mpData->m_aItems.size(); - ULONG i=0; + sal_uIntPtr i=0; do { if( bUp ) @@ -6204,14 +6204,14 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) if( !pos-- ) { if( bNoCycle ) - return FALSE; + return sal_False; // highlight the menu button if it is the last item if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, TRUE ); - return TRUE; + ImplDrawMenubutton( this, sal_True ); + return sal_True; } else pos = nCount-1; @@ -6222,14 +6222,14 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) if( ++pos >= nCount ) { if( bNoCycle ) - return FALSE; + return sal_False; // highlight the menu button if it is the last item if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, TRUE ); - return TRUE; + ImplDrawMenubutton( this, sal_True ); + return sal_True; } else pos = 0; @@ -6238,7 +6238,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) pToolItem = &mpData->m_aItems[pos]; - if ( ImplIsValidItem( pToolItem, FALSE ) ) + if ( ImplIsValidItem( pToolItem, sal_False ) ) break; } while( ++i < nCount); @@ -6247,14 +6247,14 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle ) { // select the menu button if a clipped item would be selected ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, TRUE ); + ImplDrawMenubutton( this, sal_True ); } else if( i != nCount ) ImplChangeHighlight( pToolItem ); else - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -6267,7 +6267,7 @@ void ToolBox::ImplShowFocus() if( pItem->mpWindow ) { Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow; - pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = TRUE; + pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = sal_True; pWin->Invalidate( 0 ); } } @@ -6283,7 +6283,7 @@ void ToolBox::ImplHideFocus() if( pItem->mpWindow ) { Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow; - pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = FALSE; + pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = sal_False; pWin->Invalidate( 0 ); } } @@ -6291,7 +6291,7 @@ void ToolBox::ImplHideFocus() if ( mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, FALSE ); + ImplDrawMenubutton( this, sal_False ); } } @@ -6311,7 +6311,7 @@ void ToolBox::ImplDisableFlatButtons() &hkey) ) { DWORD dwType = 0; - WIN_BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD + BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD DWORD cbData = sizeof(Data); if( ERROR_SUCCESS == RegQueryValueEx(hkey, "DisableFlatToolboxButtons", diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 334cdd2d0a64..3852586bdb90 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -73,17 +73,17 @@ ImplToolBoxPrivateData::ImplToolBoxPrivateData() : mnMenuButtonWidth = TB_MENUBUTTON_SIZE; - mbIsLocked = FALSE; - mbNativeButtons = FALSE; - mbIsPaintLocked = FALSE; - mbAssumeDocked = FALSE; - mbAssumePopupMode = FALSE; - mbAssumeFloating = FALSE; - mbKeyInputDisabled = FALSE; - mbMenubuttonSelected = FALSE; - mbPageScroll = FALSE; - mbWillUsePopupMode = FALSE; - mbDropDownByKeyboard = FALSE; + mbIsLocked = sal_False; + mbNativeButtons = sal_False; + mbIsPaintLocked = sal_False; + mbAssumeDocked = sal_False; + mbAssumePopupMode = sal_False; + mbAssumeFloating = sal_False; + mbKeyInputDisabled = sal_False; + mbMenubuttonSelected = sal_False; + mbPageScroll = sal_False; + mbWillUsePopupMode = sal_False; + mbDropDownByKeyboard = sal_False; } ImplToolBoxPrivateData::~ImplToolBoxPrivateData() @@ -103,21 +103,21 @@ ImplToolItem::ImplToolItem() meType = TOOLBOXITEM_BUTTON; mnBits = 0; meState = STATE_NOCHECK; - mbEnabled = TRUE; - mbVisible = TRUE; - mbEmptyBtn = TRUE; - mbShowWindow = FALSE; - mbBreak = FALSE; + mbEnabled = sal_True; + mbVisible = sal_True; + mbEmptyBtn = sal_True; + mbShowWindow = sal_False; + mbBreak = sal_False; mnSepSize = TB_SEP_SIZE; mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH; mnImageAngle = 0; - mbMirrorMode = FALSE; - mbVisibleText = FALSE; + mbMirrorMode = sal_False; + mbVisibleText = sal_False; } // ----------------------------------------------------------------------- -ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage, +ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nItemBits ) : maImage( rImage ) { @@ -128,11 +128,11 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage, meType = TOOLBOXITEM_BUTTON; mnBits = nItemBits; meState = STATE_NOCHECK; - mbEnabled = TRUE; - mbVisible = TRUE; - mbEmptyBtn = FALSE; - mbShowWindow = FALSE; - mbBreak = FALSE; + mbEnabled = sal_True; + mbVisible = sal_True; + mbEmptyBtn = sal_False; + mbShowWindow = sal_False; + mbBreak = sal_False; mnSepSize = TB_SEP_SIZE; mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH; mnImageAngle = 0; @@ -142,7 +142,7 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage, // ----------------------------------------------------------------------- -ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText, +ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const XubString& rText, ToolBoxItemBits nItemBits ) : maText( rText ) { @@ -153,11 +153,11 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText, meType = TOOLBOXITEM_BUTTON; mnBits = nItemBits; meState = STATE_NOCHECK; - mbEnabled = TRUE; - mbVisible = TRUE; - mbEmptyBtn = FALSE; - mbShowWindow = FALSE; - mbBreak = FALSE; + mbEnabled = sal_True; + mbVisible = sal_True; + mbEmptyBtn = sal_False; + mbShowWindow = sal_False; + mbBreak = sal_False; mnSepSize = TB_SEP_SIZE; mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH; mnImageAngle = 0; @@ -167,7 +167,7 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText, // ----------------------------------------------------------------------- -ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage, +ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, const XubString& rText, ToolBoxItemBits nItemBits ) : maImage( rImage ), maText( rText ) @@ -179,11 +179,11 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage, meType = TOOLBOXITEM_BUTTON; mnBits = nItemBits; meState = STATE_NOCHECK; - mbEnabled = TRUE; - mbVisible = TRUE; - mbEmptyBtn = FALSE; - mbShowWindow = FALSE; - mbBreak = FALSE; + mbEnabled = sal_True; + mbVisible = sal_True; + mbEmptyBtn = sal_False; + mbShowWindow = sal_False; + mbBreak = sal_False; mnSepSize = TB_SEP_SIZE; mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH; mnImageAngle = 0; @@ -264,7 +264,7 @@ ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) // ----------------------------------------------------------------------- -Size ImplToolItem::GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) +Size ImplToolItem::GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) { Size aSize( rDefaultSize ); // the size of 'standard' toolbox items // non-standard items are eg windows or buttons with text @@ -276,13 +276,13 @@ Size ImplToolItem::GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, cons if ( mpWindow && bHorz ) { // get size of item window and check if it fits - // no windows in vertical toolbars (the default is mbShowWindow=FALSE) + // no windows in vertical toolbars (the default is mbShowWindow=sal_False) Size aWinSize = mpWindow->GetSizePixel(); if ( !bCheckMaxWidth || (aWinSize.Width() <= maxWidth) ) { aSize.Width() = aWinSize.Width(); aSize.Height() = aWinSize.Height(); - mbShowWindow = TRUE; + mbShowWindow = sal_True; } else { @@ -318,27 +318,27 @@ Size ImplToolItem::GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, cons // ----------------------------------------------------------------------- -void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbImage, BOOL& rbText ) const +void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& rbImage, sal_Bool& rbText ) const { if ( meType != TOOLBOXITEM_BUTTON ) { // no button -> draw nothing - rbImage = rbText = FALSE; + rbImage = rbText = sal_False; return; } - BOOL bHasImage; - BOOL bHasText; + sal_Bool bHasImage; + sal_Bool bHasText; // check for image and/or text if ( !(maImage) ) - bHasImage = FALSE; + bHasImage = sal_False; else - bHasImage = TRUE; + bHasImage = sal_True; if ( !maText.Len() ) - bHasText = FALSE; + bHasText = sal_False; else - bHasText = TRUE; + bHasText = sal_True; // prefer images if symbolonly buttons are drawn // prefer texts if textonly buttons are dreawn @@ -347,38 +347,38 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbIma { if( bHasImage || !bHasText ) { - rbImage = TRUE; - rbText = FALSE; + rbImage = sal_True; + rbText = sal_False; } else { - rbImage = FALSE; - rbText = TRUE; + rbImage = sal_False; + rbText = sal_True; } } else if ( eButtonType == BUTTON_TEXT ) // drawing text only { if( bHasText || !bHasImage ) { - rbImage = FALSE; - rbText = TRUE; + rbImage = sal_False; + rbText = sal_True; } else { - rbImage = TRUE; - rbText = FALSE; + rbImage = sal_True; + rbText = sal_False; } } else // drawing icons and text both { - rbImage = TRUE; - rbText = TRUE; + rbImage = sal_True; + rbText = sal_True; } } // ----------------------------------------------------------------------- -Rectangle ImplToolItem::GetDropDownRect( BOOL bHorz ) const +Rectangle ImplToolItem::GetDropDownRect( sal_Bool bHorz ) const { Rectangle aRect; if( (mnBits & TIB_DROPDOWN) && !maRect.IsEmpty() ) @@ -396,7 +396,7 @@ Rectangle ImplToolItem::GetDropDownRect( BOOL bHorz ) const // ----------------------------------------------------------------------- -BOOL ImplToolItem::IsClipped() const +sal_Bool ImplToolItem::IsClipped() const { return ( meType == TOOLBOXITEM_BUTTON && mbVisible && maRect.IsEmpty() ); } @@ -415,16 +415,16 @@ const XubString& ToolBox::ImplConvertMenuString( const XubString& rStr ) // ----------------------------------------------------------------------- -void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint ) +void ToolBox::ImplInvalidate( sal_Bool bNewCalc, sal_Bool bFullPaint ) { ImplUpdateInputEnable(); if ( bNewCalc ) - mbCalc = TRUE; + mbCalc = sal_True; if ( bFullPaint ) { - mbFormat = TRUE; + mbFormat = sal_True; // Muss ueberhaupt eine neue Ausgabe erfolgen if ( IsReallyVisible() && IsUpdateMode() ) @@ -438,7 +438,7 @@ void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint ) { if ( !mbFormat ) { - mbFormat = TRUE; + mbFormat = sal_True; // Muss ueberhaupt eine neue Ausgabe erfolgen if ( IsReallyVisible() && IsUpdateMode() ) @@ -452,7 +452,7 @@ void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint ) // ----------------------------------------------------------------------- -void ToolBox::ImplUpdateItem( USHORT nIndex ) +void ToolBox::ImplUpdateItem( sal_uInt16 nIndex ) { // Muss ueberhaupt eine neue Ausgabe erfolgen if ( IsReallyVisible() && IsUpdateMode() ) @@ -512,7 +512,7 @@ void ToolBox::Deactivate() if ( mbHideStatusText ) { GetpApp()->HideHelpStatusText(); - mbHideStatusText = FALSE; + mbHideStatusText = sal_False; } } @@ -527,7 +527,7 @@ void ToolBox::Highlight() if ( aStr.Len() || mbHideStatusText ) { GetpApp()->ShowHelpStatusText( aStr ); - mbHideStatusText = TRUE; + mbHideStatusText = sal_True; } } @@ -572,10 +572,10 @@ void ToolBox::UserDraw( const UserDrawEvent& ) // ----------------------------------------------------------------------- -void ToolBox::InsertItem( const ResId& rResId, USHORT nPos ) +void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) { - ULONG nObjMask; - BOOL bImage = FALSE; // Wurde Image gesetzt + sal_uIntPtr nObjMask; + sal_Bool bImage = sal_False; // Wurde Image gesetzt // Item anlegen ImplToolItem aItem; @@ -584,7 +584,7 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos ) nObjMask = ReadLongRes(); if ( nObjMask & RSC_TOOLBOXITEM_ID ) - aItem.mnId = sal::static_int_cast<USHORT>(ReadLongRes()); + aItem.mnId = sal::static_int_cast<sal_uInt16>(ReadLongRes()); else aItem.mnId = 1; @@ -610,22 +610,22 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos ) Bitmap aBmp = Bitmap( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); aItem.maImage = Image( aBmp, IMAGE_STDBTN_COLOR ); - bImage = TRUE; + bImage = sal_True; } if ( nObjMask & RSC_TOOLBOXITEM_IMAGE ) { aItem.maImage = Image( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); - bImage = TRUE; + bImage = sal_True; } if ( nObjMask & RSC_TOOLBOXITEM_DISABLE ) - aItem.mbEnabled = !(BOOL)ReadShortRes(); + aItem.mbEnabled = !(sal_Bool)ReadShortRes(); if ( nObjMask & RSC_TOOLBOXITEM_STATE ) aItem.meState = (TriState)ReadLongRes(); if ( nObjMask & RSC_TOOLBOXITEM_HIDE ) - aItem.mbVisible = !((BOOL)ReadShortRes()); + aItem.mbVisible = !((sal_Bool)ReadShortRes()); if ( nObjMask & RSC_TOOLBOXITEM_COMMAND ) aItem.maCommandStr = ReadStringRes(); @@ -636,15 +636,15 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos ) aItem.maImage = maImageList.GetImage( aItem.mnId ); // Wenn es sich um ein ButtonItem handelt, die ID ueberpruefen - BOOL bNewCalc; + sal_Bool bNewCalc; if ( aItem.meType != TOOLBOXITEM_BUTTON ) { - bNewCalc = FALSE; + bNewCalc = sal_False; aItem.mnId = 0; } else { - bNewCalc = TRUE; + bNewCalc = sal_True; DBG_ASSERT( aItem.mnId, "ToolBox::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( aItem.mnId ) == TOOLBOX_ITEM_NOTFOUND, @@ -659,14 +659,14 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos ) ImplInvalidate( bNewCalc ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::InsertItem( USHORT nItemId, const Image& rImage, - ToolBoxItemBits nBits, USHORT nPos ) +void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, + ToolBoxItemBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "ToolBox::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, @@ -676,18 +676,18 @@ void ToolBox::InsertItem( USHORT nItemId, const Image& rImage, mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, nBits ) ); mpData->ImplClearLayoutData(); - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >(nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::InsertItem( USHORT nItemId, const Image& rImage, +void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, const XubString& rText, - ToolBoxItemBits nBits, USHORT nPos ) + ToolBoxItemBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "ToolBox::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, @@ -697,17 +697,17 @@ void ToolBox::InsertItem( USHORT nItemId, const Image& rImage, mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, ImplConvertMenuString( rText ), nBits ) ); mpData->ImplClearLayoutData(); - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::InsertItem( USHORT nItemId, const XubString& rText, - ToolBoxItemBits nBits, USHORT nPos ) +void ToolBox::InsertItem( sal_uInt16 nItemId, const XubString& rText, + ToolBoxItemBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "ToolBox::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, @@ -717,17 +717,17 @@ void ToolBox::InsertItem( USHORT nItemId, const XubString& rText, mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, ImplConvertMenuString( rText ), nBits ) ); mpData->ImplClearLayoutData(); - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::InsertWindow( USHORT nItemId, Window* pWindow, - ToolBoxItemBits nBits, USHORT nPos ) +void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow, + ToolBoxItemBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "ToolBox::InsertWindow(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, @@ -745,80 +745,80 @@ void ToolBox::InsertWindow( USHORT nItemId, Window* pWindow, if ( pWindow ) pWindow->Hide(); - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::InsertSpace( USHORT nPos ) +void ToolBox::InsertSpace( sal_uInt16 nPos ) { // Item anlegen und in die Liste einfuegen ImplToolItem aItem; aItem.meType = TOOLBOXITEM_SPACE; - aItem.mbEnabled = FALSE; + aItem.mbEnabled = sal_False; mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( FALSE ); + ImplInvalidate( sal_False ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::InsertSeparator( USHORT nPos, USHORT nPixSize ) +void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize ) { // Item anlegen und in die Liste einfuegen ImplToolItem aItem; aItem.meType = TOOLBOXITEM_SEPARATOR; - aItem.mbEnabled = FALSE; + aItem.mbEnabled = sal_False; if ( nPixSize ) aItem.mnSepSize = nPixSize; mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( FALSE ); + ImplInvalidate( sal_False ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::InsertBreak( USHORT nPos ) +void ToolBox::InsertBreak( sal_uInt16 nPos ) { // Item anlegen und in die Liste einfuegen ImplToolItem aItem; aItem.meType = TOOLBOXITEM_BREAK; - aItem.mbEnabled = FALSE; + aItem.mbEnabled = sal_False; mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( FALSE ); + ImplInvalidate( sal_False ); // Notify - USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); + sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } // ----------------------------------------------------------------------- -void ToolBox::RemoveItem( USHORT nPos ) +void ToolBox::RemoveItem( sal_uInt16 nPos ) { if( nPos < mpData->m_aItems.size() ) { - BOOL bMustCalc; + sal_Bool bMustCalc; if ( mpData->m_aItems[nPos].meType == TOOLBOXITEM_BUTTON ) - bMustCalc = TRUE; + bMustCalc = sal_True; else - bMustCalc = FALSE; + bMustCalc = sal_False; if ( mpData->m_aItems[nPos].mpWindow ) mpData->m_aItems[nPos].mpWindow->Hide(); @@ -844,9 +844,9 @@ void ToolBox::RemoveItem( USHORT nPos ) // ----------------------------------------------------------------------- -void ToolBox::MoveItem( USHORT nItemId, USHORT nNewPos ) +void ToolBox::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos == nNewPos ) return; @@ -864,14 +864,14 @@ void ToolBox::MoveItem( USHORT nItemId, USHORT nNewPos ) mpData->ImplClearLayoutData(); // ToolBox neu ausgeben - ImplInvalidate( FALSE ); + ImplInvalidate( sal_False ); // Notify if( nPos < nNewPos ) // only send one event, all indices above this item are invalid anyway ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMREMOVED, reinterpret_cast< void* >( nPos ) ); else { - USHORT nNewPos2 = sal::static_int_cast<USHORT>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos); + sal_uInt16 nNewPos2 = sal::static_int_cast<sal_uInt16>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos2 ) ); } } @@ -879,13 +879,13 @@ void ToolBox::MoveItem( USHORT nItemId, USHORT nNewPos ) // ----------------------------------------------------------------------- -void ToolBox::CopyItem( const ToolBox& rToolBox, USHORT nItemId, - USHORT nNewPos ) +void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId, + sal_uInt16 nNewPos ) { DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, "ToolBox::CopyItem(): ItemId already exists" ); - USHORT nPos = rToolBox.GetItemPos( nItemId ); + sal_uInt16 nPos = rToolBox.GetItemPos( nItemId ); // Existiert Item if ( nPos != TOOLBOX_ITEM_NOTFOUND ) @@ -894,15 +894,15 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, USHORT nItemId, ImplToolItem aNewItem = rToolBox.mpData->m_aItems[nPos]; // Bestimme Daten zuruecksetzen aNewItem.mpWindow = NULL; - aNewItem.mbShowWindow = FALSE; + aNewItem.mbShowWindow = sal_False; mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem ); mpData->ImplClearLayoutData(); // ToolBox neu ausgeben - ImplInvalidate( FALSE ); + ImplInvalidate( sal_False ); // Notify - USHORT nNewPos2 = sal::static_int_cast<USHORT>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos); + sal_uInt16 nNewPos2 = sal::static_int_cast<sal_uInt16>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos2 ) ); } } @@ -921,10 +921,10 @@ void ToolBox::CopyItems( const ToolBox& rToolBox ) it != mpData->m_aItems.end(); ++it ) { it->mpWindow = NULL; - it->mbShowWindow = FALSE; + it->mbShowWindow = sal_False; } - ImplInvalidate( TRUE, TRUE ); + ImplInvalidate( sal_True, sal_True ); // Notify ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED ); @@ -941,7 +941,7 @@ void ToolBox::Clear() mnCurItemId = 0; mnHighItemId = 0; - ImplInvalidate( TRUE, TRUE ); + ImplInvalidate( sal_True, sal_True ); // Notify ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED ); @@ -957,7 +957,7 @@ void ToolBox::SetButtonType( ButtonType eNewType ) // Hier besser alles neu ausgeben, da es ansonsten zu Problemen // mit den per CopyBits kopierten Bereichen geben kann - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); } } @@ -968,8 +968,8 @@ void ToolBox::SetToolboxButtonSize( ToolBoxButtonSize eSize ) if( mpData->meButtonSize != eSize ) { mpData->meButtonSize = eSize; - mbCalc = TRUE; - mbFormat = TRUE; + mbCalc = sal_True; + mbFormat = sal_True; } } @@ -984,10 +984,10 @@ const Size& ToolBox::GetDefaultImageSize() const { static Size aSmallButtonSize( TB_SMALLIMAGESIZE, TB_SMALLIMAGESIZE ); - static ULONG s_nSymbolsStyle = STYLE_SYMBOLS_DEFAULT; + static sal_uIntPtr s_nSymbolsStyle = STYLE_SYMBOLS_DEFAULT; static Size aLargeButtonSize( TB_LARGEIMAGESIZE, TB_LARGEIMAGESIZE ); - ULONG nSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyle(); + sal_uIntPtr nSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyle(); if ( s_nSymbolsStyle != nSymbolsStyle ) { s_nSymbolsStyle = nSymbolsStyle; @@ -1022,13 +1022,13 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) { // Setzen, ob Items horizontal oder vertikal angeordnet werden sollen if ( (eNewAlign == WINDOWALIGN_LEFT) || (eNewAlign == WINDOWALIGN_RIGHT) ) - mbHorz = FALSE; + mbHorz = sal_False; else - mbHorz = TRUE; + mbHorz = sal_True; // Hier alles neu ausgeben, da sich Border auch aendert - mbCalc = TRUE; - mbFormat = TRUE; + mbCalc = sal_True; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -1037,7 +1037,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) // ----------------------------------------------------------------------- -void ToolBox::SetLineCount( USHORT nNewLines ) +void ToolBox::SetLineCount( sal_uInt16 nNewLines ) { if ( !nNewLines ) nNewLines = 1; @@ -1048,18 +1048,18 @@ void ToolBox::SetLineCount( USHORT nNewLines ) // Hier besser alles neu ausgeben, da es ansonsten zu Problemen // mit den per CopyBits kopierten Bereichen geben kann - ImplInvalidate( FALSE ); + ImplInvalidate( sal_False ); } } // ----------------------------------------------------------------------- -void ToolBox::SetPageScroll( BOOL b ) +void ToolBox::SetPageScroll( sal_Bool b ) { mpData->mbPageScroll = b; } -BOOL ToolBox::GetPageScroll() +sal_Bool ToolBox::GetPageScroll() { return mpData->mbPageScroll; } @@ -1068,45 +1068,45 @@ BOOL ToolBox::GetPageScroll() void ToolBox::SetNextToolBox( const XubString& rStr ) { - BOOL bCalcNew = (!maNextToolBoxStr.Len() != !rStr.Len()); + sal_Bool bCalcNew = (!maNextToolBoxStr.Len() != !rStr.Len()); maNextToolBoxStr = rStr; if ( bCalcNew ) - ImplInvalidate( TRUE, FALSE ); + ImplInvalidate( sal_True, sal_False ); } // ----------------------------------------------------------------------- -USHORT ToolBox::GetItemCount() const +sal_uInt16 ToolBox::GetItemCount() const { - return (USHORT)mpData->m_aItems.size(); + return (sal_uInt16)mpData->m_aItems.size(); } // ----------------------------------------------------------------------- -ToolBoxItemType ToolBox::GetItemType( USHORT nPos ) const +ToolBoxItemType ToolBox::GetItemType( sal_uInt16 nPos ) const { return (nPos < mpData->m_aItems.size()) ? mpData->m_aItems[nPos].meType : TOOLBOXITEM_DONTKNOW; } // ----------------------------------------------------------------------- -USHORT ToolBox::GetItemPos( USHORT nItemId ) const +sal_uInt16 ToolBox::GetItemPos( sal_uInt16 nItemId ) const { int nCount = mpData->m_aItems.size(); for( int nPos = 0; nPos < nCount; nPos++ ) if( mpData->m_aItems[nPos].mnId == nItemId ) - return (USHORT)nPos; + return (sal_uInt16)nPos; return TOOLBOX_ITEM_NOTFOUND; } // ----------------------------------------------------------------------- -USHORT ToolBox::GetItemPos( const Point& rPos ) const +sal_uInt16 ToolBox::GetItemPos( const Point& rPos ) const { // search the item position on the given point - USHORT nRet = TOOLBOX_ITEM_NOTFOUND; - USHORT nPos = 0; + sal_uInt16 nRet = TOOLBOX_ITEM_NOTFOUND; + sal_uInt16 nPos = 0; std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { @@ -1126,14 +1126,14 @@ USHORT ToolBox::GetItemPos( const Point& rPos ) const // ----------------------------------------------------------------------- -USHORT ToolBox::GetItemId( USHORT nPos ) const +sal_uInt16 ToolBox::GetItemId( sal_uInt16 nPos ) const { return (nPos < mpData->m_aItems.size()) ? mpData->m_aItems[nPos].mnId : 0; } // ----------------------------------------------------------------------- -USHORT ToolBox::GetItemId( const Point& rPos ) const +sal_uInt16 ToolBox::GetItemId( const Point& rPos ) const { // Item suchen, das geklickt wurde std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -1211,25 +1211,25 @@ Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) } -Point ToolBox::GetItemPopupPosition( USHORT nItemId, const Size& rSize ) const +Point ToolBox::GetItemPopupPosition( sal_uInt16 nItemId, const Size& rSize ) const { return ImplGetPopupPosition( GetItemRect( nItemId ), rSize ); } // ----------------------------------------------------------------------- -Rectangle ToolBox::GetItemRect( USHORT nItemId ) const +Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId ) const { if ( mbCalc || mbFormat ) ((ToolBox*)this)->ImplFormat(); - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); return GetItemPosRect( nPos ); } // ----------------------------------------------------------------------- -Rectangle ToolBox::GetItemPosRect( USHORT nPos ) const +Rectangle ToolBox::GetItemPosRect( sal_uInt16 nPos ) const { if ( mbCalc || mbFormat ) ((ToolBox*)this)->ImplFormat(); @@ -1241,18 +1241,18 @@ Rectangle ToolBox::GetItemPosRect( USHORT nPos ) const } // ----------------------------------------------------------------------- -Rectangle ToolBox::GetItemDropDownRect( USHORT nItemId ) const +Rectangle ToolBox::GetItemDropDownRect( sal_uInt16 nItemId ) const { if ( mbCalc || mbFormat ) ((ToolBox*)this)->ImplFormat(); - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); return GetItemPosDropDownRect( nPos ); } // ----------------------------------------------------------------------- -Rectangle ToolBox::GetItemPosDropDownRect( USHORT nPos ) const +Rectangle ToolBox::GetItemPosDropDownRect( sal_uInt16 nPos ) const { if ( mbCalc || mbFormat ) ((ToolBox*)this)->ImplFormat(); @@ -1270,24 +1270,24 @@ Rectangle ToolBox::GetMenubuttonRect() const return mpData->maMenubuttonItem.maRect; } -BOOL ToolBox::ImplHasExternalMenubutton() +sal_Bool ToolBox::ImplHasExternalMenubutton() { // check if the borderwindow (i.e. the decoration) provides the menu button - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( ImplIsFloatingMode() ) { // custom menu is placed in the decoration ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( WINDOW_BORDER ) ); if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() ) - bRet = TRUE; + bRet = sal_True; } return bRet; } // ----------------------------------------------------------------------- -void ToolBox::SetItemBits( USHORT nItemId, ToolBoxItemBits nBits ) +void ToolBox::SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos < mpData->m_aItems.size() ) { @@ -1296,15 +1296,15 @@ void ToolBox::SetItemBits( USHORT nItemId, ToolBoxItemBits nBits ) nBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; nOldBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; // trigger reformat when the item width has changed (dropdown arrow) - BOOL bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN); + sal_Bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN); if ( nBits != nOldBits ) - ImplInvalidate( TRUE, bFormat ); + ImplInvalidate( sal_True, bFormat ); } } // ----------------------------------------------------------------------- -ToolBoxItemBits ToolBox::GetItemBits( USHORT nItemId ) const +ToolBoxItemBits ToolBox::GetItemBits( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1316,9 +1316,9 @@ ToolBoxItemBits ToolBox::GetItemBits( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetItemData( USHORT nItemId, void* pNewData ) +void ToolBox::SetItemData( sal_uInt16 nItemId, void* pNewData ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos < mpData->m_aItems.size() ) { @@ -1329,7 +1329,7 @@ void ToolBox::SetItemData( USHORT nItemId, void* pNewData ) // ----------------------------------------------------------------------- -void* ToolBox::GetItemData( USHORT nItemId ) const +void* ToolBox::GetItemData( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1341,9 +1341,9 @@ void* ToolBox::GetItemData( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetItemImage( USHORT nItemId, const Image& rImage ) +void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { @@ -1354,7 +1354,7 @@ void ToolBox::SetItemImage( USHORT nItemId, const Image& rImage ) Size aOldSize = pItem->maImage.GetSizePixel(); pItem->maImage = rImage; if ( aOldSize != pItem->maImage.GetSizePixel() ) - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); else ImplUpdateItem( nPos ); } @@ -1369,8 +1369,8 @@ void ToolBox::SetImageList( const ImageList& rImageList ) { maImageList = rImageList; - USHORT nCount = (USHORT)mpData->m_aItems.size(); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = (sal_uInt16)mpData->m_aItems.size(); + for( sal_uInt16 i = 0; i < nCount; i++ ) { Image aImage; if ( mpData->m_aItems[i].mnId ) @@ -1392,9 +1392,9 @@ static Image ImplRotImage( const Image& rImage, long nAngle10 ) return Image( aRotBitmapEx ); } -void ToolBox::SetItemImageAngle( USHORT nItemId, long nAngle10 ) +void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { @@ -1416,7 +1416,7 @@ void ToolBox::SetItemImageAngle( USHORT nItemId, long nAngle10 ) if ( !mbCalc ) { if ( aOldSize != pItem->maImage.GetSizePixel() ) - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); else ImplUpdateItem( nPos ); } @@ -1435,9 +1435,9 @@ static Image ImplMirrorImage( const Image& rImage ) return Image( aMirrBitmapEx ); } -void ToolBox::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror ) +void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { @@ -1463,7 +1463,7 @@ void ToolBox::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror ) // ----------------------------------------------------------------------- -Image ToolBox::GetItemImage( USHORT nItemId ) const +Image ToolBox::GetItemImage( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1475,7 +1475,7 @@ Image ToolBox::GetItemImage( USHORT nItemId ) const // ----------------------------------------------------------------------- -long ToolBox::GetItemImageAngle( USHORT nItemId ) const +long ToolBox::GetItemImageAngle( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1487,32 +1487,32 @@ long ToolBox::GetItemImageAngle( USHORT nItemId ) const // ----------------------------------------------------------------------- -BOOL ToolBox::GetItemImageMirrorMode( USHORT nItemId ) const +sal_Bool ToolBox::GetItemImageMirrorMode( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) return pItem->mbMirrorMode; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void ToolBox::SetItemHighImage( USHORT nItemId, const Image& rImage ) +void ToolBox::SetItemHighImage( sal_uInt16 nItemId, const Image& rImage ) { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) { DBG_ASSERT( (pItem->maImage.GetSizePixel() == rImage.GetSizePixel()) || - ((!rImage) == TRUE), "ToolBox::SetItemHighImage() - ImageSize != HighImageSize" ); + ((!rImage) == sal_True), "ToolBox::SetItemHighImage() - ImageSize != HighImageSize" ); pItem->maHighImage = rImage; } } // ----------------------------------------------------------------------- -Image ToolBox::GetItemHighImage( USHORT nItemId ) const +Image ToolBox::GetItemHighImage( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1524,9 +1524,9 @@ Image ToolBox::GetItemHighImage( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetItemText( USHORT nItemId, const XubString& rText ) +void ToolBox::SetItemText( sal_uInt16 nItemId, const XubString& rText ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { @@ -1539,7 +1539,7 @@ void ToolBox::SetItemText( USHORT nItemId, const XubString& rText ) pItem->maText = ImplConvertMenuString( rText ); mpData->ImplClearLayoutData(); if ( nOldWidth != GetCtrlTextWidth( pItem->maText ) ) - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); else ImplUpdateItem( nPos ); } @@ -1556,7 +1556,7 @@ void ToolBox::SetItemText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& ToolBox::GetItemText( USHORT nItemId ) const +const XubString& ToolBox::GetItemText( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1568,9 +1568,9 @@ const XubString& ToolBox::GetItemText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetItemWindow( USHORT nItemId, Window* pNewWindow ) +void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { @@ -1578,14 +1578,14 @@ void ToolBox::SetItemWindow( USHORT nItemId, Window* pNewWindow ) pItem->mpWindow = pNewWindow; if ( pNewWindow ) pNewWindow->Hide(); - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED, reinterpret_cast< void* >( nPos ) ); } } // ----------------------------------------------------------------------- -Window* ToolBox::GetItemWindow( USHORT nItemId ) const +Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1604,7 +1604,7 @@ void ToolBox::StartSelection() if ( !mbSelection ) { - mbSelection = TRUE; + mbSelection = sal_True; mnCurPos = TOOLBOX_ITEM_NOTFOUND; mnCurItemId = 0; Activate(); @@ -1615,13 +1615,13 @@ void ToolBox::StartSelection() void ToolBox::EndSelection() { - mbCommandDrag = FALSE; + mbCommandDrag = sal_False; if ( mbDrag || mbSelection ) { // Daten zuruecksetzen - mbDrag = FALSE; - mbSelection = FALSE; + mbDrag = sal_False; + mbSelection = sal_False; if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND ) ImplDrawItem( mnCurPos ); EndTracking(); @@ -1638,9 +1638,9 @@ void ToolBox::EndSelection() // ----------------------------------------------------------------------- -void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease ) +void ToolBox::SetItemDown( sal_uInt16 nItemId, sal_Bool bDown, sal_Bool bRelease ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { @@ -1649,7 +1649,7 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease ) if ( nPos != mnCurPos ) { mnCurPos = nPos; - ImplDrawItem( mnCurPos, TRUE ); + ImplDrawItem( mnCurPos, sal_True ); Flush(); } } @@ -1657,7 +1657,7 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease ) { if ( nPos == mnCurPos ) { - ImplDrawItem( mnCurPos, FALSE ); + ImplDrawItem( mnCurPos, sal_False ); Flush(); mnCurPos = TOOLBOX_ITEM_NOTFOUND; } @@ -1667,8 +1667,8 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease ) { if ( mbDrag || mbSelection ) { - mbDrag = FALSE; - mbSelection = FALSE; + mbDrag = sal_False; + mbSelection = sal_False; EndTracking(); ReleaseMouse(); Deactivate(); @@ -1684,21 +1684,21 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease ) // ----------------------------------------------------------------------- -BOOL ToolBox::IsItemDown( USHORT nItemId ) const +sal_Bool ToolBox::IsItemDown( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) return (nPos == mnCurPos); else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void ToolBox::SetItemState( USHORT nItemId, TriState eState ) +void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { @@ -1712,8 +1712,8 @@ void ToolBox::SetItemState( USHORT nItemId, TriState eState ) (pItem->mnBits & TIB_RADIOCHECK) ) { ImplToolItem* pGroupItem; - USHORT nGroupPos; - USHORT nItemCount = GetItemCount(); + sal_uInt16 nGroupPos; + sal_uInt16 nItemCount = GetItemCount(); nGroupPos = nPos; while ( nGroupPos ) @@ -1758,7 +1758,7 @@ void ToolBox::SetItemState( USHORT nItemId, TriState eState ) // ----------------------------------------------------------------------- -TriState ToolBox::GetItemState( USHORT nItemId ) const +TriState ToolBox::GetItemState( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1770,15 +1770,15 @@ TriState ToolBox::GetItemState( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::EnableItem( USHORT nItemId, BOOL bEnable ) +void ToolBox::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { ImplToolItem* pItem = &mpData->m_aItems[nPos]; if ( bEnable ) - bEnable = TRUE; + bEnable = sal_True; if ( pItem->mbEnabled != bEnable ) { pItem->mbEnabled = bEnable; @@ -1802,21 +1802,21 @@ void ToolBox::EnableItem( USHORT nItemId, BOOL bEnable ) // ----------------------------------------------------------------------- -BOOL ToolBox::IsItemEnabled( USHORT nItemId ) const +sal_Bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) return pItem->mbEnabled; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void ToolBox::ShowItem( USHORT nItemId, BOOL bVisible ) +void ToolBox::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); mpData->ImplClearLayoutData(); if ( nPos != TOOLBOX_ITEM_NOTFOUND ) @@ -1825,36 +1825,36 @@ void ToolBox::ShowItem( USHORT nItemId, BOOL bVisible ) if ( pItem->mbVisible != bVisible ) { pItem->mbVisible = bVisible; - ImplInvalidate( FALSE ); + ImplInvalidate( sal_False ); } } } // ----------------------------------------------------------------------- -BOOL ToolBox::IsItemVisible( USHORT nItemId ) const +sal_Bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) return pItem->mbVisible; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ToolBox::IsItemReallyVisible( USHORT nItemId ) const +sal_Bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const { // is the item on the visible area of the toolbox? - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder ); ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem && pItem->mbVisible && !pItem->maRect.IsEmpty() && aRect.IsOver( pItem->maRect ) ) { - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -1862,7 +1862,7 @@ BOOL ToolBox::IsItemReallyVisible( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetItemCommand( USHORT nItemId, const XubString& rCommand ) +void ToolBox::SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1872,7 +1872,7 @@ void ToolBox::SetItemCommand( USHORT nItemId, const XubString& rCommand ) // ----------------------------------------------------------------------- -const XubString& ToolBox::GetItemCommand( USHORT nItemId ) const +const XubString& ToolBox::GetItemCommand( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1884,7 +1884,7 @@ const XubString& ToolBox::GetItemCommand( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetQuickHelpText( USHORT nItemId, const XubString& rText ) +void ToolBox::SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText ) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1894,7 +1894,7 @@ void ToolBox::SetQuickHelpText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& ToolBox::GetQuickHelpText( USHORT nItemId ) const +const XubString& ToolBox::GetQuickHelpText( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1906,7 +1906,7 @@ const XubString& ToolBox::GetQuickHelpText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetHelpText( USHORT nItemId, const XubString& rText ) +void ToolBox::SetHelpText( sal_uInt16 nItemId, const XubString& rText ) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1916,14 +1916,14 @@ void ToolBox::SetHelpText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& ToolBox::GetHelpText( USHORT nItemId ) const +const XubString& ToolBox::GetHelpText( sal_uInt16 nItemId ) const { return ImplGetHelpText( nItemId ); } // ----------------------------------------------------------------------- -void ToolBox::SetHelpId( USHORT nItemId, ULONG nHelpId ) +void ToolBox::SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId ) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1933,7 +1933,7 @@ void ToolBox::SetHelpId( USHORT nItemId, ULONG nHelpId ) // ----------------------------------------------------------------------- -ULONG ToolBox::GetHelpId( USHORT nItemId ) const +sal_uIntPtr ToolBox::GetHelpId( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1950,12 +1950,12 @@ void ToolBox::SetBorder( long nX, long nY ) mnBorderX = nX; mnBorderY = nY; - ImplInvalidate( TRUE, TRUE ); + ImplInvalidate( sal_True, sal_True ); } // ----------------------------------------------------------------------- -void ToolBox::SetOutStyle( USHORT nNewStyle ) +void ToolBox::SetOutStyle( sal_uInt16 nNewStyle ) { // always force flat looking toolbars since NWF nNewStyle |= TOOLBOX_STYLE_FLAT; @@ -1972,7 +1972,7 @@ void ToolBox::SetOutStyle( USHORT nNewStyle ) mnMaxItemHeight = 1; } - ImplInvalidate( TRUE, TRUE ); + ImplInvalidate( sal_True, sal_True ); } } @@ -1980,7 +1980,7 @@ void ToolBox::SetOutStyle( USHORT nNewStyle ) void ToolBox::RecalcItems() { - ImplInvalidate( TRUE ); + ImplInvalidate( sal_True ); } // ----------------------------------------------------------------------- @@ -1995,11 +1995,11 @@ void ToolBox::ImplUpdateInputEnable() if( it->mbEnabled ) { // at least one useful entry - mpData->mbKeyInputDisabled = FALSE; + mpData->mbKeyInputDisabled = sal_False; return; } } - mpData->mbKeyInputDisabled = TRUE; + mpData->mbKeyInputDisabled = sal_True; } // ----------------------------------------------------------------------- @@ -2008,14 +2008,14 @@ void ToolBox::ImplFillLayoutData() const { mpData->m_pLayoutData = new ToolBoxLayoutData(); - USHORT nCount = (USHORT)mpData->m_aItems.size(); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = (sal_uInt16)mpData->m_aItems.size(); + for( sal_uInt16 i = 0; i < nCount; i++ ) { ImplToolItem* pItem = &mpData->m_aItems[i]; // Nur malen, wenn Rechteck im PaintRectangle liegt if ( !pItem->maRect.IsEmpty() ) - const_cast<ToolBox*>(this)->ImplDrawItem( i, FALSE, FALSE, TRUE ); + const_cast<ToolBox*>(this)->ImplDrawItem( i, sal_False, sal_False, sal_True ); } } @@ -2030,14 +2030,14 @@ String ToolBox::GetDisplayText() const // ----------------------------------------------------------------------- -Rectangle ToolBox::GetCharacterBounds( USHORT nItemID, long nIndex ) const +Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const { long nItemIndex = -1; if( ! mpData->m_pLayoutData ) ImplFillLayoutData(); if( mpData->m_pLayoutData ) { - for( ULONG i = 0; i < mpData->m_pLayoutData->m_aLineItemIds.size(); i++ ) + for( sal_uIntPtr i = 0; i < mpData->m_pLayoutData->m_aLineItemIds.size(); i++ ) { if( mpData->m_pLayoutData->m_aLineItemIds[i] == nItemID ) { @@ -2051,7 +2051,7 @@ Rectangle ToolBox::GetCharacterBounds( USHORT nItemID, long nIndex ) const // ----------------------------------------------------------------------- -long ToolBox::GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const +long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const { long nIndex = -1; rItemID = 0; @@ -2060,7 +2060,7 @@ long ToolBox::GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const if( mpData->m_pLayoutData ) { nIndex = mpData->m_pLayoutData->GetIndexForPoint( rPoint ); - for( ULONG i = 0; i < mpData->m_pLayoutData->m_aLineIndices.size(); i++ ) + for( sal_uIntPtr i = 0; i < mpData->m_pLayoutData->m_aLineIndices.size(); i++ ) { if( mpData->m_pLayoutData->m_aLineIndices[i] <= nIndex && (i == mpData->m_pLayoutData->m_aLineIndices.size()-1 || mpData->m_pLayoutData->m_aLineIndices[i+1] > nIndex) ) @@ -2093,12 +2093,12 @@ Pair ToolBox::GetTextStartEnd( long nText ) const // ----------------------------------------------------------------------- -USHORT ToolBox::GetDisplayItemId( long nText ) const +sal_uInt16 ToolBox::GetDisplayItemId( long nText ) const { - USHORT nItemId = 0; + sal_uInt16 nItemId = 0; if( ! mpData->m_pLayoutData ) ImplFillLayoutData(); - if( mpData->m_pLayoutData && nText >= 0 && (ULONG)nText < mpData->m_pLayoutData->m_aLineItemIds.size() ) + if( mpData->m_pLayoutData && nText >= 0 && (sal_uIntPtr)nText < mpData->m_pLayoutData->m_aLineItemIds.size() ) nItemId = mpData->m_pLayoutData->m_aLineItemIds[nText]; return nItemId; } @@ -2118,7 +2118,7 @@ const Link& ToolBox::GetDropdownClickHdl() const // ----------------------------------------------------------------------- -void ToolBox::SetMenuType( USHORT aType ) +void ToolBox::SetMenuType( sal_uInt16 aType ) { if( aType != mpData->maMenuType ) { @@ -2128,9 +2128,9 @@ void ToolBox::SetMenuType( USHORT aType ) // the menu button may have to be moved into the decoration which changes the layout ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) - pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( aType & TOOLBOX_MENUTYPE_CUSTOMIZE) ? TRUE : FALSE ); + pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( aType & TOOLBOX_MENUTYPE_CUSTOMIZE) ? sal_True : sal_False ); - mbFormat = TRUE; + mbFormat = sal_True; ImplFormat(); ImplSetMinMaxFloatSize( this ); } @@ -2143,12 +2143,12 @@ void ToolBox::SetMenuType( USHORT aType ) } } -USHORT ToolBox::GetMenuType() const +sal_uInt16 ToolBox::GetMenuType() const { return mpData->maMenuType; } -BOOL ToolBox::IsMenuEnabled() const +sal_Bool ToolBox::IsMenuEnabled() const { return mpData->maMenuType != TOOLBOX_MENUTYPE_NONE; } @@ -2170,7 +2170,7 @@ const Link& ToolBox::GetMenuButtonHdl() const // ----------------------------------------------------------------------- -BOOL ToolBox::ImplHasClippedItems() +sal_Bool ToolBox::ImplHasClippedItems() { // are any items currently clipped ? ImplFormat(); @@ -2178,10 +2178,10 @@ BOOL ToolBox::ImplHasClippedItems() while ( it != mpData->m_aItems.end() ) { if( it->IsClipped() ) - return TRUE; + return sal_True; it++; } - return FALSE; + return sal_False; } void ToolBox::ImplUpdateCustomMenu() @@ -2192,7 +2192,7 @@ void ToolBox::ImplUpdateCustomMenu() PopupMenu *pMenu = GetMenu(); - USHORT i = 0; + sal_uInt16 i = 0; // remove old entries while( i < pMenu->GetItemCount() ) { @@ -2213,7 +2213,7 @@ void ToolBox::ImplUpdateCustomMenu() { if( it->IsClipped() ) { - USHORT id = it->mnId + TOOLBOX_MENUITEM_START; + sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START; pMenu->InsertItem( id, it->maText, it->maImage, 0, 0 ); pMenu->EnableItem( id, it->mbEnabled ); pMenu->CheckItem( id, it->meState == STATE_CHECK ); @@ -2226,9 +2226,9 @@ IMPL_LINK( ToolBox, ImplCustomMenuListener, VclMenuEvent*, pEvent ) { if( pEvent->GetMenu() == GetMenu() && pEvent->GetId() == VCLEVENT_MENU_SELECT ) { - USHORT id = GetMenu()->GetItemId( pEvent->GetItemPos() ); + sal_uInt16 id = GetMenu()->GetItemId( pEvent->GetItemPos() ); if( id >= TOOLBOX_MENUITEM_START ) - TriggerItem( id - TOOLBOX_MENUITEM_START, FALSE, FALSE ); + TriggerItem( id - TOOLBOX_MENUITEM_START, sal_False, sal_False ); } return 0; } @@ -2276,7 +2276,7 @@ void ToolBox::ImplExecuteCustomMenu() } } - USHORT uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ), + sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ), POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE ); if ( aDelData.IsDelete() ) @@ -2313,24 +2313,24 @@ void ToolBox::ExecuteCustomMenu() // ----------------------------------------------------------------------- // checks override first, useful during calculation of sizes -BOOL ToolBox::ImplIsFloatingMode() const +sal_Bool ToolBox::ImplIsFloatingMode() const { DBG_ASSERT( !(mpData->mbAssumeDocked && mpData->mbAssumeFloating), "ToolBox::ImplIsFloatingMode(): cannot assume docked and floating" ); if( mpData->mbAssumeDocked ) - return FALSE; + return sal_False; else if( mpData->mbAssumeFloating ) - return TRUE; + return sal_True; else return IsFloatingMode(); } // checks override first, useful during calculation of sizes -BOOL ToolBox::ImplIsInPopupMode() const +sal_Bool ToolBox::ImplIsInPopupMode() const { if( mpData->mbAssumePopupMode ) - return TRUE; + return sal_True; else { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); @@ -2340,7 +2340,7 @@ BOOL ToolBox::ImplIsInPopupMode() const // ----------------------------------------------------------------------- -void ToolBox::Lock( BOOL bLock ) +void ToolBox::Lock( sal_Bool bLock ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( !pWrapper ) @@ -2350,8 +2350,8 @@ void ToolBox::Lock( BOOL bLock ) mpData->mbIsLocked = bLock; if( !ImplIsFloatingMode() ) { - mbCalc = TRUE; - mbFormat = TRUE; + mbCalc = sal_True; + mbFormat = sal_True; SetSizePixel( CalcWindowSizePixel(1) ); Invalidate(); } @@ -2360,7 +2360,7 @@ void ToolBox::Lock( BOOL bLock ) // ----------------------------------------------------------------------- -BOOL ToolBox::AlwaysLocked() +sal_Bool ToolBox::AlwaysLocked() { // read config item to determine toolbox behaviour, used for subtoolbars @@ -2376,35 +2376,35 @@ BOOL ToolBox::AlwaysLocked() if ( aNode.isValid() ) { // feature enabled ? - BOOL bStatesEnabled = BOOL(); + sal_Bool bStatesEnabled = sal_Bool(); ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString::createFromAscii( "StatesEnabled" ) ); if( aValue >>= bStatesEnabled ) { - if( bStatesEnabled == TRUE ) + if( bStatesEnabled == sal_True ) { // now read the locking state utl::OConfigurationNode aNode2 = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory( vcl::unohelper::GetMultiServiceFactory(), OUString::createFromAscii( "/org.openoffice.Office.UI.GlobalSettings/Toolbars/States" ) ); // note: case sensisitive ! - BOOL bLocked = BOOL(); + sal_Bool bLocked = sal_Bool(); ::com::sun::star::uno::Any aValue2 = aNode2.getNodeValue( OUString::createFromAscii( "Locked" ) ); if( aValue2 >>= bLocked ) - nAlwaysLocked = (bLocked == TRUE) ? 1 : 0; + nAlwaysLocked = (bLocked == sal_True) ? 1 : 0; } } } } - return nAlwaysLocked == 1 ? TRUE : FALSE; + return nAlwaysLocked == 1 ? sal_True : sal_False; } -BOOL ToolBox::WillUsePopupMode() const +sal_Bool ToolBox::WillUsePopupMode() const { return mpData->mbWillUsePopupMode; } -void ToolBox::WillUsePopupMode( BOOL b ) +void ToolBox::WillUsePopupMode( sal_Bool b ) { mpData->mbWillUsePopupMode = b; } @@ -2413,7 +2413,7 @@ void ToolBox::ImplUpdateImageList() { if (mpData->mpImageListProvider != NULL) { - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); try { ImageListType eType = bHC ? vcl::HIGHCONTRAST_YES : vcl::HIGHCONTRAST_NO; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index ca92d9ed6c5b..aca39334585a 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -116,12 +116,12 @@ DBG_NAME( Window ) // ======================================================================= -#define IMPL_PAINT_PAINT ((USHORT)0x0001) -#define IMPL_PAINT_PAINTALL ((USHORT)0x0002) -#define IMPL_PAINT_PAINTALLCHILDS ((USHORT)0x0004) -#define IMPL_PAINT_PAINTCHILDS ((USHORT)0x0008) -#define IMPL_PAINT_ERASE ((USHORT)0x0010) -#define IMPL_PAINT_CHECKRTL ((USHORT)0x0020) +#define IMPL_PAINT_PAINT ((sal_uInt16)0x0001) +#define IMPL_PAINT_PAINTALL ((sal_uInt16)0x0002) +#define IMPL_PAINT_PAINTALLCHILDS ((sal_uInt16)0x0004) +#define IMPL_PAINT_PAINTCHILDS ((sal_uInt16)0x0008) +#define IMPL_PAINT_ERASE ((sal_uInt16)0x0010) +#define IMPL_PAINT_CHECKRTL ((sal_uInt16)0x0020) // ----------------------------------------------------------------------- @@ -138,7 +138,7 @@ struct ImplCalcToTopData struct ImplAccessibleInfos { - USHORT nAccessibleRole; + sal_uInt16 nAccessibleRole; String* pAccessibleName; String* pAccessibleDescription; @@ -288,12 +288,12 @@ bool Window::ImplCheckUIFont( const Font& rFont ) // ----------------------------------------------------------------------- -void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) +void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl ) { // reset high contrast to false, so the system can either update it // or AutoDetectSystemHC can kick in (see below) StyleSettings aTmpSt( rSettings.GetStyleSettings() ); - aTmpSt.SetHighContrastMode( FALSE ); + aTmpSt.SetHighContrastMode( sal_False ); rSettings.SetStyleSettings( aTmpSt ); ImplGetFrame()->UpdateSettings( rSettings ); @@ -497,7 +497,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) || rSettings.GetStyleSettings().GetWindowColor().IsDark() ) { aStyleSettings = rSettings.GetStyleSettings(); - aStyleSettings.SetHighContrastMode( TRUE ); + aStyleSettings.SetHighContrastMode( sal_True ); rSettings.SetStyleSettings( aStyleSettings ); } } @@ -506,7 +506,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) static const char* pEnvHC = getenv( "SAL_FORCE_HC" ); if( pEnvHC && *pEnvHC ) { - aStyleSettings.SetHighContrastMode( TRUE ); + aStyleSettings.SetHighContrastMode( sal_True ); rSettings.SetStyleSettings( aStyleSettings ); } @@ -630,83 +630,83 @@ void Window::ImplInitWindowData( WindowType nType ) mpWindowImpl->mnDlgCtrlFlags = 0; // DialogControl-Flags mpWindowImpl->mnLockCount = 0; // LockCount mpWindowImpl->meAlwaysInputMode = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called - mpWindowImpl->mbFrame = FALSE; // TRUE: Window is a frame window - mpWindowImpl->mbBorderWin = FALSE; // TRUE: Window is a border window - mpWindowImpl->mbOverlapWin = FALSE; // TRUE: Window is a overlap window - mpWindowImpl->mbSysWin = FALSE; // TRUE: SystemWindow is the base class - mpWindowImpl->mbDialog = FALSE; // TRUE: Dialog is the base class - mpWindowImpl->mbDockWin = FALSE; // TRUE: DockingWindow is the base class - mpWindowImpl->mbFloatWin = FALSE; // TRUE: FloatingWindow is the base class - mpWindowImpl->mbPushButton = FALSE; // TRUE: PushButton is the base class - mpWindowImpl->mbToolBox = FALSE; // TRUE: ToolBox is the base class - mpWindowImpl->mbMenuFloatingWindow= FALSE; // TRUE: MenuFloatingWindow is the base class - mpWindowImpl->mbToolbarFloatingWindow= FALSE; // TRUE: ImplPopupFloatWin is the base class, used for subtoolbars - mpWindowImpl->mbSplitter = FALSE; // TRUE: Splitter is the base class - mpWindowImpl->mbVisible = FALSE; // TRUE: Show( TRUE ) called - mpWindowImpl->mbOverlapVisible = FALSE; // TRUE: Hide called for visible window from ImplHideAllOverlapWindow() - mpWindowImpl->mbDisabled = FALSE; // TRUE: Enable( FALSE ) called - mpWindowImpl->mbInputDisabled = FALSE; // TRUE: EnableInput( FALSE ) called - mpWindowImpl->mbDropDisabled = FALSE; // TRUE: Drop is enabled - mpWindowImpl->mbNoUpdate = FALSE; // TRUE: SetUpdateMode( FALSE ) called - mpWindowImpl->mbNoParentUpdate = FALSE; // TRUE: SetParentUpdateMode( FALSE ) called - mpWindowImpl->mbActive = FALSE; // TRUE: Window Active - mpWindowImpl->mbParentActive = FALSE; // TRUE: OverlapActive from Parent - mpWindowImpl->mbReallyVisible = FALSE; // TRUE: this and all parents to an overlaped window are visible - mpWindowImpl->mbReallyShown = FALSE; // TRUE: this and all parents to an overlaped window are shown - mpWindowImpl->mbInInitShow = FALSE; // TRUE: we are in InitShow - mpWindowImpl->mbChildNotify = FALSE; // TRUE: ChildNotify - mpWindowImpl->mbChildPtrOverwrite = FALSE; // TRUE: PointerStyle overwrites Child-Pointer - mpWindowImpl->mbNoPtrVisible = FALSE; // TRUE: ShowPointer( FALSE ) called - mpWindowImpl->mbMouseMove = FALSE; // TRUE: BaseMouseMove called - mpWindowImpl->mbPaintFrame = FALSE; // TRUE: Paint is visible, but not painted - mpWindowImpl->mbInPaint = FALSE; // TRUE: Inside PaintHdl - mpWindowImpl->mbMouseButtonDown = FALSE; // TRUE: BaseMouseButtonDown called - mpWindowImpl->mbMouseButtonUp = FALSE; // TRUE: BaseMouseButtonUp called - mpWindowImpl->mbKeyInput = FALSE; // TRUE: BaseKeyInput called - mpWindowImpl->mbKeyUp = FALSE; // TRUE: BaseKeyUp called - mpWindowImpl->mbCommand = FALSE; // TRUE: BaseCommand called - mpWindowImpl->mbDefPos = TRUE; // TRUE: Position is not Set - mpWindowImpl->mbDefSize = TRUE; // TRUE: Size is not Set - mpWindowImpl->mbCallMove = TRUE; // TRUE: Move must be called by Show - mpWindowImpl->mbCallResize = TRUE; // TRUE: Resize must be called by Show - mpWindowImpl->mbWaitSystemResize = TRUE; // TRUE: Wait for System-Resize - mpWindowImpl->mbInitWinClipRegion = TRUE; // TRUE: Calc Window Clip Region - mpWindowImpl->mbInitChildRegion = FALSE; // TRUE: InitChildClipRegion - mpWindowImpl->mbWinRegion = FALSE; // TRUE: Window Region - mpWindowImpl->mbClipChildren = FALSE; // TRUE: Child-Fenster muessen evt. geclippt werden - mpWindowImpl->mbClipSiblings = FALSE; // TRUE: Nebeneinanderliegende Child-Fenster muessen evt. geclippt werden - mpWindowImpl->mbChildTransparent = FALSE; // TRUE: Child-Fenster duerfen transparent einschalten (inkl. Parent-CLIPCHILDREN) - mpWindowImpl->mbPaintTransparent = FALSE; // TRUE: Paints muessen auf Parent ausgeloest werden - mpWindowImpl->mbMouseTransparent = FALSE; // TRUE: Window is transparent for Mouse - mpWindowImpl->mbDlgCtrlStart = FALSE; // TRUE: Ab hier eigenes Dialog-Control - mpWindowImpl->mbFocusVisible = FALSE; // TRUE: Focus Visible - mpWindowImpl->mbUseNativeFocus = FALSE; - mpWindowImpl->mbNativeFocusVisible= FALSE; // TRUE: native Focus Visible - mpWindowImpl->mbInShowFocus = FALSE; // prevent recursion - mpWindowImpl->mbInHideFocus = FALSE; // prevent recursion - mpWindowImpl->mbTrackVisible = FALSE; // TRUE: Tracking Visible - mpWindowImpl->mbControlForeground = FALSE; // TRUE: Foreground-Property set - mpWindowImpl->mbControlBackground = FALSE; // TRUE: Background-Property set - mpWindowImpl->mbAlwaysOnTop = FALSE; // TRUE: immer vor allen anderen normalen Fenstern sichtbar - mpWindowImpl->mbCompoundControl = FALSE; // TRUE: Zusammengesetztes Control => Listener... - mpWindowImpl->mbCompoundControlHasFocus = FALSE; // TRUE: Zusammengesetztes Control hat irgendwo den Focus - mpWindowImpl->mbPaintDisabled = FALSE; // TRUE: Paint soll nicht ausgefuehrt werden - mpWindowImpl->mbAllResize = FALSE; // TRUE: Auch ResizeEvents mit 0,0 schicken - mpWindowImpl->mbInDtor = FALSE; // TRUE: Wir befinden uns im Window-Dtor - mpWindowImpl->mbExtTextInput = FALSE; // TRUE: ExtTextInput-Mode is active - mpWindowImpl->mbInFocusHdl = FALSE; // TRUE: Innerhalb vom GetFocus-Handler - mpWindowImpl->mbCreatedWithToolkit = FALSE; - mpWindowImpl->mbSuppressAccessibilityEvents = FALSE; // TRUE: do not send any accessibility events - mpWindowImpl->mbDrawSelectionBackground = FALSE; // TRUE: draws transparent window background to indicate (toolbox) selection - mpWindowImpl->mbIsInTaskPaneList = FALSE; // TRUE: window was added to the taskpanelist in the topmost system window + mpWindowImpl->mbFrame = sal_False; // sal_True: Window is a frame window + mpWindowImpl->mbBorderWin = sal_False; // sal_True: Window is a border window + mpWindowImpl->mbOverlapWin = sal_False; // sal_True: Window is a overlap window + mpWindowImpl->mbSysWin = sal_False; // sal_True: SystemWindow is the base class + mpWindowImpl->mbDialog = sal_False; // sal_True: Dialog is the base class + mpWindowImpl->mbDockWin = sal_False; // sal_True: DockingWindow is the base class + mpWindowImpl->mbFloatWin = sal_False; // sal_True: FloatingWindow is the base class + mpWindowImpl->mbPushButton = sal_False; // sal_True: PushButton is the base class + mpWindowImpl->mbToolBox = sal_False; // sal_True: ToolBox is the base class + mpWindowImpl->mbMenuFloatingWindow= sal_False; // sal_True: MenuFloatingWindow is the base class + mpWindowImpl->mbToolbarFloatingWindow= sal_False; // sal_True: ImplPopupFloatWin is the base class, used for subtoolbars + mpWindowImpl->mbSplitter = sal_False; // sal_True: Splitter is the base class + mpWindowImpl->mbVisible = sal_False; // sal_True: Show( sal_True ) called + mpWindowImpl->mbOverlapVisible = sal_False; // sal_True: Hide called for visible window from ImplHideAllOverlapWindow() + mpWindowImpl->mbDisabled = sal_False; // sal_True: Enable( sal_False ) called + mpWindowImpl->mbInputDisabled = sal_False; // sal_True: EnableInput( sal_False ) called + mpWindowImpl->mbDropDisabled = sal_False; // sal_True: Drop is enabled + mpWindowImpl->mbNoUpdate = sal_False; // sal_True: SetUpdateMode( sal_False ) called + mpWindowImpl->mbNoParentUpdate = sal_False; // sal_True: SetParentUpdateMode( sal_False ) called + mpWindowImpl->mbActive = sal_False; // sal_True: Window Active + mpWindowImpl->mbParentActive = sal_False; // sal_True: OverlapActive from Parent + mpWindowImpl->mbReallyVisible = sal_False; // sal_True: this and all parents to an overlaped window are visible + mpWindowImpl->mbReallyShown = sal_False; // sal_True: this and all parents to an overlaped window are shown + mpWindowImpl->mbInInitShow = sal_False; // sal_True: we are in InitShow + mpWindowImpl->mbChildNotify = sal_False; // sal_True: ChildNotify + mpWindowImpl->mbChildPtrOverwrite = sal_False; // sal_True: PointerStyle overwrites Child-Pointer + mpWindowImpl->mbNoPtrVisible = sal_False; // sal_True: ShowPointer( sal_False ) called + mpWindowImpl->mbMouseMove = sal_False; // sal_True: BaseMouseMove called + mpWindowImpl->mbPaintFrame = sal_False; // sal_True: Paint is visible, but not painted + mpWindowImpl->mbInPaint = sal_False; // sal_True: Inside PaintHdl + mpWindowImpl->mbMouseButtonDown = sal_False; // sal_True: BaseMouseButtonDown called + mpWindowImpl->mbMouseButtonUp = sal_False; // sal_True: BaseMouseButtonUp called + mpWindowImpl->mbKeyInput = sal_False; // sal_True: BaseKeyInput called + mpWindowImpl->mbKeyUp = sal_False; // sal_True: BaseKeyUp called + mpWindowImpl->mbCommand = sal_False; // sal_True: BaseCommand called + mpWindowImpl->mbDefPos = sal_True; // sal_True: Position is not Set + mpWindowImpl->mbDefSize = sal_True; // sal_True: Size is not Set + mpWindowImpl->mbCallMove = sal_True; // sal_True: Move must be called by Show + mpWindowImpl->mbCallResize = sal_True; // sal_True: Resize must be called by Show + mpWindowImpl->mbWaitSystemResize = sal_True; // sal_True: Wait for System-Resize + mpWindowImpl->mbInitWinClipRegion = sal_True; // sal_True: Calc Window Clip Region + mpWindowImpl->mbInitChildRegion = sal_False; // sal_True: InitChildClipRegion + mpWindowImpl->mbWinRegion = sal_False; // sal_True: Window Region + mpWindowImpl->mbClipChildren = sal_False; // sal_True: Child-Fenster muessen evt. geclippt werden + mpWindowImpl->mbClipSiblings = sal_False; // sal_True: Nebeneinanderliegende Child-Fenster muessen evt. geclippt werden + mpWindowImpl->mbChildTransparent = sal_False; // sal_True: Child-Fenster duerfen transparent einschalten (inkl. Parent-CLIPCHILDREN) + mpWindowImpl->mbPaintTransparent = sal_False; // sal_True: Paints muessen auf Parent ausgeloest werden + mpWindowImpl->mbMouseTransparent = sal_False; // sal_True: Window is transparent for Mouse + mpWindowImpl->mbDlgCtrlStart = sal_False; // sal_True: Ab hier eigenes Dialog-Control + mpWindowImpl->mbFocusVisible = sal_False; // sal_True: Focus Visible + mpWindowImpl->mbUseNativeFocus = sal_False; + mpWindowImpl->mbNativeFocusVisible= sal_False; // sal_True: native Focus Visible + mpWindowImpl->mbInShowFocus = sal_False; // prevent recursion + mpWindowImpl->mbInHideFocus = sal_False; // prevent recursion + mpWindowImpl->mbTrackVisible = sal_False; // sal_True: Tracking Visible + mpWindowImpl->mbControlForeground = sal_False; // sal_True: Foreground-Property set + mpWindowImpl->mbControlBackground = sal_False; // sal_True: Background-Property set + mpWindowImpl->mbAlwaysOnTop = sal_False; // sal_True: immer vor allen anderen normalen Fenstern sichtbar + mpWindowImpl->mbCompoundControl = sal_False; // sal_True: Zusammengesetztes Control => Listener... + mpWindowImpl->mbCompoundControlHasFocus = sal_False; // sal_True: Zusammengesetztes Control hat irgendwo den Focus + mpWindowImpl->mbPaintDisabled = sal_False; // sal_True: Paint soll nicht ausgefuehrt werden + mpWindowImpl->mbAllResize = sal_False; // sal_True: Auch ResizeEvents mit 0,0 schicken + mpWindowImpl->mbInDtor = sal_False; // sal_True: Wir befinden uns im Window-Dtor + mpWindowImpl->mbExtTextInput = sal_False; // sal_True: ExtTextInput-Mode is active + mpWindowImpl->mbInFocusHdl = sal_False; // sal_True: Innerhalb vom GetFocus-Handler + mpWindowImpl->mbCreatedWithToolkit = sal_False; + mpWindowImpl->mbSuppressAccessibilityEvents = sal_False; // sal_True: do not send any accessibility events + mpWindowImpl->mbDrawSelectionBackground = sal_False; // sal_True: draws transparent window background to indicate (toolbox) selection + mpWindowImpl->mbIsInTaskPaneList = sal_False; // sal_True: window was added to the taskpanelist in the topmost system window mpWindowImpl->mnNativeBackground = 0; // initialize later, depends on type - mpWindowImpl->mbCallHandlersDuringInputDisabled = FALSE; // TRUE: call event handlers even if input is disabled - mpWindowImpl->mbDisableAccessibleLabelForRelation = FALSE; // TRUE: do not set LabelFor relation on accessible objects - mpWindowImpl->mbDisableAccessibleLabeledByRelation = FALSE; // TRUE: do not set LabeledBy relation on accessible objects - mpWindowImpl->mbHelpTextDynamic = FALSE; // TRUE: append help id in HELP_DEBUG case - mpWindowImpl->mbFakeFocusSet = FALSE; // TRUE: pretend as if the window has focus. + mpWindowImpl->mbCallHandlersDuringInputDisabled = sal_False; // sal_True: call event handlers even if input is disabled + mpWindowImpl->mbDisableAccessibleLabelForRelation = sal_False; // sal_True: do not set LabelFor relation on accessible objects + mpWindowImpl->mbDisableAccessibleLabeledByRelation = sal_False; // sal_True: do not set LabeledBy relation on accessible objects + mpWindowImpl->mbHelpTextDynamic = sal_False; // sal_True: append help id in HELP_DEBUG case + mpWindowImpl->mbFakeFocusSet = sal_False; // sal_True: pretend as if the window has focus. - mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // TRUE: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active + mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // sal_True: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active } // ----------------------------------------------------------------------- @@ -733,7 +733,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste if ( !mpWindowImpl->mbFrame && !mpWindowImpl->mbBorderWin && !mpWindowImpl->mpBorderWindow && (nStyle & (WB_BORDER | WB_SYSTEMCHILDWINDOW) ) ) { - USHORT nBorderTypeStyle = 0; + sal_uInt16 nBorderTypeStyle = 0; if( (nStyle & WB_SYSTEMCHILDWINDOW) ) { // handle WB_SYSTEMCHILDWINDOW @@ -751,8 +751,8 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste } else if( !mpWindowImpl->mbFrame && ! pParent ) { - mpWindowImpl->mbOverlapWin = TRUE; - mpWindowImpl->mbFrame = TRUE; + mpWindowImpl->mbOverlapWin = sal_True; + mpWindowImpl->mbFrame = sal_True; } // insert window in list @@ -767,7 +767,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL; mpWindowImpl->mpOverlapData->mpNextBackWin = NULL; mpWindowImpl->mpOverlapData->mnSaveBackSize = 0; - mpWindowImpl->mpOverlapData->mbSaveBack = FALSE; + mpWindowImpl->mpOverlapData->mbSaveBack = sal_False; mpWindowImpl->mpOverlapData->mnTopLevel = 1; } @@ -778,7 +778,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste if ( mpWindowImpl->mbFrame ) { // create frame - ULONG nFrameStyle = 0; + sal_uIntPtr nFrameStyle = 0; if ( nStyle & WB_MOVEABLE ) nFrameStyle |= SAL_FRAME_STYLE_MOVEABLE; @@ -884,21 +884,21 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpFrameData->mnMouseCode = 0; mpWindowImpl->mpFrameData->mnMouseMode = 0; mpWindowImpl->mpFrameData->meMapUnit = MAP_PIXEL; - mpWindowImpl->mpFrameData->mbHasFocus = FALSE; - mpWindowImpl->mpFrameData->mbInMouseMove = FALSE; - mpWindowImpl->mpFrameData->mbMouseIn = FALSE; - mpWindowImpl->mpFrameData->mbStartDragCalled = FALSE; - mpWindowImpl->mpFrameData->mbNeedSysWindow = FALSE; - mpWindowImpl->mpFrameData->mbMinimized = FALSE; - mpWindowImpl->mpFrameData->mbStartFocusState = FALSE; - mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = FALSE; - mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = FALSE; - mpWindowImpl->mpFrameData->mbSysObjFocus = FALSE; + mpWindowImpl->mpFrameData->mbHasFocus = sal_False; + mpWindowImpl->mpFrameData->mbInMouseMove = sal_False; + mpWindowImpl->mpFrameData->mbMouseIn = sal_False; + mpWindowImpl->mpFrameData->mbStartDragCalled = sal_False; + mpWindowImpl->mpFrameData->mbNeedSysWindow = sal_False; + mpWindowImpl->mpFrameData->mbMinimized = sal_False; + mpWindowImpl->mpFrameData->mbStartFocusState = sal_False; + mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = sal_False; + mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = sal_False; + mpWindowImpl->mpFrameData->mbSysObjFocus = sal_False; mpWindowImpl->mpFrameData->maPaintTimer.SetTimeout( 30 ); mpWindowImpl->mpFrameData->maPaintTimer.SetTimeoutHdl( LINK( this, Window, ImplHandlePaintHdl ) ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeout( 50 ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeoutHdl( LINK( this, Window, ImplHandleResizeTimerHdl ) ); - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = FALSE; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_False; if ( pRealParent && IsTopWindow() ) { @@ -943,7 +943,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings ); OutputDevice::SetSettings( *pSVData->maAppData.mpSettings ); - pSVData->maAppData.mbSettingsInit = TRUE; + pSVData->maAppData.mbSettingsInit = sal_True; } // If we create a Window with default size, query this @@ -969,7 +969,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste } const StyleSettings& rStyleSettings = maSettings.GetStyleSettings(); - USHORT nScreenZoom = rStyleSettings.GetScreenZoom(); + sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom(); mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100; mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100; maFont = rStyleSettings.GetAppFont(); @@ -1030,7 +1030,7 @@ void Window::ImplInsertWindow( Window* pParent ) mpWindowImpl->mpFrameData = pFrameParent->mpWindowImpl->mpFrameData; mpWindowImpl->mpFrame = pFrameParent->mpWindowImpl->mpFrame; mpWindowImpl->mpFrameWindow = pFrameParent; - mpWindowImpl->mbFrame = FALSE; + mpWindowImpl->mbFrame = sal_False; // search overlap window and insert window in list if ( ImplIsOverlapWindow() ) @@ -1069,7 +1069,7 @@ void Window::ImplInsertWindow( Window* pParent ) // ----------------------------------------------------------------------- -void Window::ImplRemoveWindow( BOOL bRemoveFrameData ) +void Window::ImplRemoveWindow( sal_Bool bRemoveFrameData ) { // Fenster aus den Listen austragen if ( !mpWindowImpl->mbFrame ) @@ -1122,7 +1122,7 @@ void Window::ImplRemoveWindow( BOOL bRemoveFrameData ) void Window::ImplCallResize() { - mpWindowImpl->mbCallResize = FALSE; + mpWindowImpl->mbCallResize = sal_False; if( GetBackground().IsGradient() ) Invalidate(); @@ -1138,7 +1138,7 @@ void Window::ImplCallResize() void Window::ImplCallMove() { - mpWindowImpl->mbCallMove = FALSE; + mpWindowImpl->mbCallMove = sal_False; if( mpWindowImpl->mbFrame ) { @@ -1180,12 +1180,12 @@ void Window::ImplCallMove() // ----------------------------------------------------------------------- -static ULONG ImplAutoHelpID( ResMgr* pResMgr ) +static sal_uIntPtr ImplAutoHelpID( ResMgr* pResMgr ) { if ( !Application::IsAutoHelpIdEnabled() ) return 0; - ULONG nHID = 0; + sal_uIntPtr nHID = 0; DBG_ASSERT( pResMgr, "No res mgr for auto help id" ); if( ! pResMgr ) @@ -1221,17 +1221,17 @@ void Window::ImplLoadRes( const ResId& rResId ) nHelpId = ImplAutoHelpID( rResId.GetResMgr() ); SetHelpId( nHelpId ); - ULONG nObjMask = ReadLongRes(); + sal_uIntPtr nObjMask = ReadLongRes(); // ResourceStyle - ULONG nRSStyle = ReadLongRes(); + sal_uIntPtr nRSStyle = ReadLongRes(); // WinBits ReadLongRes(); // HelpId ReadLongRes(); - BOOL bPos = FALSE; - BOOL bSize = FALSE; + sal_Bool bPos = sal_False; + sal_Bool bSize = sal_False; Point aPos; Size aSize; @@ -1240,7 +1240,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // Groessenangabe aus der Resource verwenden MapUnit ePosMap = MAP_PIXEL; - bPos = TRUE; + bPos = sal_True; if ( nObjMask & WINDOW_XYMAPMODE ) ePosMap = (MapUnit)ReadLongRes(); @@ -1255,7 +1255,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // Groessenangabe aus der Resource verwenden MapUnit eSizeMap = MAP_PIXEL; - bSize = TRUE; + bSize = sal_True; if ( nObjMask & WINDOW_WHMAPMODE ) eSizeMap = (MapUnit)ReadLongRes(); @@ -1281,25 +1281,25 @@ void Window::ImplLoadRes( const ResId& rResId ) SetSizePixel( aSize ); if ( nRSStyle & RSWND_DISABLED ) - Enable( FALSE ); + Enable( sal_False ); if ( nObjMask & WINDOW_TEXT ) SetText( ReadStringRes() ); if ( nObjMask & WINDOW_HELPTEXT ) { SetHelpText( ReadStringRes() ); - mpWindowImpl->mbHelpTextDynamic = TRUE; + mpWindowImpl->mbHelpTextDynamic = sal_True; } if ( nObjMask & WINDOW_QUICKTEXT ) SetQuickHelpText( ReadStringRes() ); if ( nObjMask & WINDOW_EXTRALONG ) SetData( (void*)ReadLongRes() ); if ( nObjMask & WINDOW_UNIQUEID ) - SetUniqueId( (ULONG)ReadLongRes() ); + SetUniqueId( (sal_uIntPtr)ReadLongRes() ); if ( nObjMask & WINDOW_BORDER_STYLE ) { - USHORT nBorderStyle = (USHORT)ReadLongRes(); + sal_uInt16 nBorderStyle = (sal_uInt16)ReadLongRes(); SetBorderStyle( nBorderStyle ); } } @@ -1320,9 +1320,9 @@ ImplWinData* Window::ImplGetWinData() const mpWindowImpl->mpWinData->mpFocusRect = NULL; mpWindowImpl->mpWinData->mpTrackRect = NULL; mpWindowImpl->mpWinData->mnTrackFlags = 0; - mpWindowImpl->mpWinData->mnIsTopWindow = (USHORT) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) - mpWindowImpl->mpWinData->mbMouseOver = FALSE; - mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? FALSE : TRUE; // TRUE: try to draw this control with native theme API + mpWindowImpl->mpWinData->mnIsTopWindow = (sal_uInt16) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) + mpWindowImpl->mpWinData->mbMouseOver = sal_False; + mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? sal_False : sal_True; // sal_True: try to draw this control with native theme API mpWindowImpl->mpWinData->mpSmartHelpId = NULL; mpWindowImpl->mpWinData->mpSmartUniqueId = NULL; } @@ -1335,7 +1335,7 @@ ImplWinData* Window::ImplGetWinData() const SalGraphics* Window::ImplGetFrameGraphics() const { if ( mpWindowImpl->mpFrameWindow->mpGraphics ) - mpWindowImpl->mpFrameWindow->mbInitClipRegion = TRUE; + mpWindowImpl->mpFrameWindow->mbInitClipRegion = sal_True; else mpWindowImpl->mpFrameWindow->ImplGetGraphics(); mpWindowImpl->mpFrameWindow->mpGraphics->ResetClipRegion(); @@ -1365,7 +1365,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos ) if ( !mpWindowImpl->mbVisible ) return NULL; - USHORT nHitTest = ImplHitTest( rFramePos ); + sal_uInt16 nHitTest = ImplHitTest( rFramePos ); if ( nHitTest & WINDOW_HITTEST_INSIDE ) { // und danach gehen wir noch alle Child-Fenster durch @@ -1389,7 +1389,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos ) // ----------------------------------------------------------------------- -USHORT Window::ImplHitTest( const Point& rFramePos ) +sal_uInt16 Window::ImplHitTest( const Point& rFramePos ) { Point aFramePos( rFramePos ); if( ImplIsAntiparallel() ) @@ -1409,7 +1409,7 @@ USHORT Window::ImplHitTest( const Point& rFramePos ) return 0; } - USHORT nHitTest = WINDOW_HITTEST_INSIDE; + sal_uInt16 nHitTest = WINDOW_HITTEST_INSIDE; if ( mpWindowImpl->mbMouseTransparent ) nHitTest |= WINDOW_HITTEST_TRANSPARENT; return nHitTest; @@ -1417,22 +1417,22 @@ USHORT Window::ImplHitTest( const Point& rFramePos ) // ----------------------------------------------------------------------- -BOOL Window::ImplIsRealParentPath( const Window* pWindow ) const +sal_Bool Window::ImplIsRealParentPath( const Window* pWindow ) const { pWindow = pWindow->GetParent(); while ( pWindow ) { if ( pWindow == this ) - return TRUE; + return sal_True; pWindow = pWindow->GetParent(); } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Window::ImplIsChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow ) const { do { @@ -1442,19 +1442,19 @@ BOOL Window::ImplIsChild( const Window* pWindow, BOOL bSystemWindow ) const pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return TRUE; + return sal_True; } while ( pWindow ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Window::ImplIsWindowOrChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const { if ( this == pWindow ) - return TRUE; + return sal_True; return ImplIsChild( pWindow, bSystemWindow ); } @@ -1484,15 +1484,15 @@ int Window::ImplTestMousePointerSet() { // Wenn Mouse gecaptured ist, dann soll MousePointer umgeschaltet werden if ( IsMouseCaptured() ) - return TRUE; + return sal_True; // Wenn sich Mouse ueber dem Fenster befindet, dann soll MousePointer // umgeschaltet werden Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() ); if ( aClientRect.IsInside( GetPointerPosPixel() ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -1500,7 +1500,7 @@ int Window::ImplTestMousePointerSet() PointerStyle Window::ImplGetMousePointer() const { PointerStyle ePointerStyle; - BOOL bWait = FALSE; + sal_Bool bWait = sal_False; if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() ) ePointerStyle = GetPointer().GetStyle(); @@ -1520,7 +1520,7 @@ PointerStyle Window::ImplGetMousePointer() const if ( pWindow->mpWindowImpl->mnWaitCount ) { ePointerStyle = POINTER_WAIT; - bWait = TRUE; + bWait = sal_True; } else { @@ -1543,11 +1543,11 @@ PointerStyle Window::ImplGetMousePointer() const void Window::ImplResetReallyVisible() { - BOOL bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; + sal_Bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; - mbDevOutput = FALSE; - mpWindowImpl->mbReallyVisible = FALSE; - mpWindowImpl->mbReallyShown = FALSE; + mbDevOutput = sal_False; + mpWindowImpl->mbReallyVisible = sal_False; + mpWindowImpl->mbReallyShown = sal_False; // the SHOW/HIDE events serve as indicators to send child creation/destroy events to the access bridge. // For this, the data member of the event must not be NULL. @@ -1585,11 +1585,11 @@ void Window::ImplSetReallyVisible() if( !mpWindowImpl->mbReallyShown ) ImplCallInitShow(); - BOOL bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; + sal_Bool bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; - mbDevOutput = TRUE; - mpWindowImpl->mbReallyVisible = TRUE; - mpWindowImpl->mbReallyShown = TRUE; + mbDevOutput = sal_True; + mpWindowImpl->mbReallyVisible = sal_True; + mpWindowImpl->mbReallyShown = sal_True; // the SHOW/HIDE events serve as indicators to send child creation/destroy events to the access bridge. // For this, the data member of the event must not be NULL. @@ -1622,10 +1622,10 @@ void Window::ImplSetReallyVisible() void Window::ImplCallInitShow() { - mpWindowImpl->mbReallyShown = TRUE; - mpWindowImpl->mbInInitShow = TRUE; + mpWindowImpl->mbReallyShown = sal_True; + mpWindowImpl->mbInInitShow = sal_True; StateChanged( STATE_CHANGE_INITSHOW ); - mpWindowImpl->mbInInitShow = FALSE; + mpWindowImpl->mbInInitShow = sal_False; Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) @@ -1681,7 +1681,7 @@ void Window::ImplInitResolutionSettings() if ( mpWindowImpl->mbFrame ) { const StyleSettings& rStyleSettings = maSettings.GetStyleSettings(); - USHORT nScreenZoom = rStyleSettings.GetScreenZoom(); + sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom(); mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100; mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100; SetPointFont( rStyleSettings.GetAppFont() ); @@ -1707,7 +1707,7 @@ void Window::ImplInitResolutionSettings() void Window::ImplPointToLogic( Font& rFont ) const { Size aSize = rFont.GetSize(); - USHORT nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); + sal_uInt16 nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); if ( aSize.Width() ) { @@ -1734,7 +1734,7 @@ void Window::ImplPointToLogic( Font& rFont ) const void Window::ImplLogicToPoint( Font& rFont ) const { Size aSize = rFont.GetSize(); - USHORT nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); + sal_uInt16 nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); if ( IsMapModeEnabled() ) aSize = LogicToPixel( aSize ); @@ -1758,13 +1758,13 @@ void Window::ImplLogicToPoint( Font& rFont ) const // ----------------------------------------------------------------------- -BOOL Window::ImplSysObjClip( const Region* pOldRegion ) +sal_Bool Window::ImplSysObjClip( const Region* pOldRegion ) { - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( mpWindowImpl->mpSysObj ) { - BOOL bVisibleState = mpWindowImpl->mbReallyVisible; + sal_Bool bVisibleState = mpWindowImpl->mbReallyVisible; if ( bVisibleState ) { @@ -1785,7 +1785,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion ) Region aRegion = *pWinChildClipRegion; Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); Region aWinRectRegion( aWinRect ); - USHORT nClipFlags = mpWindowImpl->mpSysObj->GetClipRegionType(); + sal_uInt16 nClipFlags = mpWindowImpl->mpSysObj->GetClipRegionType(); if ( aRegion == aWinRectRegion ) mpWindowImpl->mpSysObj->ResetClipRegion(); @@ -1804,9 +1804,9 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion ) long nY; long nWidth; long nHeight; - ULONG nRectCount; + sal_uIntPtr nRectCount; ImplRegionInfo aInfo; - BOOL bRegionRect; + sal_Bool bRegionRect; nRectCount = aRegion.GetRectCount(); mpWindowImpl->mpSysObj->BeginSetClipRegion( nRectCount ); @@ -1820,7 +1820,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion ) } } else - bVisibleState = FALSE; + bVisibleState = sal_False; } // Visible-Status updaten @@ -1884,31 +1884,31 @@ void Window::ImplUpdateSysObjClip() // ----------------------------------------------------------------------- -BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller ) +sal_Bool Window::ImplSetClipFlagChilds( sal_Bool bSysObjOnlySmaller ) { - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( mpWindowImpl->mpSysObj ) { Region* pOldRegion = NULL; if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion ) pOldRegion = new Region( mpWindowImpl->maWinClipRegion ); - mbInitClipRegion = TRUE; - mpWindowImpl->mbInitWinClipRegion = TRUE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInitWinClipRegion = sal_True; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } if ( !ImplSysObjClip( pOldRegion ) ) { - mbInitClipRegion = TRUE; - mpWindowImpl->mbInitWinClipRegion = TRUE; - bUpdate = FALSE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInitWinClipRegion = sal_True; + bUpdate = sal_False; } if ( pOldRegion ) @@ -1916,14 +1916,14 @@ BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller ) } else { - mbInitClipRegion = TRUE; - mpWindowImpl->mbInitWinClipRegion = TRUE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInitWinClipRegion = sal_True; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -1932,15 +1932,15 @@ BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -BOOL Window::ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller ) +sal_Bool Window::ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller ) { - BOOL bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); + sal_Bool bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } @@ -1949,18 +1949,18 @@ BOOL Window::ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller ) +sal_Bool Window::ImplSetClipFlag( sal_Bool bSysObjOnlySmaller ) { if ( !ImplIsOverlapWindow() ) { - BOOL bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); + sal_Bool bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); Window* pParent = ImplGetParent(); if ( pParent && ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP)) ) { - pParent->mbInitClipRegion = TRUE; - pParent->mpWindowImpl->mbInitChildRegion = TRUE; + pParent->mbInitClipRegion = sal_True; + pParent->mpWindowImpl->mbInitChildRegion = sal_True; } // Schwestern muessen ihre ClipRegion auch neu berechnen @@ -1970,7 +1970,7 @@ BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2050,7 +2050,7 @@ void Window::ImplExcludeOverlapWindows2( Region& rRegion ) // ----------------------------------------------------------------------- -void Window::ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps ) +void Window::ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps ) { if ( bThis ) ImplIntersectWindowClipRegion( rRegion ); @@ -2085,21 +2085,21 @@ void Window::ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps ) // ----------------------------------------------------------------------- -BOOL Window::ImplClipChilds( Region& rRegion ) +sal_Bool Window::ImplClipChilds( Region& rRegion ) { - BOOL bOtherClip = FALSE; + sal_Bool bOtherClip = sal_False; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) { // ParentClipMode-Flags auswerten - USHORT nClipMode = pWindow->GetParentClipMode(); + sal_uInt16 nClipMode = pWindow->GetParentClipMode(); if ( !(nClipMode & PARENTCLIPMODE_NOCLIP) && ((nClipMode & PARENTCLIPMODE_CLIP) || (GetStyle() & WB_CLIPCHILDREN)) ) pWindow->ImplExcludeWindowRegion( rRegion ); else - bOtherClip = TRUE; + bOtherClip = sal_True; } pWindow = pWindow->mpWindowImpl->mpNext; @@ -2153,13 +2153,13 @@ void Window::ImplInitWinClipRegion() ImplClipSiblings( mpWindowImpl->maWinClipRegion ); // Clip Parent Boundaries - ImplClipBoundaries( mpWindowImpl->maWinClipRegion, FALSE, TRUE ); + ImplClipBoundaries( mpWindowImpl->maWinClipRegion, sal_False, sal_True ); // Clip Children if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren ) - mpWindowImpl->mbInitChildRegion = TRUE; + mpWindowImpl->mbInitChildRegion = sal_True; - mpWindowImpl->mbInitWinClipRegion = FALSE; + mpWindowImpl->mbInitWinClipRegion = sal_False; } // ----------------------------------------------------------------------- @@ -2184,7 +2184,7 @@ void Window::ImplInitWinChildClipRegion() ImplClipChilds( *mpWindowImpl->mpChildClipRegion ); } - mpWindowImpl->mbInitChildRegion = FALSE; + mpWindowImpl->mbInitChildRegion = sal_False; } // ----------------------------------------------------------------------- @@ -2265,7 +2265,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& // ----------------------------------------------------------------------- void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, - BOOL bChilds, BOOL bParent, BOOL bSiblings ) + sal_Bool bChilds, sal_Bool bParent, sal_Bool bSiblings ) { Region aRegion( rSourceRect ); if ( mpWindowImpl->mbWinRegion ) @@ -2337,13 +2337,13 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegio // ----------------------------------------------------------------------- -void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) +void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) { // call PrePaint. PrePaint may add to the invalidate region as well as // other parameters used below. PrePaint(); - mpWindowImpl->mbPaintFrame = FALSE; + mpWindowImpl->mbPaintFrame = sal_False; if ( nPaintFlags & IMPL_PAINT_PAINTALLCHILDS ) mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALLCHILDS | (nPaintFlags & IMPL_PAINT_PAINTALL); @@ -2397,8 +2397,8 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) if ( mpWindowImpl->mpCursor ) mpWindowImpl->mpCursor->ImplHide(); - mbInitClipRegion = TRUE; - mpWindowImpl->mbInPaint = TRUE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInPaint = sal_True; // Paint-Region zuruecksetzen Region aPaintRegion( mpWindowImpl->maInvalidateRegion ); @@ -2438,11 +2438,11 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) if ( mpWindowImpl->mbFocusVisible ) ImplInvertFocus( *(mpWindowImpl->mpWinData->mpFocusRect) ); } - mpWindowImpl->mbInPaint = FALSE; - mbInitClipRegion = TRUE; + mpWindowImpl->mbInPaint = sal_False; + mbInitClipRegion = sal_True; mpWindowImpl->mpPaintRegion = NULL; if ( mpWindowImpl->mpCursor ) - mpWindowImpl->mpCursor->ImplShow( FALSE ); + mpWindowImpl->mpCursor->ImplShow( sal_False ); } } else @@ -2468,7 +2468,7 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) // #98943# draw toolbox selection if( !aSelectionRect.IsEmpty() ) - DrawSelectionBackground( aSelectionRect, 3, FALSE, TRUE, FALSE ); + DrawSelectionBackground( aSelectionRect, 3, sal_False, sal_True, sal_False ); if ( pChildRegion ) delete pChildRegion; @@ -2535,14 +2535,14 @@ IMPL_LINK( Window, ImplHandleResizeTimerHdl, void*, EMPTYARG ) // ----------------------------------------------------------------------- -void Window::ImplInvalidateFrameRegion( const Region* pRegion, USHORT nFlags ) +void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) { // PAINTCHILDS bei allen Parent-Fenster bis zum ersten OverlapWindow // setzen if ( !ImplIsOverlapWindow() ) { Window* pTempWindow = this; - USHORT nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0; + sal_uInt16 nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0; do { pTempWindow = pTempWindow->ImplGetParent(); @@ -2600,7 +2600,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion ) { Region aRegion = rRegion; - ImplClipBoundaries( aRegion, TRUE, TRUE ); + ImplClipBoundaries( aRegion, sal_True, sal_True ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); @@ -2630,7 +2630,7 @@ void Window::ImplInvalidateParentFrameRegion( Region& rRegion ) // ----------------------------------------------------------------------- -void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) +void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) { // Hintergrund-Sicherung zuruecksetzen @@ -2638,7 +2638,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) ImplInvalidateAllOverlapBackgrounds(); // Feststellen, was neu ausgegeben werden muss - BOOL bInvalidateAll = !pRegion; + sal_Bool bInvalidateAll = !pRegion; // Transparent-Invalidate beruecksichtigen Window* pOpaqueWindow = this; @@ -2651,7 +2651,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) { pOpaqueWindow = pTempWindow; nFlags |= INVALIDATE_CHILDREN; - bInvalidateAll = FALSE; + bInvalidateAll = sal_False; break; } @@ -2663,7 +2663,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) } // Region zusammenbauen - USHORT nOrgFlags = nFlags; + sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (INVALIDATE_CHILDREN | INVALIDATE_NOCHILDREN)) ) { if ( GetStyle() & WB_CLIPCHILDREN ) @@ -2672,7 +2672,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) nFlags |= INVALIDATE_CHILDREN; } if ( (nFlags & INVALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bInvalidateAll = FALSE; + bInvalidateAll = sal_False; if ( bInvalidateAll ) ImplInvalidateFrameRegion( NULL, nFlags ); else @@ -2691,7 +2691,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) else aRegion.Intersect( *pRegion ); } - ImplClipBoundaries( aRegion, TRUE, TRUE ); + ImplClipBoundaries( aRegion, sal_True, sal_True ); if ( nFlags & INVALIDATE_NOCHILDREN ) { nFlags &= ~INVALIDATE_CHILDREN; @@ -2718,7 +2718,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - BOOL bChilds ) + sal_Bool bChilds ) { if ( (mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALL)) == IMPL_PAINT_PAINT ) { @@ -2733,7 +2733,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { - pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, TRUE ); + pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, sal_True ); pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2743,7 +2743,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - BOOL bChilds ) + sal_Bool bChilds ) { // Paint-Region auch verschieben, wenn noch Paints anstehen ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, bChilds ); @@ -2771,7 +2771,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, if ( !aPaintAllRegion.IsEmpty() ) { aPaintAllRegion.Move( nHorzScroll, nVertScroll ); - USHORT nPaintFlags = 0; + sal_uInt16 nPaintFlags = 0; if ( bChilds ) mpWindowImpl->mnPaintFlags |= INVALIDATE_CHILDREN; ImplInvalidateFrameRegion( &aPaintAllRegion, nPaintFlags ); @@ -2781,7 +2781,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, // ----------------------------------------------------------------------- -void Window::ImplValidateFrameRegion( const Region* pRegion, USHORT nFlags ) +void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) { if ( !pRegion ) mpWindowImpl->maInvalidateRegion.SetEmpty(); @@ -2826,11 +2826,11 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) +void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) { // Region zusammenbauen - BOOL bValidateAll = !pRegion; - USHORT nOrgFlags = nFlags; + sal_Bool bValidateAll = !pRegion; + sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (VALIDATE_CHILDREN | VALIDATE_NOCHILDREN)) ) { if ( GetStyle() & WB_CLIPCHILDREN ) @@ -2839,7 +2839,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) nFlags |= VALIDATE_CHILDREN; } if ( (nFlags & VALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bValidateAll = FALSE; + bValidateAll = sal_False; if ( bValidateAll ) ImplValidateFrameRegion( NULL, nFlags ); else @@ -2848,7 +2848,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) Region aRegion( aRect ); if ( pRegion ) aRegion.Intersect( *pRegion ); - ImplClipBoundaries( aRegion, TRUE, TRUE ); + ImplClipBoundaries( aRegion, sal_True, sal_True ); if ( nFlags & VALIDATE_NOCHILDREN ) { nFlags &= ~VALIDATE_CHILDREN; @@ -2868,7 +2868,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) // ----------------------------------------------------------------------- void Window::ImplScroll( const Rectangle& rRect, - long nHorzScroll, long nVertScroll, USHORT nFlags ) + long nHorzScroll, long nVertScroll, sal_uInt16 nFlags ) { if ( !IsDeviceOutputNecessary() ) return; @@ -2886,7 +2886,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( mpWindowImpl->mpCursor ) mpWindowImpl->mpCursor->ImplHide(); - USHORT nOrgFlags = nFlags; + sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (SCROLL_CHILDREN | SCROLL_NOCHILDREN)) ) { if ( GetStyle() & WB_CLIPCHILDREN ) @@ -2896,14 +2896,14 @@ void Window::ImplScroll( const Rectangle& rRect, } Region aInvalidateRegion; - BOOL bScrollChilds = (nFlags & SCROLL_CHILDREN) != 0; - BOOL bErase = (nFlags & SCROLL_NOERASE) == 0; + sal_Bool bScrollChilds = (nFlags & SCROLL_CHILDREN) != 0; + sal_Bool bErase = (nFlags & SCROLL_NOERASE) == 0; if ( !mpWindowImpl->mpFirstChild ) - bScrollChilds = FALSE; + bScrollChilds = sal_False; // --- RTL --- check if this window requires special action - BOOL bReMirror = ( ImplIsAntiparallel() ); + sal_Bool bReMirror = ( ImplIsAntiparallel() ); Rectangle aRectMirror( rRect ); if( bReMirror ) @@ -2918,7 +2918,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !(nFlags & SCROLL_NOINVALIDATE) ) { - ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChilds, TRUE, FALSE ); + ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChilds, sal_True, sal_False ); // --- RTL --- // if the scrolling on the device is performed in the opposite direction @@ -2928,7 +2928,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !aInvalidateRegion.IsEmpty() ) { aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); - bErase = TRUE; + bErase = sal_True; } if ( !(nFlags & SCROLL_NOWINDOWINVALIDATE) ) { @@ -2950,7 +2950,7 @@ void Window::ImplScroll( const Rectangle& rRect, aRegion.Exclude( aInvalidateRegion ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !bScrollChilds ) { if ( nOrgFlags & SCROLL_NOCHILDREN ) @@ -3001,7 +3001,7 @@ void Window::ImplScroll( const Rectangle& rRect, // so it has to be re-mirrored before calling the Paint-handler mpWindowImpl->mnPaintFlags |= IMPL_PAINT_CHECKRTL; - USHORT nPaintFlags = INVALIDATE_CHILDREN; + sal_uInt16 nPaintFlags = INVALIDATE_CHILDREN; if ( !bErase ) nPaintFlags |= INVALIDATE_NOERASE; if ( !bScrollChilds ) @@ -3031,24 +3031,24 @@ void Window::ImplScroll( const Rectangle& rRect, Update(); if ( mpWindowImpl->mpCursor ) - mpWindowImpl->mpCursor->ImplShow( FALSE ); + mpWindowImpl->mpCursor->ImplShow( sal_False ); } // ----------------------------------------------------------------------- -void Window::ImplUpdateAll( BOOL bOverlapWindows ) +void Window::ImplUpdateAll( sal_Bool bOverlapWindows ) { if ( !mpWindowImpl->mbReallyVisible ) return; - BOOL bFlush = FALSE; + sal_Bool bFlush = sal_False; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = TRUE; + bFlush = sal_True; } // Ein Update wirkt immer auf das OverlapWindow, damit bei spaeteren @@ -3107,10 +3107,10 @@ void Window::ImplUpdateWindowPtr() // ----------------------------------------------------------------------- -void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame ) +void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ) { - BOOL bVisible = IsVisible(); - Show( FALSE ); + sal_Bool bVisible = IsVisible(); + Show( sal_False ); ImplRemoveWindow( bNewFrame ); Window* pRealParent = mpWindowImpl->mpRealParent; ImplInsertWindow( ImplGetParent() ); @@ -3131,14 +3131,14 @@ void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame ) } if ( bVisible ) - Show( TRUE ); + Show( sal_True ); } // ----------------------------------------------------------------------- -BOOL Window::ImplUpdatePos() +sal_Bool Window::ImplUpdatePos() { - BOOL bSysChild = FALSE; + sal_Bool bSysChild = sal_False; if ( ImplIsOverlapWindow() ) { @@ -3157,12 +3157,12 @@ BOOL Window::ImplUpdatePos() while ( pChild ) { if ( pChild->ImplUpdatePos() ) - bSysChild = TRUE; + bSysChild = sal_True; pChild = pChild->mpWindowImpl->mpNext; } if ( mpWindowImpl->mpSysObj ) - bSysChild = TRUE; + bSysChild = sal_True; return bSysChild; } @@ -3184,12 +3184,12 @@ void Window::ImplUpdateSysObjPos() // ----------------------------------------------------------------------- void Window::ImplPosSizeWindow( long nX, long nY, - long nWidth, long nHeight, USHORT nFlags ) + long nWidth, long nHeight, sal_uInt16 nFlags ) { - BOOL bNewPos = FALSE; - BOOL bNewSize = FALSE; - BOOL bNewWidth = FALSE; - BOOL bCopyBits = FALSE; + sal_Bool bNewPos = sal_False; + sal_Bool bNewSize = sal_False; + sal_Bool bNewWidth = sal_False; + sal_Bool bCopyBits = sal_False; long nOldOutOffX = mnOutOffX; long nOldOutOffY = mnOutOffY; long nOldOutWidth = mnOutWidth; @@ -3211,17 +3211,17 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mnOutWidth && mnOutHeight && !mpWindowImpl->mbPaintTransparent && !mpWindowImpl->mbInitWinClipRegion && !mpWindowImpl->maWinClipRegion.IsEmpty() && !HasPaintEvent() ) - bCopyBits = TRUE; + bCopyBits = sal_True; } - BOOL bnXRecycled = FALSE; // avoid duplicate mirroring in RTL case + sal_Bool bnXRecycled = sal_False; // avoid duplicate mirroring in RTL case if ( nFlags & WINDOW_POSSIZE_WIDTH ) { if(!( nFlags & WINDOW_POSSIZE_X )) { nX = mpWindowImpl->mnX; nFlags |= WINDOW_POSSIZE_X; - bnXRecycled = TRUE; // we're using a mnX which was already mirrored in RTL case + bnXRecycled = sal_True; // we're using a mnX which was already mirrored in RTL case } if ( nWidth < 0 ) @@ -3229,9 +3229,9 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nWidth != mnOutWidth ) { mnOutWidth = nWidth; - bNewSize = TRUE; - bCopyBits = FALSE; - bNewWidth = TRUE; + bNewSize = sal_True; + bCopyBits = sal_False; + bNewWidth = sal_True; } } if ( nFlags & WINDOW_POSSIZE_HEIGHT ) @@ -3241,8 +3241,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nHeight != mnOutHeight ) { mnOutHeight = nHeight; - bNewSize = TRUE; - bCopyBits = FALSE; + bNewSize = sal_True; + bCopyBits = sal_False; } } @@ -3292,12 +3292,12 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, FALSE, TRUE, TRUE ); + *pOverlapRegion, sal_False, sal_True, sal_True ); } mpWindowImpl->mnX = nX; mpWindowImpl->maPos.X() = nOrgX; mpWindowImpl->mnAbsScreenX = aPtDev.X(); // --- RTL --- (store real screen pos) - bNewPos = TRUE; + bNewPos = sal_True; } } if ( nFlags & WINDOW_POSSIZE_Y ) @@ -3310,11 +3310,11 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, FALSE, TRUE, TRUE ); + *pOverlapRegion, sal_False, sal_True, sal_True ); } mpWindowImpl->mnY = nY; mpWindowImpl->maPos.Y() = nY; - bNewPos = TRUE; + bNewPos = sal_True; } } @@ -3330,7 +3330,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, */ if ( bNewPos || bNewSize ) { - BOOL bUpdateSysObjPos = FALSE; + sal_Bool bUpdateSysObjPos = sal_False; if ( bNewPos ) bUpdateSysObjPos = ImplUpdatePos(); @@ -3357,7 +3357,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, } else { - mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = TRUE; + mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = sal_True; } } } @@ -3383,12 +3383,12 @@ void Window::ImplPosSizeWindow( long nX, long nY, else { if ( bNewPos ) - mpWindowImpl->mbCallMove = TRUE; + mpWindowImpl->mbCallMove = sal_True; if ( bNewSize ) - mpWindowImpl->mbCallResize = TRUE; + mpWindowImpl->mbCallResize = sal_True; } - BOOL bUpdateSysObjClip = FALSE; + sal_Bool bUpdateSysObjClip = sal_False; if ( IsReallyVisible() ) { if ( bNewPos || bNewSize ) @@ -3399,7 +3399,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) ImplInvalidateAllOverlapBackgrounds(); // Clip-Flag neu setzen - bUpdateSysObjClip = !ImplSetClipFlag( TRUE ); + bUpdateSysObjClip = !ImplSetClipFlag( sal_True ); } // Fensterinhalt invalidieren ? @@ -3407,8 +3407,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, { if ( bNewPos ) { - BOOL bInvalidate = FALSE; - BOOL bParentPaint = TRUE; + sal_Bool bInvalidate = sal_False; + sal_Bool bParentPaint = sal_True; if ( !ImplIsOverlapWindow() ) bParentPaint = mpWindowImpl->mpParent->IsPaintEnabled(); if ( bCopyBits && bParentPaint && !HasPaintEvent() ) @@ -3418,7 +3418,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Size( mnOutWidth, mnOutHeight ) ) ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !pOverlapRegion->IsEmpty() ) { pOverlapRegion->Move( mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY ); @@ -3430,7 +3430,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ), Size( nOldOutWidth, nOldOutHeight ) ), mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY, - TRUE ); + sal_True ); SalGraphics* pGraphics = ImplGetFrameGraphics(); if ( pGraphics ) { @@ -3443,10 +3443,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, SAL_COPYAREA_WINDOWINVALIDATE, this ); } else - bInvalidate = TRUE; + bInvalidate = sal_True; } else - bInvalidate = TRUE; + bInvalidate = sal_True; if ( !bInvalidate ) { if ( !pOverlapRegion->IsEmpty() ) @@ -3454,10 +3454,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, } } else - bInvalidate = TRUE; + bInvalidate = sal_True; } else - bInvalidate = TRUE; + bInvalidate = sal_True; if ( bInvalidate ) ImplInvalidateFrameRegion( NULL, INVALIDATE_CHILDREN ); } @@ -3469,7 +3469,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, aRegion.Exclude( *pOldRegion ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); } @@ -3482,7 +3482,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Region aRegion( *pOldRegion ); if ( !mpWindowImpl->mbPaintTransparent ) ImplExcludeWindowRegion( aRegion ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !aRegion.IsEmpty() && !mpWindowImpl->mpBorderWindow ) ImplInvalidateParentFrameRegion( aRegion ); } @@ -3573,7 +3573,7 @@ void Window::ImplCalcChildOverlapToTop( ImplCalcToTopData* pPrevData ) // ----------------------------------------------------------------------- -void Window::ImplToTop( USHORT nFlags ) +void Window::ImplToTop( sal_uInt16 nFlags ) { DBG_ASSERT( ImplIsOverlapWindow(), "Window::ImplToTop(): Is not a OverlapWindow" ); @@ -3590,7 +3590,7 @@ void Window::ImplToTop( USHORT nFlags ) // do not bring floating windows on the client to top if( !ImplGetClientWindow() || !(ImplGetClientWindow()->GetStyle() & WB_SYSTEMFLOATWIN) ) { - USHORT nSysFlags = 0; + sal_uInt16 nSysFlags = 0; if ( nFlags & TOTOP_RESTOREWHENMIN ) nSysFlags |= SAL_FRAME_TOTOP_RESTOREWHENMIN; if ( nFlags & TOTOP_FOREGROUNDTASK ) @@ -3613,7 +3613,7 @@ void Window::ImplToTop( USHORT nFlags ) mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev; // AlwaysOnTop beruecksichtigen - BOOL bOnTop = IsAlwaysOnTopEnabled(); + sal_Bool bOnTop = IsAlwaysOnTopEnabled(); Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; if ( !bOnTop ) { @@ -3626,7 +3626,7 @@ void Window::ImplToTop( USHORT nFlags ) } // TopLevel abpruefen - BYTE nTopLevel = mpWindowImpl->mpOverlapData->mnTopLevel; + sal_uInt8 nTopLevel = mpWindowImpl->mpOverlapData->mnTopLevel; while ( pNextWin ) { if ( (bOnTop != pNextWin->IsAlwaysOnTopEnabled()) || @@ -3667,7 +3667,7 @@ void Window::ImplToTop( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::ImplStartToTop( USHORT nFlags ) +void Window::ImplStartToTop( sal_uInt16 nFlags ) { ImplCalcToTopData aStartData; ImplCalcToTopData* pCurData; @@ -3722,7 +3722,7 @@ void Window::ImplStartToTop( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible ) +void Window::ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ) { // Soll Focus auch geholt werden? if ( !(nFlags & TOTOP_NOGRABFOCUS) ) @@ -3741,7 +3741,7 @@ void Window::ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible ) pFocusWindow = pFocusWindow->ImplGetParent(); } if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ACTIVATE_MODE_GRABFOCUS) && - !pFocusWindow->HasChildPathFocus( TRUE ) ) + !pFocusWindow->HasChildPathFocus( sal_True ) ) pFocusWindow->GrabFocus(); } @@ -3758,8 +3758,8 @@ void Window::ImplShowAllOverlaps() { if ( pOverlapWindow->mpWindowImpl->mbOverlapVisible ) { - pOverlapWindow->Show( TRUE, SHOW_NOACTIVATE ); - pOverlapWindow->mpWindowImpl->mbOverlapVisible = FALSE; + pOverlapWindow->Show( sal_True, SHOW_NOACTIVATE ); + pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_False; } pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; @@ -3775,8 +3775,8 @@ void Window::ImplHideAllOverlaps() { if ( pOverlapWindow->IsVisible() ) { - pOverlapWindow->mpWindowImpl->mbOverlapVisible = TRUE; - pOverlapWindow->Show( FALSE ); + pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_True; + pOverlapWindow->Show( sal_False ); } pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; @@ -3785,24 +3785,24 @@ void Window::ImplHideAllOverlaps() // ----------------------------------------------------------------------- -void Window::ImplCallMouseMove( USHORT nMouseCode, BOOL bModChanged ) +void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged ) { if ( mpWindowImpl->mpFrameData->mbMouseIn && mpWindowImpl->mpFrameWindow->mpWindowImpl->mbReallyVisible ) { - ULONG nTime = Time::GetSystemTicks(); + sal_uIntPtr nTime = Time::GetSystemTicks(); long nX = mpWindowImpl->mpFrameData->mnLastMouseX; long nY = mpWindowImpl->mpFrameData->mnLastMouseY; - USHORT nCode = nMouseCode; - USHORT nMode = mpWindowImpl->mpFrameData->mnMouseMode; - BOOL bLeave; + sal_uInt16 nCode = nMouseCode; + sal_uInt16 nMode = mpWindowImpl->mpFrameData->mnMouseMode; + sal_Bool bLeave; // Auf MouseLeave testen if ( ((nX < 0) || (nY < 0) || (nX >= mpWindowImpl->mpFrameWindow->mnOutWidth) || (nY >= mpWindowImpl->mpFrameWindow->mnOutHeight)) && !ImplGetSVData()->maWinData.mpCaptureWin ) - bLeave = TRUE; + bLeave = sal_True; else - bLeave = FALSE; + bLeave = sal_False; nMode |= MOUSE_SYNTHETIC; if ( bModChanged ) nMode |= MOUSE_MODIFIERCHANGED; @@ -3849,8 +3849,8 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, Window* pNewRealWindow; Window* pOldRealWindow; Window* pLastRealWindow; - BOOL bCallActivate = TRUE; - BOOL bCallDeactivate = TRUE; + sal_Bool bCallActivate = sal_True; + sal_Bool bCallDeactivate = sal_True; pOldRealWindow = pOldOverlapWindow->ImplGetWindow(); pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); @@ -3861,7 +3861,7 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, !pNewRealWindow->GetActivateMode() ) { pSVData->maWinData.mpLastDeacWin = pOldOverlapWindow; - bCallDeactivate = FALSE; + bCallDeactivate = sal_False; } } else if ( (pNewRealWindow->GetType() != WINDOW_FLOATINGWINDOW) || @@ -3870,15 +3870,15 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, if ( pSVData->maWinData.mpLastDeacWin ) { if ( pSVData->maWinData.mpLastDeacWin == pNewOverlapWindow ) - bCallActivate = FALSE; + bCallActivate = sal_False; else { pLastRealWindow = pSVData->maWinData.mpLastDeacWin->ImplGetWindow(); - pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = FALSE; + pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = sal_False; pSVData->maWinData.mpLastDeacWin->Deactivate(); if ( pLastRealWindow != pSVData->maWinData.mpLastDeacWin ) { - pLastRealWindow->mpWindowImpl->mbActive = TRUE; + pLastRealWindow->mpWindowImpl->mbActive = sal_True; pLastRealWindow->Activate(); } } @@ -3890,14 +3890,14 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, { if( pOldOverlapWindow->mpWindowImpl->mbActive ) { - pOldOverlapWindow->mpWindowImpl->mbActive = FALSE; + pOldOverlapWindow->mpWindowImpl->mbActive = sal_False; pOldOverlapWindow->Deactivate(); } if ( pOldRealWindow != pOldOverlapWindow ) { if( pOldRealWindow->mpWindowImpl->mbActive ) { - pOldRealWindow->mpWindowImpl->mbActive = FALSE; + pOldRealWindow->mpWindowImpl->mbActive = sal_False; pOldRealWindow->Deactivate(); } } @@ -3906,14 +3906,14 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, { if( ! pNewOverlapWindow->mpWindowImpl->mbActive ) { - pNewOverlapWindow->mpWindowImpl->mbActive = TRUE; + pNewOverlapWindow->mpWindowImpl->mbActive = sal_True; pNewOverlapWindow->Activate(); } if ( pNewRealWindow != pNewOverlapWindow ) { if( ! pNewRealWindow->mpWindowImpl->mbActive ) { - pNewRealWindow->mpWindowImpl->mbActive = TRUE; + pNewRealWindow->mpWindowImpl->mbActive = sal_True; pNewRealWindow->Activate(); } } @@ -3935,7 +3935,7 @@ static bool IsWindowFocused(const WindowImpl& rWinImpl) } // ----------------------------------------------------------------------- -void Window::ImplGrabFocus( USHORT nFlags ) +void Window::ImplGrabFocus( sal_uInt16 nFlags ) { // #143570# no focus for destructing windows if( mpWindowImpl->mbInDtor ) @@ -3993,13 +3993,13 @@ void Window::ImplGrabFocus( USHORT nFlags ) // which is done using ToTop ImplSVData* pSVData = ImplGetSVData(); - BOOL bAsyncFocusWaiting = FALSE; + sal_Bool bAsyncFocusWaiting = sal_False; Window *pFrame = pSVData->maWinData.mpFirstFrame; while( pFrame ) { if( pFrame != mpWindowImpl->mpFrameWindow && pFrame->mpWindowImpl->mpFrameData->mnFocusId ) { - bAsyncFocusWaiting = TRUE; + bAsyncFocusWaiting = sal_True; break; } pFrame = pFrame->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4007,7 +4007,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) bool bHasFocus = IsWindowFocused(*mpWindowImpl); - BOOL bMustNotGrabFocus = FALSE; + sal_Bool bMustNotGrabFocus = sal_False; // #100242#, check parent hierarchy if some floater prohibits grab focus Window *pParent = this; @@ -4017,7 +4017,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) // otherwise we cannot set the focus in a floating toolbox if( ( (pParent->mpWindowImpl->mbFloatWin && ((FloatingWindow*)pParent)->GrabsFocus()) || ( pParent->GetStyle() & WB_SYSTEMFLOATWIN ) ) && !( pParent->GetStyle() & WB_MOVEABLE ) ) { - bMustNotGrabFocus = TRUE; + bMustNotGrabFocus = sal_True; break; } pParent = pParent->mpWindowImpl->mpParent; @@ -4078,11 +4078,11 @@ void Window::ImplGrabFocus( USHORT nFlags ) { Window* pNewOverlapWindow = ImplGetFirstOverlapWindow(); Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); - pNewOverlapWindow->mpWindowImpl->mbActive = TRUE; + pNewOverlapWindow->mpWindowImpl->mbActive = sal_True; pNewOverlapWindow->Activate(); if ( pNewRealWindow != pNewOverlapWindow ) { - pNewRealWindow->mpWindowImpl->mbActive = TRUE; + pNewRealWindow->mpWindowImpl->mbActive = sal_True; pNewRealWindow->Activate(); } } @@ -4161,7 +4161,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) else pParent = pLastParent; - pParent->mpWindowImpl->mbActive = FALSE; + pParent->mpWindowImpl->mbActive = sal_False; pParent->Deactivate(); pDeactivateParent = pLastParent; } @@ -4184,7 +4184,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) else pParent = pLastParent; - pParent->mpWindowImpl->mbActive = TRUE; + pParent->mpWindowImpl->mbActive = sal_True; pParent->Activate(); pActivateParent = pLastParent; } @@ -4215,7 +4215,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) { if ( mpWindowImpl->mpCursor ) mpWindowImpl->mpCursor->ImplShow(); - mpWindowImpl->mbInFocusHdl = TRUE; + mpWindowImpl->mbInFocusHdl = sal_True; mpWindowImpl->mnGetFocusFlags = nFlags; // if we're changing focus due to closing a popup floating window // notify the new focus window so it can restore the inner focus @@ -4232,7 +4232,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) if( !aDogTag.IsDelete() ) { mpWindowImpl->mnGetFocusFlags = 0; - mpWindowImpl->mbInFocusHdl = FALSE; + mpWindowImpl->mbInFocusHdl = sal_False; } } } @@ -4372,7 +4372,7 @@ Window::~Window() xCanvasComponent->dispose(); } - mpWindowImpl->mbInDtor = TRUE; + mpWindowImpl->mbInDtor = sal_True; ImplCallEventListeners( VCLEVENT_OBJECT_DYING ); @@ -4435,7 +4435,7 @@ Window::~Window() } } - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False ); if ( pWrapper ) pWrapper->WindowDestroyed( this ); @@ -4471,16 +4471,16 @@ Window::~Window() pSVData->maWinData.mpDefDialogParent = NULL; #ifdef DBG_UTIL - if ( TRUE ) // always perform these tests in non-pro versions + if ( sal_True ) // always perform these tests in non-pro versions { ByteString aErrorStr; - BOOL bError = FALSE; + sal_Bool bError = sal_False; Window* pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pTempWin ) { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = TRUE; + bError = sal_True; lcl_appendWindowInfo( aErrorStr, *pTempWin ); } pTempWin = pTempWin->mpWindowImpl->mpNextOverlap; @@ -4495,13 +4495,13 @@ Window::~Window() GetpApp()->Abort( String( aTempStr, RTL_TEXTENCODING_UTF8 ) ); // abort in non-pro version, this must be fixed! } - bError = FALSE; + bError = sal_False; pTempWin = pSVData->maWinData.mpFirstFrame; while ( pTempWin ) { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = TRUE; + bError = sal_True; lcl_appendWindowInfo( aErrorStr, *pTempWin ); } pTempWin = pTempWin->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4608,11 +4608,11 @@ Window::~Window() } // check if the focus window is our child - BOOL bHasFocussedChild = FALSE; + sal_Bool bHasFocussedChild = sal_False; if( pSVData->maWinData.mpFocusWin && ImplIsRealParentPath( pSVData->maWinData.mpFocusWin ) ) { // #122232#, this must not happen and is an application bug ! but we try some cleanup to hopefully avoid crashes, see below - bHasFocussedChild = TRUE; + bHasFocussedChild = sal_True; #ifdef DBG_UTIL ByteString aTempStr( "Window (" ); aTempStr += ByteString( GetText(), RTL_TEXTENCODING_UTF8 ); @@ -4698,18 +4698,18 @@ Window::~Window() ImplDelData* pDelData = mpWindowImpl->mpFirstDel; while ( pDelData ) { - pDelData->mbDel = TRUE; + pDelData->mbDel = sal_True; pDelData->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore pDelData = pDelData->mpNext; } // Fenster aus den Listen austragen - ImplRemoveWindow( TRUE ); + ImplRemoveWindow( sal_True ); // de-register as "top window child" at our parent, if necessary if ( mpWindowImpl->mbFrame ) { - BOOL bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); + sal_Bool bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); if ( mpWindowImpl->mpRealParent && bIsTopWindow ) { ImplWinData* pParentWinData = mpWindowImpl->mpRealParent->ImplGetWinData(); @@ -4786,7 +4786,7 @@ void Window::doLazyDelete() DockingWindow* pDockWin = dynamic_cast<DockingWindow*>(this); if( pSysWin || ( pDockWin && pDockWin->IsFloatingMode() ) ) { - Show( FALSE ); + Show( sal_False ); SetParent( ImplGetDefaultWindow() ); } vcl::LazyDeletor<Window>::Delete( this ); @@ -4802,7 +4802,7 @@ void Window::MouseMove( const MouseEvent& rMEvt ) NotifyEvent aNEvt( EVENT_MOUSEMOVE, this, &rMEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbMouseMove = TRUE; + mpWindowImpl->mbMouseMove = sal_True; } // ----------------------------------------------------------------------- @@ -4815,7 +4815,7 @@ void Window::MouseButtonDown( const MouseEvent& rMEvt ) NotifyEvent aNEvt( EVENT_MOUSEBUTTONDOWN, this, &rMEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbMouseButtonDown = TRUE; + mpWindowImpl->mbMouseButtonDown = sal_True; } // ----------------------------------------------------------------------- @@ -4828,7 +4828,7 @@ void Window::MouseButtonUp( const MouseEvent& rMEvt ) NotifyEvent aNEvt( EVENT_MOUSEBUTTONUP, this, &rMEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbMouseButtonUp = TRUE; + mpWindowImpl->mbMouseButtonUp = sal_True; } // ----------------------------------------------------------------------- @@ -4841,7 +4841,7 @@ void Window::KeyInput( const KeyEvent& rKEvt ) NotifyEvent aNEvt( EVENT_KEYINPUT, this, &rKEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbKeyInput = TRUE; + mpWindowImpl->mbKeyInput = sal_True; } // ----------------------------------------------------------------------- @@ -4854,7 +4854,7 @@ void Window::KeyUp( const KeyEvent& rKEvt ) NotifyEvent aNEvt( EVENT_KEYUP, this, &rKEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbKeyUp = TRUE; + mpWindowImpl->mbKeyUp = sal_True; } // ----------------------------------------------------------------------- @@ -4876,7 +4876,7 @@ void Window::Paint( const Rectangle& rRect ) // ----------------------------------------------------------------------- -void Window::Draw( OutputDevice*, const Point&, const Size&, ULONG ) +void Window::Draw( OutputDevice*, const Point&, const Size&, sal_uIntPtr ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } @@ -4982,7 +4982,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt ) { SmartId aSmartId = GetSmartHelpId(); - ULONG nNumHelpId = 0; + sal_uIntPtr nNumHelpId = 0; String aStrHelpId; if( aSmartId.HasString() ) aStrHelpId = aSmartId.GetStr(); @@ -5020,7 +5020,7 @@ void Window::Command( const CommandEvent& rCEvt ) NotifyEvent aNEvt( EVENT_COMMAND, this, &rCEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbCommand = TRUE; + mpWindowImpl->mbCommand = sal_True; } // ----------------------------------------------------------------------- @@ -5036,7 +5036,7 @@ void Window::Tracking( const TrackingEvent& rTEvt ) // ----------------------------------------------------------------------- -void Window::UserEvent( ULONG, void* ) +void Window::UserEvent( sal_uIntPtr, void* ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } @@ -5164,7 +5164,7 @@ long Window::PreNotify( NotifyEvent& rNEvt ) DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } - long bDone = FALSE; + long bDone = sal_False; if ( mpWindowImpl->mpParent && !ImplIsOverlapWindow() ) bDone = mpWindowImpl->mpParent->PreNotify( rNEvt ); @@ -5172,11 +5172,11 @@ long Window::PreNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_GETFOCUS ) { - BOOL bCompoundFocusChanged = FALSE; + sal_Bool bCompoundFocusChanged = sal_False; if ( mpWindowImpl->mbCompoundControl && !mpWindowImpl->mbCompoundControlHasFocus && HasChildPathFocus() ) { - mpWindowImpl->mbCompoundControlHasFocus = TRUE; - bCompoundFocusChanged = TRUE; + mpWindowImpl->mbCompoundControlHasFocus = sal_True; + bCompoundFocusChanged = sal_True; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5184,11 +5184,11 @@ long Window::PreNotify( NotifyEvent& rNEvt ) } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - BOOL bCompoundFocusChanged = FALSE; + sal_Bool bCompoundFocusChanged = sal_False; if ( mpWindowImpl->mbCompoundControl && mpWindowImpl->mbCompoundControlHasFocus && !HasChildPathFocus() ) { - mpWindowImpl->mbCompoundControlHasFocus = FALSE ; - bCompoundFocusChanged = TRUE; + mpWindowImpl->mbCompoundControlHasFocus = sal_False ; + bCompoundFocusChanged = sal_True; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5253,7 +5253,7 @@ long Window::Notify( NotifyEvent& rNEvt ) DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } - long nRet = FALSE; + long nRet = sal_False; // check for docking window // but do nothing if window is docked and locked @@ -5263,27 +5263,27 @@ long Window::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - BOOL bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) ) { // ctrl double click toggles floating mode pWrapper->SetFloatingMode( !pWrapper->IsFloatingMode() ); - return TRUE; + return sal_True; } else if ( pMEvt->GetClicks() == 1 && bHit) { // allow start docking during mouse move pWrapper->ImplEnableStartDocking(); - return TRUE; + return sal_True; } } } else if ( rNEvt.GetType() == EVENT_MOUSEMOVE ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - BOOL bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { // check if a single click initiated this sequence ( ImplStartDockingEnabled() ) @@ -5300,7 +5300,7 @@ long Window::Notify( NotifyEvent& rNEvt ) } pWrapper->ImplStartDocking( aPos ); } - return TRUE; + return sal_True; } } else if( rNEvt.GetType() == EVENT_KEYINPUT ) @@ -5318,7 +5318,7 @@ long Window::Notify( NotifyEvent& rNEvt ) */ if( pWrapper->IsFloatingMode() ) ToTop( TOTOP_GRABFOCUSONLY ); - return TRUE; + return sal_True; } } } @@ -5341,7 +5341,7 @@ long Window::Notify( NotifyEvent& rNEvt ) if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == EVENT_GETFOCUS) && !(GetStyle() & WB_TABSTOP) && !(mpWindowImpl->mnDlgCtrlFlags & WINDOW_DLGCTRL_WANTFOCUS) ) { - USHORT n = 0; + sal_uInt16 n = 0; Window* pFirstChild = ImplGetDlgWindow( n, DLGWINDOW_FIRST ); if ( pFirstChild ) pFirstChild->ImplControlFocus(); @@ -5360,7 +5360,7 @@ long Window::Notify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -void Window::ImplCallEventListeners( ULONG nEvent, void* pData ) +void Window::ImplCallEventListeners( sal_uIntPtr nEvent, void* pData ) { // The implementation was moved to CallEventListeners(), // because derived classes in svtools must be able to @@ -5373,7 +5373,7 @@ void Window::ImplCallEventListeners( ULONG nEvent, void* pData ) // ----------------------------------------------------------------------- -void Window::CallEventListeners( ULONG nEvent, void* pData ) +void Window::CallEventListeners( sal_uIntPtr nEvent, void* pData ) { VclWindowEvent aEvent( this, nEvent, pData ); @@ -5445,25 +5445,25 @@ void Window::RemoveChildEventListener( const Link& rEventListener ) // ----------------------------------------------------------------------- -ULONG Window::PostUserEvent( ULONG nEvent, void* pEventData ) +sal_uIntPtr Window::PostUserEvent( sal_uIntPtr nEvent, void* pEventData ) { - ULONG nEventId; + sal_uIntPtr nEventId; PostUserEvent( nEventId, nEvent, pEventData ); return nEventId; } // ----------------------------------------------------------------------- -ULONG Window::PostUserEvent( const Link& rLink, void* pCaller ) +sal_uIntPtr Window::PostUserEvent( const Link& rLink, void* pCaller ) { - ULONG nEventId; + sal_uIntPtr nEventId; PostUserEvent( nEventId, rLink, pCaller ); return nEventId; } // ----------------------------------------------------------------------- -BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData ) +sal_Bool Window::PostUserEvent( sal_uIntPtr& rEventId, sal_uIntPtr nEvent, void* pEventData ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5472,23 +5472,23 @@ BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData ) pSVEvent->mpData = pEventData; pSVEvent->mpLink = NULL; pSVEvent->mpWindow = this; - pSVEvent->mbCall = TRUE; + pSVEvent->mbCall = sal_True; ImplAddDel( &(pSVEvent->maDelData) ); - rEventId = (ULONG)pSVEvent; + rEventId = (sal_uIntPtr)pSVEvent; if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) ) - return TRUE; + return sal_True; else { rEventId = 0; ImplRemoveDel( &(pSVEvent->maDelData) ); delete pSVEvent; - return FALSE; + return sal_False; } } // ----------------------------------------------------------------------- -BOOL Window::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller ) +sal_Bool Window::PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5497,23 +5497,23 @@ BOOL Window::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller ) pSVEvent->mpData = pCaller; pSVEvent->mpLink = new Link( rLink ); pSVEvent->mpWindow = this; - pSVEvent->mbCall = TRUE; + pSVEvent->mbCall = sal_True; ImplAddDel( &(pSVEvent->maDelData) ); - rEventId = (ULONG)pSVEvent; + rEventId = (sal_uIntPtr)pSVEvent; if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) ) - return TRUE; + return sal_True; else { rEventId = 0; ImplRemoveDel( &(pSVEvent->maDelData) ); delete pSVEvent; - return FALSE; + return sal_False; } } // ----------------------------------------------------------------------- -void Window::RemoveUserEvent( ULONG nUserEvent ) +void Window::RemoveUserEvent( sal_uIntPtr nUserEvent ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5530,14 +5530,14 @@ void Window::RemoveUserEvent( ULONG nUserEvent ) pSVEvent->mpWindow = NULL; } - pSVEvent->mbCall = FALSE; + pSVEvent->mbCall = sal_False; } // ----------------------------------------------------------------------- IMPL_LINK( Window, ImplAsyncStateChangedHdl, void*, pState ) { - StateChanged( (StateChangedType)(ULONG)pState ); + StateChanged( (StateChangedType)(sal_uIntPtr)pState ); return 0; } @@ -5547,28 +5547,28 @@ void Window::PostStateChanged( StateChangedType nState ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - PostUserEvent( LINK( this, Window, ImplAsyncStateChangedHdl ), (void*)(ULONG)nState ); + PostUserEvent( LINK( this, Window, ImplAsyncStateChangedHdl ), (void*)(sal_uIntPtr)nState ); } // ----------------------------------------------------------------------- -BOOL Window::IsLocked( BOOL bChilds ) const +sal_Bool Window::IsLocked( sal_Bool bChilds ) const { if ( mpWindowImpl->mnLockCount != 0 ) - return TRUE; + return sal_True; if ( bChilds || mpWindowImpl->mbChildNotify ) { Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { - if ( pChild->IsLocked( TRUE ) ) - return TRUE; + if ( pChild->IsLocked( sal_True ) ) + return sal_True; pChild = pChild->mpWindowImpl->mpNext; } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -5626,7 +5626,7 @@ SystemWindow* Window::GetSystemWindow() const // ----------------------------------------------------------------------- -void Window::SetBorderStyle( USHORT nBorderStyle ) +void Window::SetBorderStyle( sal_uInt16 nBorderStyle ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5669,7 +5669,7 @@ void Window::SetBorderStyle( USHORT nBorderStyle ) // ----------------------------------------------------------------------- -USHORT Window::GetBorderStyle() const +sal_uInt16 Window::GetBorderStyle() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5717,7 +5717,7 @@ long Window::CalcTitleWidth() const // ----------------------------------------------------------------------- -void Window::EnableClipSiblings( BOOL bClipSiblings ) +void Window::EnableClipSiblings( sal_Bool bClipSiblings ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5729,7 +5729,7 @@ void Window::EnableClipSiblings( BOOL bClipSiblings ) // ----------------------------------------------------------------------- -void Window::SetMouseTransparent( BOOL bTransparent ) +void Window::SetMouseTransparent( sal_Bool bTransparent ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5744,7 +5744,7 @@ void Window::SetMouseTransparent( BOOL bTransparent ) // ----------------------------------------------------------------------- -void Window::SetPaintTransparent( BOOL bTransparent ) +void Window::SetPaintTransparent( sal_Bool bTransparent ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5771,7 +5771,7 @@ void Window::SetInputContext( const InputContext& rInputContext ) // ----------------------------------------------------------------------- -void Window::EndExtTextInput( USHORT nFlags ) +void Window::EndExtTextInput( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5829,24 +5829,24 @@ long Window::GetCursorExtTextInputWidth() const // ----------------------------------------------------------------------- void Window::SetSettings( const AllSettings& rSettings ) { - SetSettings( rSettings, FALSE ); + SetSettings( rSettings, sal_False ); } -void Window::SetSettings( const AllSettings& rSettings, BOOL bChild ) +void Window::SetSettings( const AllSettings& rSettings, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->SetSettings( rSettings, FALSE ); + mpWindowImpl->mpBorderWindow->SetSettings( rSettings, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->SetSettings( rSettings, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->SetSettings( rSettings, sal_True ); } AllSettings aOldSettings = maSettings; OutputDevice::SetSettings( rSettings ); - ULONG nChangeFlags = aOldSettings.GetChangeFlags( rSettings ); + sal_uIntPtr nChangeFlags = aOldSettings.GetChangeFlags( rSettings ); // AppFont-Aufloesung und DPI-Aufloesung neu berechnen ImplInitResolutionSettings(); @@ -5870,20 +5870,20 @@ void Window::SetSettings( const AllSettings& rSettings, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::UpdateSettings( const AllSettings& rSettings, BOOL bChild ) +void Window::UpdateSettings( const AllSettings& rSettings, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, FALSE ); + mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, sal_True ); } AllSettings aOldSettings = maSettings; - ULONG nChangeFlags = maSettings.Update( maSettings.GetWindowUpdate(), rSettings ); + sal_uIntPtr nChangeFlags = maSettings.Update( maSettings.GetWindowUpdate(), rSettings ); nChangeFlags |= SETTINGS_IN_UPDATE_SETTINGS; // Set this flag so the receiver of the data changed // event can distinguish between the changing of global // setting and a local change ( with SetSettings ) @@ -5984,7 +5984,7 @@ void Window::GetFontResolution( sal_Int32& nDPIX, sal_Int32& nDPIY ) const // ----------------------------------------------------------------------- -void Window::SetParentClipMode( USHORT nMode ) +void Window::SetParentClipMode( sal_uInt16 nMode ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5996,14 +5996,14 @@ void Window::SetParentClipMode( USHORT nMode ) { mpWindowImpl->mnParentClipMode = nMode; if ( nMode & PARENTCLIPMODE_CLIP ) - mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = TRUE; + mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = sal_True; } } } // ----------------------------------------------------------------------- -USHORT Window::GetParentClipMode() const +sal_uInt16 Window::GetParentClipMode() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6024,7 +6024,7 @@ void Window::SetWindowRegionPixel() else if( mpWindowImpl->mbFrame ) { mpWindowImpl->maWinRegion = Region( REGION_NULL); - mpWindowImpl->mbWinRegion = FALSE; + mpWindowImpl->mbWinRegion = sal_False; mpWindowImpl->mpFrame->ResetClipRegion(); } else @@ -6032,7 +6032,7 @@ void Window::SetWindowRegionPixel() if ( mpWindowImpl->mbWinRegion ) { mpWindowImpl->maWinRegion = Region( REGION_NULL ); - mpWindowImpl->mbWinRegion = FALSE; + mpWindowImpl->mbWinRegion = sal_False; ImplSetClipFlag(); if ( IsReallyVisible() ) @@ -6071,9 +6071,9 @@ void Window::SetWindowRegionPixel( const Region& rRegion ) long nY; long nWidth; long nHeight; - ULONG nRectCount; + sal_uIntPtr nRectCount; ImplRegionInfo aInfo; - BOOL bRegionRect; + sal_Bool bRegionRect; nRectCount = mpWindowImpl->maWinRegion.GetRectCount(); mpWindowImpl->mpFrame->BeginSetClipRegion( nRectCount ); @@ -6093,24 +6093,24 @@ void Window::SetWindowRegionPixel( const Region& rRegion ) } else { - BOOL bInvalidate = FALSE; + sal_Bool bInvalidate = sal_False; if ( rRegion.GetType() == REGION_NULL ) { if ( mpWindowImpl->mbWinRegion ) { mpWindowImpl->maWinRegion = Region( REGION_NULL ); - mpWindowImpl->mbWinRegion = FALSE; + mpWindowImpl->mbWinRegion = sal_False; ImplSetClipFlag(); - bInvalidate = TRUE; + bInvalidate = sal_True; } } else { mpWindowImpl->maWinRegion = rRegion; - mpWindowImpl->mbWinRegion = TRUE; + mpWindowImpl->mbWinRegion = sal_True; ImplSetClipFlag(); - bInvalidate = TRUE; + bInvalidate = sal_True; } if ( IsReallyVisible() ) @@ -6141,7 +6141,7 @@ const Region& Window::GetWindowRegionPixel() const // ----------------------------------------------------------------------- -BOOL Window::IsWindowRegionPixel() const +sal_Bool Window::IsWindowRegionPixel() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6153,7 +6153,7 @@ BOOL Window::IsWindowRegionPixel() const // ----------------------------------------------------------------------- -Region Window::GetWindowClipRegionPixel( USHORT nFlags ) const +Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6224,7 +6224,7 @@ void Window::ExpandPaintClipRegion( const Region& rRegion ) if( ! aDevPixRegion.IsEmpty() ) { mpWindowImpl->mpPaintRegion->Union( aDevPixRegion ); - mbInitClipRegion = TRUE; + mbInitClipRegion = sal_True; } } } @@ -6259,13 +6259,13 @@ void Window::SetParent( Window* pNewParent ) // check if the taskpanelist would change and move the window pointer accordingly SystemWindow *pSysWin = ImplGetLastSystemWindow(this); SystemWindow *pNewSysWin = NULL; - BOOL bChangeTaskPaneList = FALSE; + sal_Bool bChangeTaskPaneList = sal_False; if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) ) { pNewSysWin = ImplGetLastSystemWindow( pNewParent ); if( pNewSysWin && pNewSysWin != pSysWin ) { - bChangeTaskPaneList = TRUE; + bChangeTaskPaneList = sal_True; pSysWin->GetTaskPaneList()->RemoveWindow( this ); } } @@ -6294,8 +6294,8 @@ void Window::SetParent( Window* pNewParent ) if ( mpWindowImpl->mbFrame ) mpWindowImpl->mpFrame->SetParent( pNewParent->mpWindowImpl->mpFrame ); - BOOL bVisible = IsVisible(); - Show( FALSE, SHOW_NOFOCUSCHANGE ); + sal_Bool bVisible = IsVisible(); + Show( sal_False, SHOW_NOFOCUSCHANGE ); // Testen, ob sich das Overlap-Window aendert Window* pOldOverlapWindow; @@ -6312,9 +6312,9 @@ void Window::SetParent( Window* pNewParent ) } // Fenster in der Hirachie umsetzen - BOOL bFocusOverlapWin = HasChildPathFocus( TRUE ); - BOOL bFocusWin = HasChildPathFocus(); - BOOL bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; + sal_Bool bFocusOverlapWin = HasChildPathFocus( sal_True ); + sal_Bool bFocusWin = HasChildPathFocus(); + sal_Bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; if ( bNewFrame ) { if ( mpWindowImpl->mpFrameData->mpFocusWin ) @@ -6336,7 +6336,7 @@ void Window::SetParent( Window* pNewParent ) ImplRemoveWindow( bNewFrame ); ImplInsertWindow( pNewParent ); if ( mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP ) - pNewParent->mpWindowImpl->mbClipChildren = TRUE; + pNewParent->mpWindowImpl->mbClipChildren = sal_True; ImplUpdateWindowPtr(); if ( ImplUpdatePos() ) ImplUpdateSysObjPos(); @@ -6375,7 +6375,7 @@ void Window::SetParent( Window* pNewParent ) } // Activate-Status beim naechsten Overlap-Window updaten - if ( HasChildPathFocus( TRUE ) ) + if ( HasChildPathFocus( sal_True ) ) ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow ); } @@ -6411,12 +6411,12 @@ void Window::SetParent( Window* pNewParent ) ImplGetOwnerDrawList().push_back( this ); if ( bVisible ) - Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } // ----------------------------------------------------------------------- -void Window::Show( BOOL bVisible, USHORT nFlags ) +void Window::Show( sal_Bool bVisible, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6425,7 +6425,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) ImplDelData aDogTag( this ); - BOOL bRealVisibilityChanged = FALSE; + sal_Bool bRealVisibilityChanged = sal_False; mpWindowImpl->mbVisible = (bVisible != 0); if ( !bVisible ) @@ -6436,16 +6436,16 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( mpWindowImpl->mpBorderWindow ) { - BOOL bOldUpdate = mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate; + sal_Bool bOldUpdate = mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate; if ( mpWindowImpl->mbNoParentUpdate ) - mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = TRUE; - mpWindowImpl->mpBorderWindow->Show( FALSE, nFlags ); + mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = sal_True; + mpWindowImpl->mpBorderWindow->Show( sal_False, nFlags ); mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = bOldUpdate; } else if ( mpWindowImpl->mbFrame ) { - mpWindowImpl->mbSuppressAccessibilityEvents = TRUE; - mpWindowImpl->mpFrame->Show( FALSE, FALSE ); + mpWindowImpl->mbSuppressAccessibilityEvents = sal_True; + mpWindowImpl->mpFrame->Show( sal_False, sal_False ); } StateChanged( STATE_CHANGE_VISIBLE ); @@ -6453,12 +6453,12 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( mpWindowImpl->mbReallyVisible ) { Region aInvRegion( REGION_EMPTY ); - BOOL bSaveBack = FALSE; + sal_Bool bSaveBack = sal_False; if ( ImplIsOverlapWindow() && !mpWindowImpl->mbFrame ) { if ( ImplRestoreOverlapBackground( aInvRegion ) ) - bSaveBack = TRUE; + bSaveBack = sal_True; } if ( !bSaveBack ) @@ -6553,7 +6553,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( ImplIsOverlapWindow() && !(nFlags & SHOW_NOACTIVATE) ) { ImplStartToTop(( nFlags & SHOW_FOREGROUNDTASK ) ? TOTOP_FOREGROUNDTASK : 0 ); - ImplFocusToTop( 0, FALSE ); + ImplFocusToTop( 0, sal_False ); } // Hintergrund sichern @@ -6568,7 +6568,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( !mpWindowImpl->mbFrame ) { - USHORT nInvalidateFlags = INVALIDATE_CHILDREN; + sal_uInt16 nInvalidateFlags = INVALIDATE_CHILDREN; if( ! IsPaintTransparent() ) nInvalidateFlags |= INVALIDATE_NOTRANSPARENT; ImplInvalidate( NULL, nInvalidateFlags ); @@ -6577,7 +6577,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) } if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->Show( TRUE, nFlags ); + mpWindowImpl->mpBorderWindow->Show( sal_True, nFlags ); else if ( mpWindowImpl->mbFrame ) { ImplSVData* pSVData = ImplGetSVData(); @@ -6586,11 +6586,11 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) pSVData->mpIntroWindow->Hide(); //DBG_ASSERT( !mpWindowImpl->mbSuppressAccessibilityEvents, "Window::Show() - Frame reactivated"); - mpWindowImpl->mbSuppressAccessibilityEvents = FALSE; + mpWindowImpl->mbSuppressAccessibilityEvents = sal_False; - mpWindowImpl->mbPaintFrame = TRUE; - BOOL bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? TRUE : FALSE; - mpWindowImpl->mpFrame->Show( TRUE, bNoActivate ); + mpWindowImpl->mbPaintFrame = sal_True; + sal_Bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? sal_True : sal_False; + mpWindowImpl->mpFrame->Show( sal_True, bNoActivate ); if( aDogTag.IsDelete() ) return; @@ -6711,10 +6711,10 @@ void Window::Enable( bool bEnable, bool bChild ) if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->Enable( bEnable, FALSE ); + mpWindowImpl->mpBorderWindow->Enable( bEnable, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->Enable( bEnable, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->Enable( bEnable, sal_True ); } // #i56102# restore app focus win in case the @@ -6756,7 +6756,7 @@ void Window::Enable( bool bEnable, bool bChild ) void Window::SetCallHandlersOnInputDisabled( bool bCall ) { - mpWindowImpl->mbCallHandlersDuringInputDisabled = bCall ? TRUE : FALSE; + mpWindowImpl->mbCallHandlersDuringInputDisabled = bCall ? sal_True : sal_False; Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) @@ -6775,17 +6775,17 @@ bool Window::IsCallHandlersOnInputDisabled() const // ----------------------------------------------------------------------- -void Window::EnableInput( BOOL bEnable, BOOL bChild ) +void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - BOOL bNotify = (bEnable != mpWindowImpl->mbInputDisabled); + sal_Bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->EnableInput( bEnable, FALSE ); + mpWindowImpl->mpBorderWindow->EnableInput( bEnable, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, sal_True ); } if ( (! bEnable && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled) || @@ -6843,7 +6843,7 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, +void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin, const Window* pExcludeWindow ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6859,11 +6859,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, while ( pSysWin ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, TRUE ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, sal_True ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, sal_True ) ) pSysWin->EnableInput( bEnable, bChild ); } pSysWin = pSysWin->mpWindowImpl->mpNextOverlap; @@ -6876,11 +6876,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, if( pFrameWin->ImplIsFloatingWindow() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, TRUE ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, sal_True ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, sal_True ) ) pFrameWin->EnableInput( bEnable, bChild ); } } @@ -6895,11 +6895,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, while( p != rList.end() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), TRUE ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), sal_True ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), sal_True ) ) (*p)->EnableInput( bEnable, bChild ); } p++; @@ -6910,19 +6910,19 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, // ----------------------------------------------------------------------- -void Window::AlwaysEnableInput( BOOL bAlways, BOOL bChild ) +void Window::AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, FALSE ); + mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, sal_False ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputEnabled; if ( bAlways ) - EnableInput( TRUE, FALSE ); + EnableInput( sal_True, sal_False ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled ) { @@ -6942,19 +6942,19 @@ void Window::AlwaysEnableInput( BOOL bAlways, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild ) +void Window::AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, FALSE ); + mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, sal_False ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputDisabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputDisabled; if ( bAlways ) - EnableInput( FALSE, FALSE ); + EnableInput( sal_False, sal_False ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled ) { @@ -6974,7 +6974,7 @@ void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::SetActivateMode( USHORT nMode ) +void Window::SetActivateMode( sal_uInt16 nMode ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6989,9 +6989,9 @@ void Window::SetActivateMode( USHORT nMode ) if ( mpWindowImpl->mnActivateMode ) { if ( (mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW)) && - !HasChildPathFocus( TRUE ) ) + !HasChildPathFocus( sal_True ) ) { - mpWindowImpl->mbActive = FALSE; + mpWindowImpl->mbActive = sal_False; Deactivate(); } } @@ -6999,7 +6999,7 @@ void Window::SetActivateMode( USHORT nMode ) { if ( !mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW) ) { - mpWindowImpl->mbActive = TRUE; + mpWindowImpl->mbActive = sal_True; Activate(); } } @@ -7008,7 +7008,7 @@ void Window::SetActivateMode( USHORT nMode ) // ----------------------------------------------------------------------- -void Window::ToTop( USHORT nFlags ) +void Window::ToTop( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7018,7 +7018,7 @@ void Window::ToTop( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::SetZOrder( Window* pRefWindow, USHORT nFlags ) +void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7136,7 +7136,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags ) if ( mpWindowImpl->mbInitWinClipRegion || !mpWindowImpl->maWinClipRegion.IsEmpty() ) { - BOOL bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; + sal_Bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; ImplSetClipFlag(); // Wenn ClipRegion noch nicht initalisiert wurde, dann @@ -7195,7 +7195,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::EnableAlwaysOnTop( BOOL bEnable ) +void Window::EnableAlwaysOnTop( sal_Bool bEnable ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7213,16 +7213,16 @@ void Window::EnableAlwaysOnTop( BOOL bEnable ) // ----------------------------------------------------------------------- void Window::SetPosSizePixel( long nX, long nY, - long nWidth, long nHeight, USHORT nFlags ) + long nWidth, long nHeight, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - BOOL bHasValidSize = !mpWindowImpl->mbDefSize; + sal_Bool bHasValidSize = !mpWindowImpl->mbDefSize; if ( nFlags & WINDOW_POSSIZE_POS ) - mpWindowImpl->mbDefPos = FALSE; + mpWindowImpl->mbDefPos = sal_False; if ( nFlags & WINDOW_POSSIZE_SIZE ) - mpWindowImpl->mbDefSize = FALSE; + mpWindowImpl->mbDefSize = sal_False; // Oberstes BorderWindow ist das Window, welches positioniert werden soll Window* pWindow = this; @@ -7242,7 +7242,7 @@ void Window::SetPosSizePixel( long nX, long nY, nHeight = pWindow->mnOutHeight; - USHORT nSysFlags=0; + sal_uInt16 nSysFlags=0; if( nFlags & WINDOW_POSSIZE_WIDTH ) nSysFlags |= SAL_FRAME_POSSIZE_WIDTH; if( nFlags & WINDOW_POSSIZE_HEIGHT ) @@ -7456,18 +7456,18 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow ) const { // with decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, FALSE ); + return ImplGetWindowExtentsRelative( pRelativeWindow, sal_False ); } Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow ) const { // without decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, TRUE ); + return ImplGetWindowExtentsRelative( pRelativeWindow, sal_True ); } // ----------------------------------------------------------------------- -Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ) const +Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const { SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry(); // make sure we use the extent of our border window, @@ -7497,7 +7497,7 @@ Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bC // ----------------------------------------------------------------------- -void Window::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags ) +void Window::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7509,7 +7509,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags ) // ----------------------------------------------------------------------- void Window::Scroll( long nHorzScroll, long nVertScroll, - const Rectangle& rRect, USHORT nFlags ) + const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7521,7 +7521,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, // ----------------------------------------------------------------------- -void Window::Invalidate( USHORT nFlags ) +void Window::Invalidate( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7533,7 +7533,7 @@ void Window::Invalidate( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Invalidate( const Rectangle& rRect, USHORT nFlags ) +void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7550,7 +7550,7 @@ void Window::Invalidate( const Rectangle& rRect, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Invalidate( const Region& rRegion, USHORT nFlags ) +void Window::Invalidate( const Region& rRegion, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7569,7 +7569,7 @@ void Window::Invalidate( const Region& rRegion, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Validate( USHORT nFlags ) +void Window::Validate( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7581,7 +7581,7 @@ void Window::Validate( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Validate( const Rectangle& rRect, USHORT nFlags ) +void Window::Validate( const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7598,7 +7598,7 @@ void Window::Validate( const Rectangle& rRect, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Validate( const Region& rRegion, USHORT nFlags ) +void Window::Validate( const Region& rRegion, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7617,18 +7617,18 @@ void Window::Validate( const Region& rRegion, USHORT nFlags ) // ----------------------------------------------------------------------- -BOOL Window::HasPaintEvent() const +sal_Bool Window::HasPaintEvent() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( !mpWindowImpl->mbReallyVisible ) - return FALSE; + return sal_False; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) - return TRUE; + return sal_True; if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT ) - return TRUE; + return sal_True; if ( !ImplIsOverlapWindow() ) { @@ -7637,12 +7637,12 @@ BOOL Window::HasPaintEvent() const { pTempWindow = pTempWindow->ImplGetParent(); if ( pTempWindow->mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINTCHILDS | IMPL_PAINT_PAINTALLCHILDS) ) - return TRUE; + return sal_True; } while ( !pTempWindow->ImplIsOverlapWindow() ); } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -7660,14 +7660,14 @@ void Window::Update() if ( !mpWindowImpl->mbReallyVisible ) return; - BOOL bFlush = FALSE; + sal_Bool bFlush = sal_False; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = TRUE; + bFlush = sal_True; } // Zuerst muessen wir alle Fenster ueberspringen, die Paint-Transparent @@ -7736,7 +7736,7 @@ void Window::Sync() // ----------------------------------------------------------------------- -void Window::SetUpdateMode( BOOL bUpdate ) +void Window::SetUpdateMode( sal_Bool bUpdate ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7755,7 +7755,7 @@ void Window::GrabFocus() // ----------------------------------------------------------------------- -BOOL Window::HasFocus() const +sal_Bool Window::HasFocus() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7797,7 +7797,7 @@ void Window::SetFakeFocus( bool bFocus ) // ----------------------------------------------------------------------- -BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const +sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7813,7 +7813,7 @@ BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin; if ( pFocusWin ) return ImplIsWindowOrChild( pFocusWin, bSystemWindow ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -7834,7 +7834,7 @@ void Window::CaptureMouse() if ( pSVData->maWinData.mpCaptureWin != this ) { pSVData->maWinData.mpCaptureWin = this; - mpWindowImpl->mpFrame->CaptureMouse( TRUE ); + mpWindowImpl->mpFrame->CaptureMouse( sal_True ); } } @@ -7852,14 +7852,14 @@ void Window::ReleaseMouse() if ( pSVData->maWinData.mpCaptureWin == this ) { pSVData->maWinData.mpCaptureWin = NULL; - mpWindowImpl->mpFrame->CaptureMouse( FALSE ); + mpWindowImpl->mpFrame->CaptureMouse( sal_False ); ImplGenerateMouseMove(); } } // ----------------------------------------------------------------------- -BOOL Window::IsMouseCaptured() const +sal_Bool Window::IsMouseCaptured() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7884,7 +7884,7 @@ void Window::SetPointer( const Pointer& rPointer ) // ----------------------------------------------------------------------- -void Window::EnableChildPointerOverwrite( BOOL bOverwrite ) +void Window::EnableChildPointerOverwrite( sal_Bool bOverwrite ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7954,7 +7954,7 @@ Point Window::GetLastPointerPosPixel() // ----------------------------------------------------------------------- -void Window::ShowPointer( BOOL bVisible ) +void Window::ShowPointer( sal_Bool bVisible ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7993,7 +7993,7 @@ Window::PointerState Window::GetPointerState() // ----------------------------------------------------------------------- -BOOL Window::IsMouseOver() +sal_Bool Window::IsMouseOver() { return ImplGetWinData()->mbMouseOver; } @@ -8133,7 +8133,7 @@ const XubString& Window::GetHelpText() const SmartId aSmartId = GetSmartHelpId(); - ULONG nNumHelpId = 0; + sal_uIntPtr nNumHelpId = 0; String aStrHelpId; if( aSmartId.HasString() ) aStrHelpId = aSmartId.GetStr(); @@ -8152,7 +8152,7 @@ const XubString& Window::GetHelpText() const ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this ); else ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( nNumHelpId, this ); - mpWindowImpl->mbHelpTextDynamic = FALSE; + mpWindowImpl->mbHelpTextDynamic = sal_False; } } } @@ -8170,7 +8170,7 @@ const XubString& Window::GetHelpText() const aTxt.append( sal_Int32( nNumHelpId ) ); mpWindowImpl->maHelpText = aTxt.makeStringAndClear(); } - mpWindowImpl->mbHelpTextDynamic = FALSE; + mpWindowImpl->mbHelpTextDynamic = sal_False; } return mpWindowImpl->maHelpText; @@ -8188,11 +8188,11 @@ Window* Window::FindWindow( const Point& rPos ) const // ----------------------------------------------------------------------- -USHORT Window::GetChildCount() const +sal_uInt16 Window::GetChildCount() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - USHORT nChildCount = 0; + sal_uInt16 nChildCount = 0; Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { @@ -8205,11 +8205,11 @@ USHORT Window::GetChildCount() const // ----------------------------------------------------------------------- -Window* Window::GetChild( USHORT nChild ) const +Window* Window::GetChild( sal_uInt16 nChild ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - USHORT nChildCount = 0; + sal_uInt16 nChildCount = 0; Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { @@ -8224,7 +8224,7 @@ Window* Window::GetChild( USHORT nChild ) const // ----------------------------------------------------------------------- -Window* Window::GetWindow( USHORT nType ) const +Window* Window::GetWindow( sal_uInt16 nType ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8316,7 +8316,7 @@ Window* Window::GetWindow( USHORT nType ) const // ----------------------------------------------------------------------- -BOOL Window::IsChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::IsChild( const Window* pWindow, sal_Bool bSystemWindow ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); DBG_CHKOBJ( pWindow, Window, ImplDbgCheckWindow ); @@ -8329,22 +8329,22 @@ BOOL Window::IsChild( const Window* pWindow, BOOL bSystemWindow ) const pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return TRUE; + return sal_True; } while ( pWindow ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Window::IsWindowOrChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); DBG_CHKOBJ( pWindow, Window, ImplDbgCheckWindow ); if ( this == pWindow ) - return TRUE; + return sal_True; return ImplIsChild( pWindow, bSystemWindow ); } @@ -8383,7 +8383,7 @@ void Window::SetWindowPeer( ::com::sun::star::uno::Reference< ::com::sun::star:: // ----------------------------------------------------------------------- -::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > Window::GetComponentInterface( BOOL bCreate ) +::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > Window::GetComponentInterface( sal_Bool bCreate ) { if ( !mpWindowImpl->mxWindowPeer.is() && bCreate ) { @@ -8518,7 +8518,7 @@ Reference< XDropTarget > Window::GetDropTarget() Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); } else - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = TRUE; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True; } @@ -8738,7 +8738,7 @@ Reference< XClipboard > Window::GetPrimarySelection() // Accessibility // ----------------------------------------------------------------------- -::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( BOOL bCreate ) +::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( sal_Bool bCreate ) { // do not optimize hierarchy for the top level border win (ie, when there is no parent) /* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy @@ -8758,7 +8758,7 @@ Reference< XClipboard > Window::GetPrimarySelection() ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::CreateAccessible() { - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc( GetComponentInterface( TRUE ), ::com::sun::star::uno::UNO_QUERY ); + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc( GetComponentInterface( sal_True ), ::com::sun::star::uno::UNO_QUERY ); return xAcc; } @@ -8768,46 +8768,46 @@ void Window::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star:: } // skip all border windows that are no top level frames -BOOL Window::ImplIsAccessibleCandidate() const +sal_Bool Window::ImplIsAccessibleCandidate() const { if( !mpWindowImpl->mbBorderWin ) - return TRUE; + return sal_True; else // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menues!) are closeable if( mpWindowImpl->mbFrame && mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } -BOOL Window::ImplIsAccessibleNativeFrame() const +sal_Bool Window::ImplIsAccessibleNativeFrame() const { if( mpWindowImpl->mbFrame ) // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menues!) are closeable if( (mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE)) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; else - return FALSE; + return sal_False; } -USHORT Window::ImplGetAccessibleCandidateChildWindowCount( USHORT nFirstWindowType ) const +sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const { - USHORT nChildren = 0; + sal_uInt16 nChildren = 0; Window* pChild = GetWindow( nFirstWindowType ); while ( pChild ) { if( pChild->ImplIsAccessibleCandidate() ) nChildren++; else - nChildren = sal::static_int_cast<USHORT>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD )); + nChildren = sal::static_int_cast<sal_uInt16>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD )); pChild = pChild->mpWindowImpl->mpNext; } return nChildren; } -Window* Window::ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCount, USHORT nFirstWindowType, BOOL bTopLevel ) const +Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8820,7 +8820,7 @@ Window* Window::ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCo Window *pTmpChild = pChild; if( !pChild->ImplIsAccessibleCandidate() ) - pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, FALSE ); + pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, sal_False ); if ( nChild == rChildCount ) return pTmpChild; @@ -8873,9 +8873,9 @@ Window* Window::GetAccessibleParentWindow() const } /* -USHORT Window::GetAccessibleChildWindowCount() +sal_uInt16 Window::GetAccessibleChildWindowCount() { - USHORT nChildren = ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD ); + sal_uInt16 nChildren = ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD ); // Search also for SystemWindows. Window* pOverlap = GetWindow( WINDOW_OVERLAP ); @@ -8885,9 +8885,9 @@ USHORT Window::GetAccessibleChildWindowCount() } */ -USHORT Window::GetAccessibleChildWindowCount() +sal_uInt16 Window::GetAccessibleChildWindowCount() { - USHORT nChildren = 0; + sal_uInt16 nChildren = 0; Window* pChild = mpWindowImpl->mpFirstChild; while( pChild ) { @@ -8933,21 +8933,21 @@ USHORT Window::GetAccessibleChildWindowCount() } /* -Window* Window::GetAccessibleChildWindow( USHORT n ) +Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) { - USHORT nChildCount; // will be set in ImplGetAccessibleCandidateChild(...) - Window* pChild = ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTCHILD, TRUE ); + sal_uInt16 nChildCount; // will be set in ImplGetAccessibleCandidateChild(...) + Window* pChild = ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTCHILD, sal_True ); if ( !pChild && ( n >= nChildCount ) ) { Window* pOverlap = GetWindow( WINDOW_OVERLAP ); - pChild = pOverlap->ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTOVERLAP, FALSE ); + pChild = pOverlap->ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTOVERLAP, sal_False ); } return pChild; } */ -Window* Window::GetAccessibleChildWindow( USHORT n ) +Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) { // report the menubarwindow as a the first child of THE workwindow if( GetType() == WINDOW_WORKWINDOW && ((WorkWindow *) this)->GetMenuBar() ) @@ -8963,7 +8963,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n ) } // transform n to child number including invisible children - USHORT nChildren = n; + sal_uInt16 nChildren = n; Window* pChild = mpWindowImpl->mpFirstChild; while( pChild ) { @@ -9011,7 +9011,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n ) } -void Window::SetAccessibleRole( USHORT nRole ) +void Window::SetAccessibleRole( sal_uInt16 nRole ) { if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; @@ -9020,11 +9020,11 @@ void Window::SetAccessibleRole( USHORT nRole ) mpWindowImpl->mpAccessibleInfos->nAccessibleRole = nRole; } -USHORT Window::GetAccessibleRole() const +sal_uInt16 Window::GetAccessibleRole() const { using namespace ::com::sun::star; - USHORT nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF; + sal_uInt16 nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF; if ( nRole == 0xFFFF ) { switch ( GetType() ) @@ -9254,7 +9254,7 @@ String Window::GetAccessibleDescription() const return aAccessibleDescription; } -BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath ) +sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) { if( !bTraverseParentPath ) return mpWindowImpl->mbSuppressAccessibilityEvents; @@ -9264,11 +9264,11 @@ BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath ) while ( pParent && pParent->mpWindowImpl) { if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents ) - return TRUE; + return sal_True; else pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames } - return FALSE; + return sal_False; } } @@ -9288,9 +9288,9 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& // returns background color used in this control // false: could not determine color -BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol ) +sal_Bool Window::ImplGetCurrentBackgroundColor( Color& rCol ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch ( GetType() ) { @@ -9308,7 +9308,7 @@ BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol ) if( !aWall.IsGradient() && !aWall.IsBitmap() ) rCol = aWall.GetColor(); else - bRet = FALSE; + bRet = sal_False; } else rCol = GetSettings().GetStyleSettings().GetFaceColor(); @@ -9317,21 +9317,21 @@ BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol ) return bRet; } -void Window::DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, NULL, NULL ); } -void Window::DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly, Color* pSelectionTextColor ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, pSelectionTextColor, NULL ); } void Window::DrawSelectionBackground( const Rectangle& rRect, - USHORT highlight, - BOOL bChecked, - BOOL bDrawBorder, - BOOL bDrawExtBorderOnly, + sal_uInt16 highlight, + sal_Bool bChecked, + sal_Bool bDrawBorder, + sal_Bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor @@ -9349,8 +9349,8 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, Color aSelectionBorderCol( pPaintColor ? *pPaintColor : rStyles.GetHighlightColor() ); Color aSelectionFillCol( aSelectionBorderCol ); - BOOL bDark = rStyles.GetFaceColor().IsDark(); - BOOL bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); + sal_Bool bDark = rStyles.GetFaceColor().IsDark(); + sal_Bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); int c1 = aSelectionBorderCol.GetLuminance(); int c2 = GetDisplayBackground().GetColor().GetLuminance(); @@ -9358,7 +9358,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, if( !bDark && !bBright && abs( c2-c1 ) < (pPaintColor ? 40 : 75) ) { // constrast too low - USHORT h,s,b; + sal_uInt16 h,s,b; aSelectionFillCol.RGBtoHSB( h, s, b ); if( b > 50 ) b -= 40; else b += 40; @@ -9390,7 +9390,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, else SetLineColor(); - USHORT nPercent = 0; + sal_uInt16 nPercent = 0; if( !highlight ) { if( bDark ) @@ -9510,7 +9510,7 @@ Window* Window::GetPreferredKeyInputWindow() } -BOOL Window::IsScrollable() const +sal_Bool Window::IsScrollable() const { // check for scrollbars Window *pChild = mpWindowImpl->mpFirstChild; @@ -9524,24 +9524,24 @@ BOOL Window::IsScrollable() const return false; } -BOOL Window::IsTopWindow() const +sal_Bool Window::IsTopWindow() const { if ( mpWindowImpl->mbInDtor ) - return FALSE; + return sal_False; // topwindows must be frames or they must have a borderwindow which is a frame if( !mpWindowImpl->mbFrame && (!mpWindowImpl->mpBorderWindow || (mpWindowImpl->mpBorderWindow && !mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) ) - return FALSE; + return sal_False; ImplGetWinData(); - if( mpWindowImpl->mpWinData->mnIsTopWindow == (USHORT)~0) // still uninitialized + if( mpWindowImpl->mpWinData->mnIsTopWindow == (sal_uInt16)~0) // still uninitialized { // #113722#, cache result of expensive queryInterface call Window *pThisWin = (Window*)this; Reference< XTopWindow > xTopWindow( pThisWin->GetComponentInterface(), UNO_QUERY ); pThisWin->mpWindowImpl->mpWinData->mnIsTopWindow = xTopWindow.is() ? 1 : 0; } - return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? TRUE : FALSE; + return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? sal_True : sal_False; } void Window::ImplMirrorFramePos( Point &pt ) const @@ -9550,7 +9550,7 @@ void Window::ImplMirrorFramePos( Point &pt ) const } // frame based modal counter (dialogs are not modal to the whole application anymore) -BOOL Window::IsInModalMode() const +sal_Bool Window::IsInModalMode() const { return (mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mnModalMode != 0); } @@ -9582,16 +9582,16 @@ void Window::ImplDecModalCount() pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow : NULL; } } -BOOL Window::ImplIsInTaskPaneList() +sal_Bool Window::ImplIsInTaskPaneList() { return mpWindowImpl->mbIsInTaskPaneList; } -void Window::ImplIsInTaskPaneList( BOOL mbIsInTaskList ) +void Window::ImplIsInTaskPaneList( sal_Bool mbIsInTaskList ) { mpWindowImpl->mbIsInTaskPaneList = mbIsInTaskList; } -void Window::ImplNotifyIconifiedState( BOOL bIconified ) +void Window::ImplNotifyIconifiedState( sal_Bool bIconified ) { mpWindowImpl->mpFrameWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); // #109206# notify client window as well to have toolkit topwindow listeners notified @@ -9599,15 +9599,15 @@ void Window::ImplNotifyIconifiedState( BOOL bIconified ) mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); } -BOOL Window::HasActiveChildFrame() +sal_Bool Window::HasActiveChildFrame() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; Window *pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; while( pFrameWin ) { if( pFrameWin != mpWindowImpl->mpFrameWindow ) { - BOOL bDecorated = FALSE; + sal_Bool bDecorated = sal_False; Window *pChildFrame = pFrameWin->ImplGetWindow(); // #i15285# unfortunately WB_MOVEABLE is the same as WB_TABSTOP which can // be removed for ToolBoxes to influence the keyboard accessibility @@ -9619,9 +9619,9 @@ BOOL Window::HasActiveChildFrame() if( bDecorated || (pFrameWin->mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) ) if( pChildFrame && pChildFrame->IsVisible() && pChildFrame->IsActive() ) { - if( ImplIsChild( pChildFrame, TRUE ) ) + if( ImplIsChild( pChildFrame, sal_True ) ) { - bRet = TRUE; + bRet = sal_True; break; } } @@ -9636,11 +9636,11 @@ LanguageType Window::GetInputLanguage() const return mpWindowImpl->mpFrame->GetInputLanguage(); } -void Window::EnableNativeWidget( BOOL bEnable ) +void Window::EnableNativeWidget( sal_Bool bEnable ) { static const char* pNoNWF = getenv( "SAL_NO_NWF" ); if( pNoNWF && *pNoNWF ) - bEnable = FALSE; + bEnable = sal_False; if( bEnable != ImplGetWinData()->mbEnableNativeWidget ) { @@ -9665,7 +9665,7 @@ void Window::EnableNativeWidget( BOOL bEnable ) } } -BOOL Window::IsNativeWidgetEnabled() const +sal_Bool Window::IsNativeWidgetEnabled() const { return ImplGetWinData()->mbEnableNativeWidget; } @@ -9799,16 +9799,16 @@ Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpr void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rPos ) { - BOOL bRVisible = mpWindowImpl->mbReallyVisible; + sal_Bool bRVisible = mpWindowImpl->mbReallyVisible; mpWindowImpl->mbReallyVisible = mpWindowImpl->mbVisible; - BOOL bDevOutput = mbDevOutput; - mbDevOutput = TRUE; + sal_Bool bDevOutput = mbDevOutput; + mbDevOutput = sal_True; long nOldDPIX = ImplGetDPIX(); long nOldDPIY = ImplGetDPIY(); mnDPIX = i_pTargetOutDev->ImplGetDPIX(); mnDPIY = i_pTargetOutDev->ImplGetDPIY(); - BOOL bOutput = IsOutputEnabled(); + sal_Bool bOutput = IsOutputEnabled(); EnableOutput(); DBG_ASSERT( GetMapMode().GetMapUnit() == MAP_PIXEL, "MapMode must be PIXEL based" ); @@ -9941,8 +9941,8 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& / Hide(); } - BOOL bVisible = mpWindowImpl->mbVisible; - mpWindowImpl->mbVisible = TRUE; + sal_Bool bVisible = mpWindowImpl->mbVisible; + mpWindowImpl->mbVisible = sal_True; if( mpWindowImpl->mpBorderWindow ) mpWindowImpl->mpBorderWindow->ImplPaintToDevice( pDev, rPos ); diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 02b2713b01cc..2334c3c468f9 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -74,7 +74,7 @@ struct ImplFocusDelData : public ImplDelData // ======================================================================= -BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const +sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); DBG_CHKOBJ( pTestWindow, Window, ImplDbgCheckWindow ); @@ -84,11 +84,11 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const const Window* pTempWindow = pTestWindow; const Window* pThisWindow = ImplGetFirstOverlapWindow(); if ( pTempWindow == pThisWindow ) - return FALSE; + return sal_False; do { if ( pTempWindow == pThisWindow ) - return TRUE; + return sal_True; if ( pTempWindow->mpWindowImpl->mbFrame ) break; pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow; @@ -98,7 +98,7 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const do { if ( pTempWindow == pTestWindow ) - return FALSE; + return sal_False; if ( pTempWindow->mpWindowImpl->mbFrame ) break; pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow; @@ -108,8 +108,8 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const // Fenster auf gleiche Ebene bringen if ( pThisWindow->mpWindowImpl->mpOverlapWindow != pTestWindow->mpWindowImpl->mpOverlapWindow ) { - USHORT nThisLevel = 0; - USHORT nTestLevel = 0; + sal_uInt16 nThisLevel = 0; + sal_uInt16 nTestLevel = 0; pTempWindow = pThisWindow; do { @@ -156,12 +156,12 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const do { if ( pTempWindow == pThisWindow ) - return TRUE; + return sal_True; pTempWindow = pTempWindow->mpWindowImpl->mpNext; } while ( pTempWindow ); - return FALSE; + return sal_False; } // ======================================================================= @@ -172,7 +172,7 @@ void Window::ImplSaveOverlapBackground() if ( !mpWindowImpl->mbFrame ) { - ULONG nSaveBackSize = mnOutWidth*mnOutHeight; + sal_uIntPtr nSaveBackSize = mnOutWidth*mnOutHeight; if ( nSaveBackSize <= IMPL_MAXSAVEBACKSIZE ) { if ( nSaveBackSize+mpWindowImpl->mpFrameData->mnAllSaveBackSize <= IMPL_MAXALLSAVEBACKSIZE ) @@ -207,7 +207,7 @@ void Window::ImplSaveOverlapBackground() // ----------------------------------------------------------------------- -BOOL Window::ImplRestoreOverlapBackground( Region& rInvRegion ) +sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) { if ( mpWindowImpl->mpOverlapData->mpSaveBackDev ) { @@ -237,10 +237,10 @@ BOOL Window::ImplRestoreOverlapBackground( Region& rInvRegion ) ImplDeleteOverlapBackground(); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -309,7 +309,7 @@ void Window::ImplInvalidateAllOverlapBackgrounds() // ======================================================================= -Bitmap Window::SnapShot( BOOL bBorder ) const +Bitmap Window::SnapShot( sal_Bool bBorder ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -348,7 +348,7 @@ Bitmap Window::SnapShot( BOOL bBorder ) const Bitmap Window::SnapShot() const { // Should be merged in the next top level build !!! - return SnapShot( TRUE ); + return SnapShot( sal_True ); } // ----------------------------------------------------------------------- @@ -359,7 +359,7 @@ void Window::ShowFocus( const Rectangle& rRect ) if( mpWindowImpl->mbInShowFocus ) return; - mpWindowImpl->mbInShowFocus = TRUE; + mpWindowImpl->mbInShowFocus = sal_True; ImplWinData* pWinData = ImplGetWinData(); @@ -373,7 +373,7 @@ void Window::ShowFocus( const Rectangle& rRect ) { if ( *(pWinData->mpFocusRect) == rRect ) { - mpWindowImpl->mbInShowFocus = FALSE; + mpWindowImpl->mbInShowFocus = sal_False; return; } @@ -386,18 +386,18 @@ void Window::ShowFocus( const Rectangle& rRect ) pWinData->mpFocusRect = new Rectangle( rRect ); else *(pWinData->mpFocusRect) = rRect; - mpWindowImpl->mbFocusVisible = TRUE; + mpWindowImpl->mbFocusVisible = sal_True; } else { if( ! mpWindowImpl->mbNativeFocusVisible ) { - mpWindowImpl->mbNativeFocusVisible = TRUE; + mpWindowImpl->mbNativeFocusVisible = sal_True; if ( !mpWindowImpl->mbInPaint ) Invalidate(); } } - mpWindowImpl->mbInShowFocus = FALSE; + mpWindowImpl->mbInShowFocus = sal_False; } // ----------------------------------------------------------------------- @@ -408,7 +408,7 @@ void Window::HideFocus() if( mpWindowImpl->mbInHideFocus ) return; - mpWindowImpl->mbInHideFocus = TRUE; + mpWindowImpl->mbInHideFocus = sal_True; // native themeing can suggest not to use focus rects if( ! ( mpWindowImpl->mbUseNativeFocus && @@ -416,29 +416,29 @@ void Window::HideFocus() { if ( !mpWindowImpl->mbFocusVisible ) { - mpWindowImpl->mbInHideFocus = FALSE; + mpWindowImpl->mbInHideFocus = sal_False; return; } if ( !mpWindowImpl->mbInPaint ) ImplInvertFocus( *(ImplGetWinData()->mpFocusRect) ); - mpWindowImpl->mbFocusVisible = FALSE; + mpWindowImpl->mbFocusVisible = sal_False; } else { if( mpWindowImpl->mbNativeFocusVisible ) { - mpWindowImpl->mbNativeFocusVisible = FALSE; + mpWindowImpl->mbNativeFocusVisible = sal_False; if ( !mpWindowImpl->mbInPaint ) Invalidate(); } } - mpWindowImpl->mbInHideFocus = FALSE; + mpWindowImpl->mbInHideFocus = sal_False; } // ----------------------------------------------------------------------- -void Window::Invert( const Rectangle& rRect, USHORT nFlags ) +void Window::Invert( const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -474,14 +474,14 @@ void Window::Invert( const Rectangle& rRect, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Invert( const Polygon& rPoly, USHORT nFlags ) +void Window::Invert( const Polygon& rPoly, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( !IsDeviceOutputNecessary() ) return; - USHORT nPoints = rPoly.GetSize(); + sal_uInt16 nPoints = rPoly.GetSize(); if ( nPoints < 2 ) return; @@ -512,7 +512,7 @@ void Window::Invert( const Polygon& rPoly, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::ShowTracking( const Rectangle& rRect, USHORT nFlags ) +void Window::ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -537,7 +537,7 @@ void Window::ShowTracking( const Rectangle& rRect, USHORT nFlags ) else *(pWinData->mpTrackRect) = rRect; pWinData->mnTrackFlags = nFlags; - mpWindowImpl->mbTrackVisible = TRUE; + mpWindowImpl->mbTrackVisible = sal_True; } // ----------------------------------------------------------------------- @@ -551,13 +551,13 @@ void Window::HideTracking() ImplWinData* pWinData = ImplGetWinData(); if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & SHOWTRACK_WINDOW) ) InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags ); - mpWindowImpl->mbTrackVisible = FALSE; + mpWindowImpl->mbTrackVisible = sal_False; } } // ----------------------------------------------------------------------- -void Window::InvertTracking( const Rectangle& rRect, USHORT nFlags ) +void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -598,12 +598,12 @@ void Window::InvertTracking( const Rectangle& rRect, USHORT nFlags ) Point aPoint( mnOutOffX, mnOutOffY ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); - ImplClipBoundaries( aRegion, FALSE, FALSE ); + ImplClipBoundaries( aRegion, sal_False, sal_False ); ImplSelectClipRegion( aRegion, pGraphics ); } } - USHORT nStyle = nFlags & SHOWTRACK_STYLE; + sal_uInt16 nStyle = nFlags & SHOWTRACK_STYLE; if ( nStyle == SHOWTRACK_OBJECT ) pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SAL_INVERT_TRACKFRAME, this ); else if ( nStyle == SHOWTRACK_SPLIT ) @@ -622,11 +622,11 @@ void Window::InvertTracking( const Rectangle& rRect, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::InvertTracking( const Polygon& rPoly, USHORT nFlags ) +void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - USHORT nPoints = rPoly.GetSize(); + sal_uInt16 nPoints = rPoly.GetSize(); if ( nPoints < 2 ) return; @@ -664,7 +664,7 @@ void Window::InvertTracking( const Polygon& rPoly, USHORT nFlags ) Point aPoint( mnOutOffX, mnOutOffY ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); - ImplClipBoundaries( aRegion, FALSE, FALSE ); + ImplClipBoundaries( aRegion, sal_False, sal_False ); ImplSelectClipRegion( aRegion, pGraphics ); } } @@ -701,7 +701,7 @@ IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer ) // ----------------------------------------------------------------------- -void Window::StartTracking( USHORT nFlags ) +void Window::StartTracking( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -732,7 +732,7 @@ void Window::StartTracking( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::EndTracking( USHORT nFlags ) +void Window::EndTracking( sal_uInt16 nFlags ) { ImplSVData* pSVData = ImplGetSVData(); @@ -775,7 +775,7 @@ void Window::EndTracking( USHORT nFlags ) // ----------------------------------------------------------------------- -BOOL Window::IsTracking() const +sal_Bool Window::IsTracking() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -784,7 +784,7 @@ BOOL Window::IsTracking() const // ----------------------------------------------------------------------- -void Window::StartAutoScroll( USHORT nFlags ) +void Window::StartAutoScroll( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -821,7 +821,7 @@ void Window::EndAutoScroll() // ----------------------------------------------------------------------- -BOOL Window::IsAutoScroll() const +sal_Bool Window::IsAutoScroll() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -847,13 +847,13 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, { const Region aOldClip( rSaveDevice.GetClipRegion() ); const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) ); - const BOOL bMap = rSaveDevice.IsMapModeEnabled(); + const sal_Bool bMap = rSaveDevice.IsMapModeEnabled(); // move clip region to have the same distance to DestOffset aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() ); // set pixel clip region - rSaveDevice.EnableMapMode( FALSE ); + rSaveDevice.EnableMapMode( sal_False ); rSaveDevice.SetClipRegion( aClip ); rSaveDevice.EnableMapMode( bMap ); rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this ); @@ -882,13 +882,13 @@ sal_uIntPtr Window::SaveFocus() // ----------------------------------------------------------------------- -BOOL Window::EndSaveFocus( sal_uIntPtr nSaveId, BOOL bRestore ) +sal_Bool Window::EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore ) { if ( !nSaveId ) - return FALSE; + return sal_False; else { - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; ImplFocusDelData* pDelData = (ImplFocusDelData*)(void*)nSaveId; if ( !pDelData->IsDelete() ) { @@ -951,7 +951,7 @@ void Window::SetZoomedPointFont( const Font& rFont ) long nFontDiff = Abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() ); if ( (aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2) ) { - USHORT nType; + sal_uInt16 nType; if ( aMetric.GetPitch() == PITCH_FIXED ) nType = DEFAULTFONT_FIXED; else @@ -1044,7 +1044,7 @@ void Window::SetControlForeground() if ( mpWindowImpl->mbControlForeground ) { mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT ); - mpWindowImpl->mbControlForeground = FALSE; + mpWindowImpl->mbControlForeground = sal_False; StateChanged( STATE_CHANGE_CONTROLFOREGROUND ); } } @@ -1060,7 +1060,7 @@ void Window::SetControlForeground( const Color& rColor ) if ( mpWindowImpl->mbControlForeground ) { mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT ); - mpWindowImpl->mbControlForeground = FALSE; + mpWindowImpl->mbControlForeground = sal_False; StateChanged( STATE_CHANGE_CONTROLFOREGROUND ); } } @@ -1069,7 +1069,7 @@ void Window::SetControlForeground( const Color& rColor ) if ( mpWindowImpl->maControlForeground != rColor ) { mpWindowImpl->maControlForeground = rColor; - mpWindowImpl->mbControlForeground = TRUE; + mpWindowImpl->mbControlForeground = sal_True; StateChanged( STATE_CHANGE_CONTROLFOREGROUND ); } } @@ -1084,7 +1084,7 @@ void Window::SetControlBackground() if ( mpWindowImpl->mbControlBackground ) { mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT ); - mpWindowImpl->mbControlBackground = FALSE; + mpWindowImpl->mbControlBackground = sal_False; StateChanged( STATE_CHANGE_CONTROLBACKGROUND ); } } @@ -1100,7 +1100,7 @@ void Window::SetControlBackground( const Color& rColor ) if ( mpWindowImpl->mbControlBackground ) { mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT ); - mpWindowImpl->mbControlBackground = FALSE; + mpWindowImpl->mbControlBackground = sal_False; StateChanged( STATE_CHANGE_CONTROLBACKGROUND ); } } @@ -1109,7 +1109,7 @@ void Window::SetControlBackground( const Color& rColor ) if ( mpWindowImpl->maControlBackground != rColor ) { mpWindowImpl->maControlBackground = rColor; - mpWindowImpl->mbControlBackground = TRUE; + mpWindowImpl->mbControlBackground = sal_True; StateChanged( STATE_CHANGE_CONTROLBACKGROUND ); } } @@ -1173,12 +1173,12 @@ long Window::GetDrawPixel( OutputDevice* pDev, long nPixels ) const // ----------------------------------------------------------------------- -BOOL Window::HandleScrollCommand( const CommandEvent& rCmd, +sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, ScrollBar* pHScrl, ScrollBar* pVScrl ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( pHScrl || pVScrl ) { @@ -1186,7 +1186,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd, { case COMMAND_STARTAUTOSCROLL: { - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( pHScrl ) { if ( (pHScrl->GetVisibleSize() < pHScrl->GetRangeMax()) && @@ -1203,7 +1203,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd, if ( nFlags ) { StartAutoScroll( nFlags ); - bRet = TRUE; + bRet = sal_True; } } break; @@ -1214,7 +1214,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd, if ( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) ) { - ULONG nScrollLines = pData->GetScrollLines(); + sal_uIntPtr nScrollLines = pData->GetScrollLines(); long nLines; if ( nScrollLines == COMMAND_WHEEL_PAGESCROLL ) { @@ -1231,7 +1231,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd, 0L, pData->IsHorz() ? pHScrl : pVScrl, nLines ); - bRet = TRUE; + bRet = sal_True; } } } @@ -1244,7 +1244,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd, { ImplHandleScroll( pHScrl, pData->GetDeltaX(), pVScrl, pData->GetDeltaY() ); - bRet = TRUE; + bRet = sal_True; } } break; @@ -1312,7 +1312,7 @@ void Window::ImplHandleScroll( ScrollBar* pHScrl, long nX, // support for docking // this is currently handled in ImplDockingWindowWrapper /* -void Window::ImplSetFloatingMode( BOOL bFloatMode ) +void Window::ImplSetFloatingMode( sal_Bool bFloatMode ) { // if the window is docked, put it into a flaoting window // if it is floating put it back in the old frame @@ -1325,11 +1325,11 @@ void Window::ImplSetFloatingMode( BOOL bFloatMode ) { if ( pWrapper->PrepareToggleFloatingMode() ) { - BOOL bVisible = IsVisible(); + sal_Bool bVisible = IsVisible(); if ( bFloatMode ) { - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); pWrapper->maDockPos = GetPosPixel(); @@ -1377,7 +1377,7 @@ void Window::ImplSetFloatingMode( BOOL bFloatMode ) } else { - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); // FloatingDaten wird im FloatingWindow speichern pWrapper->maFloatPos = mpFloatWin->GetPosPixel(); @@ -1418,7 +1418,7 @@ DockingManager* Window::GetDockingManager() return ImplGetDockingManager(); } -void Window::EnableDocking( BOOL bEnable ) +void Window::EnableDocking( sal_Bool bEnable ) { // update list of dockable windows if( bEnable ) @@ -1444,12 +1444,12 @@ Window* Window::ImplGetTopmostFrameWindow() // making these Methods out of line to be able to change them lateron without complete rebuild // TODO: Set the SmartId in here and remove mpWindowImpl->mnHelpId -void Window::SetHelpId( ULONG nHelpId ) +void Window::SetHelpId( sal_uIntPtr nHelpId ) { SetSmartHelpId(SmartId(nHelpId)); } -ULONG Window::GetHelpId() const +sal_uIntPtr Window::GetHelpId() const { return mpWindowImpl->mnHelpId; } @@ -1493,8 +1493,8 @@ SmartId Window::GetSmartHelpId() const // making these Methods out of line to be able to change them lateron without complete rebuild // TODO: Set the SmartId in here and remove mpWindowImpl->mnUniqId -void Window::SetUniqueId( ULONG nUniqueId ) { mpWindowImpl->mnUniqId = nUniqueId; } -ULONG Window::GetUniqueId() const { return mpWindowImpl->mnUniqId; } +void Window::SetUniqueId( sal_uIntPtr nUniqueId ) { mpWindowImpl->mnUniqId = nUniqueId; } +sal_uIntPtr Window::GetUniqueId() const { return mpWindowImpl->mnUniqId; } void Window::SetSmartUniqueId( const SmartId& aId, SmartIdUpdateMode aMode ) @@ -1607,47 +1607,47 @@ Window* Window::ImplGetFrameWindow() const return mpWindowImpl->mpFrameWindow; } -BOOL Window::ImplIsDockingWindow() const +sal_Bool Window::ImplIsDockingWindow() const { return mpWindowImpl->mbDockWin; } -BOOL Window::ImplIsFloatingWindow() const +sal_Bool Window::ImplIsFloatingWindow() const { return mpWindowImpl->mbFloatWin; } -BOOL Window::ImplIsToolbox() const +sal_Bool Window::ImplIsToolbox() const { return mpWindowImpl->mbToolBox; } -BOOL Window::ImplIsSplitter() const +sal_Bool Window::ImplIsSplitter() const { return mpWindowImpl->mbSplitter; } -BOOL Window::ImplIsPushButton() const +sal_Bool Window::ImplIsPushButton() const { return mpWindowImpl->mbPushButton; } -BOOL Window::ImplIsOverlapWindow() const +sal_Bool Window::ImplIsOverlapWindow() const { return mpWindowImpl->mbOverlapWin; } -void Window::ImplSetActive( BOOL bActive ) +void Window::ImplSetActive( sal_Bool bActive ) { mpWindowImpl->mbActive = bActive; } -BOOL Window::ImplIsMouseTransparent() const +sal_Bool Window::ImplIsMouseTransparent() const { return mpWindowImpl->mbMouseTransparent; } -void Window::ImplSetMouseTransparent( BOOL bTransparent ) +void Window::ImplSetMouseTransparent( sal_Bool bTransparent ) { mpWindowImpl->mbMouseTransparent = bTransparent; } @@ -1678,7 +1678,7 @@ void Window::ImplFrameToOutput( Rectangle& rRect ) rRect.Bottom()-=mnOutOffY; } -void Window::SetCompoundControl( BOOL bCompound ) +void Window::SetCompoundControl( sal_Bool bCompound ) { mpWindowImpl->mbCompoundControl = bCompound; } @@ -1722,77 +1722,77 @@ WindowType Window::GetType() const { return mpWindowImpl->mnType; } -BOOL Window::IsSystemWindow() const +sal_Bool Window::IsSystemWindow() const { return mpWindowImpl->mbSysWin; } -BOOL Window::IsDialog() const +sal_Bool Window::IsDialog() const { return mpWindowImpl->mbDialog; } -BOOL Window::IsMenuFloatingWindow() const +sal_Bool Window::IsMenuFloatingWindow() const { return mpWindowImpl->mbMenuFloatingWindow; } -BOOL Window::IsToolbarFloatingWindow() const +sal_Bool Window::IsToolbarFloatingWindow() const { return mpWindowImpl->mbToolbarFloatingWindow; } -void Window::EnableAllResize( BOOL bEnable ) +void Window::EnableAllResize( sal_Bool bEnable ) { mpWindowImpl->mbAllResize = bEnable; } -BOOL Window::IsAllResizeEnabled() const +sal_Bool Window::IsAllResizeEnabled() const { return mpWindowImpl->mbAllResize; } -BOOL Window::IsClipSiblingsEnabled() const +sal_Bool Window::IsClipSiblingsEnabled() const { return mpWindowImpl->mbClipSiblings; } -void Window::EnableChildTransparentMode( BOOL bEnable ) +void Window::EnableChildTransparentMode( sal_Bool bEnable ) { mpWindowImpl->mbChildTransparent = bEnable; } -BOOL Window::IsChildTransparentModeEnabled() const +sal_Bool Window::IsChildTransparentModeEnabled() const { return mpWindowImpl->mbChildTransparent; } -BOOL Window::IsMouseTransparent() const +sal_Bool Window::IsMouseTransparent() const { return mpWindowImpl->mbMouseTransparent; } -BOOL Window::IsPaintTransparent() const +sal_Bool Window::IsPaintTransparent() const { return mpWindowImpl->mbPaintTransparent; } -void Window::SetDialogControlStart( BOOL bStart ) +void Window::SetDialogControlStart( sal_Bool bStart ) { mpWindowImpl->mbDlgCtrlStart = bStart; } -BOOL Window::IsDialogControlStart() const +sal_Bool Window::IsDialogControlStart() const { return mpWindowImpl->mbDlgCtrlStart; } -void Window::SetDialogControlFlags( USHORT nFlags ) +void Window::SetDialogControlFlags( sal_uInt16 nFlags ) { mpWindowImpl->mnDlgCtrlFlags = nFlags; } -USHORT Window::GetDialogControlFlags() const +sal_uInt16 Window::GetDialogControlFlags() const { return mpWindowImpl->mnDlgCtrlFlags; } @@ -1802,22 +1802,22 @@ const InputContext& Window::GetInputContext() const return mpWindowImpl->maInputContext; } -BOOL Window::IsExtTextInput() const +sal_Bool Window::IsExtTextInput() const { return mpWindowImpl->mbExtTextInput; } -void Window::EnableChildNotify( BOOL bEnable ) +void Window::EnableChildNotify( sal_Bool bEnable ) { mpWindowImpl->mbChildNotify = bEnable; } -BOOL Window::IsChildNotify() const +sal_Bool Window::IsChildNotify() const { return mpWindowImpl->mbChildNotify; } -BOOL Window::IsControlFont() const +sal_Bool Window::IsControlFont() const { return (mpWindowImpl->mpControlFont != 0); } @@ -1827,7 +1827,7 @@ Color Window::GetControlForeground() const return mpWindowImpl->maControlForeground; } -BOOL Window::IsControlForeground() const +sal_Bool Window::IsControlForeground() const { return mpWindowImpl->mbControlForeground; } @@ -1837,12 +1837,12 @@ Color Window::GetControlBackground() const return mpWindowImpl->maControlBackground; } -BOOL Window::IsControlBackground() const +sal_Bool Window::IsControlBackground() const { return mpWindowImpl->mbControlBackground; } -BOOL Window::IsInPaint() const +sal_Bool Window::IsInPaint() const { return mpWindowImpl->mbInPaint; } @@ -1852,128 +1852,128 @@ Window* Window::GetParent() const return mpWindowImpl->mpRealParent; } -BOOL Window::IsVisible() const +sal_Bool Window::IsVisible() const { return mpWindowImpl->mbVisible; } -BOOL Window::IsReallyVisible() const +sal_Bool Window::IsReallyVisible() const { return mpWindowImpl->mbReallyVisible; } -BOOL Window::IsParentPathVisible() const +sal_Bool Window::IsParentPathVisible() const { return mpWindowImpl->mbReallyVisible; } -BOOL Window::IsReallyShown() const +sal_Bool Window::IsReallyShown() const { return mpWindowImpl->mbReallyShown; } -BOOL Window::IsInInitShow() const +sal_Bool Window::IsInInitShow() const { return mpWindowImpl->mbInInitShow; } -BOOL Window::IsEnabled() const +sal_Bool Window::IsEnabled() const { return !mpWindowImpl->mbDisabled; } -BOOL Window::IsInputEnabled() const +sal_Bool Window::IsInputEnabled() const { return !mpWindowImpl->mbInputDisabled; } -BOOL Window::IsAlwaysEnableInput() const +sal_Bool Window::IsAlwaysEnableInput() const { return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled; } -BOOL Window::IsAlwaysDisableInput() const +sal_Bool Window::IsAlwaysDisableInput() const { return mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled; } -USHORT Window::GetActivateMode() const +sal_uInt16 Window::GetActivateMode() const { return mpWindowImpl->mnActivateMode; } -BOOL Window::IsAlwaysOnTopEnabled() const +sal_Bool Window::IsAlwaysOnTopEnabled() const { return mpWindowImpl->mbAlwaysOnTop; } -BOOL Window::IsDefaultPos() const +sal_Bool Window::IsDefaultPos() const { return mpWindowImpl->mbDefPos; } -BOOL Window::IsDefaultSize() const +sal_Bool Window::IsDefaultSize() const { return mpWindowImpl->mbDefSize; } -void Window::EnablePaint( BOOL bEnable ) +void Window::EnablePaint( sal_Bool bEnable ) { mpWindowImpl->mbPaintDisabled = !bEnable; } -BOOL Window::IsPaintEnabled() const +sal_Bool Window::IsPaintEnabled() const { return !mpWindowImpl->mbPaintDisabled; } -BOOL Window::IsUpdateMode() const +sal_Bool Window::IsUpdateMode() const { return !mpWindowImpl->mbNoUpdate; } -void Window::SetParentUpdateMode( BOOL bUpdate ) +void Window::SetParentUpdateMode( sal_Bool bUpdate ) { mpWindowImpl->mbNoParentUpdate = !bUpdate; } -BOOL Window::IsParentUpdateMode() const +sal_Bool Window::IsParentUpdateMode() const { return !mpWindowImpl->mbNoParentUpdate; } -BOOL Window::IsActive() const +sal_Bool Window::IsActive() const { return mpWindowImpl->mbActive; } -USHORT Window::GetGetFocusFlags() const +sal_uInt16 Window::GetGetFocusFlags() const { return mpWindowImpl->mnGetFocusFlags; } -BOOL Window::IsCompoundControl() const +sal_Bool Window::IsCompoundControl() const { return mpWindowImpl->mbCompoundControl; } -BOOL Window::HasCompoundControlFocus() const +sal_Bool Window::HasCompoundControlFocus() const { return mpWindowImpl->mbCompoundControlHasFocus; } -BOOL Window::IsChildPointerOverwrite() const +sal_Bool Window::IsChildPointerOverwrite() const { return mpWindowImpl->mbChildPtrOverwrite; } -BOOL Window::IsPointerVisible() const +sal_Bool Window::IsPointerVisible() const { return !mpWindowImpl->mbNoPtrVisible; } -BOOL Window::IsWait() const +sal_Bool Window::IsWait() const { return (mpWindowImpl->mnWaitCount != 0); } @@ -1988,7 +1988,7 @@ const Fraction& Window::GetZoom() const return mpWindowImpl->maZoom; } -BOOL Window::IsZoom() const +sal_Bool Window::IsZoom() const { return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator(); } @@ -1996,7 +1996,7 @@ BOOL Window::IsZoom() const void Window::SetHelpText( const XubString& rHelpText ) { mpWindowImpl->maHelpText = rHelpText; - mpWindowImpl->mbHelpTextDynamic = TRUE; + mpWindowImpl->mbHelpTextDynamic = sal_True; } void Window::SetQuickHelpText( const XubString& rHelpText ) @@ -2019,12 +2019,12 @@ void* Window::GetData() const return mpWindowImpl->mpUserData; } -BOOL Window::IsCreatedWithToolkit() const +sal_Bool Window::IsCreatedWithToolkit() const { return mpWindowImpl->mbCreatedWithToolkit; } -void Window::SetCreatedWithToolkit( BOOL b ) +void Window::SetCreatedWithToolkit( sal_Bool b ) { mpWindowImpl->mbCreatedWithToolkit = b; diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 7b0512a1320b..7498de8a167d 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -133,9 +133,9 @@ long ImplCallEvent( NotifyEvent& rEvt ) // ======================================================================= -static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, - USHORT nCode, USHORT nSVEvent, - BOOL bMouseLeave ) +static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, + sal_uInt16 nCode, sal_uInt16 nSVEvent, + sal_Bool bMouseLeave ) { ImplSVData* pSVData = ImplGetSVData(); @@ -146,21 +146,21 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, * #93895# since floats are system windows, coordinates have * to be converted to float relative for the hittest */ - USHORT nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE; + sal_uInt16 nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE; FloatingWindow* pFloat = pSVData->maWinData.mpFirstFloat->ImplFloatHitTest( pChild, rMousePos, nHitTest ); FloatingWindow* pLastLevelFloat; - ULONG nPopupFlags; + sal_uIntPtr nPopupFlags; if ( nSVEvent == EVENT_MOUSEMOVE ) { if ( bMouseLeave ) - return TRUE; + return sal_True; if ( !pFloat || (nHitTest & IMPL_FLOATWIN_HITTEST_RECT) ) { if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp ) ImplDestroyHelpWindow( true ); pChild->ImplGetFrame()->SetPointer( POINTER_ARROW ); - return TRUE; + return sal_True; } } else @@ -176,15 +176,15 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); // Erstmal ausgebaut als Hack fuer Bug 53378 // if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ) -// return FALSE; +// return sal_False; // else - return TRUE; + return sal_True; } else if ( nHitTest & IMPL_FLOATWIN_HITTEST_RECT ) { if ( !(pFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE) ) pFloat->ImplSetMouseDown(); - return TRUE; + return sal_True; } } else @@ -195,7 +195,7 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, { if ( pFloat->ImplIsMouseDown() ) pFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); - return TRUE; + return sal_True; } } else @@ -205,7 +205,7 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, if ( !(nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) ) { pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); - return TRUE; + return sal_True; } } } @@ -220,21 +220,21 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, { if ( (nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) && (nSVEvent == EVENT_MOUSEBUTTONUP) ) - return TRUE; + return sal_True; pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ) - return FALSE; + return sal_False; else - return TRUE; + return sal_True; } else - return TRUE; + return sal_True; } } } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -246,7 +246,7 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos ) !( pSVData->maHelpData.mpHelpWin->IsWindowOrChild( pChild ) || pChild->IsWindowOrChild( pSVData->maHelpData.mpHelpWin ) ) ) { - USHORT nHelpMode = 0; + sal_uInt16 nHelpMode = 0; if ( pSVData->maHelpData.mbQuickHelp ) nHelpMode = HELPMODE_QUICK; if ( pSVData->maHelpData.mbBalloonHelp ) @@ -256,9 +256,9 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos ) if ( pChild->IsInputEnabled() && ! pChild->IsInModalMode() ) { HelpEvent aHelpEvent( rMousePos, nHelpMode ); - pSVData->maHelpData.mbRequestingHelp = TRUE; + pSVData->maHelpData.mbRequestingHelp = sal_True; pChild->RequestHelp( aHelpEvent ); - pSVData->maHelpData.mbRequestingHelp = FALSE; + pSVData->maHelpData.mbRequestingHelp = sal_False; } // #104172# do not kill keyboard activated tooltips else if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp) @@ -282,8 +282,8 @@ static void ImplSetMousePointer( Window* pChild ) // ----------------------------------------------------------------------- -static BOOL ImplCallCommand( Window* pChild, USHORT nEvt, void* pData = NULL, - BOOL bMouse = FALSE, Point* pPos = NULL ) +static sal_Bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL, + sal_Bool bMouse = sal_False, Point* pPos = NULL ) { Point aPos; if ( pPos ) @@ -303,24 +303,24 @@ static BOOL ImplCallCommand( Window* pChild, USHORT nEvt, void* pData = NULL, CommandEvent aCEvt( aPos, nEvt, bMouse, pData ); NotifyEvent aNCmdEvt( EVENT_COMMAND, pChild, &aCEvt ); ImplDelData aDelData( pChild ); - BOOL bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0); + sal_Bool bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; if ( !bPreNotify ) { - pChild->ImplGetWindowImpl()->mbCommand = FALSE; + pChild->ImplGetWindowImpl()->mbCommand = sal_False; pChild->Command( aCEvt ); if( aDelData.IsDelete() ) - return FALSE; + return sal_False; pChild->ImplNotifyKeyMouseCommandEventListeners( aNCmdEvt ); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; if ( pChild->ImplGetWindowImpl()->mbCommand ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -343,24 +343,24 @@ static long ContextMenuEventLink( void* pCEvent, void* ) if( ! pEv->aDelData.IsDelete() ) { pEv->pWindow->ImplRemoveDel( &pEv->aDelData ); - ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, TRUE, &pEv->aChildPos ); + ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, sal_True, &pEv->aChildPos ); } delete pEv; return 0; } -long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, - long nX, long nY, ULONG nMsgTime, - USHORT nCode, USHORT nMode ) +long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave, + long nX, long nY, sal_uIntPtr nMsgTime, + sal_uInt16 nCode, sal_uInt16 nMode ) { ImplSVData* pSVData = ImplGetSVData(); Point aMousePos( nX, nY ); Window* pChild; long nRet; - USHORT nClicks; + sal_uInt16 nClicks; ImplFrameData* pWinFrameData = pWindow->ImplGetFrameData(); - USHORT nOldCode = pWinFrameData->mnMouseCode; + sal_uInt16 nOldCode = pWinFrameData->mnMouseCode; // we need a mousemove event, befor we get a mousebuttondown or a // mousebuttonup event @@ -383,7 +383,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, if ( (pWinFrameData->mnLastMouseX != nX) || (pWinFrameData->mnLastMouseY != nY) ) { - ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, FALSE, nX, nY, nMsgTime, nCode, nMode ); + ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False, nX, nY, nMsgTime, nCode, nMode ); } } @@ -396,7 +396,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, pWinFrameData->mnMouseMode = nMode & ~(MOUSE_SYNTHETIC | MOUSE_MODIFIERCHANGED); if ( bMouseLeave ) { - pWinFrameData->mbMouseIn = FALSE; + pWinFrameData->mbMouseIn = sal_False; if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp ) { ImplDelData aDelData( pWindow ); @@ -408,7 +408,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, } } else - pWinFrameData->mbMouseIn = TRUE; + pWinFrameData->mbMouseIn = sal_True; DBG_ASSERT( !pSVData->maWinData.mpTrackWin || (pSVData->maWinData.mpTrackWin == pSVData->maWinData.mpCaptureWin), @@ -561,7 +561,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, !(((nMouseY-nDragH) <= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY) && ((nMouseY+nDragH) >= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY)) ) { - pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = TRUE; + pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True; // Check if drag source provides it's own recognizer if( pMouseDownWin->ImplGetFrameData()->mbInternalDragGestureRecognizer ) @@ -592,7 +592,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, nClicks, sal_False ); - ULONG nCount = Application::ReleaseSolarMutex(); + sal_uIntPtr nCount = Application::ReleaseSolarMutex(); // FIXME: where do I get Action from ? ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > xDragSource = pMouseDownWin->GetDragSource(); @@ -610,7 +610,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, } } else - pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = TRUE; + pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True; } // test for mouseleave and mouseenter @@ -624,8 +624,8 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, NotifyEvent aNLeaveEvt( EVENT_MOUSEMOVE, pMouseMoveWin, &aMLeaveEvt ); ImplDelData aDelData; ImplDelData aDelData2; - pWinFrameData->mbInMouseMove = TRUE; - pMouseMoveWin->ImplGetWinData()->mbMouseOver = FALSE; + pWinFrameData->mbInMouseMove = sal_True; + pMouseMoveWin->ImplGetWinData()->mbMouseOver = sal_False; pMouseMoveWin->ImplAddDel( &aDelData ); // Durch MouseLeave kann auch dieses Fenster zerstoert // werden @@ -640,7 +640,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, } pWinFrameData->mpMouseMoveWin = NULL; - pWinFrameData->mbInMouseMove = FALSE; + pWinFrameData->mbInMouseMove = sal_False; if ( pChild ) { @@ -658,7 +658,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, } pWinFrameData->mpMouseMoveWin = pChild; if( pChild ) - pChild->ImplGetWinData()->mbMouseOver = TRUE; + pChild->ImplGetWinData()->mbMouseOver = sal_True; // MouseLeave if ( !pChild ) @@ -670,7 +670,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, if ( nSVEvent == EVENT_MOUSEBUTTONDOWN ) { const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings(); - ULONG nDblClkTime = rMSettings.GetDoubleClickTime(); + sal_uIntPtr nDblClkTime = rMSettings.GetDoubleClickTime(); long nDblClkW = rMSettings.GetDoubleClickWidth(); long nDblClkH = rMSettings.GetDoubleClickHeight(); //long nMouseX = nX; @@ -687,7 +687,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, ((nMouseY+nDblClkH) >= pChild->ImplGetFrameData()->mnFirstMouseY) ) { pChild->ImplGetFrameData()->mnClickCount++; - pChild->ImplGetFrameData()->mbStartDragCalled = TRUE; + pChild->ImplGetFrameData()->mbStartDragCalled = sal_True; } else { @@ -726,7 +726,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, if ( !aDelData.IsDelete() ) { pChild->ImplRemoveDel( &aDelData ); - pChild->ImplGetFrameData()->mbStartDragCalled = TRUE; + pChild->ImplGetFrameData()->mbStartDragCalled = sal_True; } return 1; } @@ -735,15 +735,15 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, } // call handler - BOOL bDrag = FALSE; - BOOL bCallHelpRequest = TRUE; + sal_Bool bDrag = sal_False; + sal_Bool bCallHelpRequest = sal_True; DBG_ASSERT( pChild, "ImplHandleMouseEvent: pChild is NULL" ); ImplDelData aDelData; NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt ); pChild->ImplAddDel( &aDelData ); if ( nSVEvent == EVENT_MOUSEMOVE ) - pChild->ImplGetFrameData()->mbInMouseMove = TRUE; + pChild->ImplGetFrameData()->mbInMouseMove = sal_True; // bring window into foreground on mouseclick if ( nSVEvent == EVENT_MOUSEBUTTONDOWN ) @@ -773,7 +773,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, (pSVData->maWinData.mnTrackFlags & STARTTRACK_SCROLLREPEAT) ) pSVData->maWinData.mpTrackTimer->Start(); } - bCallHelpRequest = FALSE; + bCallHelpRequest = sal_False; nRet = 1; } else @@ -784,16 +784,16 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, pChild->ToTop( TOTOP_NOGRABFOCUS ); if( aDelData.IsDelete() ) - bCallHelpRequest = FALSE; + bCallHelpRequest = sal_False; else { // if the MouseMove handler changes the help window's visibility // the HelpRequest handler should not be called anymore Window* pOldHelpTextWin = pSVData->maHelpData.mpHelpWin; - pChild->ImplGetWindowImpl()->mbMouseMove = FALSE; + pChild->ImplGetWindowImpl()->mbMouseMove = sal_False; pChild->MouseMove( aMEvt ); if ( pOldHelpTextWin != pSVData->maHelpData.mpHelpWin ) - bCallHelpRequest = FALSE; + bCallHelpRequest = sal_False; } } } @@ -804,7 +804,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, nRet = 1; else { - pChild->ImplGetWindowImpl()->mbMouseButtonDown = FALSE; + pChild->ImplGetWindowImpl()->mbMouseButtonDown = sal_False; pChild->MouseButtonDown( aMEvt ); } } @@ -817,7 +817,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, } else { - pChild->ImplGetWindowImpl()->mbMouseButtonUp = FALSE; + pChild->ImplGetWindowImpl()->mbMouseButtonUp = sal_False; pChild->MouseButtonUp( aMEvt ); } } @@ -832,7 +832,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, if ( nSVEvent == EVENT_MOUSEMOVE ) - pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = FALSE; + pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = sal_False; if ( nSVEvent == EVENT_MOUSEMOVE ) { @@ -870,11 +870,11 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, if ( /*(nRet == 0) &&*/ (nClicks == 1) && (nSVEvent == EVENT_MOUSEBUTTONDOWN) && (nCode == MOUSE_MIDDLE) ) { - USHORT nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction(); + sal_uInt16 nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction(); if ( nMiddleAction == MOUSE_MIDDLE_AUTOSCROLL ) - nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, TRUE, &aChildPos ); + nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, sal_True, &aChildPos ); else if ( nMiddleAction == MOUSE_MIDDLE_PASTESELECTION ) - nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, TRUE, &aChildPos ); + nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, sal_True, &aChildPos ); } else { @@ -883,7 +883,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, if ( (nCode == rMSettings.GetContextMenuCode()) && (nClicks == rMSettings.GetContextMenuClicks()) ) { - BOOL bContextMenu; + sal_Bool bContextMenu; if ( rMSettings.GetContextMenuDown() ) bContextMenu = (nSVEvent == EVENT_MOUSEBUTTONDOWN); else @@ -907,7 +907,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, Application::PostUserEvent( Link( pEv, ContextMenuEventLink ) ); } else - nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, TRUE, &aChildPos ); + nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_True, &aChildPos ); } } } @@ -962,20 +962,20 @@ static Window* ImplGetKeyInputWindow( Window* pWindow ) // ----------------------------------------------------------------------- -static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, - USHORT nKeyCode, USHORT nCharCode, USHORT nRepeat, BOOL bForward ) +static long ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, + sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, sal_Bool bForward ) { ImplSVData* pSVData = ImplGetSVData(); KeyCode aKeyCode( nKeyCode, nKeyCode ); - USHORT nEvCode = aKeyCode.GetCode(); + sal_uInt16 nEvCode = aKeyCode.GetCode(); // allow application key listeners to remove the key event - // but make sure we're not forwarding external KeyEvents, (ie where bForward is FALSE) + // but make sure we're not forwarding external KeyEvents, (ie where bForward is sal_False) // becasue those are coming back from the listener itself and MUST be processed KeyEvent aKeyEvent( (xub_Unicode)nCharCode, aKeyCode, nRepeat ); if( bForward ) { - USHORT nVCLEvent; + sal_uInt16 nVCLEvent; switch( nSVEvent ) { case EVENT_KEYINPUT: @@ -998,11 +998,11 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, if( Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep() ) { String aSep( pWindow->GetSettings().GetLocaleDataWrapper().getNumDecimalSep() ); - nCharCode = (USHORT) aSep.GetChar(0); + nCharCode = (sal_uInt16) aSep.GetChar(0); } } - BOOL bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1(); + sal_Bool bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1(); // determine last input time pSVData->maAppData.mnLastInputTime = Time::GetSystemTicks(); @@ -1038,7 +1038,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, if ( pSVData->maWinData.mpTrackWin ) { - USHORT nOrigCode = aKeyCode.GetCode(); + sal_uInt16 nOrigCode = aKeyCode.GetCode(); if ( (nOrigCode == KEY_ESCAPE) && !(pSVData->maWinData.mnTrackFlags & STARTTRACK_NOKEYCANCEL) ) { @@ -1048,7 +1048,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat(); if ( !(pLastLevelFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOKEYCLOSE) ) { - USHORT nEscCode = aKeyCode.GetCode(); + sal_uInt16 nEscCode = aKeyCode.GetCode(); if ( nEscCode == KEY_ESCAPE ) pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); @@ -1071,7 +1071,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat(); if ( !(pLastLevelFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOKEYCLOSE) ) { - USHORT nCode = aKeyCode.GetCode(); + sal_uInt16 nCode = aKeyCode.GetCode(); if ( (nCode == KEY_ESCAPE) || bCtrlF6) { @@ -1106,19 +1106,19 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, KeyEvent aKeyEvt( (xub_Unicode)nCharCode, aKeyCode, nRepeat ); NotifyEvent aNotifyEvt( nSVEvent, pChild, &aKeyEvt ); - BOOL bKeyPreNotify = (ImplCallPreNotify( aNotifyEvt ) != 0); + sal_Bool bKeyPreNotify = (ImplCallPreNotify( aNotifyEvt ) != 0); long nRet = 1; if ( !bKeyPreNotify && !aDelData.IsDelete() ) { if ( nSVEvent == EVENT_KEYINPUT ) { - pChild->ImplGetWindowImpl()->mbKeyInput = FALSE; + pChild->ImplGetWindowImpl()->mbKeyInput = sal_False; pChild->KeyInput( aKeyEvt ); } else { - pChild->ImplGetWindowImpl()->mbKeyUp = FALSE; + pChild->ImplGetWindowImpl()->mbKeyUp = sal_False; pChild->KeyUp( aKeyEvt ); } // #82968# @@ -1135,10 +1135,10 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, { if ( !bKeyPreNotify && pChild->ImplGetWindowImpl()->mbKeyInput ) { - USHORT nCode = aKeyCode.GetCode(); + sal_uInt16 nCode = aKeyCode.GetCode(); // #101999# is focus in or below toolbox - BOOL bToolboxFocus=FALSE; + sal_Bool bToolboxFocus=sal_False; if( (nCode == KEY_F1) && aKeyCode.IsShift() ) { Window *pWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; @@ -1146,7 +1146,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, { if( pWin->ImplGetWindowImpl()->mbToolBox ) { - bToolboxFocus = TRUE; + bToolboxFocus = sal_True; break; } else @@ -1156,7 +1156,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, // ContextMenu if ( (nCode == KEY_CONTEXTMENU) || ((nCode == KEY_F10) && aKeyCode.IsShift() && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) ) - nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, FALSE ); + nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_False ); else if ( ( (nCode == KEY_F2) && aKeyCode.IsShift() ) || ( (nCode == KEY_F1) && aKeyCode.IsMod1() ) || // #101999# no active help when focus in toolbox, simulate BallonHelp instead ( (nCode == KEY_F1) && aKeyCode.IsShift() && bToolboxFocus ) ) @@ -1169,10 +1169,10 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, aPos = pChild->OutputToScreenPixel( aPos ); HelpEvent aHelpEvent( aPos, HELPMODE_BALLOON ); - aHelpEvent.SetKeyboardActivated( TRUE ); - pSVData->maHelpData.mbSetKeyboardHelp = TRUE; + aHelpEvent.SetKeyboardActivated( sal_True ); + pSVData->maHelpData.mbSetKeyboardHelp = sal_True; pChild->RequestHelp( aHelpEvent ); - pSVData->maHelpData.mbSetKeyboardHelp = FALSE; + pSVData->maHelpData.mbSetKeyboardHelp = sal_False; } else if ( (nCode == KEY_F1) || (nCode == KEY_HELP) ) { @@ -1219,7 +1219,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, ImplDelData aChildDelData( pChild ); KeyEvent aKEvt( (xub_Unicode)nCharCode, aKeyCode, nRepeat ); NotifyEvent aNEvt( nSVEvent, pChild, &aKEvt ); - BOOL bPreNotify = (ImplCallPreNotify( aNEvt ) != 0); + sal_Bool bPreNotify = (ImplCallPreNotify( aNEvt ) != 0); if ( aChildDelData.IsDelete() ) return 1; @@ -1227,12 +1227,12 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, { if ( nSVEvent == EVENT_KEYINPUT ) { - pChild->ImplGetWindowImpl()->mbKeyInput = FALSE; + pChild->ImplGetWindowImpl()->mbKeyInput = sal_False; pChild->KeyInput( aKEvt ); } else { - pChild->ImplGetWindowImpl()->mbKeyUp = FALSE; + pChild->ImplGetWindowImpl()->mbKeyUp = sal_False; pChild->KeyUp( aKEvt ); } // #82968# @@ -1253,8 +1253,8 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent, static long ImplHandleExtTextInput( Window* pWindow, const XubString& rText, - const USHORT* pTextAttr, - ULONG nCursorPos, USHORT nCursorFlags ) + const sal_uInt16* pTextAttr, + sal_uIntPtr nCursorPos, sal_uInt16 nCursorFlags ) { ImplSVData* pSVData = ImplGetSVData(); Window* pChild = NULL; @@ -1279,7 +1279,7 @@ static long ImplHandleExtTextInput( Window* pWindow, ImplWinData* pWinData = pChild->ImplGetWinData(); if ( !pChild->ImplGetWindowImpl()->mbExtTextInput ) { - pChild->ImplGetWindowImpl()->mbExtTextInput = TRUE; + pChild->ImplGetWindowImpl()->mbExtTextInput = sal_True; if ( !pWinData->mpExtOldText ) pWinData->mpExtOldText = new UniString; else @@ -1298,7 +1298,7 @@ static long ImplHandleExtTextInput( Window* pWindow, return 0; // Test for changes - BOOL bOnlyCursor = FALSE; + sal_Bool bOnlyCursor = sal_False; xub_StrLen nMinLen = Min( pWinData->mpExtOldText->Len(), rText.Len() ); xub_StrLen nDeltaStart = 0; while ( nDeltaStart < nMinLen ) @@ -1327,7 +1327,7 @@ static long ImplHandleExtTextInput( Window* pWindow, } if ( (nDeltaStart >= nMinLen) && (pWinData->mpExtOldText->Len() == rText.Len()) ) - bOnlyCursor = TRUE; + bOnlyCursor = sal_True; // Call Event and store the information CommandExtTextInputData aData( rText, pTextAttr, @@ -1342,8 +1342,8 @@ static long ImplHandleExtTextInput( Window* pWindow, } if ( pTextAttr ) { - pWinData->mpExtOldAttrAry = new USHORT[rText.Len()]; - memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.Len()*sizeof( USHORT ) ); + pWinData->mpExtOldAttrAry = new sal_uInt16[rText.Len()]; + memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.Len()*sizeof( sal_uInt16 ) ); } return !ImplCallCommand( pChild, COMMAND_EXTTEXTINPUT, &aData ); } @@ -1358,7 +1358,7 @@ static long ImplHandleEndExtTextInput( Window* /* pWindow */ ) if ( pChild ) { - pChild->ImplGetWindowImpl()->mbExtTextInput = FALSE; + pChild->ImplGetWindowImpl()->mbExtTextInput = sal_False; pSVData->maWinData.mpExtTextInputWin = NULL; ImplWinData* pWinData = pChild->ImplGetWinData(); if ( pWinData->mpExtOldText ) @@ -1435,26 +1435,26 @@ static long ImplHandleInputContextChange( Window* pWindow, LanguageType eNewLang // ----------------------------------------------------------------------- -static BOOL ImplCallWheelCommand( Window* pWindow, const Point& rPos, +static sal_Bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, const CommandWheelData* pWheelData ) { Point aCmdMousePos = pWindow->ImplFrameToOutput( rPos ); - CommandEvent aCEvt( aCmdMousePos, COMMAND_WHEEL, TRUE, pWheelData ); + CommandEvent aCEvt( aCmdMousePos, COMMAND_WHEEL, sal_True, pWheelData ); NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, &aCEvt ); ImplDelData aDelData( pWindow ); - BOOL bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0); + sal_Bool bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; if ( !bPreNotify ) { - pWindow->ImplGetWindowImpl()->mbCommand = FALSE; + pWindow->ImplGetWindowImpl()->mbCommand = sal_False; pWindow->Command( aCEvt ); if ( aDelData.IsDelete() ) - return FALSE; + return sal_False; if ( pWindow->ImplGetWindowImpl()->mbCommand ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -1471,8 +1471,8 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv if( aDogTag.IsDelete() ) return 0; - USHORT nMode; - USHORT nCode = rEvt.mnCode; + sal_uInt16 nMode; + sal_uInt16 nCode = rEvt.mnCode; bool bHorz = rEvt.mbHorz; bool bPixel = rEvt.mbDeltaIsPixel; if ( nCode & KEY_MOD1 ) @@ -1489,7 +1489,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv CommandWheelData aWheelData( rEvt.mnDelta, rEvt.mnNotchDelta, rEvt.mnScrollLines, nMode, nCode, bHorz, bPixel ); Point aMousePos( rEvt.mnX, rEvt.mnY ); - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; // first check any floating window ( eg. drop down listboxes) bool bIsFloat = false; @@ -1497,7 +1497,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv if ( pSVData->maWinData.mpFirstFloat && !pSVData->maWinData.mpCaptureWin && !pSVData->maWinData.mpFirstFloat->ImplIsFloatPopupModeWindow( pWindow ) ) { - USHORT nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE; + sal_uInt16 nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE; pMouseWindow = pSVData->maWinData.mpFirstFloat->ImplFloatHitTest( pWindow, aMousePos, nHitTest ); } // then try the window directly beneath the mouse @@ -1551,7 +1551,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat(); if( pLastLevelFloat ) { - ULONG nPopupFlags = pLastLevelFloat->GetPopupModeFlags(); + sal_uIntPtr nPopupFlags = pLastLevelFloat->GetPopupModeFlags(); if ( nPopupFlags & FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE ) { pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); @@ -1563,7 +1563,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv } // ----------------------------------------------------------------------- -#define IMPL_PAINT_CHECKRTL ((USHORT)0x0020) +#define IMPL_PAINT_CHECKRTL ((sal_uInt16)0x0020) static void ImplHandlePaint( Window* pWindow, const Rectangle& rBoundRect, bool bImmediateUpdate ) { @@ -1602,7 +1602,7 @@ static void KillOwnPopups( Window* pWindow ) ImplSVData* pSVData = ImplGetSVData(); Window *pParent = pWindow->ImplGetWindowImpl()->mpFrameWindow; Window *pChild = pSVData->maWinData.mpFirstFloat; - if ( pChild && pParent->ImplIsWindowOrChild( pChild, TRUE ) ) + if ( pChild && pParent->ImplIsWindowOrChild( pChild, sal_True ) ) { if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) ) pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); @@ -1629,7 +1629,7 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ) { pWindow->mnOutWidth = nNewWidth; pWindow->mnOutHeight = nNewHeight; - pWindow->ImplGetWindowImpl()->mbWaitSystemResize = FALSE; + pWindow->ImplGetWindowImpl()->mbWaitSystemResize = sal_False; if ( pWindow->IsReallyVisible() ) pWindow->ImplSetClipFlag(); if ( pWindow->IsVisible() || pWindow->ImplGetWindow()->ImplGetWindowImpl()->mbAllResize || @@ -1660,13 +1660,13 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ) pWindow->ImplCallResize(); // otherwise menues cannot be positioned } else - pWindow->ImplGetWindowImpl()->mbCallResize = TRUE; + pWindow->ImplGetWindowImpl()->mbCallResize = sal_True; } } pWindow->ImplGetWindowImpl()->mpFrameData->mbNeedSysWindow = (nNewWidth < IMPL_MIN_NEEDSYSWIN) || (nNewHeight < IMPL_MIN_NEEDSYSWIN); - BOOL bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0); + sal_Bool bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0); if( bMinimized != pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized ) pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplNotifyIconifiedState( bMinimized ); pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized = bMinimized; @@ -1692,7 +1692,7 @@ static void ImplHandleMove( Window* pWindow ) if ( pWindow->IsVisible() ) pWindow->ImplCallMove(); else - pWindow->ImplGetWindowImpl()->mbCallMove = TRUE; // make sure the framepos will be updated on the next Show() + pWindow->ImplGetWindowImpl()->mbCallMove = sal_True; // make sure the framepos will be updated on the next Show() if ( pWindow->ImplGetWindowImpl()->mbFrame && pWindow->ImplGetWindowImpl()->mpClientWindow ) pWindow->ImplGetWindowImpl()->mpClientWindow->ImplCallMove(); // notify client to update geometry @@ -1709,7 +1709,7 @@ static void ImplHandleMoveResize( Window* pWindow, long nNewWidth, long nNewHeig // ----------------------------------------------------------------------- -static void ImplActivateFloatingWindows( Window* pWindow, BOOL bActive ) +static void ImplActivateFloatingWindows( Window* pWindow, sal_Bool bActive ) { // Zuerst alle ueberlappenden Fenster ueberpruefen Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap; @@ -1737,7 +1737,7 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG ) // Wenn Status erhalten geblieben ist, weil wir den Focus in der // zwischenzeit schon wiederbekommen haben, brauchen wir auch // nichts machen - BOOL bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus; + sal_Bool bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus; // Dann die zeitverzoegerten Funktionen ausfuehren if ( bHasFocus ) @@ -1748,21 +1748,21 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG ) if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin ) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInputEnabled() && ! ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInModalMode() ) { if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsEnabled() ) { ImplGetWindowImpl()->mpFrameData->mpFocusWin->GrabFocus(); - bHandled = TRUE; + bHandled = sal_True; } else if( ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplHasDlgCtrl() ) { // #109094# if the focus is restored to a disabled dialog control (was disabled meanwhile) // try to move it to the next control ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplDlgCtrlNextWindow(); - bHandled = TRUE; + bHandled = sal_True; } } if ( !bHandled ) @@ -1803,11 +1803,11 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG ) Window* pOldOverlapWindow = pOldFocusWindow->ImplGetFirstOverlapWindow(); Window* pOldRealWindow = pOldOverlapWindow->ImplGetWindow(); - pOldOverlapWindow->ImplGetWindowImpl()->mbActive = FALSE; + pOldOverlapWindow->ImplGetWindowImpl()->mbActive = sal_False; pOldOverlapWindow->Deactivate(); if ( pOldRealWindow != pOldOverlapWindow ) { - pOldRealWindow->ImplGetWindowImpl()->mbActive = FALSE; + pOldRealWindow->ImplGetWindowImpl()->mbActive = sal_False; pOldRealWindow->Deactivate(); } } @@ -1843,7 +1843,7 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG ) static void ImplHandleGetFocus( Window* pWindow ) { - pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = TRUE; + pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_True; // Focus-Events zeitverzoegert ausfuehren, damit bei SystemChildFenstern // nicht alles flackert, wenn diese den Focus bekommen @@ -1887,7 +1887,7 @@ static void ImplHandleLoseFocus( Window* pWindow ) pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); } - pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = FALSE; + pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_False; // Focus-Events zeitverzoegert ausfuehren, damit bei SystemChildFenstern // nicht alles flackert, wenn diese den Focus bekommen @@ -2008,9 +2008,9 @@ static void ImplHandleUserEvent( ImplSVEvent* pSVEvent ) // ======================================================================= -static USHORT ImplGetMouseMoveMode( SalMouseEvent* pEvent ) +static sal_uInt16 ImplGetMouseMoveMode( SalMouseEvent* pEvent ) { - USHORT nMode = 0; + sal_uInt16 nMode = 0; if ( !pEvent->mnCode ) nMode |= MOUSE_SIMPLEMOVE; if ( (pEvent->mnCode & MOUSE_LEFT) && !(pEvent->mnCode & KEY_MOD1) ) @@ -2022,9 +2022,9 @@ static USHORT ImplGetMouseMoveMode( SalMouseEvent* pEvent ) // ----------------------------------------------------------------------- -static USHORT ImplGetMouseButtonMode( SalMouseEvent* pEvent ) +static sal_uInt16 ImplGetMouseButtonMode( SalMouseEvent* pEvent ) { - USHORT nMode = 0; + sal_uInt16 nMode = 0; if ( pEvent->mnButton == MOUSE_LEFT ) nMode |= MOUSE_SIMPLECLICK; if ( (pEvent->mnButton == MOUSE_LEFT) && !(pEvent->mnCode & (MOUSE_MIDDLE | MOUSE_RIGHT)) ) @@ -2042,7 +2042,7 @@ static USHORT ImplGetMouseButtonMode( SalMouseEvent* pEvent ) inline long ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, TRUE, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_True, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -2052,7 +2052,7 @@ inline long ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) inline long ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, FALSE, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -2062,7 +2062,7 @@ inline long ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) inline long ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, FALSE, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, sal_False, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2077,7 +2077,7 @@ inline long ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent inline long ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, FALSE, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, sal_False, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2092,12 +2092,12 @@ inline long ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent ) static long ImplHandleSalMouseActivate( Window* /*pWindow*/, SalMouseActivateEvent* /*pEvent*/ ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -static long ImplHandleMenuEvent( Window* pWindow, SalMenuEvent* pEvent, USHORT nEvent ) +static long ImplHandleMenuEvent( Window* pWindow, SalMenuEvent* pEvent, sal_uInt16 nEvent ) { // Find SystemWindow and its Menubar and let it dispatch the command long nRet = 0; @@ -2147,11 +2147,11 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent ) if ( pTrackWin ) pWindow = pTrackWin; #ifdef MACOSX - USHORT nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_MOD3); + sal_uInt16 nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_MOD3); #else - USHORT nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2); + sal_uInt16 nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2); #endif - USHORT nNewCode = pEvent->mnCode; + sal_uInt16 nNewCode = pEvent->mnCode; if ( nOldCode != nNewCode ) { #ifdef MACOSX @@ -2159,7 +2159,7 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent ) #else nNewCode |= pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & ~(KEY_SHIFT | KEY_MOD1 | KEY_MOD2); #endif - pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, TRUE ); + pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, sal_True ); } // #105224# send commandevent to allow special treatment of Ctrl-LeftShift/Ctrl-RightShift etc. @@ -2191,7 +2191,7 @@ static void ImplHandleInputLanguageChange( Window* pWindow ) // ----------------------------------------------------------------------- -static void ImplHandleSalSettings( Window* pWindow, USHORT nEvent ) +static void ImplHandleSalSettings( Window* pWindow, sal_uInt16 nEvent ) { // Application Notification werden nur fuer das erste Window ausgeloest ImplSVData* pSVData = ImplGetSVData(); @@ -2211,7 +2211,7 @@ static void ImplHandleSalSettings( Window* pWindow, USHORT nEvent ) } else { - USHORT nType; + sal_uInt16 nType; switch ( nEvent ) { case SALEVENT_VOLUMECHANGED: @@ -2225,7 +2225,7 @@ static void ImplHandleSalSettings( Window* pWindow, USHORT nEvent ) nType = DATACHANGED_DISPLAY; break; case SALEVENT_FONTCHANGED: - OutputDevice::ImplUpdateAllFontData( TRUE ); + OutputDevice::ImplUpdateAllFontData( sal_True ); nType = DATACHANGED_FONTS; break; case SALEVENT_DATETIMECHANGED: @@ -2275,7 +2275,7 @@ static void ImplHandleSalExtTextInputPos( Window* pWindow, SalExtTextInputPosEve static long ImplHandleShowDialog( Window* pWindow, int nDialogId ) { if( ! pWindow ) - return FALSE; + return sal_False; if( pWindow->GetType() == WINDOW_BORDERWINDOW ) { @@ -2339,8 +2339,8 @@ static void ImplHandleSalSurroundingTextRequest( Window *pWindow, // ----------------------------------------------------------------------- static void ImplHandleSurroundingTextSelectionChange( Window *pWindow, - ULONG nStart, - ULONG nEnd ) + sal_uIntPtr nStart, + sal_uIntPtr nEnd ) { Window* pChild = ImplGetKeyInputWindow( pWindow ); if( pChild ) @@ -2362,7 +2362,7 @@ static void ImplHandleStartReconversion( Window *pWindow ) // ----------------------------------------------------------------------- long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, - USHORT nEvent, const void* pEvent ) + sal_uInt16 nEvent, const void* pEvent ) { DBG_TESTSOLARMUTEX(); @@ -2437,28 +2437,28 @@ long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, { SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT, - pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, TRUE ); + pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True ); } break; case SALEVENT_EXTERNALKEYINPUT: { KeyEvent* pKeyEvt = (KeyEvent*) pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT, - pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), FALSE ); + pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False ); } break; case SALEVENT_KEYUP: { SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYUP, - pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, TRUE ); + pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True ); } break; case SALEVENT_EXTERNALKEYUP: { KeyEvent* pKeyEvt = (KeyEvent*) pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYUP, - pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), FALSE ); + pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False ); } break; case SALEVENT_KEYMODCHANGE: @@ -2545,15 +2545,15 @@ long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, { // Message-Schleife beenden Application::Quit(); - return FALSE; + return sal_False; } else { bInQueryExit = false; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } case SALEVENT_SETTINGSCHANGED: @@ -2609,7 +2609,7 @@ long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, break; #ifdef DBG_UTIL default: - DBG_ERROR1( "ImplWindowFrameProc(): unknown event (%lu)", (ULONG)nEvent ); + DBG_ERROR1( "ImplWindowFrameProc(): unknown event (%lu)", (sal_uIntPtr)nEvent ); break; #endif } diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 8fb2f2f8346a..24726a9177ea 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -46,8 +46,8 @@ // ======================================================================= -#define WORKWIN_WINDOWSTATE_FULLSCREEN ((ULONG)0x00010000) -#define WORKWIN_WINDOWSTATE_ALL ((ULONG)0x00FF0000) +#define WORKWIN_WINDOWSTATE_FULLSCREEN ((sal_uIntPtr)0x00010000) +#define WORKWIN_WINDOWSTATE_ALL ((sal_uIntPtr)0x00FF0000) // ======================================================================= @@ -56,17 +56,17 @@ void WorkWindow::ImplInitWorkWindowData() mnIcon = 0; // Should be removed in the next top level update - now in SystemWindow mnPresentationFlags = 0; - mbPresentationMode = FALSE; - mbPresentationVisible = FALSE; - mbPresentationFull = FALSE; - mbFullScreenMode = FALSE; + mbPresentationMode = sal_False; + mbPresentationVisible = sal_False; + mbPresentationFull = sal_False; + mbFullScreenMode = sal_False; } // ----------------------------------------------------------------------- void WorkWindow::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ) { - USHORT nFrameStyle = BORDERWINDOW_STYLE_FRAME; + sal_uInt16 nFrameStyle = BORDERWINDOW_STYLE_FRAME; if ( nStyle & WB_APP ) nFrameStyle |= BORDERWINDOW_STYLE_APP; @@ -139,7 +139,7 @@ WorkWindow::WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSyst SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); - mbSysChild = TRUE; + mbSysChild = sal_True; ImplInit( pParent, nStyle, aSystemWorkWindowToken ); } @@ -149,7 +149,7 @@ WorkWindow::WorkWindow( SystemParentData* pParent ) : SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); - mbSysChild = TRUE; + mbSysChild = sal_True; ImplInit( NULL, 0, pParent ); } @@ -178,7 +178,7 @@ WorkWindow::~WorkWindow() // ----------------------------------------------------------------------- -void WorkWindow::ShowFullScreenMode( BOOL bFullScreenMode, sal_Int32 nDisplay ) +void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDisplay ) { if ( !mbFullScreenMode == !bFullScreenMode ) return; @@ -192,34 +192,34 @@ void WorkWindow::ShowFullScreenMode( BOOL bFullScreenMode, sal_Int32 nDisplay ) mbFullScreenMode = bFullScreenMode != 0; if ( !mbSysChild ) { - mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = TRUE; + mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = sal_True; ImplGetFrame()->ShowFullScreen( bFullScreenMode, nDisplay ); } } // ----------------------------------------------------------------------- -void WorkWindow::StartPresentationMode( BOOL bPresentation, USHORT nFlags, sal_Int32 nDisplay ) +void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplay ) { if ( !bPresentation == !mbPresentationMode ) return; if ( bPresentation ) { - mbPresentationMode = TRUE; + mbPresentationMode = sal_True; mbPresentationVisible = IsVisible(); mbPresentationFull = mbFullScreenMode; mnPresentationFlags = nFlags; if ( !(mnPresentationFlags & PRESENTATION_NOFULLSCREEN) ) - ShowFullScreenMode( TRUE, nDisplay ); + ShowFullScreenMode( sal_True, nDisplay ); if ( !mbSysChild ) { if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS ) - mpWindowImpl->mpFrame->SetAlwaysOnTop( TRUE ); + mpWindowImpl->mpFrame->SetAlwaysOnTop( sal_True ); if ( !(mnPresentationFlags & PRESENTATION_NOAUTOSHOW) ) ToTop(); - mpWindowImpl->mpFrame->StartPresentation( TRUE ); + mpWindowImpl->mpFrame->StartPresentation( sal_True ); } if ( !(mnPresentationFlags & PRESENTATION_NOAUTOSHOW) ) @@ -230,22 +230,22 @@ void WorkWindow::StartPresentationMode( BOOL bPresentation, USHORT nFlags, sal_I Show( mbPresentationVisible ); if ( !mbSysChild ) { - mpWindowImpl->mpFrame->StartPresentation( FALSE ); + mpWindowImpl->mpFrame->StartPresentation( sal_False ); if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS ) - mpWindowImpl->mpFrame->SetAlwaysOnTop( FALSE ); + mpWindowImpl->mpFrame->SetAlwaysOnTop( sal_False ); } ShowFullScreenMode( mbPresentationFull, nDisplay ); - mbPresentationMode = FALSE; - mbPresentationVisible = FALSE; - mbPresentationFull = FALSE; + mbPresentationMode = sal_False; + mbPresentationVisible = sal_False; + mbPresentationFull = sal_False; mnPresentationFlags = 0; } } // ----------------------------------------------------------------------- -BOOL WorkWindow::IsMinimized() const +sal_Bool WorkWindow::IsMinimized() const { //return mpWindowImpl->mpFrameData->mbMinimized; SalFrameState aState; @@ -255,15 +255,15 @@ BOOL WorkWindow::IsMinimized() const // ----------------------------------------------------------------------- -BOOL WorkWindow::SetPluginParent( SystemParentData* pParent ) +sal_Bool WorkWindow::SetPluginParent( SystemParentData* pParent ) { DBG_ASSERT( ! mbPresentationMode && ! mbFullScreenMode, "SetPluginParent in fullscreen or presentation mode !" ); bool bWasDnd = Window::ImplStopDnd(); - BOOL bShown = IsVisible(); - Show( FALSE ); - BOOL bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent ); + sal_Bool bShown = IsVisible(); + Show( sal_False ); + sal_Bool bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent ); Show( bShown ); if( bWasDnd ) @@ -272,7 +272,7 @@ BOOL WorkWindow::SetPluginParent( SystemParentData* pParent ) return bRet; } -void WorkWindow::ImplSetFrameState( ULONG aFrameState ) +void WorkWindow::ImplSetFrameState( sal_uIntPtr aFrameState ) { SalFrameState aState; aState.mnMask = SAL_FRAMESTATE_MASK_STATE; @@ -291,9 +291,9 @@ void WorkWindow::Restore() ImplSetFrameState( SAL_FRAMESTATE_NORMAL ); } -BOOL WorkWindow::Close() +sal_Bool WorkWindow::Close() { - BOOL bCanClose = SystemWindow::Close(); + sal_Bool bCanClose = SystemWindow::Close(); // Ist es das Applikationsfenster, dann beende die Applikation if ( bCanClose && ( ImplGetSVData()->maWinData.mpAppWin == this ) ) @@ -302,14 +302,14 @@ BOOL WorkWindow::Close() return bCanClose; } -void WorkWindow::Maximize( BOOL bMaximize ) +void WorkWindow::Maximize( sal_Bool bMaximize ) { ImplSetFrameState( bMaximize ? SAL_FRAMESTATE_MAXIMIZED : SAL_FRAMESTATE_NORMAL ); } -BOOL WorkWindow::IsMaximized() const +sal_Bool WorkWindow::IsMaximized() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SalFrameState aState; if( mpWindowImpl->mpFrame->GetWindowState( &aState ) ) @@ -317,7 +317,7 @@ BOOL WorkWindow::IsMaximized() const if( aState.mnState & (SAL_FRAMESTATE_MAXIMIZED | SAL_FRAMESTATE_MAXIMIZED_HORZ | SAL_FRAMESTATE_MAXIMIZED_VERT ) ) - bRet = TRUE; + bRet = sal_True; } return bRet; } |