diff options
Diffstat (limited to 'automation/source/server/sta_list.cxx')
-rw-r--r-- | automation/source/server/sta_list.cxx | 226 |
1 files changed, 113 insertions, 113 deletions
diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx index f663665c20b6..3164c5729466 100644 --- a/automation/source/server/sta_list.cxx +++ b/automation/source/server/sta_list.cxx @@ -60,19 +60,19 @@ TTProfiler *StatementList::pProfiler = NULL; StatementList *StatementList::pFirst = NULL; -BOOL StatementList::bReadingCommands = FALSE; -BOOL StatementList::bIsInReschedule = FALSE; -USHORT StatementList::nModalCount = 0; +sal_Bool StatementList::bReadingCommands = sal_False; +sal_Bool StatementList::bIsInReschedule = sal_False; +sal_uInt16 StatementList::nModalCount = 0; Window *StatementList::pLastFocusWindow = NULL; -BOOL StatementList::bWasDragManager = FALSE; -BOOL StatementList::bWasPopupMenu = FALSE; -BOOL StatementList::bBasicWasRunning = FALSE; +sal_Bool StatementList::bWasDragManager = sal_False; +sal_Bool StatementList::bWasPopupMenu = sal_False; +sal_Bool StatementList::bBasicWasRunning = sal_False; RetStream *StatementList::pRet = NULL; -BOOL StatementList::IsError = FALSE; -BOOL StatementList::bDying = FALSE; -BOOL StatementList::bExecuting = FALSE; +sal_Bool StatementList::IsError = sal_False; +sal_Bool StatementList::bDying = sal_False; +sal_Bool StatementList::bExecuting = sal_False; StatementList *StatementList::pCurrentProfileStatement = NULL; -BOOL StatementList::bUsePostEvents = TRUE; +sal_Bool StatementList::bUsePostEvents = sal_True; #if OSL_DEBUG_LEVEL > 1 EditWindow *StatementList::m_pDbgWin; #endif @@ -82,23 +82,23 @@ rtl::OString StatementList::aWindowWaitUId = rtl::OString(); Window *StatementList::pWindowWaitPointer = NULL; rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString(); rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString(); -USHORT StatementList::nUseBindings = 0; +sal_uInt16 StatementList::nUseBindings = 0; -USHORT StatementList::aSubMenuId1 = 0; // Untermens bei PopupMenus -USHORT StatementList::aSubMenuId2 = 0; // erstmal 2-Stufig -USHORT StatementList::aSubMenuId3 = 0; // and now even 3 levels #i31512# +sal_uInt16 StatementList::aSubMenuId1 = 0; // Untermens bei PopupMenus +sal_uInt16 StatementList::aSubMenuId2 = 0; // erstmal 2-Stufig +sal_uInt16 StatementList::aSubMenuId3 = 0; // and now even 3 levels #i31512# SystemWindow *StatementList::pMenuWindow = NULL; TTProperties *StatementList::pTTProperties = NULL; -USHORT StatementList::nMinTypeKeysDelay = 0; // Verzgerung der einzelnen Anschlge fr TypeKeys -USHORT StatementList::nMaxTypeKeysDelay = 0; -BOOL StatementList::bDoTypeKeysDelay = FALSE; +sal_uInt16 StatementList::nMinTypeKeysDelay = 0; // Verzgerung der einzelnen Anschlge fr TypeKeys +sal_uInt16 StatementList::nMaxTypeKeysDelay = 0; +sal_Bool StatementList::bDoTypeKeysDelay = sal_False; Window* StatementList::pFirstDocFrame = NULL; -BOOL StatementList::bIsSlotInExecute = FALSE; +sal_Bool StatementList::bIsSlotInExecute = sal_False; -BOOL StatementList::bCatchGPF = TRUE; +sal_Bool StatementList::bCatchGPF = sal_True; IMPL_GEN_RES_STR; @@ -121,7 +121,7 @@ TTSettings* GetTTSettings() // Translate pTTSettings->pTranslateWin = NULL; - pTTSettings->bToTop = TRUE; + pTTSettings->bToTop = sal_True; } return pTTSettings; @@ -134,14 +134,14 @@ TTSettings* GetTTSettings() #define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "TT_Win_is_closing_HID" ) && pWin->GetUniqueId().equals( "TT_Win_is_closing_UID" )) /* -UniString GEN_RES_STR0( ULONG nResId ) { return ResString( nResId ); } -UniString GEN_RES_STR1( ULONG nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } -UniString GEN_RES_STR2( ULONG nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } -UniString GEN_RES_STR3( ULONG nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );} +UniString GEN_RES_STR0( sal_uLong nResId ) { return ResString( nResId ); } +UniString GEN_RES_STR1( sal_uLong nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } +UniString GEN_RES_STR2( sal_uLong nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } +UniString GEN_RES_STR3( sal_uLong nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );} */ StatementList::StatementList() : nRetryCount(MAX_RETRIES) -, bStatementInQue(FALSE) +, bStatementInQue(sal_False) { if (!pRet) pRet = new RetStream; // so Spt wie mglich, aber dennoch Zentral und auf jeden Fall rechtzeitig, da pRet private ist. @@ -176,7 +176,7 @@ void StatementList::SendProfile( String aText ) if ( pProfiler->IsPartitioning() ) // FIXME: HELPID - pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() ULONG != comm_ULONG on 64bit + pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() sal_uLong != comm_ULONG on 64bit } if ( pProfiler->IsAutoProfiling() ) @@ -196,7 +196,7 @@ void StatementList::QueStatement(StatementList *pAfterThis) if ( bStatementInQue ) return; - bStatementInQue = TRUE; + bStatementInQue = sal_True; if ( pAfterThis ) { if ( pAfterThis->bStatementInQue ) @@ -229,7 +229,7 @@ void StatementList::QueStatement(StatementList *pAfterThis) void StatementList::Advance() { // pFirst ist static! pFirst = pNext; - bStatementInQue = FALSE; + bStatementInQue = sal_False; pNext = NULL; } @@ -242,7 +242,7 @@ StatementList::~StatementList() DBG_ASSERT(!bReadingCommands,"Deleting commands while reading them!"); } -Window* StatementList::GetDocWin( USHORT nNr ) +Window* StatementList::GetDocWin( sal_uInt16 nNr ) { Window* pBase = Application::GetFirstTopLevelWindow(); @@ -259,10 +259,10 @@ Window* StatementList::GetDocWin( USHORT nNr ) return NULL; } -USHORT StatementList::GetDocFrameCount() +sal_uInt16 StatementList::GetDocFrameCount() { Window* pBase = Application::GetFirstTopLevelWindow(); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while ( pBase ) { @@ -273,10 +273,10 @@ USHORT StatementList::GetDocFrameCount() return nCount; } -USHORT StatementList::GetDocWinCount() +sal_uInt16 StatementList::GetDocWinCount() { Window* pBase = Application::GetFirstTopLevelWindow(); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while ( pBase ) { @@ -287,12 +287,12 @@ USHORT StatementList::GetDocWinCount() return nCount; } -Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeBase ) +Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase ) { if ( !pBase && !aSearch.HasSearchFlag( SEARCH_NO_TOPLEVEL_WIN ) ) { - BOOL bSearchFocusFirst = aSearch.HasSearchFlag( SEARCH_FOCUS_FIRST ); + sal_Bool bSearchFocusFirst = aSearch.HasSearchFlag( SEARCH_FOCUS_FIRST ); Window *pControl = NULL; if ( bSearchFocusFirst ) @@ -372,7 +372,7 @@ Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeB } -Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL MaybeBase ) +Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase ) { if ( !pBase ) return NULL; @@ -382,7 +382,7 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May Window *pResult = NULL; - USHORT i; + sal_uInt16 i; for( i = 0 ; i < pBase->GetChildCount() && !pResult; i++ ) pResult = SearchClientWin( pBase->GetChild(i), aSearch ); @@ -390,23 +390,23 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May } -BOOL SearchUID::IsWinOK( Window *pWin ) +sal_Bool SearchUID::IsWinOK( Window *pWin ) { if ( aUId.equals( pWin->GetUniqueOrHelpId() ) ) { if ( ( pWin->IsEnabled() || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pWin->IsVisible() ) - return TRUE; + return sal_True; else { if ( !pMaybeResult ) pMaybeResult = pWin; - return FALSE; + return sal_False; } } else if ( pWin->GetType() == WINDOW_TOOLBOX ) // Buttons and Controls on ToolBox. { ToolBox *pTB = ((ToolBox*)pWin); - USHORT i; + sal_uInt16 i; for ( i = 0; i < pTB->GetItemCount() ; i++ ) { if ( aUId.equals( Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ) ) || aUId.equals( pTB->GetHelpId(pTB->GetItemId( i )) ) ) @@ -421,17 +421,17 @@ BOOL SearchUID::IsWinOK( Window *pWin ) { // We got a Button, see if its valid also. if ( ( pTB->IsItemEnabled(pTB->GetItemId(i)) || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pTB->IsItemVisible(pTB->GetItemId(i)) ) - return TRUE; // We got a Button. + return sal_True; // We got a Button. else { // better a disabled Button on a valid ToolBox than an invalid ToolBox as below pMaybeResult = pTB; - return FALSE; + return sal_False; } } else if ( !pMaybeResult ) { // invalid ToolBox pMaybeResult = pTB; - return FALSE; + return sal_False; } } if ( pItemWin ) @@ -441,23 +441,23 @@ BOOL SearchUID::IsWinOK( Window *pWin ) { if ( !pAlternateResult ) // only take the first found ItemWindow #i35365 pAlternateResult = pItemWin; // since we cannot return a Window here - return FALSE; // continue searching to prefer a window with the right ID #i32292 + return sal_False; // continue searching to prefer a window with the right ID #i32292 } else if ( !pMaybeResult ) { pMaybeResult = pItemWin; - return FALSE; + return sal_False; } } } } - return FALSE; + return sal_False; } else - return FALSE; + return sal_False; } -Window* StatementList::SearchTree( rtl::OString aUId ,BOOL bSearchButtonOnToolbox ) +Window* StatementList::SearchTree( rtl::OString aUId ,sal_Bool bSearchButtonOnToolbox ) { SearchUID aSearch(aUId,bSearchButtonOnToolbox); @@ -471,19 +471,19 @@ Window* StatementList::SearchTree( rtl::OString aUId ,BOOL bSearchButtonOnToolbo } -BOOL SearchWinPtr::IsWinOK( Window *pWin ) +sal_Bool SearchWinPtr::IsWinOK( Window *pWin ) { return pWin == pTest; } -BOOL StatementList::WinPtrValid(Window *pTest) +sal_Bool StatementList::WinPtrValid(Window *pTest) { SearchWinPtr aSearch( pTest ); return SearchAllWin( NULL, aSearch ) != NULL; } -BOOL SearchRT::IsWinOK( Window *pWin ) +sal_Bool SearchRT::IsWinOK( Window *pWin ) { if ( pWin->IsVisible() && pWin->GetType() == mnRT ) { @@ -491,15 +491,15 @@ BOOL SearchRT::IsWinOK( Window *pWin ) if ( mnSkip ) { mnSkip--; - return FALSE; + return sal_False; } else - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase, USHORT nSkip, BOOL bSearchAll ) +Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase, sal_uInt16 nSkip, sal_Bool bSearchAll ) { SearchRT aSearch( nRT, 0, nSkip ); if ( bSearchAll ) @@ -510,7 +510,7 @@ Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase return SearchAllWin( pBase, aSearch, MaybeBase ); } -USHORT StatementList::CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase ) +sal_uInt16 StatementList::CountWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase ) { SearchRT aSearch( nRT, SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN, 0xFFFF ); @@ -518,7 +518,7 @@ USHORT StatementList::CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBas return aSearch.GetCount(); } -BOOL SearchScroll::IsWinOK( Window *pWin ) +sal_Bool SearchScroll::IsWinOK( Window *pWin ) { if ( SearchRT::IsWinOK( pWin ) ) { @@ -526,10 +526,10 @@ BOOL SearchScroll::IsWinOK( Window *pWin ) return (( pWin->GetStyle() & WB_HORZ ) && ( nDirection == CONST_ALIGN_BOTTOM )) || (( pWin->GetStyle() & WB_VERT ) && ( nDirection == CONST_ALIGN_RIGHT )); } - return FALSE; + return sal_False; } -ScrollBar* StatementList::GetScrollBar( Window *pBase, USHORT nDirection, BOOL MaybeBase ) +ScrollBar* StatementList::GetScrollBar( Window *pBase, sal_uInt16 nDirection, sal_Bool MaybeBase ) { SearchScroll aSearch( nDirection, SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN ); @@ -537,12 +537,12 @@ ScrollBar* StatementList::GetScrollBar( Window *pBase, USHORT nDirection, BOOL M } -BOOL SearchPopupFloatingWin::IsWinOK( Window *pWin ) +sal_Bool SearchPopupFloatingWin::IsWinOK( Window *pWin ) { return pWin->IsVisible() && pWin->GetType() == WINDOW_FLOATINGWINDOW && ((FloatingWindow*)pWin)->IsInPopupMode(); } -Window* StatementList::GetPopupFloatingWin( BOOL MaybeBase ) +Window* StatementList::GetPopupFloatingWin( sal_Bool MaybeBase ) { SearchPopupFloatingWin aSearch; @@ -557,7 +557,7 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) if ( pBaseMenu->GetWindow() == pWin ) return pBaseMenu; - USHORT i; + sal_uInt16 i; // while ( pBaseMenu ) // { i = 0; @@ -588,16 +588,16 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) return pMenu; } - USHORT nSkip = 0; + sal_uInt16 nSkip = 0; Window* pMenuBarWin = NULL; - while ( (pMenuBarWin = GetWinByRT( NULL, WINDOW_MENUBARWINDOW, TRUE, nSkip++, TRUE )) != NULL ) + while ( (pMenuBarWin = GetWinByRT( NULL, WINDOW_MENUBARWINDOW, sal_True, nSkip++, sal_True )) != NULL ) { Window* pParent = pMenuBarWin->GET_REAL_PARENT(); if ( pParent && pParent->GetType() == WINDOW_BORDERWINDOW && pParent->IsVisible() ) { Menu* pMenu = NULL; // find Menu of MenuBarWindow - USHORT nCount; + sal_uInt16 nCount; for ( nCount = 0 ; nCount < pParent->GetChildCount() ; nCount++ ) { if ( pParent->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) @@ -621,26 +621,26 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) } -BOOL SearchActive::IsWinOK( Window *pWin ) +sal_Bool SearchActive::IsWinOK( Window *pWin ) { // return pWin->IsVisible() && ( (nRT == WINDOW_ANYTYPE && IsDialog(pWin) ) || pWin->GetType() == nRT ) && (nRT == WINDOW_FILEDIALOG || nRT == WINDOW_PATHDIALOG || nRT == WINDOW_PRINTDIALOG || nRT == WINDOW_PRINTERSETUPDIALOG || nRT == WINDOW_COLORDIALOG || ((SystemWindow*)pWin)->IsActive()); // only matches ResID due to problems with UNIX Window Managers return pWin->IsVisible() && ( (nRT == WINDOW_ANYTYPE && IsDialog(pWin) ) || pWin->GetType() == nRT ); } -Window* StatementList::GetActive( WindowType nRT, BOOL MaybeBase ) +Window* StatementList::GetActive( WindowType nRT, sal_Bool MaybeBase ) { SearchActive aSearch( nRT ); return SearchAllWin( NULL, aSearch, MaybeBase ); } -BOOL SearchFadeSplitWin::IsWinOK( Window *pWin ) +sal_Bool SearchFadeSplitWin::IsWinOK( Window *pWin ) { #if OSL_DEBUG_LEVEL > 1 if ( pWin->GetType() == WINDOW_SPLITWINDOW ) { - BOOL bResult; + sal_Bool bResult; WindowAlign aAlign; bResult = pWin->IsVisible(); bResult = ((SplitWindow*)pWin)->IsFadeInButtonVisible(); @@ -654,7 +654,7 @@ BOOL SearchFadeSplitWin::IsWinOK( Window *pWin ) /*&& ((SplitWindow*)pWin)->IsAutoHideButtonVisible()*/ && ((SplitWindow*)pWin)->GetAlign() == nAlign; } -Window* StatementList::GetFadeSplitWin( Window *pBase, WindowAlign nAlign, BOOL MaybeBase ) +Window* StatementList::GetFadeSplitWin( Window *pBase, WindowAlign nAlign, sal_Bool MaybeBase ) { SearchFadeSplitWin aSearch( nAlign ); @@ -682,13 +682,13 @@ Window* StatementList::GetMouseWin() return NULL; } -Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase ) +Window* StatementList::GetFocus( WindowType nRT, sal_Bool MaybeBase ) { if ( nRT == WINDOW_TABCONTROL ) { Window *pResult = GetActive( WINDOW_TABDIALOG, MaybeBase); - for( USHORT i = 0 ; pResult && i < pResult->GetChildCount(); i++ ) + for( sal_uInt16 i = 0 ; pResult && i < pResult->GetChildCount(); i++ ) if ( pResult->GetChild(i)->GetType() == nRT ) return pResult->GetChild(i); } @@ -696,7 +696,7 @@ Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase ) return NULL; } -Window* StatementList::GetAnyActive( BOOL MaybeBase ) +Window* StatementList::GetAnyActive( sal_Bool MaybeBase ) { Window *pControl; @@ -785,7 +785,7 @@ Window* StatementList::GetFirstDocFrame() return pFirstDocFrame; } -BOOL StatementList::IsFirstDocFrame( Window* pWin ) +sal_Bool StatementList::IsFirstDocFrame( Window* pWin ) { return pWin && ( pWin == GetFirstDocFrame() || ( GetFirstDocFrame() && pWin == GetFirstDocFrame()->GetWindow( WINDOW_CLIENT ) ) ) && ( GetFirstDocFrame() && IsDocFrame( GetFirstDocFrame() ) ); } @@ -794,7 +794,7 @@ MenuBar* StatementList::GetDocFrameMenuBar( Window* pWin ) { if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW ) { - USHORT nCount; + sal_uInt16 nCount; for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) { if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) @@ -805,35 +805,35 @@ MenuBar* StatementList::GetDocFrameMenuBar( Window* pWin ) } // a Doc Frame is a Document or the Backing Window -BOOL StatementList::IsDocFrame( Window* pWin ) +sal_Bool StatementList::IsDocFrame( Window* pWin ) { if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW ) { - USHORT nCount; - BOOL bHasWorkWindow = FALSE; - BOOL bHasMenuBar = FALSE; + sal_uInt16 nCount; + sal_Bool bHasWorkWindow = sal_False; + sal_Bool bHasMenuBar = sal_False; // #91724# it is now necessary to sort out the IME WIndow in Solaris as well. // so now we check for existence of WINDOW_WORKWINDOW and newly for // WINDOW_MENUBARWINDOW which contains the Menu and the close/min/max buttons for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) { if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) - bHasWorkWindow = TRUE; + bHasWorkWindow = sal_True; if ( pWin->GetChild( nCount )->GetType() == WINDOW_MENUBARWINDOW ) - bHasMenuBar = TRUE; + bHasMenuBar = sal_True; } return bHasWorkWindow && bHasMenuBar; } - return FALSE; + return sal_False; } // a Doc Win is a real document (not the Backing Window) -BOOL StatementList::IsDocWin( Window* pWin ) +sal_Bool StatementList::IsDocWin( Window* pWin ) { if ( pWin && IsDocFrame( pWin ) ) { if ( GetDocFrameCount() != 1 ) - return TRUE; + return sal_True; else { // check for the close button to see if we are the last one or only the backing Window @@ -841,28 +841,28 @@ BOOL StatementList::IsDocWin( Window* pWin ) return GetDocFrameMenuBar( pWin )->HasCloser(); } } - return FALSE; + return sal_False; } -BOOL StatementList::IsIMEWin( Window* pWin ) // Input Window for CJK under Solaris +sal_Bool StatementList::IsIMEWin( Window* pWin ) // Input Window for CJK under Solaris { if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW ) { - USHORT nCount; - BOOL bHasWorkWindow = FALSE; - BOOL bHasWindow = FALSE; + sal_uInt16 nCount; + sal_Bool bHasWorkWindow = sal_False; + sal_Bool bHasWindow = sal_False; // #91724# it is now necessary to sort out the IME WIndow in Solaris as well. // so now we check for existence of WINDOW_WORKWINDOW and newly for // WINDOW_WINDOW which contains the Menu and the close/min/max buttons for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) - bHasWorkWindow = TRUE; + bHasWorkWindow = sal_True; for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) if ( pWin->GetChild( nCount )->GetType() == WINDOW_WINDOW ) - bHasWindow = TRUE; + bHasWindow = sal_True; return bHasWorkWindow && !bHasWindow; } - return FALSE; + return sal_False; } UniString StatementList::Tree(Window *pBase, int Indent) @@ -1010,7 +1010,7 @@ String StatementList::ClientTree(Window *pBase, int Indent) WRITEc("\n"); aReturn.ConvertLineEnd(); - USHORT i; + sal_uInt16 i; for (i = 0 ; i < pBase->GetChildCount() ; i++) { aReturn += ClientTree(pBase->GetChild(i),Indent+1); @@ -1019,7 +1019,7 @@ String StatementList::ClientTree(Window *pBase, int Indent) } -BOOL StatementList::CheckWindowWait() +sal_Bool StatementList::CheckWindowWait() { static Time StartTime = Time(0L); // Abbruch wenn Fenster absolut nicht schliesst. if ( StartTime == Time(0L) ) @@ -1049,10 +1049,10 @@ BOOL StatementList::CheckWindowWait() aWindowWaitUId = rtl::OString(); pWindowWaitPointer = NULL; StartTime = Time(0L); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } pWindowWaitPointer = NULL; aWindowWaitUId = rtl::OString(); @@ -1061,7 +1061,7 @@ BOOL StatementList::CheckWindowWait() #endif } StartTime = Time(0L); - return TRUE; + return sal_True; } void StatementList::ReportError(String aMessage) @@ -1072,18 +1072,18 @@ void StatementList::ReportError(String aMessage) void StatementList::ReportError(rtl::OString aUId, String aMessage) { pRet->GenError ( aUId, aMessage ); - IsError = TRUE; + IsError = sal_True; } -void StatementList::ReportError(String aMessage, ULONG nWhatever) +void StatementList::ReportError(String aMessage, sal_uLong nWhatever) { ReportError ( aMessage.AppendAscii(" ").Append(UniString::CreateFromInt32(nWhatever))); } -void StatementList::DirectLog( ULONG nType, String aMessage ) +void StatementList::DirectLog( sal_uLong nType, String aMessage ) { if ( pRet ) - pRet->GenReturn( RET_DirectLoging, (USHORT) nType, aMessage ); + pRet->GenReturn( RET_DirectLoging, (sal_uInt16) nType, aMessage ); } @@ -1097,15 +1097,15 @@ void StatementList::DirectLog( ULONG nType, String aMessage ) } \ } -void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect ) +void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID1; - ULONG nID2; + sal_uLong nID1; + sal_uLong nID2; nID1 = Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, pWin, &aKEvnt ); nID2 = Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, pWin, &aKEvnt ); // wait after posting both events so deleting pWin will remove the second event also @@ -1129,7 +1129,7 @@ void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect ) Size aSize = pWin->GetOutputSize(); aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 ); - CommandEvent aEvent( aPos, COMMAND_CONTEXTMENU, FALSE ); + CommandEvent aEvent( aPos, COMMAND_CONTEXTMENU, sal_False ); ImplCommand( pWin, aEvent ); } } @@ -1139,13 +1139,13 @@ void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect ) } }; -void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) +void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID; + sal_uLong nID; nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, pWin, &aMEvnt ); ImplEventWait( nID ); } @@ -1166,13 +1166,13 @@ void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) } }; -void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) +void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID; + sal_uLong nID; nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pWin, &aMEvnt ); ImplEventWait( nID ); } @@ -1183,13 +1183,13 @@ void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) } }; -void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) +void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID; + sal_uLong nID; nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, pWin, &aMEvnt ); ImplEventWait( nID ); } @@ -1215,7 +1215,7 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) } }; -void ImplEventWait( ULONG nID ) +void ImplEventWait( sal_uLong nID ) { while ( !Application::IsProcessedMouseOrKeyEvent( nID ) ) Application::Yield(); |