summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
authorAllmann-Rahn <allmann-rahn@ubuntu.ubuntu-domain>2011-08-22 11:39:37 +0200
committerMichael Meeks <michael.meeks@novell.com>2011-08-23 17:36:50 +0100
commitfbc30846acc2391a4c323c07ea04b308a685ce46 (patch)
tree83da7330222d751cfed20898f79f3b7a8d9b4ebe /automation
parentc02eaf4bb94b2c81f6f27d7af665b344c2e1370a (diff)
Translated German comments and removed the redundant ones in the directories accessibility to (incl.) basebmp.
Diffstat (limited to 'automation')
-rw-r--r--automation/inc/automation/commdefines.hxx33
-rw-r--r--automation/inc/automation/communi.hxx14
-rw-r--r--automation/inc/automation/simplecm.hxx48
-rw-r--r--automation/source/app/testbasi.hxx8
-rw-r--r--automation/source/communi/communi.cxx63
-rw-r--r--automation/source/inc/rcontrol.hxx78
-rw-r--r--automation/source/inc/testapp.hxx70
-rw-r--r--automation/source/miniapp/testapp.hxx2
-rw-r--r--automation/source/server/cmdbasestream.cxx26
-rw-r--r--automation/source/server/editwin.cxx2
-rw-r--r--automation/source/server/editwin.hxx2
-rw-r--r--automation/source/server/prof_nul.cxx15
-rw-r--r--automation/source/server/prof_usl.cxx21
-rw-r--r--automation/source/server/profiler.cxx6
-rw-r--r--automation/source/server/profiler.hxx33
-rw-r--r--automation/source/server/recorder.cxx2
-rw-r--r--automation/source/server/retstrm.cxx2
-rw-r--r--automation/source/server/server.cxx68
-rw-r--r--automation/source/server/server.hxx2
-rw-r--r--automation/source/server/sta_list.cxx26
-rw-r--r--automation/source/server/statemnt.cxx305
-rw-r--r--automation/source/server/statemnt.hxx63
-rw-r--r--automation/source/simplecm/packethandler.cxx37
-rw-r--r--automation/source/testtool/cmdstrm.cxx36
-rw-r--r--automation/source/testtool/cmdstrm.hxx4
-rw-r--r--automation/source/testtool/comm_bas.cxx192
-rw-r--r--automation/source/testtool/comm_bas.hxx36
-rw-r--r--automation/source/testtool/httprequest.cxx2
-rw-r--r--automation/source/testtool/objtest.cxx225
-rw-r--r--automation/source/testtool/objtest.hxx25
-rw-r--r--automation/source/testtool/tcommuni.cxx6
31 files changed, 708 insertions, 744 deletions
diff --git a/automation/inc/automation/commdefines.hxx b/automation/inc/automation/commdefines.hxx
index 24ca05809034..7b6d62b47b5c 100644
--- a/automation/inc/automation/commdefines.hxx
+++ b/automation/inc/automation/commdefines.hxx
@@ -91,29 +91,28 @@
#endif // OSL_LITENDIAN
/**
- Es gibt zwei arten von Datenpaketen
- die erste enthlt in den ersten 4 Byte die Lngenangabe und in den Darauffolgenden die Daten
- Die Lngenangabe bezieht sich nur auf die Daten ohne die Lngenangabe selbst.
+ There are two types of data packages:
+ The first one contains in the first 4 bytes the length information and in the following the data.
+ The length information refers to the data only, without the length information itself.
- Die Zweite Art von Datenpaketen enthlt Header mit weitere Informationen
- wie unten beschrieben.
+ The second type of data packages contains headers with further information as described below.
- Umgeschaltet wird mit dem Boolean bUseMultiChannel im Konstruktor des Managers.
+ It's switched with the Boolean bUseMultiChanell in the manager's constructor.
**/
/**
-Defines fr Header Typen:
+Defines for header types:
-Allgemeiner Header:
- Byte Lnge Inhalt
- 0..3 4 Lnge des Paketes ohne diese 4 Byte
- 4 1 Prfsumme ber die Lnge. Stimmt sie nicht wird die Verbindung geschlossen
- 5..6 2 Lnge des Headers ohne diese 2 Byte
- 7..8 2 Typ des Headers
+general header:
+ bytes length content
+ 0..3 4 the package's length without these 4 bytes
+ 4 1 Checksum concerning the length. If it's incorrect, the connection is closed.
+ 5..6 2 length of the header without these 2 bytes
+ 7..8 2 type of the header
CH_SimpleMultiChannel:
- 9..10 2 Channel
+ 9..10 2 channel
CH_Handshake Internal Use ONLY
- Keine Weiteren Daten!
+ No further data!
**/
typedef comm_UINT16 CMProtocol;
@@ -130,8 +129,8 @@ typedef comm_UINT16 CommunicationOption;
#define CH_SimpleMultiChannel 0x0001
#define CH_Handshake 0x0002
-#define CH_REQUEST_HandshakeAlive ((HandshakeType)0x0101) /// Fordert eine Alive Antwort an
-#define CH_RESPONSE_HandshakeAlive ((HandshakeType)0x0102) /// Alive Antwort
+#define CH_REQUEST_HandshakeAlive ((HandshakeType)0x0101) /// aks for alive reply
+#define CH_RESPONSE_HandshakeAlive ((HandshakeType)0x0102) /// alive reply
/**
Announce supported options:
diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx
index 68cb3cbeaf21..c416d771af6f 100644
--- a/automation/inc/automation/communi.hxx
+++ b/automation/inc/automation/communi.hxx
@@ -58,8 +58,8 @@ protected:
virtual void CallConnectionOpened( CommunicationLink* pCL );
virtual void CallConnectionClosed( CommunicationLink* pCL );
CommunicationLinkList *ActiveLinks;
- CommunicationLinkList *InactiveLinks; /// Hier sind die CommunicationLinks drin, die sich noch nicht selbst abgemeldet haben.
- /// allerdings schon ein StopCommunication gekriegt haben, bzw ein ConnectionTerminated
+ CommunicationLinkList *InactiveLinks; /// CommunicationLinks that have not yet logged off themselves but already have received
+ /// a StopCommunication or a ConnectionTerminated
virtual void DestroyingLink( CommunicationLink *pCL );
sal_Bool bGracefullShutdown;
@@ -86,7 +86,7 @@ public:
virtual sal_Bool IsCommunicationError();
virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
- // Diese sind Virtuelle Links!!!!
+ // These are virtual links!
virtual long ConnectionClosed( void* = NULL );
virtual long DataReceived( void* = NULL );
@@ -102,8 +102,8 @@ protected:
virtual sal_Bool ShutdownCommunication();
sal_uLong nConnectionClosedEventId;
sal_uLong nDataReceivedEventId;
- osl::Mutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
- osl::Mutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
+ osl::Mutex aMConnectionClosed; // necessary because no event can be managed before the variable is set
+ osl::Mutex aMDataReceived; // necessary because no event can be managed before the variable is set
virtual void WaitForShutdown();
DECL_LINK( ShutdownLink, void* );
@@ -150,11 +150,11 @@ private:
sal_uLong nPortToListen;
sal_uInt16 nMaxConnections;
sal_uLong nAddConnectionEventId;
- osl::Mutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
+ osl::Mutex aMAddConnection; // necessary because no event can be managed before the variable is set
void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); }
CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); }
- // Diese beiden werden zum Transport der Connection vom Thread zum Mainthread verwendet.
+ // these are used for the connection's transport from the thread to the mainthread
CommunicationLinkRef xmNewConnection;
DECL_LINK( AddConnection, void* );
};
diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx
index 9a5211b1ad37..96e55caef8b7 100644
--- a/automation/inc/automation/simplecm.hxx
+++ b/automation/inc/automation/simplecm.hxx
@@ -37,7 +37,7 @@
#include <automation/commdefines.hxx>
-// CM steht f�r CommunicationManager
+// CM stands for CommunicationManager
#define CM_UNLIMITED_CONNECTIONS 0xffff
typedef sal_uInt16 CM_NameType;
@@ -45,7 +45,7 @@ typedef sal_uInt16 CM_NameType;
#define CM_FQDN ( (CM_NameType) 02 )
typedef sal_uInt16 CM_InfoType;
-// nur eines dieser 3 defines darf verwendet werden
+// only one of these three defines may be used
#define CM_NO_TEXT ( (CM_InfoType) 01 )
#define CM_SHORT_TEXT ( (CM_InfoType) 02 )
#define CM_VERBOSE_TEXT ( (CM_InfoType) 03 )
@@ -122,9 +122,9 @@ protected:
friend class CommunicationManager;
friend class MultiCommunicationManager;
friend class CommunicationManagerServerAcceptThread;
- // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks
+ // may not be stopped between the stream's reception and the callback's end
-protected: // so da� nur �ber Ref gel�scht werden kann
+protected: // so that it can only be deleted via Ref
virtual ~CommunicationLink();
void InvalidateManager() { pMyManager = NULL; }
@@ -137,13 +137,10 @@ public:
virtual sal_Bool IsCommunicationError()=0;
CommunicationManager* GetCommunicationManager(){ return pMyManager; }
-// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren
virtual ByteString GetCommunicationPartner( CM_NameType eType )=0;
-// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren
virtual ByteString GetMyName( CM_NameType eType )=0;
-// Liefert einen neuen Stream zum Versenden von Daten.
virtual SvStream* GetBestCommunicationStream()=0;
/** will call virtual function DoTransferDataStream to do actual work
@@ -151,20 +148,20 @@ public:
**/
sal_Bool TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
- // Liefert die ID, die vom Sender angegeben wurde.
- // Dadurch lassen sich virtuelle Kommunikationen �ber einen physikalischen Link realisiren.
- // Da die Kommunikation zu �lteren Versionen kompatibel bleiben mu�, mu� der Empf�nger raten,
- // die neue oder die alte verwendet wird, da sich der Kopf eines Auftrages dann �ndert.
+ // delivers the ID that is named by the server
+ // Due to that virtual communications over a physical link can be realised.
+ // Because the communication must remain compatible to older versions the receiver must guess whether
+ // the new or the old one is used because the order's head changes then
sal_uInt16 GetProtocol(){ return nServiceProtocol; }
- // Der Stream wird hier �bergeben. Der Aufrufer ist f�r dessen L�schung zust�ndig
- // Die Methode MUSS gerufen werden, da sonst keine weiteren Daten empfangen werden.
+ // Commits the stream. The caller is responsible for the deletion.
+ // The method must be called because there would be no further data received otherwise.
SvStream* GetServiceData(){ SvStream *pTemp = pServiceData; pServiceData = NULL; return pTemp; }
- /// Erm�glicht das Ausl�sen des n�chsten Callbacks. Wird auch Implizit gerufen.
+ /// Allows for the release of the next callbacks. Is also called implicitly.
void FinishCallback(){ bIsInsideCallback = sal_False; }
- /// Syncrones Empfangen der Daten. Nur f�r Kommandozeile, sonst leer implementiert
+ /// Synchronous reception of the data. Only for command line - empty implementation for other uses.
virtual sal_Bool ReceiveDataStream(){ return sal_False; }
/// Statistics
@@ -178,7 +175,7 @@ protected:
void CallInfoMsg( InfoString aMsg );
CM_InfoType GetInfoType();
CommunicationManager *pMyManager;
-// Diese Methoden werden im Main Kontext gerufen und an den Manager weitergereicht.
+// These methods are called in the main context and are handed over to the manager.
virtual DECL_LINK( ConnectionClosed, void* = NULL );
virtual DECL_LINK( DataReceived, void* = NULL );
@@ -188,7 +185,7 @@ protected:
sal_uInt16 nServiceProtocol;
sal_uInt16 nServiceHeaderType;
- /// Verhindert das vorzeitige Ausl�sen des n�chsten Callbacks.
+ /// Prevents the early release of the next callback.
void StartCallback(){ bIsInsideCallback = sal_True; }
sal_Bool bIsInsideCallback;
@@ -227,19 +224,18 @@ public:
virtual sal_Bool StartCommunication()=0;
virtual sal_Bool StartCommunication( String aApp, String aParams );
virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort );
- virtual sal_Bool StopCommunication()=0; // H�lt alle CommunicationLinks an
+ virtual sal_Bool StopCommunication()=0;
virtual sal_Bool IsCommunicationRunning() { return bIsCommunicationRunning; }
// virtual sal_Bool IsCommunicationError();
-// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren
+
virtual ByteString GetMyName( CM_NameType eType );
- virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // Notwendig f�r call im Destruktor
+ virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // necessary for call in destructor
virtual sal_uInt16 GetCommunicationLinkCount()=0;
virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr )=0;
- // Liefert den letzten neuen Link oder NULL wenn dieser schon wieder geschlossen ist.
CommunicationLinkRef GetLastNewLink() { return xLastNewLink; }
void SetConnectionOpenedHdl( Link lConnectionOpened ){ mlConnectionOpened = lConnectionOpened; }
@@ -255,8 +251,8 @@ public:
const ByteString& GetApplication() { return maApplication; }
protected:
- // Diese Methoden werden innerhalb gerufen. Sie erledigen eventuelles Housekeeping
- // und rufen dann die entsprechende Methode
+ // These methods are called inside. They care for housekeeping if applicable
+ // and call the respective method then.
virtual void CallConnectionOpened( CommunicationLink* pCL );
virtual void CallConnectionClosed( CommunicationLink* pCL );
void CallDataReceived( CommunicationLink* pCL );
@@ -264,7 +260,7 @@ protected:
CM_InfoType nInfoType;
- // Diese Routinen rufen den Link oder sind �berladen
+ // These routines call the link or are overloaded.
virtual void ConnectionOpened( CommunicationLink* pCL ){ mlConnectionOpened.Call( pCL ); }
virtual void ConnectionClosed( CommunicationLink* pCL ){ mlConnectionClosed.Call( pCL ); }
virtual void DataReceived( CommunicationLink* pCL ){ mlDataReceived.Call( pCL ); }
@@ -272,7 +268,7 @@ protected:
sal_Bool bIsCommunicationRunning;
- virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link tr�gt sich im Destruktor aus
+ virtual void DestroyingLink( CommunicationLink *pCL )=0;
private:
ByteString maApplication;
@@ -289,7 +285,7 @@ class ICommunicationManagerClient
{
friend class CommonSocketFunctions;
protected:
- virtual sal_Bool RetryConnect() { return sal_False; } // Kann dann eventuell die Applikation starten
+ virtual sal_Bool RetryConnect() { return sal_False; } // might be able to start the application
};
class TCPIO;
diff --git a/automation/source/app/testbasi.hxx b/automation/source/app/testbasi.hxx
index 2d8cbb5dca39..c21f2d5ef4f7 100644
--- a/automation/source/app/testbasi.hxx
+++ b/automation/source/app/testbasi.hxx
@@ -48,13 +48,13 @@ public:
sal_Bool Compile( SbModule* );
static MyBasic* CreateMyBasic();
- // nicht mit #ifdefs klammern, da diese Headerdatei fr testtool und basic
- // gleichermaen verwendet wird.
+ // don't surround with #ifdefs because this header file is
+ // used for testtool and basic as well
DECL_LINK( CErrorImpl, ErrorEntry* );
-// SbxObject *pTestObject; // fr das Testtool; ansonsten NULL
+// SbxObject *pTestObject; // for testtool; NULL otherwise
void LoadIniFile();
- SbTextType GetSymbolType( const String &Symbol, sal_Bool bWasTTControl ); // Besimmt den erweiterten Symboltyp fr das Syntaxhighlighting
+ SbTextType GetSymbolType( const String &Symbol, sal_Bool bWasTTControl );
virtual const String GetSpechialErrorText();
virtual void ReportRuntimeError( AppBasEd *pEditWin );
virtual void DebugFindNoErrors( sal_Bool bDebugFindNoErrors );
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx
index db319e206411..13ae2f2ea5b2 100644
--- a/automation/source/communi/communi.cxx
+++ b/automation/source/communi/communi.cxx
@@ -44,8 +44,8 @@
#include <automation/communi.hxx>
-/* Um den Destruktor protected zu machen wurde unten das delete entfernt.
- Die Methode wird ohnehin hucht benutzt.
+/* The delete below has been removed to make the destructor protected.
+ The method isn't used anyway.
// delete *((AE*)pData+n);
*/
@@ -67,7 +67,7 @@ _SV_SEEK_PTR( nm, AE )
SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* );
-osl::Mutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest
+osl::Mutex *pMPostUserEvent=NULL; // necessary because not threadproof
CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket )
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
@@ -126,10 +126,10 @@ sal_Bool CommunicationLinkViaSocket::ShutdownCommunication()
if ( GetStreamSocket() )
GetStreamSocket()->shutdown();
- if ( GetStreamSocket() ) // Mal wieder nach oben verschoben, da sonst nicht vom Read runtergesprungen wird.
+ if ( GetStreamSocket() )
GetStreamSocket()->close();
- resume(); // So da� das run auch die Schleife verlassen kann
+ resume();
join();
@@ -137,7 +137,7 @@ sal_Bool CommunicationLinkViaSocket::ShutdownCommunication()
SetStreamSocket( NULL );
delete pTempSocket;
-// ConnectionClosed(); Wird am Ende des Thread gerufen
+// ConnectionClosed(); is being called at the end of a thread
}
else
@@ -205,7 +205,7 @@ void CommunicationLinkViaSocket::run()
continue;
TimeValue sNochEins = {0, 1000000};
- while ( schedule() && bIsInsideCallback ) // solange der letzte Callback nicht beendet ist
+ while ( schedule() && bIsInsideCallback )
wait( sNochEins );
SetNewPacketAsCurrent();
StartCallback();
@@ -216,7 +216,7 @@ void CommunicationLinkViaSocket::run()
}
}
TimeValue sNochEins = {0, 1000000};
- while ( schedule() && bIsInsideCallback ) // solange der letzte Callback nicht beendet ist
+ while ( schedule() && bIsInsideCallback )
wait( sNochEins );
StartCallback();
@@ -235,23 +235,23 @@ sal_Bool CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream
return SimpleCommunicationLinkViaSocket::DoTransferDataStream( pDataStream, nProtocol );
}
-/// Dies ist ein virtueller Link!!!
+/// This is a virtual link!
long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
{
{
osl::MutexGuard aGuard( aMConnectionClosed );
- nConnectionClosedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden.
+ nConnectionClosedEventId = 0; // Attention!! everything else must be done above.
}
ShutdownCommunication();
return CommunicationLink::ConnectionClosed( );
}
-/// Dies ist ein virtueller Link!!!
+/// This is a virtual link!
long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG )
{
{
osl::MutexGuard aGuard( aMDataReceived );
- nDataReceivedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden.
+ nDataReceivedEventId = 0; // Attention!! everything else must be done above.
}
return CommunicationLink::DataReceived( );
}
@@ -297,8 +297,7 @@ MultiCommunicationManager::~MultiCommunicationManager()
}
}
- // Alles weghauen, was nicht rechtzeitig auf die B�ume gekommen ist
- // Was bei StopCommunication �brig geblieben ist, da es sich asynchron austragen wollte
+
sal_uInt16 i = ActiveLinks->Count();
while ( i-- )
{
@@ -309,9 +308,7 @@ MultiCommunicationManager::~MultiCommunicationManager()
}
delete ActiveLinks;
- /// Die Links zwischen ConnectionClosed und Destruktor.
- /// Hier NICHT gerefcounted, da sie sich sonst im Kreis festhaten w�rden,
- /// da die Links sich erst in ihrem Destruktor austragen
+
i = InactiveLinks->Count();
while ( i-- )
{
@@ -324,15 +321,13 @@ MultiCommunicationManager::~MultiCommunicationManager()
sal_Bool MultiCommunicationManager::StopCommunication()
{
- // Alle Verbindungen abbrechen
- // ConnectionClosed entfernt die Links aus der Liste. Je nach Implementation syncron
- // oder asyncron. Daher Von oben nach unten Abr�umen, so da� sich nichts verschiebt.
+
sal_uInt16 i = ActiveLinks->Count();
int nFail = 0;
while ( i )
{
if ( !ActiveLinks->GetObject(i-1)->StopCommunication() )
- nFail++; // Hochz�hlen, da Verbindung sich nicht (sofort) beenden l�sst.
+ nFail++;
i--;
}
@@ -359,7 +354,7 @@ CommunicationLinkRef MultiCommunicationManager::GetCommunicationLink( sal_uInt16
void MultiCommunicationManager::CallConnectionOpened( CommunicationLink* pCL )
{
- CommunicationLinkRef rHold(pCL); // H�lt den Zeiger bis zum Ende des calls
+ CommunicationLinkRef rHold(pCL);
ActiveLinks->C40_PTR_INSERT(CommunicationLink, pCL);
rHold->AddRef();
@@ -368,14 +363,14 @@ void MultiCommunicationManager::CallConnectionOpened( CommunicationLink* pCL )
void MultiCommunicationManager::CallConnectionClosed( CommunicationLink* pCL )
{
- CommunicationLinkRef rHold(pCL); // H�lt denm Zeiger bis zum Ende des calls
+ CommunicationLinkRef rHold(pCL);
CommunicationManager::CallConnectionClosed( pCL );
sal_uInt16 nPos;
if ( ActiveLinks->Seek_Entry( pCL, &nPos ) )
{
- InactiveLinks->C40_PTR_INSERT(CommunicationLink, pCL); // Ohne Reference
+ InactiveLinks->C40_PTR_INSERT(CommunicationLink, pCL); // without reference
ActiveLinks->Remove( nPos );
}
pCL->ReleaseReference();
@@ -430,11 +425,9 @@ sal_Bool CommunicationManagerServerViaSocket::StartCommunication()
sal_Bool CommunicationManagerServerViaSocket::StopCommunication()
{
- // Erst den Acceptor anhalten
delete pAcceptThread;
pAcceptThread = NULL;
- // Dann alle Verbindungen kappen
return CommunicationManagerServer::StopCommunication();
}
@@ -461,16 +454,16 @@ CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread(
CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread()
{
-#ifndef aUNX // Weil das Accept nicht abgebrochen werden kann, so terminiert wenigstens das Prog
- // #62855# pl: gilt auch bei anderen Unixen
- // die richtige Loesung waere natuerlich, etwas auf die pipe zu schreiben,
- // was der thread als Abbruchbedingung erkennt
- // oder wenigstens ein kill anstatt join
+#ifndef aUNX // because the accept can't be canceled - this way the prog's terminated at leastW
+ // #62855# pl: counts for other unix systems too
+ // correct solution would be of course to write something on the pipe which
+ // the thread recognizes as a cancelling condition
+ // or at least kill instead of join
terminate();
if ( pAcceptorSocket )
- pAcceptorSocket->close(); // Dann das Accept unterbrechen
+ pAcceptorSocket->close();
- join(); // Warten bis fertig
+ join();
if ( pAcceptorSocket )
{
@@ -491,7 +484,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread(
CByteString( "AddConnectionEvent aus Queue gel�scht"),
CM_MISC, xNewConnection );
xNewConnection->InvalidateManager();
- xNewConnection.Clear(); // sollte das Objekt hier l�schen
+ xNewConnection.Clear();
}
}
}
@@ -527,7 +520,7 @@ void CommunicationManagerServerAcceptThread::run()
pStreamSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 );
TimeValue sNochEins = {0, 100};
- while ( schedule() && xmNewConnection.Is() ) // Solange die letzte Connection nicht abgeholt wurde warten wir
+ while ( schedule() && xmNewConnection.Is() )
wait( sNochEins );
xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket );
xmNewConnection->StartCallback();
diff --git a/automation/source/inc/rcontrol.hxx b/automation/source/inc/rcontrol.hxx
index 14a26feded42..7e240c8caacf 100644
--- a/automation/source/inc/rcontrol.hxx
+++ b/automation/source/inc/rcontrol.hxx
@@ -40,7 +40,7 @@
#define UID_ACTIVE "UID_ACTIVE"
#define SI_IPCCommandBlock 1
-#define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal
+#define SI_SocketCommandBlock SI_IPCCommandBlock
#define SI_DirectCommandBlock 2
#define SIControl 3 // remove after numeric HelpIDs are completely removed and no legacy testtool is used anymore
#define SISlot 4
@@ -61,9 +61,9 @@
#define BinSbxValue 15
// Classes
-// !!!Diese Defines duerfen niemals geaendert werden!!!
+// !!!These defines may never be changed!!!
#define C_NoType -1
-// Maximale 32 einfache Controls
+// maximum of 32 easy controls
#define C_TabControl 0
#define C_RadioButton 1
#define C_CheckBox 2
@@ -94,7 +94,7 @@
#define C_MenuButton 24
#define C_MoreButton 25
-// Maximale 7 Container
+// maximum of 7 containers
#define C_TabPage 32
#define C_ModalDlg 33
#define C_FloatWin 34
@@ -102,7 +102,7 @@
#define C_WorkWin 36
#define C_DockingWin 37
-// Diese Defines koennen geaendert werden
+// These defines may be changed
#define C_MessBox 40
#define C_InfoBox 41
#define C_WarningBox 42
@@ -126,8 +126,8 @@
#define C_Dialog 68
-#define M_WITH_RETURN 0x0200 // Die Variable wird zum Aufnehmen des Wertes gespeichert
-#define M_KEY_STRING 0x0400 // Key Befehle werden umgewandelt i.e. "<return><up>"
+#define M_WITH_RETURN 0x0200 // the variable is saved until it gets its value
+#define M_KEY_STRING 0x0400 // key orders are converted i.e. "<return><up>"
#define M_SOFFICE 0x0800 // Command valid for Star/Open Office
#define M_MOZILLA 0x1000 // Command valid for Mozilla
// for MacroRecorder
@@ -147,7 +147,7 @@
#define M_SetPage 31
#define M_Click 32
-#define M_Close 33 // Push Buttons on Dialog (Auch More Button)
+#define M_Close 33 // Push Buttons on Dialog (also More Button)
#define M_Cancel 34
#define M_OK 35
#define M_Help 36
@@ -202,7 +202,7 @@
#define M_Restore 85 // Window Control together with M_Maximize and M_Minimize
-#define M_DisplayPercent 200 // Zum Anzeigen der Prozente des Windows
+#define M_DisplayPercent 200
#define M_LAST_NO_RETURN 200
@@ -259,7 +259,7 @@
#define M_HasScrollBar ( M_WITH_RETURN | 38 )
#define M_IsScrollBarEnabled ( M_WITH_RETURN | 39 )
-// Dieser befehl wird nur intern im Controller (sts library) verwendet. Sie tauchen nicht im Testtool auf!
+// This command is only used in the internal controller (sts library). They don't appear in the testtool!
#define _M_IsEnabled ( M_WITH_RETURN | 50 )
#define M_GetFixedTextCount ( M_WITH_RETURN | 51 )
@@ -318,7 +318,7 @@
#error "Bereich �berschritten"
#endif
-// Befehle mit Returnwert
+// commands with return value
#define RC_GetClipboard ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 1 )
#define RC_WinTree ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 2 )
#define RC_ResetApplication ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 3 )
@@ -374,30 +374,30 @@
#define RC_WaitSlot ( M_SOFFICE | M_WITH_RETURN | 44 )
// Flow Control
-#define F_EndCommandBlock 101 // Initiiert R�ckmeldung des Status
-#define F_Sequence 102 // �bergibt Sequence Nummer (1. in jedem Stream)
+#define F_EndCommandBlock 101 // initializes the reply of the status
+#define F_Sequence 102 // commits Sequence number (first in each stream)
// Return codes
-#define RET_Sequence 132 // �bergibt Sequence Nummer (1. in jedem Stream)
-#define RET_Value 133 // �bergibt Return-wert
-#define RET_WinInfo 134 // Information �ber aktuelles Fenster/Control
-#define RET_ProfileInfo 135 // Profile Information
-#define RET_DirectLoging 136 // Direktes �bertragen von Informationen in das Log
-#define RET_MacroRecorder 137 // MakroRecorder Befehl �bertragen
-
-// Subcodes die in nUId geliefert werden
-// f�r F_ProfileInfo
-#define S_ProfileReset 201 // nNr1 = Anzahl Borders
- // Achtung!! Diese Defines m�ssen aufeinanderfolgende Nummern haben!!
+#define RET_Sequence 132
+#define RET_Value 133
+#define RET_WinInfo 134
+#define RET_ProfileInfo 135
+#define RET_DirectLoging 136
+#define RET_MacroRecorder 137
+
+// Subcodes which are delivered to nUId
+// for F_ProfileInfo
+#define S_ProfileReset 201 // nNr1 = number of Borders
+ // Attention!! These defines must have numbers in a row!!
#define S_ProfileBorder1 202 // nNr1 = Border1 in ms
#define S_ProfileBorder2 203 // nNr1 = Border2 in ms
#define S_ProfileBorder3 204 // nNr1 = Border3 in ms
#define S_ProfileBorder4 205 // nNr1 = Border4 in ms
- // Achtung Ende
-#define S_ProfileTime 210 // nNr1 = remote Zeit des Befehls
-#define S_ProfileDump 211 // Gibt die daten aus.
+ // Attention end
+#define S_ProfileTime 210 // nNr1 = remote time of the command
+#define S_ProfileDump 211 // outputs the data
-// f�r F_DirectLoging
+// for F_DirectLoging
#define S_AssertError 220
#define S_AssertWarning 221
#define S_AssertTrace 222
@@ -413,7 +413,7 @@
#define CONST_CTTableControl 106
#define CONST_CTUnknown 199
-// Konstanten f�r das ALignment des gesuchten Splitters
+// constants for the ALignment of the requested splitter
#define CONST_ALIGN_LEFT 120
#define CONST_ALIGN_TOP 121
#define CONST_ALIGN_RIGHT 122
@@ -440,31 +440,31 @@
#define CONST_WSAborted 702
#define CONST_WSFinished 703
-// Beschreibt die Parametertypen als Bitfeld Reihenfolge immer!
-// wie hier Aufgelistet
+// describes the parameter types as bitfield - always sequence!
+// as listed here
#define PARAM_NONE 0x0000
#define PARAM_UINT16_1 0x0001
#define PARAM_UINT16_2 0x0002
-#define PARAM_UINT16_3 0x0100 // Nicht in der Reihe!!
-#define PARAM_UINT16_4 0x0200 // Nicht in der Reihe!!
+#define PARAM_UINT16_3 0x0100 // not in the row!!
+#define PARAM_UINT16_4 0x0200 // not in the row!!
#define PARAM_UINT32_1 0x0004
#define PARAM_UINT32_2 0x0008
#define PARAM_STR_1 0x0010
#define PARAM_STR_2 0x0020
#define PARAM_BOOL_1 0x0040
#define PARAM_BOOL_2 0x0080
-#define PARAM_SBXVALUE_1 0x0400 // hier mit 0x0400 Weiter!!! Siehe Oben!
+#define PARAM_SBXVALUE_1 0x0400 // going on with 0x0400 here!!! see above!
-// Zus�tzliche Beschreibung!! wird auch mit dem Rest verodert
-//#define PARAM_STR_RAW 0x8000 // Der Zeichensatz der Strings wird nicht konvertiert(f�r Fareastern)
+
+//#define PARAM_STR_RAW 0x8000 // the character set of the strings is not being converted (for Fareastern)
#define ERR_SEND_TIMEOUT 100
#define ERR_EXEC_TIMEOUT 101
#define ERR_RESTART_FAIL 102
#define ERR_RESTART 103
-#define ERR_NO_WIN 104 // Keine *.Win Dateien gefunden
-#define ERR_NO_SID 105 // Keine *.Sid Dateien gefunden
-#define ERR_NO_FILE 106 // Datei nicht gefunden
+#define ERR_NO_WIN 104
+#define ERR_NO_SID 105
+#define ERR_NO_FILE 106
#endif
diff --git a/automation/source/inc/testapp.hxx b/automation/source/inc/testapp.hxx
index 6b257e27b4a0..f77fb349516a 100644
--- a/automation/source/inc/testapp.hxx
+++ b/automation/source/inc/testapp.hxx
@@ -77,13 +77,13 @@ class TestToolObj: public SbxObject
friend class TTBasic;
friend class Controls;
public:
- TestToolObj( String aName, MyBasic* pBas ); // Pfade aus INI, IPC benutzen
+ TestToolObj( String aName, MyBasic* pBas ); // use paths from INI, IPC
~TestToolObj();
- void LoadIniFile(); // Laden der IniEinstellungen, die durch den ConfigDialog gendert werden knnen
+ void LoadIniFile(); // IniSetup can be changed with the ConfigDialog
void DebugFindNoErrors( sal_Bool bDebugFindNoErrors );
private:
- sal_Bool bWasPrecompilerError; // True wenn beim letzten Precompile ein Fehler auftrat
+ sal_Bool bWasPrecompilerError;
sal_Bool CError( sal_uLong, const String&, xub_StrLen, xub_StrLen, xub_StrLen );
void CalcPosition( String const &aSource, xub_StrLen nPos, xub_StrLen &l, xub_StrLen &c );
xub_StrLen ImplSearch( const String &aSource, const xub_StrLen nStart, const xub_StrLen nEnd, const String &aSearch, const xub_StrLen nSearchStart = 0 );
@@ -92,12 +92,12 @@ private:
public:
String GetRevision(String const &aSourceIn); // find Revision in the sourcecode
String PreCompile(String const &aSourceIn); // try catch; testcase endcase ..
- sal_Bool WasPrecompilerError(); // True wenn beim letzten Precompile ein Fehler auftrat
+ sal_Bool WasPrecompilerError();
void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
virtual SbxVariable* Find( const String&, SbxClassType );
-// String aKeyPlusClasses; // Pfad fr keycodes & classes & res_type (Aus Configdatei)
+// String aKeyPlusClasses; // path for keycodes & classes & res_type (from Configfile)
DECL_LINK( ReturnResultsLink, CommunicationLink* );
- sal_Bool ReturnResults( SvStream *pIn ); // Rcklieferung des Antwortstreams ber IPC oder TCP/IP oder direkt
+ sal_Bool ReturnResults( SvStream *pIn ); // return of the reply stream over IPC or TCP/IP or directly
void SetLogHdl( const Link& rLink ) { aLogHdl = rLink; }
const Link& GetLogHdl() const { return aLogHdl; }
@@ -117,41 +117,41 @@ public:
SfxBroadcaster& GetTTBroadcaster();
private:
- ImplTestToolObj *pImpl; // Alles was von der Implementation abhngt
+ ImplTestToolObj *pImpl;
static const CErrors* GetFehlerListe() { return pFehlerListe; }
sal_Bool bUseIPC;
- Link aLogHdl; // Zum Logen der Fehlermeldungen im Testtool
- Link aWinInfoHdl; // Anzeigen der Windows/Controls der zu testenden App
- Link aModuleWinExistsHdl; // Prft ob das Modul schon im Editor geladen ist
- Link aCErrorHdl; // Melden von Compilererror
- Link aWriteStringHdl; // Schreiben von text (e.g. MakroRecorder)
- sal_Bool bReturnOK; // Bricht WaitForAnswer ab
- CRevNames *pShortNames; // Aktuell verwendete Controls, zur gewinnung des Namens aus Fehlermeldung
- sal_uLong nSequence; // Sequence um Antwort und Anfrage zu syncronisieren
- rtl::OString aNextReturnId; // Id des Returnwertes i.e. UId
- void ReplaceNumbers(String &aText); // Zahlen im String mit speziellem Format in Namen umwandeln
-
- String aLastRecordedKontext;// Keeps the last kontext recorded by the Macro Recorder
+ Link aLogHdl;
+ Link aWinInfoHdl;
+ Link aModuleWinExistsHdl;
+ Link aCErrorHdl;
+ Link aWriteStringHdl;
+ sal_Bool bReturnOK;
+ CRevNames *pShortNames;
+ sal_uLong nSequence;
+ rtl::OString aNextReturnId;
+ void ReplaceNumbers(String &aText);
+
+ String aLastRecordedKontext;
#define FLAT sal_True
- String ProgPath; // Dateiname der zu Testenden APP; Gesetzt ber Start
- String aLogFileName; // Momentaner Logfilename (Wie Programmdatei aber mit .res)
- sal_Bool IsBlock; // Innerhalb Begin/EndBlock
- sal_Bool SingleCommandBlock; // Implizit um jedes kommando ein Begin/EndBlock
+ String ProgPath;
+ String aLogFileName;
+ sal_Bool IsBlock;
+ sal_Bool SingleCommandBlock;
CmdStream *In;
- void AddName(String &aBisher, String &aNeu ); // Name eventuell mit / anhngen
- void AddToListByNr( CNames *&pControls, ControlItemUId *&pNewItem ); //
+ void AddName(String &aBisher, String &aNeu ); // maybe add name with /
+ void AddToListByNr( CNames *&pControls, ControlItemUId *&pNewItem );
CNames *m_pControls;
- CNames *m_pNameKontext; // Zeigt auf den aktuellen Namenskontext, der ber 'Kontext' gesetzt wurde
+ CNames *m_pNameKontext;
CNames *m_pSIds;
- CNames *m_pReverseSlots; // Slots mit Kurznamen nach Nummer
- CNames *m_pReverseControls; // Controls mit Kurznamen nach Nummer
- CNames *m_pReverseControlsSon;// Controls mit Kurznamen nach Nummer nach Fenstern (Son)
- CNames *m_pReverseUIds; // Langnamen nach Nummer
+ CNames *m_pReverseSlots;
+ CNames *m_pReverseControls;
+ CNames *m_pReverseControlsSon;
+ CNames *m_pReverseUIds;
- sal_uInt16 nMyVar; // Wievielte Var aus Pool ist dran
+ sal_uInt16 nMyVar;
void InitTestToolObj();
CommunicationManagerClientViaSocketTT *pCommunicationManager;
@@ -176,9 +176,9 @@ private:
sal_uInt16 nWindowHandlerCallLevel;
sal_uInt16 nIdleCount;
- // wenn DialogHandler gesetzt wird er im IdleHandler inkrementiert und
- // in WaitForAnswer rckgesetzt. bersteigt er einen gewissen wert, gehe ich davon aus,
- // da WaitForAnswer still ligt und rufe die DialogHander Sub im BASIC auf.
+ // If DialogHandler has been reset it is incremented in the IdleHandler and
+ // is reset in WaitForAnswer. If it exceed a certain value, I expect WaitFor Answer to
+ // stand still and call the DialogHander Sub in BASIC.
void BeginBlock();
void EndBlock();
@@ -187,7 +187,7 @@ private:
static ControlDefLoad const arR_Cmds[];
static CNames *pRCommands;
- static CErrors *pFehlerListe; // Hier werden die Fehler des Testtools gespeichert
+ static CErrors *pFehlerListe; // the errors from the testtool are stored here
};
diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx
index fd313c9cbd40..883ccaf04088 100644
--- a/automation/source/miniapp/testapp.hxx
+++ b/automation/source/miniapp/testapp.hxx
@@ -81,7 +81,7 @@ public:
virtual void SetExecuteMode( sal_uInt16 nMode )
{
(void) nMode; /* avoid warning about unused parameter */
- }; // Ist hier sowieso egal
+ };
};
class MyApp : public Application
diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx
index 154ca63c37e7..74794aca0f26 100644
--- a/automation/source/server/cmdbasestream.cxx
+++ b/automation/source/server/cmdbasestream.cxx
@@ -63,7 +63,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT32 nUId )
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(nUId);
- Write(comm_UINT16(PARAM_NONE)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_NONE));
}
void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_UINT32 nNr )
@@ -74,7 +74,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_UINT32
Write(comm_UINT32(0));
else
Write(pUId);
- Write(comm_UINT16(PARAM_UINT32_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT32_1));
Write(nNr);
}
@@ -86,7 +86,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_String
Write(comm_UINT32(0));
else
Write(pUId);
- Write(comm_UINT16(PARAM_STR_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_STR_1));
Write(pString);
}
@@ -98,7 +98,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_BOOL b
Write(comm_UINT32(0));
else
Write(pUId);
- Write(comm_UINT16(PARAM_BOOL_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_BOOL_1));
Write(bBool);
}
@@ -110,7 +110,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_UINT32
Write(comm_UINT32(0));
else
Write(pUId);
- Write(comm_UINT16(PARAM_UINT32_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT32_1|PARAM_STR_1|PARAM_BOOL_1));
Write(nNr);
Write(pString);
Write(bBool);
@@ -121,7 +121,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_UINT3
Write(comm_UINT16(SIReturn));
Write(nRet);
Write((comm_UINT32)nMethod); //HELPID BACKWARD (no sal_uLong needed)
- Write(comm_UINT16(PARAM_UINT32_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT32_1));
Write(nNr);
}
@@ -130,7 +130,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_Strin
Write(comm_UINT16(SIReturn));
Write(nRet);
Write((comm_UINT32)nMethod); //HELPID BACKWARD (no sal_uLong needed)
- Write(comm_UINT16(PARAM_STR_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_STR_1));
Write(pString);
}
@@ -139,7 +139,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_BOOL
Write(comm_UINT16(SIReturn));
Write(nRet);
Write((comm_UINT32)nMethod); //HELPID BACKWARD (no sal_uLong needed)
- Write(comm_UINT16(PARAM_BOOL_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_BOOL_1));
Write(bBool);
}
@@ -148,7 +148,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_UINT1
Write(comm_UINT16(SIReturn));
Write(nRet);
Write((comm_UINT32)nMethod); //HELPID BACKWARD (no sal_uLong needed)
- Write(comm_UINT16(PARAM_UINT16_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT16_1));
Write(nNr);
}
@@ -159,7 +159,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
- Write(comm_UINT16(PARAM_UINT16_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT16_1));
Write(nMethod);
}
@@ -168,7 +168,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
- Write(comm_UINT16(PARAM_UINT16_1|PARAM_STR_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT16_1|PARAM_STR_1));
Write(nMethod);
Write(pString);
}
@@ -178,7 +178,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
- Write(comm_UINT16(PARAM_UINT16_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT16_1|PARAM_STR_1|PARAM_BOOL_1));
Write(nMethod);
Write(pString);
Write(bBool);
@@ -189,7 +189,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
- Write(comm_UINT16(PARAM_UINT16_1|PARAM_UINT32_1)); // Typ der folgenden Parameter
+ Write(comm_UINT16(PARAM_UINT16_1|PARAM_UINT32_1));
Write(nMethod);
Write(nNr);
}
diff --git a/automation/source/server/editwin.cxx b/automation/source/server/editwin.cxx
index 8056eebd6c02..c9d259608661 100644
--- a/automation/source/server/editwin.cxx
+++ b/automation/source/server/editwin.cxx
@@ -146,7 +146,7 @@ void EditWindow::AddText( const String &rNew )
if ( nTextLen > 5000 )
{
pImpWorkWindow->m_aInhalt.SetText( pImpWorkWindow->m_aInhalt.GetText().Erase(0,1000) );
- nTextLen = pImpWorkWindow->m_aInhalt.GetText().Len(); // Absolut, um Fehler sonstwo auszubgeln
+ nTextLen = pImpWorkWindow->m_aInhalt.GetText().Len();
}
diff --git a/automation/source/server/editwin.hxx b/automation/source/server/editwin.hxx
index 9b6d8b925f04..b3a169fbd8fc 100644
--- a/automation/source/server/editwin.hxx
+++ b/automation/source/server/editwin.hxx
@@ -49,7 +49,7 @@ protected:
String aMemPreWinText;
sal_Bool bShowWin;
- xub_StrLen nTextLen; // aus Performanzgrnden eigene Lnge mitfhren
+ xub_StrLen nTextLen;
public:
EditWindow( WorkWindow *pParent, const UniString &rName = UniString( RTL_CONSTASCII_USTRINGPARAM ( "Debug" ) ), WinBits iWstyle = WB_HSCROLL | WB_VSCROLL );
diff --git a/automation/source/server/prof_nul.cxx b/automation/source/server/prof_nul.cxx
index 46e1e3789d7b..58586ebf1948 100644
--- a/automation/source/server/prof_nul.cxx
+++ b/automation/source/server/prof_nul.cxx
@@ -36,29 +36,29 @@
struct SysdepProfileSnapshot
{
- // Hier stehen alle Felder zum Speichern eines Snapshot
+ // fields for saving a snapshot
};
struct SysdepStaticData
{
- // Hier steht alles, was whrend des Profiles stndig gebraucht wird
+ // everything that is always needed during profiling
};
void TTProfiler::InitSysdepProfiler()
{
- if ( !pSysDepStatic ) // Sollte immer so sein!!
+ if ( !pSysDepStatic ) // Should always be like this!!
pSysDepStatic = new SysdepStaticData;
- // Hier initialisieren
+ // initialize here
};
void TTProfiler::DeinitSysdepProfiler()
{
- if ( pSysDepStatic ) // Sollte immer so sein!!
+ if ( pSysDepStatic ) // Should always be like this!!
{
- // Hier aufrumen und eventuell Speicher freigeben
+ // tidy up here and free storage if applicable
delete pSysDepStatic;
}
@@ -75,19 +75,16 @@ void TTProfiler::DeleteSysdepSnapshotData( SysdepProfileSnapshot *pSysdepProfile
};
-// Titelzeile fr Logdatei
String TTProfiler::GetSysdepProfileHeader()
{
return String(CUniString("(noch) keine weiteren Daten Implementiert"));
};
-// Zustand merken
void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *, sal_uInt16 )
{};
-// Informationszeile zusammenbauen
String TTProfiler::GetSysdepProfileLine( SysdepProfileSnapshot *, SysdepProfileSnapshot * )
{
return String();
diff --git a/automation/source/server/prof_usl.cxx b/automation/source/server/prof_usl.cxx
index b7ca8037b0e1..d0b406005eca 100644
--- a/automation/source/server/prof_usl.cxx
+++ b/automation/source/server/prof_usl.cxx
@@ -45,23 +45,23 @@ struct SysdepProfileSnapshot
struct SysdepStaticData
{
- // Hier steht alles, was whrend des Profiles stndig gebraucht wird
+ // everything that is always needed during the profile
};
void TTProfiler::InitSysdepProfiler()
{
- if ( !pSysDepStatic ) // Sollte immer so sein!!
+ if ( !pSysDepStatic ) // Should always be like this!!
pSysDepStatic = new SysdepStaticData;
- // Hier initialisieren
+ // initialize here
};
void TTProfiler::DeinitSysdepProfiler()
{
- if ( pSysDepStatic ) // Sollte immer so sein!!
+ if ( pSysDepStatic ) // Should always be like this!!
{
- // Hier aufrumen und eventuell Speicher freigeben
+ // tidy up here and free storage if applicable
delete pSysDepStatic;
}
@@ -78,29 +78,28 @@ void TTProfiler::DeleteSysdepSnapshotData( SysdepProfileSnapshot *pSysdepProfile
};
-// Titelzeile fr Logdatei
String TTProfiler::GetSysdepProfileHeader()
{
return String::CreateFromAscii(" Size(Kb) ResidentSZ rtime ktime utime total");
};
-// Zustand merken
+
void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, sal_uInt16 )
{
- SvFileStream aStream( String::CreateFromAscii("/proc/self/psinfo"), STREAM_READ ); // Das ist ein expliziter Pfad fr UNXSOL!
+ SvFileStream aStream( String::CreateFromAscii("/proc/self/psinfo"), STREAM_READ ); // explicit path for UNXSOL!
if ( aStream.IsOpen() )
{
aStream.Read( &(pSysdepProfileSnapshot->mpsinfo), sizeof( psinfo ) );
aStream.Close();
}
- SvFileStream anotherStream( String::CreateFromAscii("/proc/self/status"), STREAM_READ ); // Das ist ein expliziter Pfad fr UNXSOL!
+ SvFileStream anotherStream( String::CreateFromAscii("/proc/self/status"), STREAM_READ ); // explicit path for UNXSOL!
if ( anotherStream.IsOpen() )
{
anotherStream.Read( &(pSysdepProfileSnapshot->mpstatus), sizeof( pstatus ) );
anotherStream.Close();
}
- SvFileStream YetAnotherStream( String::CreateFromAscii("/proc/self/usage"), STREAM_READ ); // Das ist ein expliziter Pfad fr UNXSOL!
+ SvFileStream YetAnotherStream( String::CreateFromAscii("/proc/self/usage"), STREAM_READ ); // explicit path for UNXSOL!
if ( YetAnotherStream.IsOpen() )
{
YetAnotherStream.Read( &(pSysdepProfileSnapshot->mprusage), sizeof( prusage ) );
@@ -111,7 +110,7 @@ void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfile
#define DIFF2( aFirst, aSecond, Membername ) ( aSecond.Membername - aFirst.Membername )
#define CALC_MS( nSec, nNSec ) ( nSec * 1000 + (nNSec+500000) / 1000000 )
#define DIFF_MS( pStart, pEnd, Member ) ( CALC_MS( pEnd->Member.tv_sec, pEnd->Member.tv_nsec ) - CALC_MS( pStart->Member.tv_sec, pStart->Member.tv_nsec ) )
-// Informationszeile zusammenbauen
+
String TTProfiler::GetSysdepProfileLine( SysdepProfileSnapshot *pStart, SysdepProfileSnapshot *pStop )
{
String aProfile;
diff --git a/automation/source/server/profiler.cxx b/automation/source/server/profiler.cxx
index c11ddce1014a..2520a1fa4e05 100644
--- a/automation/source/server/profiler.cxx
+++ b/automation/source/server/profiler.cxx
@@ -158,7 +158,7 @@ void TTProfiler::GetProfileSnapshot( ProfileSnapshot *pProfileSnapshot )
}
-void TTProfiler::StartProfilingPerCommand() // Jeden Befehl mitschneiden
+void TTProfiler::StartProfilingPerCommand()
{
bIsProfilingPerCommand = sal_True;
}
@@ -214,11 +214,11 @@ void TTProfiler::Timeout()
aAutoProfileBuffer += aLine;
- ProfileSnapshot *pTemp = pAutoStart; // Tauschen, so da jetziges Ende nchsten Start wird
+ ProfileSnapshot *pTemp = pAutoStart; // swap so that current end becomes the next start
pAutoStart = pAutoEnd;
pAutoEnd = pTemp;
- Start(); // Timer neu starten
+ Start(); // restart timer
}
String TTProfiler::GetAutoProfiling()
diff --git a/automation/source/server/profiler.hxx b/automation/source/server/profiler.hxx
index 9b8abbac21d0..cf04699cd874 100644
--- a/automation/source/server/profiler.hxx
+++ b/automation/source/server/profiler.hxx
@@ -42,7 +42,7 @@
struct SysdepProfileSnapshot;
-struct SysdepStaticData; // Nicht wirklich statisch, sondern statisch �ber mehrere Snapshots
+struct SysdepStaticData; // not really static but static over several snapshots
struct ProfileSnapshot
{
@@ -59,13 +59,13 @@ public:
TTProfiler();
~TTProfiler();
- String GetProfileHeader(); // Titelzeile f�r Logdatei
- void StartProfileInterval( sal_Bool bReadAnyway = sal_False ); // Zustand merken
- void EndProfileInterval(); // Informationszeile zusammenbauen
+ String GetProfileHeader(); // headline for logfile
+ void StartProfileInterval( sal_Bool bReadAnyway = sal_False ); // memorize condition
+ void EndProfileInterval(); // construct information line
String GetProfileLine( String &aPrefix );
- void StartProfilingPerCommand(); // Jeden Befehl mitschneiden
+ void StartProfilingPerCommand();
void StopProfilingPerCommand();
sal_Bool IsProfilingPerCommand() { return bIsProfilingPerCommand; }
@@ -74,16 +74,16 @@ public:
sal_Bool IsPartitioning() { return bIsPartitioning; }
sal_uLong GetPartitioningTime();
- void StartAutoProfiling( sal_uLong nMSec ); // Automatisch alle nMSec Milisekunden sampeln
- String GetAutoProfiling(); // Aktuelle `Sammlung` abholen
- void StopAutoProfiling(); // Sampeln beenden
+ void StartAutoProfiling( sal_uLong nMSec ); // sample automatically every nMSec milliseconds
+ String GetAutoProfiling(); // get current 'collection'
+ void StopAutoProfiling();
sal_Bool IsAutoProfiling() { return bIsAutoProfiling; }
private:
void GetProfileSnapshot( ProfileSnapshot *pProfileSnapshot );
- // Informationszeile zusammenbauen
+
String GetProfileLine( ProfileSnapshot *pStart, ProfileSnapshot *pStop );
@@ -94,8 +94,6 @@ private:
sal_Bool bIsPartitioning;
-// F�r das Automatische Profiling in festen Intervallen
-
ProfileSnapshot *pAutoStart;
ProfileSnapshot *pAutoEnd;
sal_Bool bIsAutoProfiling;
@@ -104,13 +102,12 @@ private:
virtual void Timeout();
-// Einige Hilfsfunktionen
- String Dec( sal_uLong nNr ); // Ergebnis = nNr / 100 mit 2 Dezimalen
- String Pad( const String &aS, xub_StrLen nLen ); // F�gt blanks links an den String an
+ String Dec( sal_uLong nNr ); // result = nNr / 100 with 2 decimals
+ String Pad( const String &aS, xub_StrLen nLen ); // adds blanks links to the string
-/* Ab hier werden die Methoden Systemabh�ngig in den entsprechenden cxx implementiert
- Sie werden von den oberen Methoden gerufen.
+/* from now on the methods are implemented system dependent in the respective cxx
+ they are called by the methods above
*/
SysdepStaticData *pSysDepStatic;
@@ -121,13 +118,11 @@ private:
SysdepProfileSnapshot *NewSysdepSnapshotData();
void DeleteSysdepSnapshotData( SysdepProfileSnapshot *pSysdepProfileSnapshot );
- // Titelzeile f�r Logdatei
+
String GetSysdepProfileHeader();
- // Zustand merken
void GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, sal_uInt16 nMode = PROFILE_START | PROFILE_END );
- // Informationszeile zusammenbauen
String GetSysdepProfileLine( SysdepProfileSnapshot *pStart, SysdepProfileSnapshot *pStop );
};
diff --git a/automation/source/server/recorder.cxx b/automation/source/server/recorder.cxx
index c74380dff42f..6b28c846c6fc 100644
--- a/automation/source/server/recorder.cxx
+++ b/automation/source/server/recorder.cxx
@@ -612,7 +612,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
} // if
if ( bSendData )
- new StatementFlow( NULL, F_EndCommandBlock ); // Kommando zum Senden erzeugen und in que eintragen
+ new StatementFlow( NULL, F_EndCommandBlock ); // create command for sending and entry in que
return 0;
}
diff --git a/automation/source/server/retstrm.cxx b/automation/source/server/retstrm.cxx
index df36835c15d0..21b9ad1f8bc0 100644
--- a/automation/source/server/retstrm.cxx
+++ b/automation/source/server/retstrm.cxx
@@ -80,7 +80,7 @@ void RetStream::GenReturn ( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValu
Write(sal_uInt16(SIReturn));
Write(nRet);
Write((comm_UINT32)nMethod); //HELPID BACKWARD (no sal_uLong needed)
- Write(sal_uInt16(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_SBXVALUE_1)); // type of the following parameters
Write(aValue);
}
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index 44c2c0de423e..83a31becaf64 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -49,7 +49,7 @@
#include <vcl/sound.hxx>
#include "testtool.hrc"
#include <vcl/bitmap.hxx>
-// Hat keinen Includeschutz
+// has got no include guard
#include <svtools/svtdata.hxx>
#include <rtl/textenc.h>
#include <rtl/uri.h>
@@ -101,7 +101,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 ) );
}
}
@@ -141,8 +141,8 @@ IMPL_LINK( RemoteControlCommunicationManager, SetWinCaption, Timer*, EMPTYARG )
StatementList::GetFirstDocFrame()->SetText(String(aOriginalWinCaption).AppendAscii(" TT").Append(aAdditionalWinCaption).AppendAscii("[").Append(UniString::CreateFromInt32(nPortToListen)).AppendAscii("]"));
}
else
- { // Dann Probieren wir es eben in 1 Sekunde nochmal
- pTimer = new Timer(); // Wird im Link gel�scht
+ {
+ pTimer = new Timer(); // will be deleted in link
pTimer->SetTimeout( 1000 );
pTimer->SetTimeoutHdl( LINK( this, RemoteControlCommunicationManager, SetWinCaption ) );
pTimer->Start();
@@ -218,7 +218,7 @@ sal_uLong RemoteControlCommunicationManager::GetPort()
nPortIs = aConf.ReadKey("TTPort","0").toInt32();
- // noch pr�fen ob dieses Office getestet werden soll.
+
if ( !bAutomate || aConf.ReadKey( aNoTesttoolKey, "" ) != "" )
nPortIs = 0;
@@ -232,9 +232,9 @@ sal_uLong RemoteControlCommunicationManager::GetPort()
}
#if OSL_DEBUG_LEVEL > 1
-#define MIN_IDLE 10000 // Ruhe vor dem Sturm min 10 Sekunden
+#define MIN_IDLE 10000
#else
-#define MIN_IDLE 60000 // Ruhe vor dem Sturm min 1 Minuten
+#define MIN_IDLE 60000
#endif
class ExtraIdle : public AutoTimer
@@ -252,9 +252,9 @@ ExtraIdle::ExtraIdle( ImplRemoteControl *pRC )
: nStep( 0 )
, pRemoteControl (pRC )
{
- SetTimeout( 120000 ); // 2 Minuten
+ SetTimeout( 120000 );
#if OSL_DEBUG_LEVEL > 1
- SetTimeout( 40000 ); // 40 Sekunden
+ SetTimeout( 40000 );
#endif
Start();
}
@@ -270,7 +270,7 @@ void ExtraIdle::Timeout()
return;
}
- // M�ssen wir selbst idlen?
+
#if OSL_DEBUG_LEVEL > 1
sal_uLong nLastInputInterval = Application::GetLastInputInterval();
sal_Bool bIsInModalMode = Application::IsInModalMode();
@@ -279,7 +279,7 @@ void ExtraIdle::Timeout()
if ( Application::IsInModalMode() || Application::GetLastInputInterval() < MIN_IDLE )
#endif
{
- if ( nStep ) // Schon angefangen? dann abbrechen, sonst sp�ter nochmal
+ if ( nStep )
{
if ( nStep < 15 )
{
@@ -300,14 +300,14 @@ void ExtraIdle::Timeout()
return;
}
- if ( StatementList::pFirst ) // Verarbeitung neu aufsetzen
+ if ( StatementList::pFirst ) // reset handling
{
GetpApp()->PostUserEvent( LINK( pRemoteControl, ImplRemoteControl, CommandHdl ) );
return;
}
- switch ( nStep++ ) // Probieren ob wir noch was machen k�nnen
+ switch ( nStep++ ) // test whether there's still something to do
{
case 0:
{
@@ -509,7 +509,7 @@ void ExtraIdle::Timeout()
}
}
- // Wir sind am Ende
+
#if OSL_DEBUG_LEVEL < 2
delete this;
@@ -538,7 +538,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
if ( StatementList::MaybeResetSafeReschedule() )
{
- StatementList::bExecuting = sal_False; // Wird nacher im SafeReschedule wieder zur�ckgesetzt
+ StatementList::bExecuting = sal_False; // will be reset in SafeReschedule later
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "SafeReschedule has been reset\n" );
#endif
@@ -565,12 +565,12 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
}
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
#endif
- return 0; // Garnicht erst irgendwelchen bl�dsinn machen
+ return 0;
}
while( StatementList::pFirst && ( !StatementList::bReadingCommands || StatementList::bDying ) )
- // Schleift hier bis Befehl nicht zur�ckkommt,
- // Wird dann rekursiv �ber IdleHdl und PostUserEvent aufgerufen.
+ // loops until command is not coming back,
+ // is then called recursively via IdleHdl and PostUserEvent
{
m_bInsideExecutionLoop = sal_True;
#ifdef TIMERIDLE
@@ -586,7 +586,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;
}
}
else
@@ -598,13 +598,13 @@ 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;
}
}
catch( ... )
{
if ( !StatementFlow::bUseIPC )
- throw; // aus der Hilfe heraus nicht leise abbrechen
+ throw;
try
{
@@ -615,7 +615,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
OSL_FAIL("GPF");
pC->ReportError( GEN_RES_STR0( S_GPF_ABORT ) );
StatementList::bDying = sal_True;
- while ( StatementList::pFirst ) // Kommandos werden �bersprungen
+ while ( StatementList::pFirst ) // commands are skipped
StatementList::NormalReschedule();
delete pDlg;
}
@@ -630,7 +630,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
m_bInsideExecutionLoop = sal_False;
}
- StatementList::aWindowWaitUId = rtl::OString(); // Warten r�cksetzen, da handler sowieso verlassen wird
+ StatementList::aWindowWaitUId = rtl::OString();
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
@@ -688,28 +688,28 @@ sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn )
{
case SICommand:
{
- new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
+ new StatementCommand( pCmdStream );
break;
}
case SIControl:
case SIStringControl:
{
- new StatementControl( pCmdStream, nId ); // Wird im Konstruktor an Liste angeh�ngt
+ new StatementControl( pCmdStream, nId );
break;
}
case SISlot:
{
- new StatementSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
+ new StatementSlot( pCmdStream );
break;
}
case SIUnoSlot:
{
- new StatementUnoSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
+ new StatementUnoSlot( pCmdStream );
break;
}
case SIFlow:
{
- new StatementFlow( nServiceId, pCmdStream, this ); // Wird im Konstruktor an Liste angeh�ngt
+ new StatementFlow( nServiceId, pCmdStream, this );
break;
}
default:
@@ -791,7 +791,7 @@ ImplRemoteControl::ImplRemoteControl()
#endif
}
if ( RemoteControlCommunicationManager::nComm )
- new ExtraIdle( this ); // Setzt die Bearbeitung wieder auf
+ new ExtraIdle( this ); // resumes editing
}
ImplRemoteControl::~ImplRemoteControl()
@@ -803,20 +803,20 @@ ImplRemoteControl::~ImplRemoteControl()
StatementList::bDying = sal_True;
#if OSL_DEBUG_LEVEL > 1
if ( m_pDbgWin )
- m_pDbgWin->bQuiet = sal_True; // Keine Ausgabe mehr im Debugwindow
+ m_pDbgWin->bQuiet = sal_True; // no more output in the debugwindow
#endif
#ifdef DBG_UTIL
- // Zur�cksetzen, so da� nachfolgende Assertions nicht verloren gehen
+ // reset so that the following assertions are not lost
DbgSetPrintTestTool( NULL );
osl_setDebugMessageFunc( StatementCommand::pOriginal_osl_DebugMessageFunc );
#endif
if ( StatementList::pFirst )
- { // 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 )
+ StatementList::NormalReschedule();
}
if ( pServiceMgr )
diff --git a/automation/source/server/server.hxx b/automation/source/server/server.hxx
index 3b44ba8680d8..fcadf8dfcd49 100644
--- a/automation/source/server/server.hxx
+++ b/automation/source/server/server.hxx
@@ -31,7 +31,7 @@
#include "editwin.hxx"
#include <automation/communi.hxx>
-#define TT_PORT_NOT_INITIALIZED sal_uLong(0xFFFFFFFF) // Eigentlich ja noch mehr, aber soll mal reichen
+#define TT_PORT_NOT_INITIALIZED sal_uLong(0xFFFFFFFF)
#define TT_NO_PORT_DEFINED 0
class RemoteControlCommunicationManager : public CommunicationManagerServerViaSocket
diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx
index 3ff44fa4d409..4581b6e78102 100644
--- a/automation/source/server/sta_list.cxx
+++ b/automation/source/server/sta_list.cxx
@@ -81,13 +81,13 @@ rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString();
rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString();
sal_uInt16 StatementList::nUseBindings = 0;
-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#
+sal_uInt16 StatementList::aSubMenuId1 = 0;
+sal_uInt16 StatementList::aSubMenuId2 = 0;
+sal_uInt16 StatementList::aSubMenuId3 = 0;
SystemWindow *StatementList::pMenuWindow = NULL;
TTProperties *StatementList::pTTProperties = NULL;
-sal_uInt16 StatementList::nMinTypeKeysDelay = 0; // Verz�gerung der einzelnen Anschl�ge f�r TypeKeys
+sal_uInt16 StatementList::nMinTypeKeysDelay = 0;
sal_uInt16 StatementList::nMaxTypeKeysDelay = 0;
sal_Bool StatementList::bDoTypeKeysDelay = sal_False;
@@ -134,7 +134,7 @@ StatementList::StatementList()
, 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; // as late as possible but still central and at any rate early enough because pRet is private
}
void StatementList::InitProfile()
@@ -200,7 +200,7 @@ void StatementList::QueStatement(StatementList *pAfterThis)
pFirst = this;
}
}
- else // am Ende einf�gen
+ else // insert at the end
{
pNext = NULL;
if( !pFirst )
@@ -994,7 +994,7 @@ String StatementList::ClientTree(Window *pBase, int Indent)
sal_Bool StatementList::CheckWindowWait()
{
- static Time StartTime = Time(0L); // Abbruch wenn Fenster absolut nicht schliesst.
+ static Time StartTime = Time(0L); // cancel if window doesn't want to close at all
if ( StartTime == Time(0L) )
StartTime = Time();
@@ -1010,8 +1010,8 @@ sal_Bool StatementList::CheckWindowWait()
m_pDbgWin->AddText( String::CreateFromInt32( pWindowWaitPointer->GetType() ).AppendAscii("\n") );
#endif
- // Ist die Zeit schonn abgelaufen?
- if ( StartTime + Time(0,0,10) < Time() ) // 10 Sekunden reichen wohl
+
+ if ( StartTime + Time(0,0,10) < Time() )
{
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Close timed out. Going on!! " );
@@ -1167,11 +1167,11 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect
{
if ( pWin->IsTracking() )
{
- // siehe #64693 die Position ist f�r Toolboxen relevant
- // #60020 Jetzt hoffentlich kein GPF mehr
- // Zuerst Tracking beenden ohne Event
+ // look at #64693 the position is relevant to the toolboxes
+ // #60020 hopefully no more GPF now
+ // stop tracking at first without event
pWin->EndTracking( ENDTRACK_DONTCALLHDL );
- // dann eigenen Event mit richtigem Maus-Event senden
+ // then send own event with correct mouse event
TrackingEvent aTEvt( aMEvnt, ENDTRACK_END );
pWin->Tracking( aTEvt );
}
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 12a00e38194a..14546fae8c1c 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -66,7 +66,7 @@
#include <svtools/table/tablecontrolinterface.hxx>
#include <svl/poolitem.hxx>
#include <svtools/extensionlistbox.hxx>
-// Hat keinen Includeschutz
+// has got no include guard
#include <svtools/svtdata.hxx>
#include <tools/time.hxx>
#include <svtools/stringtransfer.hxx>
@@ -191,12 +191,12 @@ void StatementFlow::SendViaSocket()
bSending = sal_True;
if ( pCommLink )
{
- if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // tritt ein Fehler auf, so wird sofort gel�scht ...
+ if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // if there's an error, it's deleted immediately
pCommLink = NULL;
}
else
{
- // Macht nix. Wenn das Basic nicht mehr da ist, ist sowiso alles egal
+ // never mind, if the basic is not there it doesn't matter anyway
OSL_FAIL("Cannot send results to TestTool");
}
@@ -219,16 +219,16 @@ sal_Bool StatementFlow::Execute()
if ( !bUseIPC )
{
- // bBool1 wurde im CTOR auf sal_False initialisiert
- if ( !bBool1 ) // also erster Durchlauf
+ // bBool1 has been initialized in CTOR to sal_False
+ if ( !bBool1 ) // means first run
{
pRemoteControl->pRetStream = pRet->GetStream();
- bBool1 = sal_True; // wurde im CTOR auf sal_False initialisiert
+ bBool1 = sal_True;
nRetryCount = nRetryCount * 4;
}
- if ( pRemoteControl->pRetStream && (nRetryCount--) ) // also solange nicht abgeholt
+ if ( pRemoteControl->pRetStream && (nRetryCount--) )
{
- return sal_False; // Bitte einmal vom Callstack runter
+ return sal_False;
}
}
@@ -241,7 +241,7 @@ sal_Bool StatementFlow::Execute()
{
case F_EndCommandBlock:
if ( !bUseIPC )
- { // wird oben abgehandelt
+ { // is handled above
pRet->Reset();
IsError = sal_False;
}
@@ -270,7 +270,7 @@ sal_Bool StatementFlow::Execute()
}
-// neue Hilfsfunktion, die stetig erweitert werden muss
+// new help function that should be enhanced constantly
static short ImpGetRType( Window *pWin )
{
short nRT = C_NoType;
@@ -640,10 +640,10 @@ sal_Bool StatementSlot::Execute()
}
-/* Neues Verfahren ab 334!
- Neue Methode zum einstellen, da� Modale Dialoge immer Asynchron aufgerufen werden
- und echter Returnwert, ob Slot geklappt hat
- und Testen ob Slot �berhaupt durch UI aufgerufen werden kann */
+/* new principle from 334!
+ new method to make dialogues be called asynchronously
+ and real return value that shows whether slot was successfull
+ and to test whether slot can be called by the UI at all */
SendProfile( SlotString( nFunctionId ) );
@@ -753,7 +753,7 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
m_pDbgWin->AddText( "*Deleting all Commands:\n" );
#endif
bReadingCommands = sal_False;
- while ( StatementList::pFirst != this ) // Alles L�schen au�er mich selbst
+ while ( StatementList::pFirst != this ) // delete everything apart from myself
{
StatementList *pDeQue = StatementList::pFirst;
pDeQue->Advance();
@@ -783,7 +783,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo
pBase = pBase->GetParent();
}
- { // Klammerung, so da� der String nicht w�hrend der Rekursion bestehen bleibt
+ { // bracketing to prevent the string from persisting during the recursion
String aName;
sal_Bool bSkip = sal_False;
@@ -888,7 +888,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo
TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), sal_False );
- if ( pBase->GetType() == WINDOW_TOOLBOX ) // Buttons und Controls auf Toolboxen.
+ if ( pBase->GetType() == WINDOW_TOOLBOX )
{
ToolBox *pTB = ((ToolBox*)pBase);
sal_uInt16 i;
@@ -961,11 +961,11 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo
}
}
- return; // ToolBox ist hier schon komplett abgehandelt.
+ return;
}
- if ( pBase->GetType() == WINDOW_BUTTONDIALOG // Buttons auf Buttondialogen mit ID
+ if ( pBase->GetType() == WINDOW_BUTTONDIALOG
|| pBase->GetType() == WINDOW_MESSBOX
|| pBase->GetType() == WINDOW_INFOBOX
|| pBase->GetType() == WINDOW_WARNINGBOX
@@ -1006,12 +1006,12 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo
break;
}
- pRet->GenReturn ( RET_WinInfo, aID, (comm_UINT32)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So da� der Text angezeigt wird!
+ pRet->GenReturn ( RET_WinInfo, aID, (comm_UINT32)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // so that text is displayed!
TypeString(pBD->GetPushButton( pBD->GetButtonId(i) )->GetType()).AppendAscii(": ").Append(aName)
.AppendAscii(" ButtonId = ").AppendAscii( aID.GetBuffer() ), sal_False );
}
- return; // ButtonDialog ist hier schon komplett abgehandelt.
+ return;
}
@@ -1063,7 +1063,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo
}
}
- return; // Menu ist hier schon komplett abgehandelt.
+ return;
}
}
}
@@ -1363,16 +1363,16 @@ sal_Bool StatementCommand::DisplayHID()
{
// Return sal_True -> reexecute command
- if ( !bBool2 ) // Wird auf sal_False initialisiert
+ if ( !bBool2 ) // is initialized with sal_False
{
- bBool2 = sal_True; // Wir sind initialisiert.
- GetTTSettings()->pDisplayInstance = this; // Und haben die Macht (Alle anderen beenden sich)
+ bBool2 = sal_True;
+ GetTTSettings()->pDisplayInstance = this; // and have the power (all others quit themselves)
if ( !(nParams & PARAM_UINT32_1) )
{
- if( GetTTSettings()->pDisplayHidWin ) // Nichts ver�ndern
+ if( GetTTSettings()->pDisplayHidWin ) // don't change anything
nLNr1_and_Pointer.nLNr1 = GetTTSettings()->pDisplayHidWin->GetConfig();
- else // Beim ersten Aufruf wollen wir alles richtig einstellen
+ else
nLNr1_and_Pointer.nLNr1 = DH_MODE_KURZNAME | DH_MODE_LANGNAME;
if( ((nParams & PARAM_BOOL_1) && bBool1) )
@@ -1388,7 +1388,7 @@ sal_Bool StatementCommand::DisplayHID()
if ( GetTTSettings()->pDisplayInstance && GetTTSettings()->pDisplayInstance != this )
{
DBG_WARNING("Mehrere DisplayHID am laufen");
- return sal_False; // Noch eine andere Instanz macht das gleiche!
+ return sal_False; // another instance is doing the same!
}
if ( !GetTTSettings()->pDisplayHidWin )
@@ -1493,9 +1493,9 @@ sal_Bool StatementCommand::DisplayHID()
if ( GetTTSettings()->pDisplayHidWin->IsSendData() && GetTTSettings()->Act )
{
if ( !StatementFlow::bSending )
- { // Normalerweise syncronisierung �ber Protokoll. Hier ist das aber asyncron!!!
+ { // usually synchronization over the protocol. But it's asynchronous here!!!
WriteControlData( GetTTSettings()->Act, GetTTSettings()->pDisplayHidWin->GetConfig() );
- new StatementFlow( this, F_EndCommandBlock ); // Kommando zum Senden erzeugen und in que eintragen
+ new StatementFlow( this, F_EndCommandBlock ); // create command for sending and enter it on que
}
}
}
@@ -1508,9 +1508,9 @@ sal_Bool StatementCommand::DisplayHID()
}
}
- if ( pFirst == this ) // Sollte immer so sein, aber besser isses
- if ( pNext ) // Befehle warten auf Ausf�hrung
- { // An Ende neu einsortieren
+ if ( pFirst == this )
+ if ( pNext )
+ {
Advance();
QueStatement( NULL );
}
@@ -1686,11 +1686,11 @@ IMPL_LINK( TranslateWin, DoRestore, PushButton*, EMPTYARG )
sTT_E_NEW.SearchAndReplaceAll( CUniString("\\t"), CUniString("\t") );
if ( StatementList::WinPtrValid( pTranslateWin ) && pTranslateWin->GetText().CompareTo( sTT_E_NEW ) == COMPARE_EQUAL )
- { // Im ersten schritt nur in der UI zur�ck
+ {
pTranslateWin->SetText( sTT_E_OLD );
}
else
- { // Im zweite Schritt auch den eingegebenen Text
+ {
EditTT_E_NEW.SetText( FixedTextTT_FT_OLD.GetText() );
PushButtonTT_PB_RESTORE.Disable();
}
@@ -1796,10 +1796,10 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt )
if ( pTranslateWin )
{
MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), sal_True );
- // alle CRs quoten (NF)
+ // quote all CRs (NF)
String sTT_E_NEW( pTranslateWin->GetText());
sTT_E_NEW.SearchAndReplaceAll( CUniString("\n"), CUniString("\\n") );
- // alle TABSs quoten ()
+ // quote all TABSs ()
sTT_E_NEW.SearchAndReplaceAll( CUniString("\t"), CUniString("\\t") );
FixedTextTT_FT_OLD.SetText( sTT_E_NEW );
@@ -1835,7 +1835,7 @@ public:
FindShortcutErrors::FindShortcutErrors()
: Search( SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN )
{
- SetAction( FDS_ACTION_COLLECT ); // Wir fange immer mit sammeln an, ODER??
+ SetAction( FDS_ACTION_COLLECT );
}
void FindShortcutErrors::SetAction( sal_uInt16 nA )
@@ -1998,7 +1998,7 @@ void TranslateWin::EnableTranslation()
void StatementCommand::Translate()
{
- // Es wurde eine initale UniqueId mitgegeben. Dann nur die dopelten Shortcuts liefern
+ // there's an initial UniqueId so only deliver the doubled shortcuts
if( (nParams & PARAM_STR_1) && nLNr1_and_Pointer.nLNr1 )
{
String aDouble;
@@ -2039,7 +2039,7 @@ void StatementCommand::Translate()
if ( pTranslationWindow->GetType() == WINDOW_BORDERWINDOW && pTranslationWindow->GetWindow( WINDOW_CLIENT ) )
{
Window* pNew = pTranslationWindow->GetWindow( WINDOW_CLIENT );
- // Bei Dockingwindoes das kanze Geraffel von Docking Floating �berspringen
+
while ( IsDialog( pNew ) && !pNew->GetUniqueOrHelpId().getLength() && pNew->GetChildCount() == 1 )
pNew = pNew->GetChild( 0 );
pTranslationWindow = pNew;
@@ -2066,7 +2066,7 @@ void StatementCommand::Translate()
aTranslation += TypeString( pParentDialog->GetType() );
}
else
- aTranslation.AppendAscii( "0;" ); // Zahl + leerer String
+ aTranslation.AppendAscii( "0;" );
aTranslation += ';';
aTranslation += '\"';
@@ -2085,9 +2085,9 @@ void StatementCommand::Translate()
aTranslation += GetTTSettings()->pTranslateWin->GetComment();
aTranslation += '\"';
- // alle CRs quoten (NF)
+ // quote all CRs (NF)
aTranslation.SearchAndReplaceAll( CUniString("\n"), CUniString("\\n") );
- // alle TABSs quoten ()
+ // quote all TABSs ()
aTranslation.SearchAndReplaceAll( CUniString("\t"), CUniString("\\t") );
pRet->GenReturn ( RET_Value, nMethodId, aTranslation );
@@ -2119,8 +2119,8 @@ void StatementCommand::Translate()
}
Window* StatementCommand::GetNextOverlap( Window* pBase )
-{ // Findet irgendwelche Overlap-Fenster, die schlie�bar aussehen
- // Eventuell mu� noch die Auswahl verfeinert werden.
+{ // finds some overlap windows that look closable
+ // maybe the choice must be improved
if ( pBase->GetType() != WINDOW_BORDERWINDOW )
pBase = pBase->GetWindow( WINDOW_OVERLAP );
@@ -2153,13 +2153,13 @@ Window* StatementCommand::GetNextOverlap( Window* pBase )
Window* StatementCommand::GetNextRecoverWin()
{
- // �ber die TopLevelWindows der App iterieren
+
Window* pBase = Application::GetFirstTopLevelWindow();
Window *pControl = NULL;
Window* pMyFirstDocFrame = NULL;
while ( pBase )
{
- // zuerst weitere Fenster auf dem Fenster suchen und schliessen
+
pControl = GetNextOverlap( pBase );
if ( pControl && pControl->GetType() == WINDOW_HELPTEXTWINDOW )
{} // skip it
@@ -2174,8 +2174,8 @@ Window* StatementCommand::GetNextRecoverWin()
return pControl;
}
- // dann das Fenster selbst Schliessen
- // erstes DocWin �berspringen
+ // then close the window itself
+ // skip first DocWin
// Assumption that Doc Windows are Borderwindows and ButtonDialog and such are not
if ( pBase->IsVisible() && !IsFirstDocFrame( pBase ) && pBase->GetType() != WINDOW_BORDERWINDOW && !IsIMEWin( pBase ) )
return pBase;
@@ -2250,7 +2250,7 @@ sal_Bool StatementCommand::Execute()
nLNr1_and_Pointer.nLNr1 = Time().GetTime() + nNr1/10;
bBool1 = sal_True;
}
- if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) ) // Aktuelle Zeit kleiner Endzeit
+ if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) )
return sal_False;
break;
case RC_DisplayHid:
@@ -2261,13 +2261,12 @@ sal_Bool StatementCommand::Execute()
{
if ( !bBool1 )
{
- nRetryCount = 150; // das sollte reichen.
- bBool1 = sal_True; // Nur beim ersten mal!
- nNr1 = 1; // Welcher Button ist dran?
- nLNr1_and_Pointer.pWindow = 0; // Speichern des AppWin
- aString1 = UniString(); // Liste der geschlossenen Fenster
+ nRetryCount = 150;
+ bBool1 = sal_True;
+ nNr1 = 1;
+ nLNr1_and_Pointer.pWindow = 0; // save the AppWin
+ aString1 = UniString(); // list of closed windows
- // So da� nacher auch wieder alles auf Default steht
nUseBindings = 0;
bCatchGPF = sal_True;
bUsePostEvents = sal_True;
@@ -2298,7 +2297,7 @@ sal_Bool StatementCommand::Execute()
short nRT = ImpGetRType( pControl );
if ( nRT == C_TabControl && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG )
- { // Bei Tabcontrol den zugeh�rigen Tabdialog nehmen
+ { // take belonging tab if tabcontrol
pControl = pControl->GET_REAL_PARENT();
nRT = ImpGetRType( pControl );
}
@@ -2322,7 +2321,7 @@ sal_Bool StatementCommand::Execute()
case C_ButtonDialog:
{
ButtonDialog* pBD = (ButtonDialog*)pControl;
- // nNr1 >= 10 bedeutet (Custom)-Buttons durchgehen
+ // nNr1 >= 10 means go through (Custom)-Buttons
if ( nNr1 >= 10+pBD->GetButtonCount() ) nNr1 = 1;
switch( nNr1 )
{
@@ -2333,7 +2332,7 @@ sal_Bool StatementCommand::Execute()
SET_WINP_CLOSING(pControl);
pBD->EndDialog(RET_OK);
}
- nNr1 = 10; // Nochmal alle Buttons der Reihe nach
+ nNr1 = 10;
break;
case 4:
if ( pBD->GetPushButton( BUTTONID_CANCEL ) )
@@ -2398,9 +2397,9 @@ sal_Bool StatementCommand::Execute()
SET_WINP_CLOSING(pControl);
((DockingWindow*)pControl)->Close();
- // Eigentlich nur bei TaskWindows! Hoffen wir mal, da� keine anderen DockingWindows dazwischen hauen.
+ // actually only for TaskWindows! let's hope there are no DockingWindows messing it up
if ( nLNr1_and_Pointer.pWindow != pControl )
- nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en
+ nNr1 = 1; // to try buttons during closing
nLNr1_and_Pointer.pWindow = pControl;
return sal_False;
@@ -2427,9 +2426,9 @@ sal_Bool StatementCommand::Execute()
pMenu->GetCloserHdl().Call( pMenu );
- // nur bei TaskWindows!
+ // only for TaskWindows!
if ( nLNr1_and_Pointer.pWindow != pControl )
- nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en
+ nNr1 = 1;
nLNr1_and_Pointer.pWindow = pControl;
return sal_False;
@@ -2443,9 +2442,9 @@ sal_Bool StatementCommand::Execute()
SET_WINP_CLOSING(pControl);
((SystemWindow*)pControl)->Close();
- // Eigentlich nur bei TaskWindows!
+ // actually only for TaskWindows!
if ( nLNr1_and_Pointer.pWindow != pControl )
- nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en
+ nNr1 = 1;
nLNr1_and_Pointer.pWindow = pControl;
return sal_False;
@@ -2460,7 +2459,7 @@ sal_Bool StatementCommand::Execute()
nLNr1_and_Pointer.nLNr1 = Time().GetTime() + 100; // 100 = 1 Second
bBool2 = sal_True;
}
- if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) ) // Aktuelle Zeit kleiner Endzeit
+ if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) )
return sal_False;
else
pRet->GenReturn ( RET_Value, nMethodId, aString1);
@@ -2480,7 +2479,7 @@ sal_Bool StatementCommand::Execute()
pRet->GenReturn ( RET_Value, nMethodId, comm_UINT16(CONST_WSFinished) );
else
{
- if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) ) // Aktuelle Zeit kleiner Endzeit
+ if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) )
return sal_False;
pRet->GenReturn ( RET_Value, nMethodId, comm_UINT16(CONST_WSTimeout) );
}
@@ -2494,12 +2493,12 @@ sal_Bool StatementCommand::Execute()
switch ( nMethodId )
{
- case RC_AppDelay: // Diese Befehle werden anderswo behandelt
+ case RC_AppDelay: // these commands are handled elsewhere
case RC_DisplayHid:
case RC_ResetApplication:
case RC_WaitSlot:
- case RC_AppAbort: // Sofortiges L�schen aller Befehle
+ case RC_AppAbort: // delete all commands immediately
break;
case RC_Assert:
{
@@ -2582,12 +2581,12 @@ sal_Bool StatementCommand::Execute()
nUseBindings = 0;
break;
case RC_Profile:
- // Bei folgenden Parametern passiert folgendes:
- // ein boolean=false Alles Profiling stoppen (Ergebnisse liefern)
- // ein boolean=true, 1-4 ints Einteilung der Zeiten in K�stchen
- // kein! boolean keine ints loggen jeden Befehls
- // kein! boolean 1 int loggen alle int Millisekunden
- // ein String wird in das Logfile �bernommen(sonst passiert nichts)
+ // list of what happens when parameters have these values:
+ // one boolean=false stop all profiling (give results)
+ // one boolean=true, 1-4 ints put the times into boxes
+ // no! boolean no ints logging every command
+ // no! boolean 1 int logging every int milliseconds
+ // one String is put into the logfile (nothing else happens)
if( !(nParams & PARAM_BOOL_1) || bBool1 )
{
if ( !pProfiler )
@@ -2604,23 +2603,22 @@ sal_Bool StatementCommand::Execute()
}
pProfiler->StartAutoProfiling( nNr1 );
- // Der Header ist abh�ngig vom Modus
+ // the header is not dependent from the mode
pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() );
}
else if ( nParams & PARAM_UINT16_1 )
- { // Partitioning initialisieren: Profile true [,nNr][,nNr][,nNr][,nNr]
+ { // initialize Partitioning: Profile true [,nNr][,nNr][,nNr][,nNr]
comm_UINT32 nAnzahl=0;
if ( nParams & PARAM_UINT16_1 ) { nAnzahl++; };
if ( nParams & PARAM_UINT16_2 ) { nAnzahl++; };
if ( nParams & PARAM_UINT16_3 ) { nAnzahl++; };
if ( nParams & PARAM_UINT16_4 ) { nAnzahl++; };
- // Hier werden die Parameter ans Testtool zur�ck �bertragen.
- // Das ist zwar etwas eigenartig, aber ansonsten m�sste man im Testtool
- // die einfache Struktur der Remotebefehle aufbrechen.
+ // Here are the parameters transferred back to the testtool.
+ // That's a little strange but you'd have to give up the easy
+ // structure of remote commands in the testtool otherwise.
pRet->GenReturn( RET_ProfileInfo, S_ProfileReset, nAnzahl );
- // Und die einzelnen Grenzen
if ( nParams & PARAM_UINT16_1 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder1, (comm_UINT32)nNr1 ); };
if ( nParams & PARAM_UINT16_2 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder2, (comm_UINT32)nNr2 ); };
if ( nParams & PARAM_UINT16_3 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder3, (comm_UINT32)nNr3 ); };
@@ -2628,13 +2626,13 @@ sal_Bool StatementCommand::Execute()
pProfiler->StartPartitioning();
}
- else if( nParams == PARAM_STR_1 ) // Genau ein String!
- { // Nur einen String ins Profiling aufnehmen
+ else if( nParams == PARAM_STR_1 )
+ {
aString1 += '\n';
pRet->GenReturn( RET_ProfileInfo, 0, aString1 );
}
else
- { // Normales Profiling je Kommando: profile
+ {
if ( pProfiler->IsAutoProfiling() )
{
pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
@@ -2642,11 +2640,11 @@ sal_Bool StatementCommand::Execute()
}
pProfiler->StartProfilingPerCommand();
- // Der Header ist abh�ngig vom Modus
+ // header is dependent from mode
pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() );
}
}
- else // Profiling wieder ausschalten: Profile false
+ else
if ( pProfiler )
{
if ( pProfiler->IsProfilingPerCommand() )
@@ -2931,7 +2929,7 @@ sal_Bool StatementCommand::Execute()
if ( (nParams & PARAM_STR_1) )
{
delete pDir;
- pDir = NULL; // wg. Sonderbehandlung Sb_ATTR_VOLUME
+ pDir = NULL; // because of special treatment Sb_ATTR_VOLUME
DirEntry aEntry( aString1 );
FileStat aStat( aEntry );
if(!aStat.GetError() && (aStat.GetKind() & FSYS_KIND_FILE))
@@ -2948,13 +2946,12 @@ sal_Bool StatementCommand::Execute()
else
nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY;
- // Nur diese Bitmaske ist unter Windows erlaubt
- // Sb_ATTR_VOLUME wird getrennt gehandelt
+ // only this bitmask is allowed by ms windows
+ // Sb_ATTR_VOLUME is handled seperately
if( nDirFlags & Sb_ATTR_VOLUME )
aPath = aEntry.GetVolume();
else
{
- // Die richtige Auswahl treffen
sal_uInt16 nMode = FSYS_KIND_FILE;
if( nFlags & Sb_ATTR_DIRECTORY )
nMode |= FSYS_KIND_DIR;
@@ -3417,7 +3414,7 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdTyp
}
sal_Bool IsDialog(Window *pWin)
-{ // Alles was von SystemWindow abgeleitet ist
+{ // everything derived from SystemWindow
if ( !pWin )
return sal_False;
@@ -3441,7 +3438,7 @@ sal_Bool IsDialog(Window *pWin)
case WINDOW_PRINTDIALOG:
case WINDOW_PRINTERSETUPDIALOG:
-// ab hier nicht ansprechbar (da nicht implementiert)
+// from here on not callable anymore (because not implemented)
case WINDOW_SYSWINDOW:
case WINDOW_SYSTEMDIALOG:
case WINDOW_COLORDIALOG:
@@ -3466,7 +3463,7 @@ sal_Bool IsAccessable(Window *pWin)
-// neue Hilfsfunktion
+// new help function
static Window*ImpGetButton( Window *pBase, WinBits nMask, WinBits nWinBits )
{
sal_uInt16 n = pBase->GetChildCount();
@@ -3613,8 +3610,7 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin )
aDiff *= 1000;
aDiff /= nSteps;
- StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack
- // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird.
+ StatementList::bExecuting = sal_True;
for ( ; nSteps ; nSteps-- )
{
@@ -3626,7 +3622,7 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin )
SafeReschedule();
}
pControl->SetPointerPosPixel(aZiel);
- StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack
+ StatementList::bExecuting = sal_False;
}
@@ -3640,13 +3636,13 @@ sal_Bool StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow )
Timer aTimer;
aTimer.SetTimeout( nTimeWait );
aTimer.Start();
- StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack
- // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird.
+ StatementList::bExecuting = sal_True;
+
while ( aTimer.IsActive() )
{
SafeReschedule( sal_True );
}
- StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack
+ StatementList::bExecuting = sal_False;
if ( !WinPtrValid(pTestWindow ) )
{
ReportError( aUId, GEN_RES_STR1( S_WINDOW_DISAPPEARED, MethodString( nMethodId ) ) );
@@ -3658,7 +3654,7 @@ sal_Bool StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow )
sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
{
- if( pControl ) // Also auch bei Disabled nicht jedoch bei Invisible
+ if( pControl ) // therefore also if disabled but not if invisible
{
switch( nMethodId )
{
@@ -3670,11 +3666,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
break;
case M_GetPosX:
if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows
+ pControl = pControl->GET_REAL_PARENT(); // special treatment for FloatingWindows
if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge
+ pControl = pControl->GET_REAL_PARENT(); // special treatment for TabDialoge
if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border
+ pControl = pControl->GET_REAL_PARENT(); // special treatment for Border
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3689,11 +3685,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
break;
case M_GetPosY:
if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border
+ pControl = pControl->GET_REAL_PARENT();
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3708,11 +3704,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
break;
case M_GetSizeX:
if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border
+ pControl = pControl->GET_REAL_PARENT();
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3720,11 +3716,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
break;
case M_GetSizeY:
if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border
+ pControl = pControl->GET_REAL_PARENT();
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3733,11 +3729,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
case M_SnapShot:
{
if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge
+ pControl = pControl->GET_REAL_PARENT();
if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW )
- pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border
+ pControl = pControl->GET_REAL_PARENT();
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3762,7 +3758,7 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
nNr4 = std::min((sal_uInt16)(pControl->GetSizePixel().Height() + 2*(sal_uInt16)aStart.Y()),nNr4);
}
if( nParams & PARAM_UINT16_4 )
- { // Zuschneiden
+ { // cutting
Point aPt(-nNr1,-nNr2);
Size aSz(nNr3,nNr4);
VirtualDevice aVDev( *pControl );
@@ -3808,9 +3804,9 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
sal_Bool StatementControl::HandleCommonMethods( Window *pControl )
{
- switch( nMethodId ) // Diese k�nnen an jedem Window ausgef�hrt werden
+ switch( nMethodId ) // can be done with every window
{
- case M_Exists: // Oben schon Behandelt. Unterdr�ckt hier nur Fehler
+ case M_Exists: // already handled above, prevents errors only here
case M_NotExists:
case M_IsEnabled:
case M_IsVisible:
@@ -3831,12 +3827,12 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl )
break;
case M_TypeKeys:
{
- if( !(nParams & PARAM_UINT16_1) ) // Anzahl wiederholungen
+ if( !(nParams & PARAM_UINT16_1) ) // number of repititions
nNr1 = 1;
if( !(nParams & PARAM_BOOL_1) ) // Follow Focus
- bBool1 = sal_False; // so bleibt das bisherige Verhalten
+ bBool1 = sal_False; // that way behaviour stays like before
- if ( !bBool1 ) // Altes Verhalten
+ if ( !bBool1 ) // old behaviour
pControl->GrabFocus();
else // If focus is not inside given control we grab it once.
{
@@ -3848,7 +3844,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl )
// maybe this can get removed since we are using GetPreferredKeyInputWindow()
if ( pControl->GetType() == WINDOW_COMBOBOX )
- { // Bei COMBOBOX an das Edit direkt liefern
+ {
Window *pTemp = NULL;
for ( sal_uInt16 i = 0 ; i < pControl->GetChildCount() && !pTemp ; i++ )
if ( pControl->GetChild( i )->GetType() == WINDOW_EDIT )
@@ -3867,12 +3863,12 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl )
if ( !pFocus || !pControl->IsWindowOrChild( pFocus, sal_True ) )
pControl->GrabFocus();
}
- if ( bBool1 ) // Jedesmal das FocusWindow finden
+ if ( bBool1 ) // finde FocusWindow every time
{
Window *pFocus = GetpApp()->GetFocusWindow();
if ( pFocus && pControl->IsWindowOrChild( pFocus, sal_True ) )
pDeliverHere = pFocus;
- else // sonst fallback auf das Basisfenster
+ else // fallback to base window
pDeliverHere = pControl;
}
pDeliverHere = pDeliverHere->GetPreferredKeyInputWindow();
@@ -3943,7 +3939,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl )
aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_NUM + aCh-'0', 0));
else if ( aPrintableMisc.Search(aCh) != STRING_NOTFOUND )
aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_MISC + (sal_uInt16)aPrintableMisc.Search(aCh), 0));
- else // Sollte eigentlich nicht auftreten
+ else // Should not happen actually
aEvent = KeyEvent(aCh, KeyCode());
}
ImplKeyInput( pDeliverHere, aEvent );
@@ -4164,7 +4160,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl )
break;
}
- pControl = pTemp; // So da� wir unten ohne Fehler durchkommen
+ pControl = pTemp;
SplitWindow *pSW = (SplitWindow*) pTemp;
switch( nMethodId )
@@ -4374,7 +4370,7 @@ sal_Bool StatementControl::Execute()
if ( pControl && pControl->GetType() == WINDOW_TOOLBOX )
{
if ( !aUId.equals( pControl->GetUniqueOrHelpId() ) )
- { // Also wenn wir irgendwas auf einer Toolbox gefunden haben
+ {
switch ( nMethodId )
{
case M_Click:
@@ -4383,7 +4379,7 @@ sal_Bool StatementControl::Execute()
case M_GetState:
break;
case M_IsEnabled:
- nMethodId = _M_IsEnabled; // Umlabeln, da die Behandlung essentiell anders ist!
+ nMethodId = _M_IsEnabled; // change label because treatment is essentially different
break;
default:
pControl = NULL;
@@ -4398,25 +4394,25 @@ sal_Bool StatementControl::Execute()
case M_NotExists:
Time aT;
sal_uInt16 aSeconds = aT.GetMin()*60+aT.GetSec();
- if ( !bBool2 ) // wurde im Konstruktor auf sal_False gesetzt
+ if ( !bBool2 ) // has been set to sal_False in the constructor
{
bBool2 = sal_True;
nNr2 = aSeconds;
if( !(nParams & PARAM_UINT16_1) )
- nNr1 = 0; // defaultm��ig sofort zur�ck
+ nNr1 = 0;
}
- if ( aSeconds < nNr2 ) // Falls die Stunde umgesprungen ist
+ if ( aSeconds < nNr2 )
aSeconds += 60*60;
if ( !pControl || !pControl->IsVisible() )
pControl = NULL;
if ( ((nMethodId == M_Exists) && pControl) ||
((nMethodId == M_NotExists) && !pControl) )
- { // Wenn Bedingung erf�llt
+ {
pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_True );
}
else
- if ( aSeconds <= nNr2 + nNr1 ) // Zeit ist noch nicht abgelaufen
+ if ( aSeconds <= nNr2 + nNr1 )
return sal_False;
else
pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_False );
@@ -4429,7 +4425,7 @@ sal_Bool StatementControl::Execute()
short nRT = 0;
- if( pControl ) // Das Fenster Existiert irgendwo, kann aber auch hidden sein!
+ if( pControl ) // the window does exist somewhere but may be hidden
{
nRT = ImpGetRType( pControl );
#if OSL_DEBUG_LEVEL > 1
@@ -4479,7 +4475,7 @@ sal_Bool StatementControl::Execute()
// TODO: handle GetFocus for all Methods and Windows like this (remove part below)
// See for impact of changed focus for HandleVisibleControls() (taking Snapshots might be different, possible exclude those methods)
if (( (nRT == C_TreeListBox) && !bBool2 )
- && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht
+ && nMethodId != M_TypeKeys
&& nMethodId != M_MouseDown
&& nMethodId != M_MouseUp
&& nMethodId != M_MouseMove )
@@ -4520,7 +4516,7 @@ sal_Bool StatementControl::Execute()
|| nRT == C_TreeListBox
)
|| nMethodId == M_OpenContextMenu )
- && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht
+ && nMethodId != M_TypeKeys
&& nMethodId != M_MouseDown
&& nMethodId != M_MouseUp
&& nMethodId != M_MouseMove )
@@ -4564,7 +4560,7 @@ sal_Bool StatementControl::Execute()
pRet->GenReturn ( RET_Value, aUId, Id2Str( ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetUniqueOrHelpId() ) );
break;
case M_SetPage :
- { // Wegen lokaler Variablen
+ { // because of local variables
TabControl *pTControl = ((TabControl*)pControl);
sal_uInt16 nActive = pTControl->GetCurPageId();
sal_uInt16 i,anz;
@@ -4590,7 +4586,8 @@ sal_Bool StatementControl::Execute()
i++;
if ( i >= pTControl->GetPageCount() )
i = 0;
- if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) ) // 3 Mal aufrufen
+ if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) )
+
break;
}
if ( !aID.equals( aWantedID ) )
@@ -4785,7 +4782,7 @@ sal_Bool StatementControl::Execute()
if ( bUnselectBeforeSelect )
pLB->SetNoSelection();
pLB->SelectEntryPos( nPos, bBool1 );
- if ( pLB->IsEntryPosSelected( nPos ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL
+ if ( pLB->IsEntryPosSelected( nPos ) ? !bBool1 : bBool1 ) // XOR in with BOOL
ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) );
}
}
@@ -4798,7 +4795,7 @@ sal_Bool StatementControl::Execute()
if ( bUnselectBeforeSelect )
pLB->SetNoSelection();
pLB->SelectEntryPos( nNr1-1, bBool1 );
- if ( pLB->IsEntryPosSelected( nNr1-1 ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL
+ if ( pLB->IsEntryPosSelected( nNr1-1 ) ? !bBool1 : bBool1 ) // XOR in with BOOL
ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), UniString::CreateFromInt32( nNr1 ) ) );
}
}
@@ -5042,7 +5039,7 @@ sal_Bool StatementControl::Execute()
if ( !aUId.equals( pTB->GetUniqueOrHelpId() ) ) // So we found a Button on the ToolBox
{
if ( (nParams == PARAM_NONE) || (nParams == PARAM_UINT16_1) )
- { // Wir f�lschen einen Parameter
+ { // we fake a Parameter
nParams |= PARAM_STR_1;
aString1 = Id2Str( aUId );
}
@@ -5113,7 +5110,7 @@ sal_Bool StatementControl::Execute()
case M_Click :
{
FIND_ITEM;
- if ( bItemFound ) // FIND_ITEM Erfolgreich
+ if ( bItemFound )
{
Rectangle aRect = pTB->GetItemRect(pTB->GetItemId(nItemPos));
if ( aRect.IsEmpty() )
@@ -5141,7 +5138,7 @@ sal_Bool StatementControl::Execute()
case M_TearOff :
{
FIND_ITEM;
- if ( bItemFound ) // FIND_ITEM Erfolgreich
+ if ( bItemFound )
{
Rectangle aRect = pTB->GetItemPosDropDownRect( nItemPos );
AnimateMouse( pControl, aRect.Center() );
@@ -5150,13 +5147,13 @@ sal_Bool StatementControl::Execute()
Window *pWin = NULL;
// Wait for the window to open.
- StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack
- { // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird.
+ StatementList::bExecuting = sal_True;
+ {
Time aDelay;
while ( !pWin && ( (pWin = GetPopupFloatingWin()) == NULL ) && ( Time() - aDelay ).GetSec() < 15 )
SafeReschedule();
}
- StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack
+ StatementList::bExecuting = sal_False;
if ( pWin && pWin->GetType() == WINDOW_FLOATINGWINDOW )
{
@@ -5176,7 +5173,7 @@ sal_Bool StatementControl::Execute()
case M_OpenMenu :
{
FIND_ITEM;
- if ( bItemFound ) // FIND_ITEM Erfolgreich
+ if ( bItemFound )
{
Rectangle aRect = pTB->GetItemPosDropDownRect( nItemPos );
AnimateMouse( pControl, aRect.Center() );
@@ -5184,7 +5181,7 @@ sal_Bool StatementControl::Execute()
ImplMouseButtonDown( pTB, aMEvnt);
ImplMouseButtonUp( pTB, aMEvnt);
- // Das Fenster ist offen.
+ // window is opened
aSubMenuId1 = 0;
aSubMenuId2 = 0;
aSubMenuId3 = 0;
@@ -5195,7 +5192,7 @@ sal_Bool StatementControl::Execute()
case _M_IsEnabled:
{
FIND_ITEM;
- if ( bItemFound ) // FIND_ITEM Erfolgreich
+ if ( bItemFound )
{
pRet->GenReturn ( RET_Value, aUId, pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) );
}
@@ -5204,7 +5201,7 @@ sal_Bool StatementControl::Execute()
case M_GetState :
{
FIND_ITEM;
- if ( bItemFound ) // FIND_ITEM Erfolgreich
+ if ( bItemFound )
{
if ( ValueOK( aUId, CUniString("GetState"), nNr1, 4 ) )
switch (nNr1)
@@ -5257,7 +5254,7 @@ sal_Bool StatementControl::Execute()
case M_IsMax:
case M_Minimize:
case M_Maximize:
- case M_Help: // Alles was unten weiterbehandelt werden soll
+ case M_Help: // everything that shall be handled below
goto DockingWin;
default:
ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "ToolBox" ) );
@@ -5971,7 +5968,7 @@ sal_Bool StatementControl::Execute()
else
ReportError( aUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_DOCKING_MODE, MethodString( nMethodId ) ) );
break;
- case M_Help: // Alles was unten weiterbehandelt werden soll
+ case M_Help:
goto MoreDialog;
default:
@@ -6019,7 +6016,7 @@ sal_Bool StatementControl::Execute()
SET_WINP_CLOSING(pControl);
((FloatingWindow*)pControl)->Close();
break;
- case M_Help: // Alles was unten weiterbehandelt werden soll
+ case M_Help:
case M_Move:
goto MoreDialog;
default:
@@ -6122,7 +6119,7 @@ sal_Bool StatementControl::Execute()
((WorkWindow*)pControl)->Maximize( sal_False );
((WorkWindow*)pControl)->Restore();
break;
- case M_Help: // Alles was unten weiterbehandelt werden soll
+ case M_Help:
goto MoreDialog;
default:
ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "WorkWindow" ) );
diff --git a/automation/source/server/statemnt.hxx b/automation/source/server/statemnt.hxx
index d278ae2a7f09..af79ec97b9f0 100644
--- a/automation/source/server/statemnt.hxx
+++ b/automation/source/server/statemnt.hxx
@@ -27,9 +27,9 @@
************************************************************************/
/***************************************************************************
**
-** Von StatementList werden alle Statements abgeleitet.
-** Es gibt immer nur eine Statementliste, die verpointert ist.
-** jederzeit kann das der Anfang der Kette abgefragt werden.
+** All statements are derived from StatementList.
+** There is never more than one statementlist with a pointer on it.
+** The beginning of the chain can always be requested.
**
***************************************************************************/
#ifndef _STATEMNT_HXX
@@ -106,8 +106,8 @@ public:
sal_Bool HasSearchFlag( SearchFlags aQueryFlag ) { return (nmSearchFlags & aQueryFlag) == aQueryFlag; }
};
-sal_Bool IsDialog(Window *pWin); // Ist *pWin von SystemWindow abgeleitet (Kann es Active sein)
-sal_Bool IsAccessable(Window *pWin); // Ist *pWin Zugreifbar (�ber IsEnabled und Parents gepr�ft)
+sal_Bool IsDialog(Window *pWin); // is *pWin derived from SystemWindow? (can it be active?)
+sal_Bool IsAccessable(Window *pWin); // is *pWin accessible (tested with IsEnabled and parents)
class SafePointer
@@ -163,12 +163,12 @@ protected:
static sal_Bool bIsInReschedule;
static sal_uInt16 nModalCount;
- static Window *pLastFocusWindow; // Wenn dieses sich �ndert wird Safe Reschedule abgebrochen
- static sal_Bool bWasDragManager; // Wenn dieses sich �ndert wird Safe Reschedule abgebrochen
- static sal_Bool bWasPopupMenu; // Wenn dieses sich �ndert wird Safe Reschedule abgebrochen
+ static Window *pLastFocusWindow; // Safe Reschedule will be cancelled if this changes
+ static sal_Bool bWasDragManager; // Safe Reschedule will be cancelled if this changes
+ static sal_Bool bWasPopupMenu; // Safe Reschedule will be cancelled if this changes
static sal_Bool bBasicWasRunning;
- static sal_uInt16 nMinTypeKeysDelay; /// Verz�gerung der einzelnen Anschl�ge f�r TypeKeys
+ static sal_uInt16 nMinTypeKeysDelay;
static sal_uInt16 nMaxTypeKeysDelay;
static sal_Bool bDoTypeKeysDelay;
@@ -178,7 +178,7 @@ protected:
public:
static sal_Bool IsInReschedule() { return bIsInReschedule; }
- void SafeReschedule( sal_Bool bYield = sal_False ) // Setzt Flag, so da� nicht schon der n�chste Befehl ausgef�hrt wird
+ void SafeReschedule( sal_Bool bYield = sal_False ) // sets flag so that the next command is not executed yet
{
nModalCount = Application::GetModalModeCount();
bIsInReschedule = sal_True;
@@ -200,7 +200,7 @@ public:
nModalCount = 0;
}
static sal_Bool MaybeResetSafeReschedule()
- { // Implementierung mu� hier zwar nicht sein, ist aber �bersichtlicher so
+ {
if ( !bIsInReschedule )
return sal_False;
@@ -216,7 +216,7 @@ public:
else
return sal_False;
}
- static void NormalReschedule() // Setzt das flag nicht
+ static void NormalReschedule() // does not set the flag
{
GetpApp()->Reschedule();
}
@@ -249,13 +249,12 @@ public:
void Advance();
virtual sal_Bool Execute() = 0;
/***************************************************************************
-** Bestimmt erst den n�chsten Befehl, setzt Current
-** und f�hrt dann aus.
-** Returnwert gibt an, ob Befehl nochmal ausgef�hrt
-** werden soll. Dann mu� auch der UserEvent verlassen werden, um der Applikation
-** normales Arbeiten zu erm�glichen (Dialog schliessen)
-** sal_True bedeutet, dass alles klar gegangen ist
-** sal_False bedeutet nochmal Bitte
+** Gets the next command first, sets current and executes then.
+** Return value tells whether the command shall be executed again.
+** Then the UserEvent must be left to allow the application for
+** normal work (close dialog).
+** sal_True means that everything's OK
+** sal_False means again please
***************************************************************************/
void ReportError(String aMessage);
@@ -277,16 +276,16 @@ public:
static RetStream *pRet;
static sal_Bool IsError;
static sal_Bool bDying;
- static sal_Bool bExecuting; // Gesetzt, wenn ein Befehl rescheduled ohne einen neuen Befehl zu erlauben
- sal_Bool bWasExecuting; // Wurde bei einem MaybeResetSafeReschedule resettet, so wird der Zustand danach wiederhergestellt
- static sal_uInt16 aSubMenuId1; // Untermen�s bei PopupMenus
- static sal_uInt16 aSubMenuId2; // erstmal 2-Stufig
+ static sal_Bool bExecuting; // is set when a command reschedules without allowing a new command
+ sal_Bool bWasExecuting; // if it has been resetted during a MaybeResetSafeReschedule, the same condition is restored after
+ static sal_uInt16 aSubMenuId1; // submenus in PopUpMenus
+ static sal_uInt16 aSubMenuId2; // 2 levels at first
static sal_uInt16 aSubMenuId3; // and now even 3 levels #i31512#
static SystemWindow *pMenuWindow; // when using MenuBar as base for MenuCommands
- static TTProperties *pTTProperties; // Hier stehen die SlotIDs aus dem SFX drin
+ static TTProperties *pTTProperties; // here are the SlotIDs from the SFX
- sal_Bool CheckWindowWait(); //True heisst, dass Window noch existiert
- //False -> Window weg;
+ sal_Bool CheckWindowWait(); // true means that the window still exists,
+ // false that it does not
static void SetFirstDocFrame( Window* pWin );
static Window* GetFirstDocFrame();
static sal_Bool IsFirstDocFrame( Window* pWin );
@@ -305,7 +304,7 @@ public:
#endif
};
-class StatementSlot : public StatementList //Slots aufrufen
+class StatementSlot : public StatementList // call slots
{
protected:
sal_uInt16 nAnzahl;
@@ -324,7 +323,7 @@ public:
virtual sal_Bool Execute();
};
-class StatementUnoSlot : public StatementSlot //Uno Slots aufrufen
+class StatementUnoSlot : public StatementSlot // call uno slots
{
public:
StatementUnoSlot(SCmdStream *pIn);
@@ -336,7 +335,7 @@ union munge
Window *pWindow;
};
-class StatementCommand : public StatementList // Befehl ausf�hren (wintree, resetaplication ...)
+class StatementCommand : public StatementList // execute command (wintree, resetaplication ...)
{
friend class ImplRemoteControl;
protected:
@@ -397,7 +396,7 @@ public:
};
-class StatementFlow : public StatementList // Kommunikation mit Sequence
+class StatementFlow : public StatementList // communication with sequence
{
sal_uInt16 nArt;
@@ -415,8 +414,8 @@ public:
static CommunicationLink *pCommLink;
static sal_Bool bSending;
- static sal_Bool bUseIPC; // Soll zur r�ckmeldung IPC verwendet werden?
- static ImplRemoteControl *pRemoteControl; // Static f�r 2. Constructor
+ static sal_Bool bUseIPC;
+ static ImplRemoteControl *pRemoteControl; // static for second constructor
private:
void SendViaSocket();
diff --git a/automation/source/simplecm/packethandler.cxx b/automation/source/simplecm/packethandler.cxx
index aac58043b326..d6ba5b369fa0 100644
--- a/automation/source/simplecm/packethandler.cxx
+++ b/automation/source/simplecm/packethandler.cxx
@@ -99,7 +99,7 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
if ( bWasError )
return sal_False;
- if ( 0xFFFFFFFF == nBytes ) // Expliziter Request f�r dieses Datenpaket auf MultiChannel umzuschalten
+ if ( 0xFFFFFFFF == nBytes ) // explicit request for this data package to switch to MultiChannel
{
READ_SOCKET( &nBytes, sizeof(nBytes) )
if ( bWasError )
@@ -114,17 +114,14 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
comm_UINT32 nReadSoFar = 0;
comm_UINT32 nHeaderReadSoFar = 0;
- // Pr�fbyte f�r L�ngenangabe
unsigned char nLenCheck = 0;
READ_SOCKET_LEN( &nLenCheck, 1, nReadSoFar );
- // Stimmt das Pr�fbyte?
bWasError |= nLenCheck != CalcCheckByte( nBytes );
comm_UINT16 nHeaderBytes;
READ_SOCKET_LEN( &nHeaderBytes, 2, nReadSoFar );
nHeaderBytes = NETWORD( nHeaderBytes );
- // reicht der Header �ber das Ende hinaus?
bWasError |= !(nBytes >= nReadSoFar + nHeaderBytes);
READ_SOCKET_LEN( &nReceiveHeaderType, 2, nHeaderReadSoFar );
@@ -153,7 +150,7 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
if ( bWasError )
return sal_False;
- /// L�ngen anpassen und ggf restheader �berlesen.
+
while ( nHeaderBytes > nHeaderReadSoFar )
{
unsigned char nDummy;
@@ -211,13 +208,13 @@ comm_BOOL PacketHandler::TransferData( const void* pData, comm_UINT32 nLen, CMPr
#ifndef FORCE_MULTI_CHANNEL_HEADERS
if ( bMultiChannel )
#endif
- nBuffer += 1+2+2+2; // f�r einen CH_SimpleMultiChannel
+ nBuffer += 1+2+2+2; // for a CH_SimpleMultiChannel
#ifdef FORCE_MULTI_CHANNEL_HEADERS
if ( !bMultiChannel )
{
comm_UINT32 n32;
- n32 = 0xffffffff; // Umschalten auf MultiChannel
+ n32 = 0xffffffff; // switch to MultiChannel
n32 = NETDWORD( n32 );
WRITE_SOCKET( &n32, 4 );
}
@@ -238,11 +235,11 @@ comm_BOOL PacketHandler::TransferData( const void* pData, comm_UINT32 nLen, CMPr
c = CalcCheckByte( nBuffer );
WRITE_SOCKET( &c, 1 );
- n16 = 4; // L�nge des Headers f�r einen CH_SimpleMultiChannel
+ n16 = 4; // header length for a CH_SimpleMultiChannel
n16 = NETWORD( n16 );
WRITE_SOCKET( &n16, 2 );
- n16 = CH_SimpleMultiChannel; // Typ des Headers
+ n16 = CH_SimpleMultiChannel; // header type
n16 = NETWORD( n16 );
WRITE_SOCKET( &n16, 2 );
@@ -260,24 +257,24 @@ comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void
comm_UINT32 nBuffer = 0;
-// if ( pMyManager->IsMultiChannel() ) Wir senden immer FFFFFFFF vorweg -> immer MultiChannel (Oder GPF bei �lteren)
- nBuffer += 1+2+2; // f�r einen CH_Handshake
+// if ( pMyManager->IsMultiChannel() ) we always send FFFFFFFF before -> always MultiChannel (or GPF for older ones)
+ nBuffer += 1+2+2; // for a CH_Handshake
- nBuffer += 2; // f�r den Typ des Handshakes
+ nBuffer += 2; // for the Handshake's type
switch ( aHandshakeType )
{
case CH_REQUEST_HandshakeAlive:
- nBuffer += 0; // Keine extra Daten
+ nBuffer += 0; // no extra data
break;
case CH_RESPONSE_HandshakeAlive:
- nBuffer += 0; // Keine extra Daten
+ nBuffer += 0; // no extra data
break;
case CH_REQUEST_ShutdownLink:
- nBuffer += 0; // Keine extra Daten
+ nBuffer += 0; // no extra data
break;
case CH_ShutdownLink:
- nBuffer += 0; // Keine extra Daten
+ nBuffer += 0; // no extra data
break;
case CH_SUPPORT_OPTIONS:
nBuffer += 2 ; // one word extradata for options
@@ -293,7 +290,7 @@ comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void
nBuffer += nLen; // Extra data in Buffer
comm_UINT32 n32;
- n32 = 0xffffffff; // Umschalten auf MultiChannel
+ n32 = 0xffffffff; // switch to MultiChannel
n32 = NETDWORD( n32 );
WRITE_SOCKET( &n32, 4 );
@@ -307,15 +304,15 @@ comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void
c = CalcCheckByte( nBuffer );
WRITE_SOCKET( &c, 1 );
- n16 = 2; // L�nge des Headers f�r einen CH_Handshake
+ n16 = 2; // header's length for a CH_Handshake
n16 = NETWORD( n16 );
WRITE_SOCKET( &n16, 2 );
- n16 = CH_Handshake; // Typ des Headers
+ n16 = CH_Handshake; // the header's type
n16 = NETWORD( n16 );
WRITE_SOCKET( &n16, 2 );
- n16 = aHandshakeType; // Typ des Handshakes
+ n16 = aHandshakeType; // the header's type
n16 = NETWORD( n16 );
WRITE_SOCKET( &n16, 2 );
diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx
index 0e7adc9989ef..023fc4c1e522 100644
--- a/automation/source/testtool/cmdstrm.cxx
+++ b/automation/source/testtool/cmdstrm.cxx
@@ -90,7 +90,7 @@ String CmdStream::WandleKeyEventString( String aKeys )
if ( nPos2 != STRING_NOTFOUND )
{
String Work = aKeys.Copy(nPos1+1,nPos2-nPos1+1-2);
- aKeys.Erase(nPos1,nPos2-nPos1+1); // Inclusive Spitze Klammern weg
+ aKeys.Erase(nPos1,nPos2-nPos1+1); // includes removing <>'s
String Result, Token;
sal_uInt16 nModify = 0;
while ( Work.Len() > 0 )
@@ -182,7 +182,7 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
{
switch (rPar->Get( i )->GetType())
{
- case SbxLONG: // alles immer als Short �bertragen
+ case SbxLONG: // always pass everything as Short
case SbxULONG:
case SbxSALINT64:
case SbxSALUINT64:
@@ -321,15 +321,15 @@ void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar )
Write(nNr);
if (rPar)
{
- sal_uInt16 nAnz = (rPar->Count()-1) >> 1; // Geteilt durch 2
+ sal_uInt16 nAnz = (rPar->Count()-1) >> 1;
Write(nAnz);
sal_Bool bWriteUnoSlot = rPar->Get( 1 )->GetType() == SbxSTRING;
for (sal_uInt16 n = 1 ; n <= nAnz ; n++)
{
- /// #59513# nicht mehr ben�tigt
+ /// #59513# not necessary anymore
// sal_uLong nUserData = rPar->Get( 2*n-1 )->GetUserData();
-// rPar->Get( 2*n-1 )->SetUserData(ID_DoNothing); // Verhindert Ausf�hrung der Slots, die als Parameter �bergeben sind.
+// rPar->Get( 2*n-1 )->SetUserData(ID_DoNothing); // prevents execution of the slots that are passed as parameters
if ( bWriteUnoSlot )
Write(rPar->Get( 2*n-1 )->GetString());
@@ -360,7 +360,7 @@ void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar )
case SbxCHAR:
if ( !bWriteUnoSlot )
Write( (sal_uInt16)BinString);
- Write((String)rPar->Get( 2*n )->GetString()); // Cast f�r OS/2
+ Write((String)rPar->Get( 2*n )->GetString()); // Cast for OS/2
break;
case SbxBOOL:
if ( !bWriteUnoSlot )
@@ -383,20 +383,20 @@ void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar )
void CmdStream::GenCmdUNOSlot( const String &aURL )
{
Write( sal_uInt16(SIUnoSlot) );
-/* Write( sal_uInt16(0) ); // Hier wird im Office die SID_OPENURL Eingetragen.
- // Dies mu� nat�rlich im Office hart verdratet werden und nicht hier,
- // da sich die ID ja mal �ndern kann.
+/* Write( sal_uInt16(0) ); // The SID_OPENURL is entered here.
+ // That must be wired hard in the Office and not here of course
+ // as the ID might change
- // Da auch die ID f�r das PoolItem im Office entnommen werden mu� hier also kein PoolItem
- // gesendet werden.
+ // Because the ID must also be taken for the PoolItem from the Office, it is not
+ // necessary to send a PoolItem here.
- Write( sal_uInt16(0) ); // Anzahl PoolItems
+ Write( sal_uInt16(0) ); // number of PoolItems
- // Stattdessen wird noch eine extra String gesendet, der dann Officeseitig in ein
- // SfxStringItem mit entsprechender ID gewandelt wird.
- Write( aURL ); // String f�r das PoolItem*/
+ // instead there's an extra string sent by the Office which is changed to an
+ // SfxStringItem with the respective ID
+ Write( aURL ); // String for the PoolItem*/
- Write( aURL ); // Die UNO URL eben
+ Write( aURL ); // UNO URL
}
void CmdStream::GenCmdControl( comm_UINT32 nUId, sal_uInt16 nMethodId, SbxArray* rPar )
@@ -419,14 +419,14 @@ void CmdStream::GenCmdFlow( sal_uInt16 nArt )
{
Write(sal_uInt16(SIFlow));
Write(nArt);
- Write(sal_uInt16(PARAM_NONE)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_NONE)); // type of the following parameters
}
void CmdStream::GenCmdFlow( sal_uInt16 nArt, comm_UINT32 nNr1 )
{
Write(sal_uInt16(SIFlow));
Write(nArt);
- Write(sal_uInt16(PARAM_UINT32_1)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_UINT32_1)); // type of the following parameters
Write(nNr1);
}
diff --git a/automation/source/testtool/cmdstrm.hxx b/automation/source/testtool/cmdstrm.hxx
index 5dac92d4c03f..7b8afef71f53 100644
--- a/automation/source/testtool/cmdstrm.hxx
+++ b/automation/source/testtool/cmdstrm.hxx
@@ -57,11 +57,11 @@ public:
SvMemoryStream* GetStream();
- static CNames *pKeyCodes; // Namen der Sondertasten MOD1, F1, LEFT ...
+ static CNames *pKeyCodes; // names of special keys MOD1, F1, LEFT ...
static ControlDefLoad const arKeyCodes [];
private:
- String WandleKeyEventString( String aKeys ); // Nutzt pKeyCodes. <RETURN> <SHIFT LEFT LEFT>
+ String WandleKeyEventString( String aKeys ); // uses pKeyCodes. <RETURN> <SHIFT LEFT LEFT>
using CmdBaseStream::Write;
void Write( comm_UINT16 nNr ){CmdBaseStream::Write( nNr );}
diff --git a/automation/source/testtool/comm_bas.cxx b/automation/source/testtool/comm_bas.cxx
index 7c42d225987e..5c75d1bf73b9 100644
--- a/automation/source/testtool/comm_bas.cxx
+++ b/automation/source/testtool/comm_bas.cxx
@@ -38,80 +38,80 @@
#include <automation/communi.hxx>
#include <basic/ttstrhlp.hxx>
-// Der CommunicationManager hat folgende Elemente:
+// The CommunicationManager consists of the following elements:
// 1) Properties:
-// Keine
-// 2) Methoden:
+// none
+// 2) Methods:
// CommunicationLink StartCommunication( Host, Port )
-// StopAllCommunication // Alle Kommunikation wird abgebrochen
-// sal_Bool IsCommunicationRunning // Luft noch irgendwas
-// String GetMyName Der eigene Name
-// sal_Bool IsLinkValid( CommunicationLink ) // Ist dieser Link noch gltig
-// SetCommunicationEventHandler( String ) // Diese Funktion wird aufgerufen bei jedem Event
+// StopAllCommunication
+// sal_Bool IsCommunicationRunning
+// String GetMyName
+// sal_Bool IsLinkValid( CommunicationLink )
+// SetCommunicationEventHandler( String )
-// Der CommunicationLink hat folgende Elemente:
+// The CommunicationLink consists of the following elements:
// 1) Properties:
-// Keine
-// 2) Methoden:
-// StopCommunication Die Kommunikation wird abgebrochen
-// String GetMyName Der eigene Name
-// String GetHostName Der Name des Anderen
-// Send(String ) String an den Partner schicken
-// String GetString Ergebnis des letzten Empfangs
+// none
+// 2) Methods:
+// StopCommunication
+// String GetMyName
+// String GetHostName
+// Send( String )
+// String GetString
-// Diese Implementation ist ein Beispiel fuer eine tabellengesteuerte
-// Version, die sehr viele Elemente enthalten kann. Die Elemente werden
-// je nach Bedarf aus der Tabelle in das Objekt uebernommen.
+// This implementation is an example for a table-controlled
+// version that can contain a lot of elements. The elements are
+// taken from the table to the object when needed.
-// Das nArgs-Feld eines Tabelleneintrags ist wie folgt verschluesselt:
+// The nArgs-field of a table entry is encrypted as follows:
-#define _ARGSMASK 0x00FF // Bis zu 255 Argumente
-#define _RWMASK 0x0F00 // Maske fuer R/W-Bits
-#define _TYPEMASK 0xF000 // Maske fuer den Typ des Eintrags
+#define _ARGSMASK 0x00FF // up to 255 arguments
+#define _RWMASK 0x0F00 // mask for R/W-Bits
+#define _TYPEMASK 0xF000 // mask for the entry type
-#define _READ 0x0100 // kann gelesen werden
-#define _BWRITE 0x0200 // kann as Lvalue verwendet werden
-#define _LVALUE _BWRITE // kann as Lvalue verwendet werden
-#define _READWRITE 0x0300 // beides
-#define _OPT 0x0400 // TRUE: optionaler Parameter
-#define _METHOD 0x1000 // Masken-Bit fuer eine Methode
-#define _PROPERTY 0x2000 // Masken-Bit fuer eine Property
-#define _COLL 0x4000 // Masken-Bit fuer eine Collection
- // Kombination von oberen Bits:
-#define _FUNCTION 0x1100 // Maske fuer Function
-#define _LFUNCTION 0x1300 // Maske fuer Function, die auch als Lvalue geht
-#define _ROPROP 0x2100 // Maske Read Only-Property
-#define _WOPROP 0x2200 // Maske Write Only-Property
-#define _RWPROP 0x2300 // Maske Read/Write-Property
-#define _COLLPROP 0x4100 // Maske Read-Collection-Element
+#define _READ 0x0100 // can be read
+#define _BWRITE 0x0200 // can be used as Lvalue
+#define _LVALUE _BWRITE // can be used as Lvalue
+#define _READWRITE 0x0300 // both
+#define _OPT 0x0400 // TRUE: optional parameter
+#define _METHOD 0x1000 // mask bit for a method
+#define _PROPERTY 0x2000 // mask bit for a property
+#define _COLL 0x4000 // mask bit for a collection
+ // combination of bits above:
+#define _FUNCTION 0x1100 // mask for a function
+#define _LFUNCTION 0x1300 // mask for a function, that works as Lvalue too
+#define _ROPROP 0x2100 // mask Read Only-Property
+#define _WOPROP 0x2200 // mask Write Only-Property
+#define _RWPROP 0x2300 // mask Read/Write-Property
+#define _COLLPROP 0x4100 // mask Read-Collection-Element
-#define COLLNAME "Elements" // Name der Collection, hier mal hart verdrahtet
+#define COLLNAME "Elements" // the collection's name, here wired hard
CommunicationWrapper::Methods CommunicationWrapper::aManagerMethods[] = {
-// Neue Kommunikation aufbauen
+
{ "StartCommunication", SbxEMPTY, &CommunicationWrapper::MStartCommunication, 2 | _FUNCTION },
- // Zwei Named Parameter
+
{ "Host", SbxSTRING, NULL, 0 },
{ "Port", SbxLONG, NULL, 0 },
-// Alle Kommunikation wird abgebrochen
+
{ "StopAllCommunication", SbxEMPTY, &CommunicationWrapper::MStopAllCommunication, 0 | _FUNCTION },
-// Luft noch irgendwas
+
{ "IsCommunicationRunning", SbxBOOL, &CommunicationWrapper::MIsCommunicationRunning, 0 | _FUNCTION },
-// Hostname als FQDN erfragen
+// as FQDN
{ "GetMyName", SbxSTRING, &CommunicationWrapper::MGetMyName, 0 | _FUNCTION },
-// Abfragen ob der Link berhaupt noch gltig ist
+
{ "IsLinkValid", SbxBOOL, &CommunicationWrapper::MIsLinkValid, 1 | _FUNCTION },
- // Ein Named Parameter
+
{ "Link", SbxOBJECT, NULL, 0 },
-// Dieser Handler wird dauernd gerufen
+
{ "SetCommunicationEventHandler", SbxEMPTY, &CommunicationWrapper::MSetCommunicationEventHandler, 1 | _FUNCTION },
- // Ein Named Parameter
+
{ "FuncName", SbxSTRING, NULL, 0 },
-{ NULL, SbxNULL, NULL, -1 }}; // Tabellenende
+{ NULL, SbxNULL, NULL, -1 }}; // end of the table
@@ -119,26 +119,26 @@ CommunicationWrapper::Methods CommunicationWrapper::aManagerMethods[] = {
CommunicationWrapper::Methods CommunicationWrapper::aLinkMethods[] = {
-// Die Kommunikation wird abgebrochen
+
{ "StopCommunication", SbxEMPTY, &CommunicationWrapper::LStopCommunication, 0 | _FUNCTION },
-// Der eigene Name
+
{ "GetMyName", SbxSTRING, &CommunicationWrapper::LGetMyName, 0 | _FUNCTION },
-// Der Name des Anderen
+
{ "GetHostName", SbxSTRING, &CommunicationWrapper::LGetHostName, 0 | _FUNCTION },
-// String an den Partner schicken
+
{ "Send", SbxEMPTY, &CommunicationWrapper::LSend, 1 | _FUNCTION },
- // Ein Named Parameter
+
{ "SendString", SbxSTRING, NULL, 0 },
-// Ergebnis des letzten Empfangs
+
{ "GetString", SbxSTRING, &CommunicationWrapper::LGetString, 0 | _FUNCTION },
-{ NULL, SbxNULL, NULL, -1 }}; // Tabellenende
+{ NULL, SbxNULL, NULL, -1 }}; // end of the table
-// Konstruktor fr den Manager
+// constructor for the manager
CommunicationWrapper::CommunicationWrapper( const String& rClass ) : SbxObject( rClass )
, m_pLink( NULL )
, m_bIsManager( sal_True )
@@ -152,7 +152,7 @@ CommunicationWrapper::CommunicationWrapper( const String& rClass ) : SbxObject(
m_pManager->SetDataReceivedHdl( LINK( this, CommunicationWrapper, Data ) );
}
-// Konstruktor fr den Link
+// constructor for the link
CommunicationWrapper::CommunicationWrapper( CommunicationLink *pThisLink ) : SbxObject( CUniString("Link") )
, m_pLink( pThisLink )
, m_bIsManager( sal_False )
@@ -163,7 +163,7 @@ CommunicationWrapper::CommunicationWrapper( CommunicationLink *pThisLink ) : Sbx
m_pManager = (CommunicationManagerClientViaSocket*)pThisLink->GetCommunicationManager();
}
-// Destruktor
+// deconstructor
CommunicationWrapper::~CommunicationWrapper()
{
if ( m_bIsManager )
@@ -171,20 +171,20 @@ CommunicationWrapper::~CommunicationWrapper()
}
-// Suche nach einem Element:
-// Hier wird linear durch die Methodentabelle gegangen, bis eine
-// passende Methode gefunden wurde.
-// Wenn die Methode/Property nicht gefunden wurde, nur NULL ohne
-// Fehlercode zurueckliefern, da so auch eine ganze Chain von
-// Objekten nach der Methode/Property befragt werden kann.
+// Search for an element:
+// Here it goes through the method table until an appropriate one
+// has been found.
+// If the method/property has not been found, get back only NULL
+// without error code because that way a whole chain of objects
+// can be asked for the method/property.
SbxVariable* CommunicationWrapper::Find( const String& rName, SbxClassType t )
{
- // Ist das Element bereits vorhanden?
+ // Does the element exist already?
SbxVariable* pRes = SbxObject::Find( rName, t );
if( !pRes && t != SbxCLASS_OBJECT )
{
- // sonst suchen
+ // look for it if not
Methods* p = m_pMethods;
short nIndex = 0;
sal_Bool bFound = sal_False;
@@ -199,7 +199,7 @@ SbxVariable* CommunicationWrapper::Find( const String& rName, SbxClassType t )
}
if( bFound )
{
- // Args-Felder isolieren:
+ // isolate args-fields:
short nAccess = ( p->nArgs & _RWMASK ) >> 8;
short nType = ( p->nArgs & _TYPEMASK );
String aName( p->pName, RTL_TEXTENCODING_ASCII_US );
@@ -209,9 +209,8 @@ SbxVariable* CommunicationWrapper::Find( const String& rName, SbxClassType t )
else if( nType & _METHOD )
eCT = SbxCLASS_METHOD;
pRes = Make( aName, eCT, p->eType );
- // Wir setzen den Array-Index + 1, da ja noch andere
- // Standard-Properties existieren, die auch aktiviert
- // werden muessen.
+ // We set the array-index + 1, because there are still
+ // other standard properties existing, which have to be activated.
pRes->SetUserData( nIndex + 1 );
pRes->SetFlags( nAccess );
}
@@ -219,7 +218,7 @@ SbxVariable* CommunicationWrapper::Find( const String& rName, SbxClassType t )
return pRes;
}
-// Aktivierung eines Elements oder Anfordern eines Infoblocks
+// activation of an element or asking for an infoblock
void CommunicationWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
const SfxHint& rHint, const TypeId& rHT )
@@ -230,7 +229,7 @@ void CommunicationWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar = pVar->GetParameters();
sal_uInt16 nIndex = (sal_uInt16) pVar->GetUserData();
- // kein Index: weiterreichen!
+ // no index: hand on!
if( nIndex )
{
sal_uLong t = pHint->GetId();
@@ -243,13 +242,13 @@ void CommunicationWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
bWrite = sal_True;
if( t == SBX_HINT_DATAWANTED || bWrite )
{
- // Parameter-Test fuer Methoden:
+ // parameter test for methods:
sal_uInt16 nPar = m_pMethods[ --nIndex ].nArgs & 0x00FF;
- // Element 0 ist der Returnwert
+ // element 0 is the return value
if( ( !pPar && nPar )
|| ( pPar && pPar->Count() != nPar+1 ) )
SetError( SbxERR_WRONG_ARGS );
- // Alles klar, man kann den Call ausfuehren
+
else
{
(this->*(m_pMethods[ nIndex ].pFunc))( pVar, pPar, bWrite );
@@ -261,13 +260,13 @@ void CommunicationWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
}
}
-// Zusammenbau der Infostruktur fuer einzelne Elemente
+// construction of the info-structure for single elements
SbxInfo* CommunicationWrapper::GetInfo( short nIdx )
{
Methods* p = &m_pMethods[ nIdx ];
- // Wenn mal eine Hilfedatei zur Verfuegung steht:
- // SbxInfo* pInfo = new SbxInfo( Hilfedateiname, p->nHelpId );
+ // if there's a help-file some time:
+ // SbxInfo* pInfo = new SbxInfo( helpfilename, p->nHelpId );
SbxInfo* pRetInfo = new SbxInfo;
short nPar = p->nArgs & _ARGSMASK;
for( short i = 0; i < nPar; i++ )
@@ -285,7 +284,7 @@ SbxInfo* CommunicationWrapper::GetInfo( short nIdx )
////////////////////////////////////////////////////////////////////////////
-// Hilfsmethoden fr den Manager
+// help methods for the manager
IMPL_LINK( CommunicationWrapper, Open, CommunicationLink*, pLink )
{
@@ -322,19 +321,18 @@ void CommunicationWrapper::Events( String aType, CommunicationLink* pLink )
Call( m_aEventHandlerName, pPar );
}
else
- delete pLink->GetServiceData(); // Stream wegschmeissen um nicht zu blockieren
+ delete pLink->GetServiceData(); // give away the stream to prevent blocking
}
////////////////////////////////////////////////////////////////////////////
-// Properties und Methoden legen beim Get (bPut = sal_False) den Returnwert
-// im Element 0 des Argv ab; beim Put (bPut = sal_True) wird der Wert aus
-// Element 0 gespeichert.
+// Properties and methods put down the return value for Get (bPut = sal_False) at
+// element 0 of the Argv; for Put (bPut = sal_True) the value from element 0 is saved.
-// Die Methoden:
+// the methods:
-// Manager
+// manager
void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ )
{ // CommunicationLink StartCommunication( Host, Port )
m_bCatchOpen = sal_True;
@@ -351,28 +349,28 @@ void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPa
}
void CommunicationWrapper::MStopAllCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
-{ // StopAllCommunication // Alle Kommunikation wird abgebrochen
+{ // StopAllCommunication
m_pManager->StopCommunication();
}
void CommunicationWrapper::MIsCommunicationRunning( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
-{ // sal_Bool IsCommunicationRunning // Luft noch irgendwas
+{ // sal_Bool IsCommunicationRunning
pVar->PutBool( m_pManager->IsCommunicationRunning() );
}
void CommunicationWrapper::MGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
-{ // String GetMyName Der eigene Name
+{ // String GetMyName
pVar->PutString( UniString( m_pManager->GetMyName( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) );
}
void CommunicationWrapper::MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ )
-{ // sal_Bool IsLinkValid( CommunicationLink ) // Ist dieser Link noch gltig
+{ // sal_Bool IsLinkValid( CommunicationLink )
CommunicationWrapper *pWrapper = (CommunicationWrapper*)(pPar->Get( 1 )->GetObject());
pVar->PutBool( m_pManager->IsLinkValid( pWrapper->GetCommunicationLink() ) );
}
void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/, SbxArray* pPar, sal_Bool /*bWrite*/ )
-{ // SetCommunicationEventHandler( String ) // Diese Funktion wird aufgerufen bei jedem Event
+{ // SetCommunicationEventHandler( String )
m_aEventHandlerName = pPar->Get( 1 )->GetString();
}
@@ -382,22 +380,22 @@ void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/,
// Link
void CommunicationWrapper::LStopCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
-{ // StopCommunication Die Kommunikation wird abgebrochen
+{ // StopCommunication
m_pLink->StopCommunication();
}
void CommunicationWrapper::LGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
-{ // String GetMyName Der eigene Name
+{ // String GetMyName
pVar->PutString( UniString( m_pLink->GetMyName( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) );
}
void CommunicationWrapper::LGetHostName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
-{ // String GetHostName Der Name des Anderen
+{ // String GetHostName
pVar->PutString( UniString( m_pLink->GetCommunicationPartner( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) );
}
void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, sal_Bool /*bWrite*/ )
-{ // Send(String ) String an den Partner schicken
+{ // Send(String )
SvStream *pSendStream = m_pLink->GetBestCommunicationStream();
String aSendString = pPar->Get( 1 )->GetString();
pSendStream->WriteByteString( aSendString, RTL_TEXTENCODING_UTF8 );
@@ -406,7 +404,7 @@ void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, sal_Boo
}
void CommunicationWrapper::LGetString( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
-{ // String GetString Ergebnis des letzten Empfangs
+{ // String GetString
SvStream *pReceiveStream = m_pLink->GetServiceData();
if ( pReceiveStream )
{
@@ -427,8 +425,6 @@ void CommunicationWrapper::LGetString( SbxVariable* pVar, SbxArray* /*pPar*/, sa
-// Die Factory legt unser Objekte an.
-
SbxObject* CommunicationFactory::CreateObject( const String& rClass )
{
if( rClass.CompareIgnoreCaseToAscii( "CommunicationManager" ) == COMPARE_EQUAL )
diff --git a/automation/source/testtool/comm_bas.hxx b/automation/source/testtool/comm_bas.hxx
index 32da48aed9a2..4b1af375235b 100644
--- a/automation/source/testtool/comm_bas.hxx
+++ b/automation/source/testtool/comm_bas.hxx
@@ -36,11 +36,10 @@
class CommunicationManagerClientViaSocket;
class CommunicationLink;
-class CommunicationWrapper : public SbxObject // Einer f�r Manager und Links
+class CommunicationWrapper : public SbxObject // one for manager(s) and links
{
- // Definition eines Tabelleneintrags. Dies wird hier gemacht,
- // da dadurch die Methoden und Properties als private deklariert
- // werden koennen.
+ // definition of a table entry. That's done here because the
+ // methods and properties can be declared private that way.
#if defined ( ICC ) || defined ( C50 )
public:
#endif
@@ -51,17 +50,17 @@ private:
#endif
struct Methods {
- const char* pName; // Name des Eintrags
- SbxDataType eType; // Datentyp
- pMeth pFunc; // Function Pointer
- short nArgs; // Argumente und Flags
+ const char* pName;
+ SbxDataType eType;
+ pMeth pFunc;
+ short nArgs;
};
- static Methods aManagerMethods[]; // Methodentabelle
- static Methods aLinkMethods[]; // Methodentabelle
- Methods *m_pMethods; // Aktuelle Methodentabelle
+ static Methods aManagerMethods[]; // method table
+ static Methods aLinkMethods[]; // method table
+ Methods *m_pMethods; // current method table
- // Methoden
- // Manager
+ // methods
+ // manager
void MStartCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
void MStopAllCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
void MIsCommunicationRunning( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
@@ -69,19 +68,18 @@ private:
void MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
void MSetCommunicationEventHandler( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
- // Link
+ // link
void LStopCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
void LGetMyName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
void LGetHostName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
void LSend( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
void LGetString( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
- // Interne Member und Methoden
+ // internal members and methods
CommunicationManagerClientViaSocket *m_pManager;
CommunicationLink *m_pLink;
- sal_Bool m_bIsManager; // Ist es kein Manager, so ist es ein Link
+ sal_Bool m_bIsManager;
- // Kram f�r Manager
DECL_LINK( Open, CommunicationLink* );
DECL_LINK( Close, CommunicationLink* );
DECL_LINK( Data, CommunicationLink* );
@@ -91,7 +89,6 @@ private:
String m_aEventHandlerName;
using SbxVariable::GetInfo;
- // Infoblock auffuellen
SbxInfo* GetInfo( short nIdx );
// Broadcaster Notification
@@ -101,14 +98,13 @@ public:
CommunicationWrapper( const String& );
CommunicationWrapper( CommunicationLink *pThisLink );
~CommunicationWrapper();
- // Suchen eines Elements
+
virtual SbxVariable* Find( const String&, SbxClassType );
CommunicationLink* GetCommunicationLink() { return m_pLink; }
};
-// Die dazugehoerige Factory:
class CommunicationFactory : public SbxFactory
{
diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx
index 4ec2f6471c2a..1ff53ad2e625 100644
--- a/automation/source/testtool/httprequest.cxx
+++ b/automation/source/testtool/httprequest.cxx
@@ -91,7 +91,7 @@ sal_Bool HttpRequest::Execute()
}
TimeValue aTV;
- aTV.Seconds = 10; // Warte 10 Sekunden
+ aTV.Seconds = 10; // wait for 10 seconds
aTV.Nanosec = 0;
pOutSocket = new osl::ConnectorSocket();
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index 80de2e226461..bcf93873ae88 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -106,7 +106,7 @@ CNames *Controls::pClasses = NULL;
ControlDefLoad const TestToolObj::arR_Cmds [] =
#include "r_cmds.hxx"
CNames *TestToolObj::pRCommands = NULL;
-CErrors *TestToolObj::pFehlerListe = NULL; // Hier werden die Fehler des Testtools gespeichert
+CErrors *TestToolObj::pFehlerListe = NULL; // the errors from the testtool are stored here
DBG_NAME( ControlItem )
@@ -285,7 +285,7 @@ SbxTransportMethod::SbxTransportMethod( SbxDataType DT )
}
-TestToolObj::TestToolObj( String aName, MyBasic* pBas ) // Aufruf im Testtool
+TestToolObj::TestToolObj( String aName, MyBasic* pBas ) // call in the testtool
: SbxObject( aName )
, bUseIPC(sal_True)
, bReturnOK(sal_True)
@@ -317,7 +317,7 @@ TestToolObj::TestToolObj( String aName, MyBasic* pBas ) // Aufruf
pCommunicationManager->SetDataReceivedHdl( LINK( this, TestToolObj, ReturnResultsLink ));
}
-void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den ConfigDialog ge�ndert werden k�nnen
+void TestToolObj::LoadIniFile()
{
#define GETSET(aVar, KeyName, Dafault) \
{ \
@@ -371,7 +371,7 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
aConf.SetGroup("Misc");
String aST;
- GETSET( aST, "ServerTimeout", rtl::OString::valueOf(Time(0,0,45).GetTime()) ); // 45 Sekunden Initial
+ GETSET( aST, "ServerTimeout", rtl::OString::valueOf(Time(0,0,45).GetTime()) ); // 45 seconds initial
pImpl->aServerTimeout = Time(sal_uLong(aST.ToInt64()));
String aSOSE;
@@ -459,7 +459,7 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
pMeth->SetUserData( nID ); \
}
-// SetUserData mu� irgendwas sein, sonst wird es im Find rausgefiltert!!!
+// SetUserData must be something, it will be filtered out later otherwise!!!
#define MAKE_USHORT_CONSTANT(cName, nValue) \
{ \
SbxProperty *pVal = new SbxProperty( CUniString( cName) , SbxINTEGER ); \
@@ -472,7 +472,7 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
void TestToolObj::InitTestToolObj()
{
- pImpl->nNumBorders = 0; // F�r Profiling mit k�stchen
+ pImpl->nNumBorders = 0; // for profiling with boxes
pImpl->nMinRemoteCommandDelay = 0;
pImpl->nMaxRemoteCommandDelay = 0;
@@ -499,7 +499,7 @@ void TestToolObj::InitTestToolObj()
pImpl->pChildEnv = new Environment;
if (!pFehlerListe)
- pFehlerListe = new CErrors; // Vor allem anderen. Wer weiss, wer alles einen Fehler ausl�st.
+ pFehlerListe = new CErrors;
In = new CmdStream();
@@ -542,19 +542,19 @@ void TestToolObj::InitTestToolObj()
MAKE_TT_KEYWORD( "MaybeAddErr", SbxCLASS_METHOD, SbxNULL, ID_MaybeAddErr );
MAKE_TT_KEYWORD( "ClearError", SbxCLASS_METHOD, SbxNULL, ID_ClearError );
MAKE_TT_KEYWORD( "SaveIDs", SbxCLASS_METHOD, SbxBOOL, ID_SaveIDs );
- MAKE_TT_KEYWORD( "AutoExecute", SbxCLASS_PROPERTY, SbxBOOL, ID_AutoExecute ); // Achtung! PROPERTY Also eine Variable
+ MAKE_TT_KEYWORD( "AutoExecute", SbxCLASS_PROPERTY, SbxBOOL, ID_AutoExecute ); // Attention! PROPERTY therefore a variable
MAKE_TT_KEYWORD( "Execute", SbxCLASS_METHOD, SbxNULL, ID_Execute );
MAKE_TT_KEYWORD( "StopOnSyntaxError", SbxCLASS_PROPERTY, SbxBOOL, ID_StopOnSyntaxError );
-/* Dialog Handler werden gebraucht, wenn im internen Testtool ein Dialog
- hochgerissen wird. Nach versenden der Remote-Kommandos wird IdleHandler aktiviert.
- Er testet, ob das Reschedule zum WaitForAnswer zur�ckkehrt. Bleibt das aus, so
- wird erst der RemoteHandler zur�ckgesetzt und dann die Handler-Sub im Basic
- gerufen.(Entkoppelt �ber PostUserEvent.)
+/* Dialog Handler are needed for dialogues in the internal testtool.
+ remote commands the IdleHandler is activated. It tests whether the
+ reschedule returns to WaitForAnswer. If this is not the case, the
+ RemoteHandler is resetted and then the Handler-Sub is called in the
+ basic (uncoupled by PostUserEvent).
- In returndaten_verarbeiten wird flag f�r ausf�hrung des n�chsten remote-befehls
- r�ckgesetzt. Der Handler wird damit auch entwertet. Er gilt also nur f�r den
- n�chsten Remotebefehl.
+ In returndaten_verarbeiten flag after flag is resetted for the execution
+ of the next remote command. The Handler is devalued too then.
+ So it counts for the next remote command only.
*/
MAKE_TT_KEYWORD( "DialogHandler", SbxCLASS_METHOD, SbxNULL, ID_DialogHandler );
@@ -594,7 +594,7 @@ void TestToolObj::InitTestToolObj()
MAKE_TT_KEYWORD( "HTTPSetProxy", SbxCLASS_METHOD, SbxNULL, ID_HTTPSetProxy );
// Load the Remote Commands from list
- if ( !pRCommands ) // Ist static, wird also nur einmal geladen
+ if ( !pRCommands ) // is static and called only once therefore
ReadFlatArray( arR_Cmds, pRCommands );
sal_uInt16 i;
for ( i = 0 ; i < pRCommands->Count() ; i++ )
@@ -612,11 +612,11 @@ void TestToolObj::InitTestToolObj()
StartListening( pMeth->GetBroadcaster(), sal_True );
}
-// Konstanten f�r SetControlType
+// constants for SetControlType
MAKE_USHORT_CONSTANT("CTBrowseBox",CONST_CTBrowseBox);
MAKE_USHORT_CONSTANT("CTValueSet",CONST_CTValueSet);
-// Konstanten f�r das Alignment des gesuchten Splitters
+// constants for the alignment of the requested splitter
MAKE_USHORT_CONSTANT("AlignLeft",CONST_ALIGN_LEFT);
MAKE_USHORT_CONSTANT("AlignTop",CONST_ALIGN_TOP);
MAKE_USHORT_CONSTANT("AlignRight",CONST_ALIGN_RIGHT);
@@ -693,7 +693,7 @@ TestToolObj::~TestToolObj()
if (pFehlerListe)
{
delete pFehlerListe;
- pFehlerListe = NULL; // da pFehlerListe static ist!!
+ pFehlerListe = NULL; // because pFehlerListe is static!!
}
if ( pCommunicationManager )
@@ -728,11 +728,11 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
{
/*******************************************************************************
**
-** Folgende Dateiendungen sind vorhanden
+** the following file extensions are available:
**
-** hid.lst Langname UId
-** *.sid Slot Ids Kurzname Langname Datei ist flach
-** *.win Controlname Langname Datei mit *name und +name Notation
+** hid.lst long name UId
+** *.sid Slot Ids short name long name file is flat
+** *.win Controlname long name file with *name and +name notation
**
**
*******************************************************************************/
@@ -746,7 +746,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
ControlDef *pNewDef, *pNewDef2;
ControlDef *pFatherDef = NULL;
- nLineNr = 0; // Wir sind ja noch vor der Datei
+ nLineNr = 0;
if (! pUIds)
{
@@ -857,7 +857,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
}
sal_Bool bMozillaName = ( !bIsFlat && aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( ".moz" ) );
- if ( aShortname.GetChar(0) == '+' ) // Kompletten Eintrag kopieren
+ if ( aShortname.GetChar(0) == '+' ) // copy complete entry
{
aShortname.Erase(0,1);
ControlDef WhatName(aLongname,rtl::OString());
@@ -896,7 +896,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
else
#endif
if ( !bUnoName && !bMozillaName )
- { // Bestimmen der ID aus der Hid.Lst
+ { // get the ID from the Hid.Lst
ControlDef WhatName(aLongname,rtl::OString());
if (pUIds->Seek_Entry(&WhatName,&nElement))
aUId = pUIds->GetObject(nElement)->pData->aUId;
@@ -923,7 +923,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
- if (aShortname.GetChar(0) == '*' || bIsFlat) // Globaler Kurzname (Dialogname oder SId)
+ if (aShortname.GetChar(0) == '*' || bIsFlat) // global short name (dialogue name or SId)
{
if (!bIsFlat)
aShortname.Erase(0,1);
@@ -935,7 +935,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
pNewDef->Sons( new CNames() );
pNewDef2 = new ControlDef(aShortname,aUId);
- if (!pNewDef->SonInsert( pNewDef2 )) // Dialog in eigenen Namespace eintragen
+ if (!pNewDef->SonInsert( pNewDef2 )) // enter dialogue into its own namespace
{
delete pNewDef2;
OSL_FAIL(" !!!! ACHTUNG !!!! Fehler beim einf�gen in leere Liste!");
@@ -998,7 +998,7 @@ void TestToolObj::AddName(String &aBisher, String &aNeu )
void TestToolObj::ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByName )
-// Wenn bSortByName == sal_False, dann nach UId Sortieren (ControlItemUId statt ControlDef)
+// if bSortByName == sal_False, sort by UId (ControlItemUId instead of ControlDef)
{
SvFileStream Stream;
String aLine,aLongname;
@@ -1015,7 +1015,7 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByNa
return;
}
- nLineNr = 0; // Wir sind ja noch vor der Datei
+ nLineNr = 0;
if ( !pNames )
pNames = new CNames();
@@ -1116,7 +1116,7 @@ void TestToolObj::WaitForAnswer ()
else
aRun = BasicRuntime( NULL );
}
- if ( bWasRealWait && aDialogHandlerName.Len() > 0 ) // Damit das ganze auch im Testtool l�uft
+ if ( bWasRealWait && aDialogHandlerName.Len() > 0 )
CallDialogHandler(GetpApp());
}
else
@@ -1155,7 +1155,7 @@ IMPL_LINK( TestToolObj, IdleHdl, Application*, EMPTYARG )
{
if ( !bReturnOK )
nIdleCount++;
- if ( nIdleCount > 10 ) // d.h. Schon 10 mal hier gewesen und noch keinmal im WaitForAnswer
+ if ( nIdleCount > 10 ) // means been here for 10 times already and none of these in WaitForAnswer
{
GetpApp()->RemoveIdleHdl( LINK( this, TestToolObj, IdleHdl ) );
GetpApp()->PostUserEvent( LINK( this, TestToolObj, CallDialogHandler ) );
@@ -1169,10 +1169,10 @@ IMPL_LINK( TestToolObj, CallDialogHandler, Application*, EMPTYARG )
String aHandlerName(aDialogHandlerName);
aDialogHandlerName.Erase();
- sal_uLong nRememberSequence = nSequence; // Da sich die Sequence im DialogHandler �ndert
+ sal_uLong nRememberSequence = nSequence;
((StarBASIC*)GetParent())->Call( aHandlerName );
nSequence = nRememberSequence;
- // Die Sequenznummern werden dann zwar doppelt vergeben, aber wen k�mmerts.
+
nWindowHandlerCallLevel--;
return 0;
@@ -1231,14 +1231,14 @@ void TestToolObj::SendViaSocket()
{
ADD_ERROR(ERR_SEND_TIMEOUT,GEN_RES_STR1(S_TIMOUT_SENDING, String::CreateFromInt64(nSequence)));
nSequence++;
- bReturnOK = sal_True; // Kein Return zu erwarten
+ bReturnOK = sal_True; // no return to be expected
}
}
else
{
ADD_ERROR(ERR_SEND_TIMEOUT,GEN_RES_STR1(S_NO_CONNECTION, String::CreateFromInt64(nSequence)));
nSequence++;
- bReturnOK = sal_True; // Kein Return zu erwarten
+ bReturnOK = sal_True;
}
}
@@ -1247,7 +1247,7 @@ void TestToolObj::EndBlock()
{
if (IsBlock)
{
- pImpl->LocalStarttime = Time::GetSystemTicks(); // Setzen der Anfangszeit f�r Performancemessung
+ pImpl->LocalStarttime = Time::GetSystemTicks(); // setting the initial time for performance measuring
In->GenCmdFlow (F_EndCommandBlock);
@@ -1381,7 +1381,7 @@ sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pC
aUId = rtl::OString();// nUId;
}
- if (aName.GetChar(0) == '*' || bIsFlat ) // Globaler Kurzname (Dialogname oder SId)
+ if (aName.GetChar(0) == '*' || bIsFlat ) // global short name (dialogue name or SId)
{
if (!bIsFlat)
aName.Erase(0,1);
@@ -1391,8 +1391,8 @@ sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pC
{
pNewDef->Sons(new CNames());
- pNewDef2 = new ControlDef(aName,aUId); // Noch einen machen
- if (!pNewDef->SonInsert(pNewDef2)) // Dialog in eigenen Namespace eintragen
+ pNewDef2 = new ControlDef(aName,aUId);
+ if (!pNewDef->SonInsert(pNewDef2)) // enter dialogue into its own namespace
{
delete pNewDef2;
OSL_FAIL(" !!!! ACHTUNG !!!! Fehler beim einf�gen in leere Liste!");
@@ -1492,7 +1492,7 @@ sal_Bool TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pCo
void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
const SfxHint& rHint, const TypeId& )
{
- static CNames *pUIds = NULL; // Halten der hid.lst
+ static CNames *pUIds = NULL; // hold the hid.lst
const SbxHint* p = PTR_CAST(SbxHint,&rHint);
if( p )
@@ -1512,7 +1512,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
{
m_pNameKontext = m_pControls;
- // So da� nicht immer mal wieder was aus einem alten Kontext dazwischenhaut
+
for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++)
{
pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) );
@@ -1528,7 +1528,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
{
m_pNameKontext = ((ControlDef*)m_pControls->GetObject(nElement))->GetSons();
- // So da� nicht immer mal wieder was aus einem alten Kontext dazwischenhaut
+
for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++)
{
pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) );
@@ -1573,7 +1573,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
pCommunicationManager->KillApplication();
break;
case ID_SaveIDs:
- if ( rPar && rPar->Count() >= 2 ) // Genau ein Parameter
+ if ( rPar && rPar->Count() >= 2 ) // one parameter excactly
{
SbxVariableRef pArg = rPar->Get( 1 );
#if defined(WNT)
@@ -1587,7 +1587,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_AutoExecute:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar ) // rPar = NULL <=> no parameters
{
pVar->PutBool(SingleCommandBlock);
}
@@ -1595,7 +1595,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_Execute:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar )
{
EndBlock();
BeginBlock();
@@ -1604,7 +1604,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_DialogHandler:
- if ( rPar && rPar->Count() >= 2 ) // Genau ein Parameter
+ if ( rPar && rPar->Count() >= 2 )
{
SbxVariableRef pArg = rPar->Get( 1 );
aDialogHandlerName = pArg->GetString();
@@ -1613,7 +1613,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_GetError:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar )
{
WaitForAnswer();
if ( IS_ERROR() )
@@ -1630,7 +1630,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_StartUse:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar )
{
{
BasicRuntime aRun = BasicRuntimeAccess::GetRuntime();
@@ -1790,9 +1790,9 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_FinishUse:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar )
{
- ADD_CASE_LOG( String() ); // Case abschliessen
+ ADD_CASE_LOG( String() ); // close case
if (!m_pControls)
m_pControls = new CNames();
@@ -1823,7 +1823,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_CaseLog:
- if ( rPar ) // rPar != NULL <=> Es gibt Parameter
+ if ( rPar ) // rPar != NULL <=> there are parameters
{
sal_uInt16 n;
String aX;
@@ -1928,7 +1928,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
}
break;
case ID_QAErrorLog:
- if ( rPar ) // rPar != NULL <=> Es gibt Parameter
+ if ( rPar )
{
sal_uInt16 n;
String aSammel;
@@ -1941,7 +1941,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
}
break;
case ID_PrintLog:
- if ( rPar ) // rPar != NULL <=> Es gibt Parameter
+ if ( rPar )
{
sal_uInt16 n;
String aSammel;
@@ -1954,7 +1954,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
}
break;
case ID_WarnLog:
- if ( rPar ) // rPar != NULL <=> Es gibt Parameter
+ if ( rPar )
{
sal_uInt16 n;
String aSammel;
@@ -1982,7 +1982,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
}
break;
case ID_GetNextCloseWindow:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar )
{
SetError( SbxERR_NOTIMP );
}
@@ -2012,7 +2012,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
{
WaitForAnswer();
}
- // f�r einige noch etwas Nachbehandlung
+
switch ( ((SbxTransportMethod*)pVar)->nValue )
{
case RC_WinTree:
@@ -2022,7 +2022,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
}
break;
case ID_Dispatch:
- if ( !rPar || (rPar->Count() % 2) == 1 ) // rPar = NULL <=> Kein Parameter ansonsten Gerade Anzahl(Ungerade, da immer Anzahl+1
+ if ( !rPar || (rPar->Count() % 2) == 1 )
{
if ( SingleCommandBlock )
BeginBlock();
@@ -2036,7 +2036,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_UNODispatch:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter ansonsten Gerade Anzahl(Ungerade, da immer Anzahl+1
+ if ( !rPar )
{
if ( SingleCommandBlock )
BeginBlock();
@@ -2112,11 +2112,11 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
break;
case ID_GetUnoApp:
{
- // Hier wird der Remote UNO Kram gestartet
- // Eintrag in die Konfiguration unter
+ // the remote UNO stuff is started here
+ // entry into the configuration at
// org.openoffice.Office.Common/Start/Connection
// socket,host=0,port=12345;iiop;XBla
- // oder
+ // or
// socket,host=0,port=12345;urp;;XBla
String aString;
@@ -2144,7 +2144,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
Reference< XInterface > xRet( xBridge->getInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) );
smgr_xMultiserviceFactory = Reference< XMultiServiceFactory >(xRet, UNO_QUERY);
- //MBA fragen!!
+ // ask MBA!!
}
catch( class Exception & rEx)
{
@@ -2168,7 +2168,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
break;
case ID_GetIServer:
{
- // Hier wird der Remote UNO Kram gestartet
+ // remote UNO stuff is started here
String aString;
@@ -2211,7 +2211,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
{
switch (rPar->Get( 1 )->GetType())
{
- case SbxLONG: // alles immer als Short �bertragen
+ case SbxLONG: // pass always everything as Short
case SbxULONG:
case SbxSALINT64:
case SbxSALUINT64:
@@ -2502,7 +2502,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
switch( nHintUserData )
{
case ID_AutoExecute:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar )
{
SingleCommandBlock = pVar->GetBool();
if ( SingleCommandBlock )
@@ -2514,7 +2514,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_WRONG_ARGS );
break;
case ID_EnableQaErrors:
- if ( !rPar ) // rPar = NULL <=> Kein Parameter
+ if ( !rPar )
pImpl->bEnableQaErrors = pVar->GetBool();
else
SetError( SbxERR_WRONG_ARGS );
@@ -2547,12 +2547,12 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
else if( nHintId == SBX_HINT_BASICSTOP )
{
// Log summary to journal
- ADD_CASE_LOG( String() ); // Case abschliessen
+ ADD_CASE_LOG( String() ); // close case
ADD_MESSAGE_LOG( CUniString("***************************************************") );
if ( pImpl->nErrorCount )
{
ADD_WARNING_LOG( GEN_RES_STR1( S_ERRORS_DETECTED, String::CreateFromInt32( pImpl->nErrorCount ) ) );
- pImpl->nWarningCount--; // Anpassen, da diese Warnung nicht in die Statistik soll
+ pImpl->nWarningCount--; // adjust because this warning shall not be in the statistics
}
else
ADD_MESSAGE_LOG( GEN_RES_STR0( S_NO_ERRORS_DETECTED ) );
@@ -2596,7 +2596,7 @@ void TestToolObj::DebugFindNoErrors( sal_Bool bDebugFindNoErrors )
SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
{
if ( BasicRuntimeAccess::IsRunInit()
- || ( aStr == String( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ) ) ) // wegen Find im "Global" Befehl des Basic
+ || ( aStr == String( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ) ) ) // because of find in the "global" command of the basic
return NULL;
SbxVariableRef Old = SbxObject::Find(aStr, aType );
@@ -2615,7 +2615,7 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
sal_uInt16 nElement;
ControlDef *pWhatName = new ControlDef(aStr,rtl::OString());
- /// nach Controls suchen
+ /// look for controls
if (m_pNameKontext && m_pNameKontext->Seek_Entry(pWhatName,&nElement))
{
delete pWhatName;
@@ -2661,7 +2661,7 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
return pImpl->pControlsObj;
}
- /// Nach slots suchen
+ /// look for slots
if (m_pSIds && m_pSIds->Seek_Entry(pWhatName,&nElement))
{
SbxTransportMethodRef pMyVar;
@@ -2689,13 +2689,13 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
return pMyVar;
}
- /// es kann sich noch um eine SlotID handeln, die numerisch abgefragt wird, statt ausgef�hrt zu werden
+ /// it might be a SlotID that is asked numerically instead of being executed
if ( aStr.Copy( aStr.Len()-3, 3 ).CompareIgnoreCaseToAscii("_ID") == COMPARE_EQUAL && m_pSIds )
{
delete pWhatName;
pWhatName = new ControlDef( aStr.Copy( 0, aStr.Len()-3 ), rtl::OString() );
if ( m_pSIds->Seek_Entry( pWhatName, &nElement ) )
- { // Nach slots suchen
+ { // look for slots
SbxVariable *pReturn = new SbxVariable;
delete pWhatName;
pWhatName = ( (ControlDef*)m_pSIds->GetObject( nElement ) );
@@ -2836,7 +2836,7 @@ xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_
xub_StrLen nTry2 = 0;
while ( !WasPrecompilerError() && (nTry2 = ImplSearch( aSource, nStart, nEnd, CUniString("try"), nTry+1 )) != STRING_NOTFOUND )
- { // Wir rekursieren erstmal mit dem 2. Try
+ {
if ( nTry2 < nCatch )
nEnd += PreCompilePart( aSource, nTry2, nEndcatch+8, aCatchLabel, nLabelCount ) - nEndcatch-8;
else
@@ -2859,7 +2859,7 @@ xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_
}
String aReplacement;
- int nTotalLength = -3 -5 -8; // try, catch und endcatch fallen raus
+ int nTotalLength = -3 -5 -8; // try, catch and endcatch are separated out
aReplacement.AppendAscii( "on error goto " );
aReplacement += aCatchLabel;
@@ -2926,7 +2926,7 @@ sal_Bool TestToolObj::WasPrecompilerError()
String TestToolObj::PreCompile( String const &aSourceIn )
{
- // Im CTOR zu fr�h, und hier grade nicg rechtzeitig. Start und Stop von Programmausf�hrung
+
StartListening( ((StarBASIC*)GetParent())->GetBroadcaster(), sal_True );
xub_StrLen nTestCase;
@@ -2936,10 +2936,9 @@ String TestToolObj::PreCompile( String const &aSourceIn )
bWasPrecompilerError = sal_False;
HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.")
- aSource = String(' ').Append( aSource ); // Da Schl�sselworte an Position 0 sonst nicht gefunden werden
+ aSource = String(' ').Append( aSource );
-// Erstmal alle "'" Kommentare raus
xub_StrLen nComment;
while ( (nComment = aSource.SearchAscii("'",nStartPos)) != STRING_NOTFOUND )
@@ -2952,7 +2951,7 @@ HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.")
nStringEndCount++;
nIndex--;
}
- if ( (nStringEndCount & 1) == 0 ) // Wir waren also nicht innerhalb eines Strings
+ if ( (nStringEndCount & 1) == 0 )
{
xub_StrLen nComEnd = aSource.SearchAscii("\n",nComment);
@@ -3028,7 +3027,7 @@ void TestToolObj::AddToListByNr( CNames *&pControls, ControlItemUId *&pNewItem )
{
AddName( pControls->GetObject(nNr)->pData->Kurzname, pNewItem->pData->Kurzname );
delete pNewItem;
- pNewItem = (ControlItemUId*)pControls->GetObject(nNr); // f�r einf�gen der S�hne
+ pNewItem = (ControlItemUId*)pControls->GetObject(nNr);
}
else
{
@@ -3044,7 +3043,7 @@ IMPL_LINK( TestToolObj, ReturnResultsLink, CommunicationLink*, pCommLink )
void TestToolObj::ReadHidLstByNumber()
{
- // Die Hid.Lst nach Nummern sortiert einlesen
+
if ( !m_pReverseUIds )
{
String aName = (pImpl->aHIDDir + DirEntry(CUniString("hid.lst"))).GetFull();
@@ -3065,7 +3064,7 @@ void TestToolObj::ReadHidLstByNumber()
void TestToolObj::SortControlsByNumber( sal_Bool bIncludeActive )
{
- // Die Controls einmal hirarchisch und einmal alle flach nach nummer sortiert
+
if ( !m_pReverseControls && !m_pReverseControlsSon && m_pControls )
{
m_pReverseControls = new CNames;
@@ -3080,7 +3079,7 @@ void TestToolObj::SortControlsByNumber( sal_Bool bIncludeActive )
if (! ((ControlItemUIdSon*)pNewFather)->GetSons() )
((ControlItemUIdSon*)pNewFather)->Sons( new CNames );
- // Existieren S�hne, diese in beide Listen eintragen
+
CNames *pControlList = ((ControlItemSon*)m_pControls->GetObject(nWin))->GetSons();
if ( pControlList )
for ( nCont = 0 ; nCont < pControlList->Count() ; nCont++ )
@@ -3105,7 +3104,7 @@ void TestToolObj::SortControlsByNumber( sal_Bool bIncludeActive )
if ( m_pReverseControls->Seek_Entry( pZeroItem, &nNr ) )
{
m_pReverseControls->DeleteAndDestroy( nNr );
-// um VorlagenLaden/UntergeordneteIniDatei/SpeichernDlg/OrdnerDlg/OeffnenDlg/MessageBox/LetzteVersion/GrafikEinfuegenDlg/FarbeDlg/ExportierenDlg/DruckerEinrichten/DruckenDlg/DateiEinfuegenDlg/Active zu verhindern
+// to prevent VorlagenLaden/UntergeordneteIniDatei/SpeichernDlg/OrdnerDlg/OeffnenDlg/MessageBox/LetzteVersion/GrafikEinfuegenDlg/FarbeDlg/ExportierenDlg/DruckerEinrichten/DruckenDlg/DateiEinfuegenDlg/Active
}
delete pZeroItem;
}
@@ -3145,7 +3144,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
else
{
comm_UINT32 nUId;
- pRetStream->Read( nUId ); // bei Sequence einfach die Sequence
+ pRetStream->Read( nUId );
// FIXME: HELPID
#if 0
aUId = rtl::OString( nUId );
@@ -3234,7 +3233,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
ReadHidLstByNumber();
SortControlsByNumber();
- // Alle Slots nach Nummer Sortiert
+
if ( !m_pReverseSlots && m_pSIds )
{
m_pReverseSlots = new CNames;
@@ -3258,7 +3257,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
pWinInfo->aKurzname.Erase();
pWinInfo->aSlotname.Erase();
- // eventuell den Kontext feststellen. Passiert nur beim ersten Eintrag nach reset
+ // detect context maybe - happens only at the first entry after reset
if ( !pReverseControlsKontext && m_pReverseControlsSon )
{
sal_uInt16 nNr;
@@ -3274,13 +3273,13 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
delete pNewItem;
}
- // Reset. Mu� nach bestimmen des Kontext stehen, da sonst mit dem reset-record
- // der Kontext falsch gesetzt wird.
+ // Reset. Must be done after determining the context because the context is set the
+ // wrong way with the reset record otherwise.
if ( pWinInfo->bIsReset )
- pReverseControlsKontext = NULL; // Reihenfolge wichtig!
+ pReverseControlsKontext = NULL; // order important!
- // Kurzname feststellen
+ // get short name
if ( pReverseControlsKontext )
{
sal_uInt16 nNr;
@@ -3292,7 +3291,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
delete pNewItem;
}
- // Slotname feststellen
+
if ( m_pReverseSlots )
{
sal_uInt16 nNr;
@@ -3302,7 +3301,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
delete pNewItem;
}
- // Langname feststellen
+
// FIXME: HELPID
#if 0
if ( aUId.HasString() )
@@ -3492,7 +3491,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
sal_Bool bWriteNewKontext = sal_False;
aControls.Erase();
- // Kurzname feststellen
+
if ( m_pReverseControls )
{
sal_uInt16 nNr;
@@ -3525,7 +3524,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
Sound::Beep( SOUND_WARNING );
}
- // now determin the best common kontext
+ // now determine the best common kontext
sal_uInt16 i,j;
sal_Bool bFoundUlongName = sal_False, bFoundControl = sal_False;
// check for current kontext
@@ -3647,7 +3646,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
xub_StrLen i;
for ( i = 0; i < aString1.Len(); i++ )
{
- if ( ((sal_uInt16)aString1.GetChar(i)) == 1 ) // we have a spechial char
+ if ( ((sal_uInt16)aString1.GetChar(i)) == 1 ) // we have a special char
{
i++;
if ( !bIsProsa )
@@ -3762,7 +3761,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
else
{
comm_UINT32 nUId;
- pRetStream->Read( nUId ); // bei Sequence einfach die Sequence
+ pRetStream->Read( nUId );
// FIXME: HELPID
#if 0
aUId = rtl::OString( nUId );
@@ -3808,7 +3807,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
String TestToolObj::GetMethodName( sal_uLong nMethodId )
{
sal_uInt16 nElement;
- if ( !Controls::pClasses ) // Ist static, wird also nur einmal geladen
+ if ( !Controls::pClasses )
ReadFlatArray( Controls::arClasses, Controls::pClasses );
if ( Controls::pClasses )
{
@@ -3828,7 +3827,7 @@ String TestToolObj::GetMethodName( sal_uLong nMethodId )
String TestToolObj::GetKeyName( sal_uInt16 nKeyCode )
{
sal_uInt16 nElement;
- if ( !CmdStream::pKeyCodes ) // Ist static, wird also nur einmal geladen
+ if ( !CmdStream::pKeyCodes )
ReadFlatArray( CmdStream::arKeyCodes, CmdStream::pKeyCodes );
if ( CmdStream::pKeyCodes )
{
@@ -3881,7 +3880,7 @@ static ControlDefLoad const arRes_Type [] =
if ( aType.CompareTo(RcKenn ) == COMPARE_EQUAL )
{
bFound = sal_True;
- if ( !pRCommands ) // Ist static, wird also nur einmal geladen
+ if ( !pRCommands )
ReadFlatArray( arR_Cmds, pRCommands );
sal_uInt16 nElement;
@@ -3903,7 +3902,7 @@ static ControlDefLoad const arRes_Type [] =
if ( aType.CompareTo(TypeKenn ) == COMPARE_EQUAL )
{
bFound = sal_True;
- if ( !pRTypes ) // Ist static, wird also nur einmal geladen
+ if ( !pRTypes )
ReadFlatArray( arRes_Type, pRTypes );
sal_uInt16 nElement;
@@ -3966,7 +3965,7 @@ SbTextType TestToolObj::GetSymbolType( const String &rSymbol, sal_Bool bWasContr
if ( bWasControl )
{
- if ( !Controls::pClasses ) // Ist static, wird also nur einmal geladen
+ if ( !Controls::pClasses )
ReadFlatArray( Controls::arClasses, Controls::pClasses );
if ( (Controls::pClasses && Controls::pClasses->Seek_Entry( &WhatName ))
@@ -3977,7 +3976,7 @@ SbTextType TestToolObj::GetSymbolType( const String &rSymbol, sal_Bool bWasContr
return TT_NOMETHOD;
}
- // Die Controls durchsuchen
+
if ( m_pControls )
{
sal_uInt16 nWin;
@@ -3989,24 +3988,24 @@ SbTextType TestToolObj::GetSymbolType( const String &rSymbol, sal_Bool bWasContr
}
}
- // Die Slots durchsuchen
+
if ( m_pSIds && m_pSIds->Seek_Entry( &WhatName ) )
return TT_SLOT;
- // Ist es ein RemoteCommand
- if ( !pRCommands ) // Ist static, wird also nur einmal geladen
+
+ if ( !pRCommands )
ReadFlatArray( arR_Cmds, pRCommands );
if ( pRCommands && pRCommands->Seek_Entry( &WhatName ) )
return TT_REMOTECMD;
- // Wenns sonst nix war, dann vielleicht ein Lokales Kommando
+
SbxVariable *pVar = SbxObject::Find( rSymbol, SbxCLASS_DONTCARE );
if ( pVar && ( pVar->ISA(SbxMethod) || pVar->ISA(SbxProperty) ) )
{
return TT_LOCALCMD;
}
- return SB_SYMBOL; // Alles was hier landet ist vom Typ SB_SYMBOL und bleibt es auch
+ return SB_SYMBOL;
}
@@ -4040,7 +4039,7 @@ void Controls::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SbxVariable* Controls::Find( const String& aStr, SbxClassType aType)
{
- if ( !pClasses ) // Ist static, wird also nur einmal geladen
+ if ( !pClasses )
ReadFlatArray( arClasses, pClasses );
if ( GetUserData() == ID_ErrorDummy )
@@ -4078,9 +4077,9 @@ SbxVariable* Controls::Find( const String& aStr, SbxClassType aType)
String TTFormat::ms2s( sal_uLong nMilliSeconds )
{
- if ( nMilliSeconds < 100000 ) // 100 Sekunden
+ if ( nMilliSeconds < 100000 )
return String::CreateFromInt64( nMilliSeconds );
- if ( nMilliSeconds < 100000*60 ) // 100 Minuten
+ if ( nMilliSeconds < 100000*60 )
return String::CreateFromInt32( nMilliSeconds / 1000 ).AppendAscii("Sec");
return String::CreateFromInt32( nMilliSeconds / 1000 / 60 ).AppendAscii("Min");
}
diff --git a/automation/source/testtool/objtest.hxx b/automation/source/testtool/objtest.hxx
index 5c95fea3dd05..f4aa1b0cbb4c 100644
--- a/automation/source/testtool/objtest.hxx
+++ b/automation/source/testtool/objtest.hxx
@@ -44,7 +44,7 @@
// #define ID_EndBlock 2
#define ID_Kontext 3
#define ID_GetError 4
-#define ID_ErrorDummy 5 // Intern zum Behandlen von Fehlenden Controls und Methoden
+#define ID_ErrorDummy 5 // internal for handling of missing controls and methods
#define ID_RecordError 6
#define ID_Start 7
//#define ID_Kill 8
@@ -139,7 +139,7 @@ SV_DECL_PTRARR_SORT_DEL(CNames, ControlItem*, 50, 10)
class ControlSon
{
protected:
- CNames *pSons; // um sicherzustelle, da� nur S�hne des richtien Type reinkommen
+ CNames *pSons;
public:
ControlSon() : pSons( NULL ) {};
@@ -223,7 +223,7 @@ public:
void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
virtual SbxVariable* Find( const String&, SbxClassType );
- SbxTransportMethodRef pMethodVar; // zum Transport von Find nach Notify
+ SbxTransportMethodRef pMethodVar; // for transport from Find to Notify
static CNames *pClasses;
static ControlDefLoad const arClasses [];
};
@@ -234,23 +234,24 @@ typedef std::map< String, String > Environment;
class ImplTestToolObj
{
public:
- String ProgParam; // Parameter der zu Testenden APP; Gesetzt �ber Start
+ String ProgParam; // parameters of the APP to be tested; set over Start
- DirEntry aFileBase; // Grundpfad f�r die *.sid und *.win Dateien (Aus Configdatei)
- DirEntry aLogFileBase; // Grundpfad f�r die *.res Dateien (Aus Configdatei)
- DirEntry aHIDDir; // Verzeichnis, in dem die hid.lst gesucht wird
+ DirEntry aFileBase; // base path for the *.sid and *.win files (from the configfile)
+ DirEntry aLogFileBase; // base path for the *.res files (from the configfile)
+ DirEntry aHIDDir; // directory in which the hid.lst is searched for
- SbxTransportMethodRef pNextReturn; // Verweis auf die Var, die den Returnwert aufnimmt.
+ SbxTransportMethodRef pNextReturn;
+
+ ControlsRef pControlsObj;
- ControlsRef pControlsObj; // Jeweiliges Objekt, an dem Methoden aufgerufen weden.
#define VAR_POOL_SIZE 8
- SbxTransportMethodRef pMyVars[VAR_POOL_SIZE]; // Falls in Ausdr�cken mehrere verwendet werden
+ SbxTransportMethodRef pMyVars[VAR_POOL_SIZE];
Time aServerTimeout;
-// Profiling Datenfelder
+// profiling data fields
sal_uLong LocalStarttime;
sal_uInt16 nNumBorders;
sal_uLong naValBorders[4];
@@ -262,7 +263,7 @@ public:
sal_uLong nMaxRemoteCommandDelay;
sal_Bool bDoRemoteCommandDelay;
- sal_Bool bLnaguageExtensionLoaded; // Wurde �ber 'use' was geladen? F�r syntax highlighting
+ sal_Bool bLnaguageExtensionLoaded; // something loaded via 'use'? for syntax highlighting
SfxBroadcaster *pTTSfxBroadcaster;
sal_uLong nErrorCount;
diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx
index 82583a414e0a..7a2fcf32e14e 100644
--- a/automation/source/testtool/tcommuni.cxx
+++ b/automation/source/testtool/tcommuni.cxx
@@ -71,7 +71,7 @@ sal_Bool CommunicationManagerClientViaSocketTT::RetryConnect()
{
if ( !bApplicationStarted )
{
- // Die App ist wohl nicht da. Starten wir sie mal.
+
if ( aAppPath.Len() )
{
delete pProcess;
@@ -84,7 +84,7 @@ sal_Bool CommunicationManagerClientViaSocketTT::RetryConnect()
if ( bSucc )
{
- aFirstRetryCall = Time() + Time( 0, 1 ); // Max eine Minute Zeit
+ aFirstRetryCall = Time() + Time( 0, 1 );
for ( int i = 10 ; i-- ; )
GetpApp()->Reschedule();
}
@@ -97,7 +97,7 @@ sal_Bool CommunicationManagerClientViaSocketTT::RetryConnect()
if ( aFirstRetryCall > Time() )
{
Timer aWait;
- aWait.SetTimeout( 500 ); // Max 500 mSec
+ aWait.SetTimeout( 500 );
aWait.Start();
while ( aWait.IsActive() )
GetpApp()->Yield();