summaryrefslogtreecommitdiff
path: root/automation/source/server/server.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'automation/source/server/server.cxx')
-rw-r--r--automation/source/server/server.cxx113
1 files changed, 58 insertions, 55 deletions
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index 3dbfe7212234..544772bb2bd5 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -84,16 +84,16 @@ void SAL_CALL osl_TestToolDebugPrint( const sal_Char *pString )
#endif
-ULONG RemoteControlCommunicationManager::nPortIs = TT_PORT_NOT_INITIALIZED;
-USHORT RemoteControlCommunicationManager::nComm = 0;
-BOOL RemoteControlCommunicationManager::bQuiet = FALSE;
+sal_uLong RemoteControlCommunicationManager::nPortIs = TT_PORT_NOT_INITIALIZED;
+sal_uInt16 RemoteControlCommunicationManager::nComm = 0;
+sal_Bool RemoteControlCommunicationManager::bQuiet = sal_False;
#if OSL_DEBUG_LEVEL > 1
RemoteControlCommunicationManager::RemoteControlCommunicationManager( EditWindow * pDbgWin )
#else
RemoteControlCommunicationManager::RemoteControlCommunicationManager()
#endif
-: CommunicationManagerServerViaSocket( GetPort(), 1, TRUE )
+: CommunicationManagerServerViaSocket( GetPort(), 1, sal_True )
#if OSL_DEBUG_LEVEL > 1
, m_pDbgWin( pDbgWin )
#endif
@@ -108,7 +108,7 @@ RemoteControlCommunicationManager::RemoteControlCommunicationManager()
{
SetInfoType( CM_SHORT_TEXT | CM_ALL );
ByteString aByteString;
- InfoMsg( InfoString( aByteString, CM_ALL ) ); // Anzeigen, daß wir da sind
+ InfoMsg( InfoString( aByteString, CM_ALL ) ); // Anzeigen, da� wir da sind
}
}
@@ -149,7 +149,7 @@ IMPL_LINK( RemoteControlCommunicationManager, SetWinCaption, Timer*, EMPTYARG )
}
else
{ // Dann Probieren wir es eben in 1 Sekunde nochmal
- pTimer = new Timer(); // Wird im Link gelöscht
+ pTimer = new Timer(); // Wird im Link gel�scht
pTimer->SetTimeout( 1000 );
pTimer->SetTimeoutHdl( LINK( this, RemoteControlCommunicationManager, SetWinCaption ) );
pTimer->Start();
@@ -169,20 +169,20 @@ void RemoteControlCommunicationManager::InfoMsg( InfoString aMsg )
#endif
}
-ULONG RemoteControlCommunicationManager::GetPort()
+sal_uLong RemoteControlCommunicationManager::GetPort()
{
if ( TT_PORT_NOT_INITIALIZED == nPortIs )
{ // Read Config
- USHORT i;
+ sal_uInt16 i;
// are we to be automated at all?
- BOOL bAutomate = FALSE;
+ sal_Bool bAutomate = sal_False;
for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
{
if ( Application::GetCommandLineParam( i ).EqualsIgnoreCaseAscii("/enableautomation")
|| Application::GetCommandLineParam( i ).EqualsIgnoreCaseAscii("-enableautomation"))
{
- bAutomate = TRUE;
+ bAutomate = sal_True;
break;
}
}
@@ -225,11 +225,11 @@ ULONG RemoteControlCommunicationManager::GetPort()
nPortIs = aConf.ReadKey("TTPort","0").ToInt32();
- // noch prüfen ob dieses Office getestet werden soll.
+ // noch pr�fen ob dieses Office getestet werden soll.
if ( !bAutomate || aConf.ReadKey( aNoTesttoolKey, "" ) != "" )
nPortIs = 0;
- nComm = (USHORT)aConf.ReadKey("Comm","0").ToInt32();
+ nComm = (sal_uInt16)aConf.ReadKey("Comm","0").ToInt32();
if ( nComm )
aConf.DeleteKey("Comm");
@@ -248,7 +248,7 @@ class ExtraIdle : public AutoTimer
{
virtual void Timeout();
- USHORT nStep;
+ sal_uInt16 nStep;
ImplRemoteControl *pRemoteControl;
public:
ExtraIdle( ImplRemoteControl *pRC );
@@ -277,16 +277,16 @@ void ExtraIdle::Timeout()
return;
}
- // Müssen wir selbst idlen?
+ // M�ssen wir selbst idlen?
#if OSL_DEBUG_LEVEL > 1
- ULONG nLastInputInterval = Application::GetLastInputInterval();
- BOOL bIsInModalMode = Application::IsInModalMode();
+ sal_uLong nLastInputInterval = Application::GetLastInputInterval();
+ sal_Bool bIsInModalMode = Application::IsInModalMode();
if ( bIsInModalMode || nLastInputInterval < MIN_IDLE )
#else
if ( Application::IsInModalMode() || Application::GetLastInputInterval() < MIN_IDLE )
#endif
{
- if ( nStep ) // Schon angefangen? dann abbrechen, sonst später nochmal
+ if ( nStep ) // Schon angefangen? dann abbrechen, sonst sp�ter nochmal
{
if ( nStep < 15 )
{
@@ -314,11 +314,11 @@ void ExtraIdle::Timeout()
}
- switch ( nStep++ ) // Probieren ob wir noch was machen können
+ switch ( nStep++ ) // Probieren ob wir noch was machen k�nnen
{
case 0:
{
- SfxPoolItem *pItem = new SfxStringItem((USHORT)StatementList::pTTProperties->nSidNewDocDirect, CUniString("swriter/web") );
+ SfxPoolItem *pItem = new SfxStringItem((sal_uInt16)StatementList::pTTProperties->nSidNewDocDirect, CUniString("swriter/web") );
new StatementSlot( StatementList::pTTProperties->nSidNewDocDirect, pItem );
SetTimeout(30000);
return;
@@ -378,7 +378,7 @@ void ExtraIdle::Timeout()
#endif
#ifdef TT_CODE
- for ( USHORT i = 0 ; i < aStr.Len() ; i++ )
+ for ( sal_uInt16 i = 0 ; i < aStr.Len() ; i++ )
{
if ( aStr.GetChar(i) < 32 || aStr.GetChar(i) > 126 )
{
@@ -563,7 +563,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
if ( StatementList::MaybeResetSafeReschedule() )
{
- StatementList::bExecuting = FALSE; // Wird nacher im SafeReschedule wieder zurückgesetzt
+ StatementList::bExecuting = sal_False; // Wird nacher im SafeReschedule wieder zur�ckgesetzt
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "SafeReschedule has been reset\n" );
#endif
@@ -590,14 +590,14 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
}
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
#endif
- return 0; // Garnicht erst irgendwelchen blödsinn machen
+ return 0; // Garnicht erst irgendwelchen bl�dsinn machen
}
while( StatementList::pFirst && ( !StatementList::bReadingCommands || StatementList::bDying ) )
- // Schleift hier bis Befehl nicht zurückkommt,
- // Wird dann rekursiv über IdleHdl und PostUserEvent aufgerufen.
+ // Schleift hier bis Befehl nicht zur�ckkommt,
+ // Wird dann rekursiv �ber IdleHdl und PostUserEvent aufgerufen.
{
- m_bInsideExecutionLoop = TRUE;
+ m_bInsideExecutionLoop = sal_True;
#ifdef TIMERIDLE
m_aIdleTimer.Stop();
m_aIdleTimer.Start();
@@ -611,7 +611,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
#endif
- return 0; // So dass die App nochmal ´ne chance bekommt
+ return 0; // So dass die App nochmal �ne chance bekommt
}
}
else
@@ -623,7 +623,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
#endif
- return 0; // So dass die App nochmal ´ne chance bekommt
+ return 0; // So dass die App nochmal �ne chance bekommt
}
}
catch( ... )
@@ -639,8 +639,8 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
pDlg->Show();
OSL_FAIL("GPF");
pC->ReportError( GEN_RES_STR0( S_GPF_ABORT ) );
- StatementList::bDying = TRUE;
- while ( StatementList::pFirst ) // Kommandos werden übersprungen
+ StatementList::bDying = sal_True;
+ while ( StatementList::pFirst ) // Kommandos werden �bersprungen
StatementList::NormalReschedule();
delete pDlg;
}
@@ -652,10 +652,10 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
}
}
- m_bInsideExecutionLoop = FALSE;
+ m_bInsideExecutionLoop = sal_False;
}
- StatementList::aWindowWaitUId = SmartId(); // Warten rücksetzen, da handler sowieso verlassen wird
+ StatementList::aWindowWaitUId = rtl::OString(); // Warten r�cksetzen, da handler sowieso verlassen wird
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
@@ -671,9 +671,9 @@ IMPL_LINK( ImplRemoteControl, QueCommandsEvent, CommunicationLink*, pCL )
return 0;
}
-BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
+sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn )
{
- USHORT nId;
+ sal_uInt16 nId;
if( !m_bIdleInserted )
{
@@ -684,11 +684,11 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
#else
GetpApp()->InsertIdleHdl( LINK( this, ImplRemoteControl, IdleHdl ), 1 );
#endif
- m_bIdleInserted = TRUE;
+ m_bIdleInserted = sal_True;
}
- StatementList::bReadingCommands = TRUE;
+ StatementList::bReadingCommands = sal_True;
#if OSL_DEBUG_LEVEL > 1
if (!m_pDbgWin->bQuiet)
@@ -701,7 +701,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
if( nServiceId != SI_IPCCommandBlock && nServiceId != SI_DirectCommandBlock )
{
OSL_TRACE( "Ungültiger Request :%i", (int)nServiceId );
- return FALSE;
+ return sal_False;
}
SCmdStream *pCmdStream = new SCmdStream(pIn);
@@ -713,28 +713,28 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
{
case SICommand:
{
- new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angehängt
+ new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SIControl:
case SIStringControl:
{
- new StatementControl( pCmdStream, nId ); // Wird im Konstruktor an Liste angehängt
+ new StatementControl( pCmdStream, nId ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SISlot:
{
- new StatementSlot( pCmdStream ); // Wird im Konstruktor an Liste angehängt
+ new StatementSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SIUnoSlot:
{
- new StatementUnoSlot( pCmdStream ); // Wird im Konstruktor an Liste angehängt
+ new StatementUnoSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SIFlow:
{
- new StatementFlow( nServiceId, pCmdStream, this ); // Wird im Konstruktor an Liste angehängt
+ new StatementFlow( nServiceId, pCmdStream, this ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
default:
@@ -748,7 +748,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
}
}
- StatementList::bReadingCommands = FALSE;
+ StatementList::bReadingCommands = sal_False;
delete pCmdStream;
#if OSL_DEBUG_LEVEL > 1
@@ -764,7 +764,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
GetpApp()->PostUserEvent( LINK( this, ImplRemoteControl, CommandHdl ) );
}
- return TRUE;
+ return sal_True;
}
@@ -776,8 +776,8 @@ SvStream* ImplRemoteControl::GetReturnStream()
}
ImplRemoteControl::ImplRemoteControl()
-: m_bIdleInserted( FALSE )
-, m_bInsideExecutionLoop( FALSE )
+: m_bIdleInserted( sal_False )
+, m_bInsideExecutionLoop( sal_False )
#if OSL_DEBUG_LEVEL > 1
, m_pDbgWin(NULL)
#endif
@@ -787,8 +787,11 @@ ImplRemoteControl::ImplRemoteControl()
if ( RemoteControlCommunicationManager::GetPort() != TT_NO_PORT_DEFINED || RemoteControlCommunicationManager::nComm )
{
m_pDbgWin = new EditWindow( NULL, CUniString("Debug Window"), WB_VSCROLL );
- m_pDbgWin->bQuiet = TRUE;
+ m_pDbgWin->bQuiet = sal_True;
m_pDbgWin->Hide();
+ m_pDbgWin->bQuiet = sal_False;
+ m_pDbgWin->Show();
+
StatementList::m_pDbgWin = m_pDbgWin;
}
#endif
@@ -819,26 +822,26 @@ ImplRemoteControl::ImplRemoteControl()
ImplRemoteControl::~ImplRemoteControl()
{
if ( MacroRecorder::HasMacroRecorder() )
- MacroRecorder::GetMacroRecorder()->SetActionRecord( FALSE ); // Will delete MacroRecorder if necessary
+ MacroRecorder::GetMacroRecorder()->SetActionRecord( sal_False ); // Will delete MacroRecorder if necessary
- StatementList::bDying = TRUE;
+ StatementList::bDying = sal_True;
#if OSL_DEBUG_LEVEL > 1
if ( m_pDbgWin )
- m_pDbgWin->bQuiet = TRUE; // Keine Ausgabe mehr im Debugwindow
+ m_pDbgWin->bQuiet = sal_True; // Keine Ausgabe mehr im Debugwindow
#endif
#ifdef DBG_UTIL
- // Zurücksetzen, so daß nachfolgende Assertions nicht verloren gehen
+ // Zur�cksetzen, so da� nachfolgende Assertions nicht verloren gehen
DbgSetPrintTestTool( NULL );
osl_setDebugMessageFunc( StatementCommand::pOriginal_osl_DebugMessageFunc );
#endif
if ( StatementList::pFirst )
- { // Es sind noch Kommandos da, also auch eine Möglichkeit zurückzusenden.
+ { // Es sind noch Kommandos da, also auch eine M�glichkeit zur�ckzusenden.
StatementList::pFirst->ReportError( GEN_RES_STR0( S_APP_SHUTDOWN ) );
- while ( StatementList::pFirst ) // Kommandos werden übersprungen
- StatementList::NormalReschedule(); // Fehler zurückgeschickt
+ while ( StatementList::pFirst ) // Kommandos werden �bersprungen
+ StatementList::NormalReschedule(); // Fehler zur�ckgeschickt
}
if ( pServiceMgr )
@@ -864,7 +867,7 @@ ImplRemoteControl::~ImplRemoteControl()
#else
GetpApp()->RemoveIdleHdl( LINK( this, ImplRemoteControl, IdleHdl ) );
#endif
- m_bIdleInserted = FALSE;
+ m_bIdleInserted = sal_False;
}
delete pServiceMgr;
}
@@ -905,7 +908,7 @@ extern "C" void CreateEventLogger()
extern "C" void DestroyEventLogger()
{
- MacroRecorder::GetMacroRecorder()->SetActionLog( FALSE ); // Will delete MacroRecorder if necessary
+ MacroRecorder::GetMacroRecorder()->SetActionLog( sal_False ); // Will delete MacroRecorder if necessary
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */