summaryrefslogtreecommitdiff
path: root/automation/source/server/sta_list.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'automation/source/server/sta_list.cxx')
-rw-r--r--automation/source/server/sta_list.cxx264
1 files changed, 133 insertions, 131 deletions
diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx
index fbc046cddf42..e8be99121ce6 100644
--- a/automation/source/server/sta_list.cxx
+++ b/automation/source/server/sta_list.cxx
@@ -57,45 +57,45 @@
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
-SmartId StatementList::aWindowWaitUId = SmartId();
+rtl::OString StatementList::aWindowWaitUId = rtl::OString();
Window *StatementList::pWindowWaitPointer = NULL;
-SmartId StatementList::aWindowWaitOldHelpId = SmartId();
-SmartId StatementList::aWindowWaitOldUniqueId = SmartId();
-USHORT StatementList::nUseBindings = 0;
+rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString();
+rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString();
+sal_uInt16 StatementList::nUseBindings = 0;
-SmartId StatementList::aSubMenuId1 = SmartId(); // Untermenüs bei PopupMenus
-SmartId StatementList::aSubMenuId2 = SmartId(); // erstmal 2-Stufig
-SmartId StatementList::aSubMenuId3 = SmartId(); // and now even 3 levels #i31512#
+sal_uInt16 StatementList::aSubMenuId1 = 0; // Untermen�s 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; // Verzögerung der einzelnen Anschläge für TypeKeys
-USHORT StatementList::nMaxTypeKeysDelay = 0;
-BOOL StatementList::bDoTypeKeysDelay = FALSE;
+sal_uInt16 StatementList::nMinTypeKeysDelay = 0; // Verz�gerung der einzelnen Anschl�ge f�r 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;
@@ -118,7 +118,7 @@ TTSettings* GetTTSettings()
// Translate
pTTSettings->pTranslateWin = NULL;
- pTTSettings->bToTop = TRUE;
+ pTTSettings->bToTop = sal_True;
}
return pTTSettings;
@@ -127,14 +127,15 @@ TTSettings* GetTTSettings()
-#define IS_WINP_CLOSING(pWin) (pWin->GetSmartHelpId().Matches( 4321 ) && pWin->GetSmartUniqueId().Matches( 1234 ))
+// FIXME: HELPID
+#define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "TT_Win_is_closing_HID" ) && pWin->GetUniqueId().equals( "TT_Win_is_closing_UID" ))
StatementList::StatementList()
: nRetryCount(MAX_RETRIES)
-, bStatementInQue(FALSE)
+, bStatementInQue(sal_False)
{
if (!pRet)
- pRet = new RetStream; // so Spät wie möglich, aber dennoch Zentral und auf jeden Fall rechtzeitig, da pRet private ist.
+ pRet = new RetStream; // so Sp�t wie m�glich, aber dennoch Zentral und auf jeden Fall rechtzeitig, da pRet private ist.
}
void StatementList::InitProfile()
@@ -146,7 +147,7 @@ void StatementList::InitProfile()
#if OSL_DEBUG_LEVEL > 1
if ( pCurrentProfileStatement != NULL && pCurrentProfileStatement != this )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") );
+ pRet->GenReturn( RET_ProfileInfo, 0, CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") );
#endif
pCurrentProfileStatement = this;
}
@@ -162,18 +163,19 @@ void StatementList::SendProfile( String aText )
pProfiler->EndProfileInterval();
if ( pProfiler->IsProfilingPerCommand() )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetProfileLine( aText ) );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileLine( aText ) );
if ( pProfiler->IsPartitioning() )
- pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileTime ), static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() ULONG != comm_ULONG on 64bit
+ // FIXME: HELPID
+ pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() sal_uLong != comm_ULONG on 64bit
}
if ( pProfiler->IsAutoProfiling() )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetAutoProfiling() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
#if OSL_DEBUG_LEVEL > 1
if ( pCurrentProfileStatement == NULL )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), CUniString("SendProfile ohne InitProfile\n") );
+ pRet->GenReturn( RET_ProfileInfo, 0, CUniString("SendProfile ohne InitProfile\n") );
#endif
pCurrentProfileStatement = NULL;
}
@@ -181,11 +183,11 @@ void StatementList::SendProfile( String aText )
void StatementList::QueStatement(StatementList *pAfterThis)
{
- DBG_ASSERT(!bStatementInQue,"QueStatement für bereits eingetragenes Statement -> Abgebrochen");
+ DBG_ASSERT(!bStatementInQue,"QueStatement f�r bereits eingetragenes Statement -> Abgebrochen");
if ( bStatementInQue )
return;
- bStatementInQue = TRUE;
+ bStatementInQue = sal_True;
if ( pAfterThis )
{
if ( pAfterThis->bStatementInQue )
@@ -199,7 +201,7 @@ void StatementList::QueStatement(StatementList *pAfterThis)
pFirst = this;
}
}
- else // am Ende einfügen
+ else // am Ende einf�gen
{
pNext = NULL;
if( !pFirst )
@@ -218,7 +220,7 @@ void StatementList::QueStatement(StatementList *pAfterThis)
void StatementList::Advance()
{ // pFirst ist static!
pFirst = pNext;
- bStatementInQue = FALSE;
+ bStatementInQue = sal_False;
pNext = NULL;
}
@@ -231,7 +233,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();
@@ -248,10 +250,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 )
{
@@ -262,10 +264,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 )
{
@@ -276,12 +278,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 )
@@ -348,7 +350,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;
@@ -358,7 +360,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 );
@@ -366,26 +368,26 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May
}
-BOOL SearchUID::IsWinOK( Window *pWin )
+sal_Bool SearchUID::IsWinOK( Window *pWin )
{
- if ( aUId.Matches( pWin->GetSmartUniqueOrHelpId() ) )
+ 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.Matches( pTB->GetItemCommand(pTB->GetItemId( i )) ) || aUId.Matches( pTB->GetHelpId(pTB->GetItemId( i )) ) )
+ if ( aUId.equals( Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ) ) || aUId.equals( pTB->GetHelpId(pTB->GetItemId( i )) ) )
{ // ID matches.
Window *pItemWin;
pItemWin = pTB->GetItemWindow( pTB->GetItemId( i ) );
@@ -397,17 +399,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 )
@@ -417,23 +419,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( SmartId aUId ,BOOL bSearchButtonOnToolbox )
+Window* StatementList::SearchTree( rtl::OString aUId ,sal_Bool bSearchButtonOnToolbox )
{
SearchUID aSearch(aUId,bSearchButtonOnToolbox);
@@ -447,19 +449,19 @@ Window* StatementList::SearchTree( SmartId aUId ,BOOL bSearchButtonOnToolbox )
}
-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 )
{
@@ -467,15 +469,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 )
@@ -486,7 +488,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 );
@@ -494,7 +496,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 ) )
{
@@ -502,10 +504,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 );
@@ -513,12 +515,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;
@@ -533,7 +535,7 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu )
if ( pBaseMenu->GetWindow() == pWin )
return pBaseMenu;
- USHORT i;
+ sal_uInt16 i;
i = 0;
while ( i < pBaseMenu->GetItemCount() )
{
@@ -561,16 +563,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 )
@@ -594,25 +596,25 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu )
}
-BOOL SearchActive::IsWinOK( Window *pWin )
+sal_Bool SearchActive::IsWinOK( Window *pWin )
{
// 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();
@@ -626,7 +628,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 );
@@ -654,13 +656,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);
}
@@ -668,7 +670,7 @@ Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase )
return NULL;
}
-Window* StatementList::GetAnyActive( BOOL MaybeBase )
+Window* StatementList::GetAnyActive( sal_Bool MaybeBase )
{
Window *pControl;
@@ -757,7 +759,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() ) );
}
@@ -766,7 +768,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 )
@@ -777,35 +779,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
@@ -813,28 +815,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)
@@ -948,7 +950,7 @@ String StatementList::ClientTree(Window *pBase, int Indent)
WRITE(sIndent);
WRITEc("UId : ");
- WRITE(UIdString(pBase->GetSmartUniqueOrHelpId()));
+ WRITE(Id2Str(pBase->GetUniqueOrHelpId()));
WRITEc(":0x");
WRITE(
String::CreateFromInt64(
@@ -982,7 +984,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);
@@ -991,7 +993,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) )
@@ -1005,7 +1007,7 @@ BOOL StatementList::CheckWindowWait()
if ( WinPtrValid(pWindowWaitPointer) && IS_WINP_CLOSING(pWindowWaitPointer) )
{
#if OSL_DEBUG_LEVEL > 1
- m_pDbgWin->AddText( aWindowWaitUId.GetText().AppendAscii(" Still Open. RType=") );
+ m_pDbgWin->AddText( Id2Str(aWindowWaitUId).AppendAscii(" Still Open. RType=") );
m_pDbgWin->AddText( String::CreateFromInt32( pWindowWaitPointer->GetType() ).AppendAscii("\n") );
#endif
@@ -1015,47 +1017,47 @@ BOOL StatementList::CheckWindowWait()
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Close timed out. Going on!! " );
#endif
- pWindowWaitPointer->SetSmartHelpId(aWindowWaitOldHelpId, SMART_SET_ALL);
- pWindowWaitPointer->SetSmartUniqueId(aWindowWaitOldUniqueId, SMART_SET_ALL);
+ pWindowWaitPointer->SetHelpId(aWindowWaitOldHelpId);
+ pWindowWaitPointer->SetUniqueId(aWindowWaitOldUniqueId);
- aWindowWaitUId = SmartId();
+ aWindowWaitUId = rtl::OString();
pWindowWaitPointer = NULL;
StartTime = Time(0L);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
pWindowWaitPointer = NULL;
- aWindowWaitUId = SmartId();
+ aWindowWaitUId = rtl::OString();
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Closed, Going on.\n" );
#endif
}
StartTime = Time(0L);
- return TRUE;
+ return sal_True;
}
void StatementList::ReportError(String aMessage)
{
- ReportError ( SmartId(), aMessage );
+ ReportError ( rtl::OString(), aMessage );
}
-void StatementList::ReportError(SmartId aUId, 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, SmartId(nType), aMessage );
+ pRet->GenReturn( RET_DirectLoging, (sal_uInt16) nType, aMessage );
}
@@ -1069,15 +1071,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
@@ -1101,7 +1103,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 );
}
}
@@ -1111,13 +1113,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 );
}
@@ -1134,13 +1136,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 );
}
@@ -1151,13 +1153,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 );
}
@@ -1166,7 +1168,7 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
{
if ( pWin->IsTracking() )
{
- // siehe #64693 die Position ist für Toolboxen relevant
+ // siehe #64693 die Position ist f�r Toolboxen relevant
// #60020 Jetzt hoffentlich kein GPF mehr
// Zuerst Tracking beenden ohne Event
pWin->EndTracking( ENDTRACK_DONTCALLHDL );
@@ -1179,7 +1181,7 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
}
};
-void ImplEventWait( ULONG nID )
+void ImplEventWait( sal_uLong nID )
{
while ( !Application::IsProcessedMouseOrKeyEvent( nID ) )
Application::Yield();