summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
Diffstat (limited to 'automation')
-rw-r--r--automation/inc/automation/commtypes.hxx38
-rw-r--r--automation/inc/automation/communi.hxx64
-rw-r--r--automation/inc/automation/simplecm.hxx130
-rw-r--r--automation/source/app/testbasi.cxx12
-rw-r--r--automation/source/app/testbasi.hxx6
-rw-r--r--automation/source/communi/communi.cxx112
-rw-r--r--automation/source/inc/cmdbasestream.hxx29
-rw-r--r--automation/source/inc/rcontrol.hxx34
-rw-r--r--automation/source/inc/testapp.hxx59
-rw-r--r--automation/source/inc/testtool.hxx6
-rw-r--r--automation/source/miniapp/editwin.cxx10
-rw-r--r--automation/source/miniapp/editwin.hxx6
-rw-r--r--automation/source/miniapp/servres.cxx4
-rw-r--r--automation/source/miniapp/servres.hrc6
-rw-r--r--automation/source/miniapp/servres.hxx4
-rw-r--r--automation/source/miniapp/servres.src2
-rw-r--r--automation/source/miniapp/servuid.hxx22
-rw-r--r--automation/source/miniapp/testapp.cxx13
-rw-r--r--automation/source/miniapp/testapp.hxx8
-rw-r--r--automation/source/server/XMLParser.cxx84
-rw-r--r--automation/source/server/cmdbasestream.cxx85
-rw-r--r--automation/source/server/editwin.cxx14
-rw-r--r--automation/source/server/editwin.hxx10
-rw-r--r--automation/source/server/prof_nul.cxx2
-rw-r--r--automation/source/server/prof_usl.cxx6
-rw-r--r--automation/source/server/profiler.cxx40
-rw-r--r--automation/source/server/profiler.hxx42
-rw-r--r--automation/source/server/recorder.cxx138
-rw-r--r--automation/source/server/recorder.hxx21
-rw-r--r--automation/source/server/retstrm.cxx53
-rw-r--r--automation/source/server/retstrm.hxx30
-rw-r--r--automation/source/server/scmdstrm.cxx10
-rw-r--r--automation/source/server/server.cxx115
-rw-r--r--automation/source/server/server.hxx12
-rw-r--r--automation/source/server/sta_list.cxx264
-rw-r--r--automation/source/server/statemnt.cxx1264
-rw-r--r--automation/source/server/statemnt.hxx274
-rw-r--r--automation/source/simplecm/packethandler.cxx44
-rw-r--r--automation/source/simplecm/packethandler.hxx2
-rw-r--r--automation/source/simplecm/simplecm.cxx96
-rw-r--r--automation/source/testtool/cmdstrm.cxx91
-rw-r--r--automation/source/testtool/cmdstrm.hxx20
-rw-r--r--automation/source/testtool/comm_bas.cxx64
-rw-r--r--automation/source/testtool/comm_bas.hxx32
-rw-r--r--automation/source/testtool/cretstrm.cxx2
-rw-r--r--automation/source/testtool/cretstrm.hxx4
-rw-r--r--automation/source/testtool/httprequest.cxx26
-rw-r--r--automation/source/testtool/httprequest.hxx20
-rw-r--r--automation/source/testtool/objtest.cxx610
-rw-r--r--automation/source/testtool/objtest.hxx107
-rw-r--r--automation/source/testtool/tcommuni.cxx42
-rw-r--r--automation/source/testtool/tcommuni.hxx14
-rw-r--r--[-rwxr-xr-x]automation/util/manually_added_ids.hid0
53 files changed, 2136 insertions, 2067 deletions
diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx
index 1dc7f4383559..adfe4561b132 100644
--- a/automation/inc/automation/commtypes.hxx
+++ b/automation/inc/automation/commtypes.hxx
@@ -32,7 +32,7 @@
* This file is intended to supply the types and defines for Environment independent
* building of the packethandler
* Only adaption of this file should be necessary. Else it is a bug!
- * Eather including apropriate files or defining the types when not available in the environment
+ * Ether including apropriate files or defining the types when not available in the environment
*
************************************************************************/
@@ -53,48 +53,24 @@
#include <sal/types.h>
typedef sal_Unicode comm_UniChar;
-
-// this is a trick to be sure the SO types are unknown, so the compiler will yell at us in case we use them
-#ifndef _SOLAR_H
-#define NO_SOLAR
-#endif
-
-#ifdef NO_SOLAR
-#define BYTE BYTE_hidden
-#define BOOL BOOL_hidden
-#define ULONG ULONG_hidden
-#define USHORT USHORT_hidden
-#define UINT16 UINT16_hidden
-#define UINT32 UINT32_hidden
-
-#endif
+#include "rtl/string.hxx"
//#define DBG_ASSERT( cond, text )
//#define DBG_ERROR( text )
#include <tools/debug.hxx>
#include <tools/solar.h>
-typedef BYTE comm_BYTE;
-typedef BOOL comm_BOOL;
+typedef sal_uInt8 comm_BYTE;
+typedef sal_Bool comm_BOOL;
typedef sal_uInt32 comm_ULONG;
typedef sal_uInt16 comm_USHORT;
-typedef UINT16 comm_UINT16;
-typedef UINT32 comm_UINT32;
-
-#ifdef NO_SOLAR
-#undef BYTE
-#undef BOOL
-#undef ULONG
-#undef USHORT
-#undef UINT16
-#undef UINT32
-
-#endif
+typedef sal_uInt16 comm_UINT16;
+typedef sal_uInt32 comm_UINT32;
typedef sal_uInt16 comm_WORD;
typedef sal_uInt32 comm_DWORD;
-class SmartId;
+class rtl::OString;
class String;
#define comm_String String
diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx
index 5f873f5b393f..2c8ac15b6bd8 100644
--- a/automation/inc/automation/communi.hxx
+++ b/automation/inc/automation/communi.hxx
@@ -45,14 +45,14 @@ SV_DECL_PTRARR_SORT( CommunicationLinkList, CommunicationLink*, 1, 10 )
class MultiCommunicationManager : public CommunicationManager
{
public:
- MultiCommunicationManager( BOOL bUseMultiChannel = FALSE );
+ MultiCommunicationManager( sal_Bool bUseMultiChannel = sal_False );
virtual ~MultiCommunicationManager();
- virtual BOOL StopCommunication(); // Hält alle CommunicationLinks an
- virtual BOOL IsLinkValid( CommunicationLink* pCL );
- virtual USHORT GetCommunicationLinkCount();
- virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr );
+ virtual sal_Bool StopCommunication();
+ virtual sal_Bool IsLinkValid( CommunicationLink* pCL );
+ virtual sal_uInt16 GetCommunicationLinkCount();
+ virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr );
- void DoQuickShutdown( BOOL bQuickShutdown = TRUE) { bGracefullShutdown = !bQuickShutdown; }
+ void DoQuickShutdown( sal_Bool bQuickShutdown = sal_True) { bGracefullShutdown = !bQuickShutdown; }
protected:
virtual void CallConnectionOpened( CommunicationLink* pCL );
@@ -60,21 +60,21 @@ protected:
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
- virtual void DestroyingLink( CommunicationLink *pCL ); // Link trägt sich im Destruktor aus
+ virtual void DestroyingLink( CommunicationLink *pCL );
- BOOL bGracefullShutdown;
+ sal_Bool bGracefullShutdown;
};
class CommunicationManagerServer : public MultiCommunicationManager
{
public:
- CommunicationManagerServer( BOOL bUseMultiChannel = FALSE ):MultiCommunicationManager( bUseMultiChannel ){;}
+ CommunicationManagerServer( sal_Bool bUseMultiChannel = sal_False ):MultiCommunicationManager( bUseMultiChannel ){;}
};
class CommunicationManagerClient : public MultiCommunicationManager, public ICommunicationManagerClient
{
public:
- CommunicationManagerClient( BOOL bUseMultiChannel = FALSE );
+ CommunicationManagerClient( sal_Bool bUseMultiChannel = sal_False );
};
class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public osl::Thread
@@ -83,14 +83,14 @@ public:
CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket );
virtual ~CommunicationLinkViaSocket();
- virtual BOOL IsCommunicationError();
- virtual BOOL DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
+ virtual sal_Bool IsCommunicationError();
+ virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
// Diese sind Virtuelle Links!!!!
virtual long ConnectionClosed( void* = NULL );
virtual long DataReceived( void* = NULL );
- virtual BOOL StopCommunication();
+ virtual sal_Bool StopCommunication();
void SetPutDataReceivedHdl( Link lPutDataReceived ){ mlPutDataReceived = lPutDataReceived; }
Link GetDataReceivedLink () {Link aLink = LINK( this, CommunicationLinkViaSocket, DataReceived ); return aLink;}
@@ -99,17 +99,17 @@ public:
protected:
virtual void SAL_CALL run();
- virtual BOOL ShutdownCommunication();
- ULONG nConnectionClosedEventId;
- ULONG nDataReceivedEventId;
+ 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
virtual void WaitForShutdown();
DECL_LINK( ShutdownLink, void* );
Timer aShutdownTimer;
- BOOL bShutdownStarted;
- BOOL bDestroying;
+ sal_Bool bShutdownStarted;
+ sal_Bool bDestroying;
Link mlPutDataReceived;
};
@@ -119,15 +119,15 @@ class CommunicationManagerServerViaSocket : public CommunicationManagerServer
public:
using CommunicationManager::StartCommunication;
- CommunicationManagerServerViaSocket( ULONG nPort, USHORT nMaxCon, BOOL bUseMultiChannel = FALSE );
+ CommunicationManagerServerViaSocket( sal_uLong nPort, sal_uInt16 nMaxCon, sal_Bool bUseMultiChannel = sal_False );
virtual ~CommunicationManagerServerViaSocket();
- virtual BOOL StartCommunication();
- virtual BOOL StopCommunication();
+ virtual sal_Bool StartCommunication();
+ virtual sal_Bool StopCommunication();
protected:
- ULONG nPortToListen;
- USHORT nMaxConnections;
+ sal_uLong nPortToListen;
+ sal_uInt16 nMaxConnections;
private:
CommunicationManagerServerAcceptThread *pAcceptThread;
@@ -137,7 +137,7 @@ private:
class CommunicationManagerServerAcceptThread: public osl::Thread
{
public:
- CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS );
+ CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, sal_uLong nPort, sal_uInt16 nMaxCon = CM_UNLIMITED_CONNECTIONS );
virtual ~CommunicationManagerServerAcceptThread();
CommunicationLinkRef GetNewConnection(){ CommunicationLinkRef xTemp = xmNewConnection; xmNewConnection.Clear(); return xTemp; }
@@ -147,9 +147,9 @@ protected:
private:
CommunicationManagerServerViaSocket* pMyServer;
osl::AcceptorSocket* pAcceptorSocket;
- ULONG nPortToListen;
- USHORT nMaxConnections;
- ULONG nAddConnectionEventId;
+ sal_uLong nPortToListen;
+ sal_uInt16 nMaxConnections;
+ sal_uLong nAddConnectionEventId;
osl::Mutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); }
CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); }
@@ -164,16 +164,16 @@ class CommunicationManagerClientViaSocket : public CommunicationManagerClient, C
public:
using CommunicationManager::StartCommunication;
- CommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel = FALSE );
- CommunicationManagerClientViaSocket( BOOL bUseMultiChannel = FALSE );
+ CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False );
+ CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False );
virtual ~CommunicationManagerClientViaSocket();
- virtual BOOL StartCommunication(){ return StartCommunication( aHostToTalk, nPortToTalk );}
- virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );}
+ virtual sal_Bool StartCommunication(){ return StartCommunication( aHostToTalk, nPortToTalk );}
+ virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );}
private:
ByteString aHostToTalk;
- ULONG nPortToTalk;
+ sal_uLong nPortToTalk;
protected:
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
};
diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx
index 775265c31f89..dd522cb3beeb 100644
--- a/automation/inc/automation/simplecm.hxx
+++ b/automation/inc/automation/simplecm.hxx
@@ -37,14 +37,14 @@
#include <automation/commdefines.hxx>
-// CM steht für CommunicationManager
+// CM steht f�r CommunicationManager
#define CM_UNLIMITED_CONNECTIONS 0xffff
-typedef USHORT CM_NameType;
+typedef sal_uInt16 CM_NameType;
#define CM_DOTTED ( (CM_NameType) 01 )
#define CM_FQDN ( (CM_NameType) 02 )
-typedef USHORT CM_InfoType;
+typedef sal_uInt16 CM_InfoType;
// nur eines dieser 3 defines darf verwendet werden
#define CM_NO_TEXT ( (CM_InfoType) 01 )
#define CM_SHORT_TEXT ( (CM_InfoType) 02 )
@@ -124,9 +124,9 @@ protected:
friend class SingleCommunicationManager;
friend class MultiCommunicationManager;
friend class CommunicationManagerServerAcceptThread;
- // Darf nicht abgeräumt werden zwischen Empfang des Streams und ende des Callbacks
+ // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks
-protected: // so daß nur über Ref gelöscht werden kann
+protected: // so da� nur �ber Ref gel�scht werden kann
virtual ~CommunicationLink();
void InvalidateManager() { pMyManager = NULL; }
@@ -135,8 +135,8 @@ protected: // so daß nur über Ref gelöscht werden kann
public:
CommunicationLink( CommunicationManager *pMan );
- virtual BOOL StopCommunication()=0;
- virtual BOOL IsCommunicationError()=0;
+ virtual sal_Bool StopCommunication()=0;
+ virtual sal_Bool IsCommunicationError()=0;
CommunicationManager* GetCommunicationManager(){ return pMyManager; }
// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren
@@ -151,27 +151,27 @@ public:
/** will call virtual function DoTransferDataStream to do actual work
Purpos is to allow housekeeping
**/
- BOOL TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
+ 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.
- UINT16 GetProtocol(){ return nServiceProtocol; }
+ // 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.
+ sal_uInt16 GetProtocol(){ return nServiceProtocol; }
- // Der Stream wird hier übergeben. Der Aufrufer ist für dessen Löschung zuständig
+ // 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.
SvStream* GetServiceData(){ SvStream *pTemp = pServiceData; pServiceData = NULL; return pTemp; }
- /// Ermöglicht das Auslösen des nächsten Callbacks. Wird auch Implizit gerufen.
- void FinishCallback(){ bIsInsideCallback = FALSE; }
+ /// Erm�glicht das Ausl�sen des n�chsten Callbacks. Wird auch Implizit gerufen.
+ void FinishCallback(){ bIsInsideCallback = sal_False; }
- /// Syncrones Empfangen der Daten. Nur für Kommandozeile, sonst leer implementiert
- virtual BOOL ReceiveDataStream(){ return FALSE; }
+ /// Syncrones Empfangen der Daten. Nur f�r Kommandozeile, sonst leer implementiert
+ virtual sal_Bool ReceiveDataStream(){ return sal_False; }
/// Statistics
DateTime GetStart() { return aStart; }
- ULONG GetTotalBytes() { return nTotalBytes; }
+ sal_uLong GetTotalBytes() { return nTotalBytes; }
DateTime GetLastAccess() { return aLastAccess; }
const ByteString& GetApplication() { return maApplication; }
virtual void SetApplication( const ByteString& aApp );
@@ -184,23 +184,23 @@ protected:
virtual DECL_LINK( ConnectionClosed, void* = NULL );
virtual DECL_LINK( DataReceived, void* = NULL );
- virtual BOOL DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
+ virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
SvStream *pServiceData;
- UINT16 nServiceProtocol;
- UINT16 nServiceHeaderType;
+ sal_uInt16 nServiceProtocol;
+ sal_uInt16 nServiceHeaderType;
- /// Verhindert das vorzeitige Auslösen des nächsten Callbacks.
- void StartCallback(){ bIsInsideCallback = TRUE; }
- BOOL bIsInsideCallback;
+ /// Verhindert das vorzeitige Ausl�sen des n�chsten Callbacks.
+ void StartCallback(){ bIsInsideCallback = sal_True; }
+ sal_Bool bIsInsideCallback;
- virtual BOOL SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL)=0;
+ virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL)=0;
- virtual BOOL ShutdownCommunication() = 0; /// Really stop the Communication
+ virtual sal_Bool ShutdownCommunication() = 0; /// Really stop the Communication
/// Statistics
DateTime aStart;
- ULONG nTotalBytes;
+ sal_uLong nTotalBytes;
DateTime aLastAccess;
private:
@@ -209,8 +209,8 @@ private:
#if OSL_DEBUG_LEVEL > 1
public:
// misc (debuging) purposes
- BOOL bFlag;
- ULONG nSomething;
+ sal_Bool bFlag;
+ sal_uLong nSomething;
#endif
};
@@ -223,23 +223,23 @@ class CommunicationManager
friend class CommunicationLink;
friend class CommonSocketFunctions;
public:
- CommunicationManager( BOOL bUseMultiChannel = FALSE );
+ CommunicationManager( sal_Bool bUseMultiChannel = sal_False );
virtual ~CommunicationManager();
- virtual BOOL StartCommunication()=0;
- virtual BOOL StartCommunication( String aApp, String aParams );
- virtual BOOL StartCommunication( ByteString aHost, ULONG nPort );
- virtual BOOL StopCommunication()=0; // Hält alle CommunicationLinks an
- virtual BOOL IsCommunicationRunning() { return bIsCommunicationRunning; }
-// virtual BOOL IsCommunicationError();
+ 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 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 BOOL IsLinkValid( CommunicationLink* pCL )=0; // Notwendig für call im Destruktor
+ virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // Notwendig f�r call im Destruktor
- virtual USHORT GetCommunicationLinkCount()=0;
- virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr )=0;
+ 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; }
@@ -252,8 +252,8 @@ public:
void SetInfoType( CM_InfoType nIT ){ nInfoType = nIT; }
CM_InfoType GetInfoType(){ return nInfoType; }
- BOOL IsMultiChannel(){ return bIsMultiChannel; }
- void SetApplication( const ByteString& aApp, BOOL bRunningLinks = FALSE );
+ sal_Bool IsMultiChannel(){ return bIsMultiChannel; }
+ void SetApplication( const ByteString& aApp, sal_Bool bRunningLinks = sal_False );
const ByteString& GetApplication() { return maApplication; }
protected:
@@ -266,15 +266,15 @@ protected:
CM_InfoType nInfoType;
- // Diese Routinen rufen den Link oder sind überladen
+ // Diese Routinen rufen den Link oder sind �berladen
virtual void ConnectionOpened( CommunicationLink* pCL ){ mlConnectionOpened.Call( pCL ); }
virtual void ConnectionClosed( CommunicationLink* pCL ){ mlConnectionClosed.Call( pCL ); }
virtual void DataReceived( CommunicationLink* pCL ){ mlDataReceived.Call( pCL ); }
virtual void InfoMsg( InfoString aMsg ){ mlInfoMsg.Call( &aMsg ); }
- BOOL bIsCommunicationRunning;
+ sal_Bool bIsCommunicationRunning;
- virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link trägt sich im Destruktor aus
+ virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link tr�gt sich im Destruktor aus
private:
ByteString maApplication;
@@ -284,40 +284,40 @@ private:
Link mlInfoMsg;
CommunicationLinkRef xLastNewLink;
- BOOL bIsMultiChannel;
+ sal_Bool bIsMultiChannel;
};
class SingleCommunicationManager : public CommunicationManager
{
public:
- SingleCommunicationManager( BOOL bUseMultiChannel = FALSE );
+ SingleCommunicationManager( sal_Bool bUseMultiChannel = sal_False );
virtual ~SingleCommunicationManager();
- virtual BOOL StopCommunication(); // Hält alle CommunicationLinks an
- virtual BOOL IsLinkValid( CommunicationLink* pCL );
- virtual USHORT GetCommunicationLinkCount();
- virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr );
+ virtual sal_Bool StopCommunication(); // H�lt alle CommunicationLinks an
+ virtual sal_Bool IsLinkValid( CommunicationLink* pCL );
+ virtual sal_uInt16 GetCommunicationLinkCount();
+ virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr );
protected:
virtual void CallConnectionOpened( CommunicationLink* pCL );
virtual void CallConnectionClosed( CommunicationLink* pCL );
CommunicationLinkRef xActiveLink;
CommunicationLink *pInactiveLink;
- virtual void DestroyingLink( CommunicationLink *pCL ); // Link trägt sich im Destruktor aus
+ virtual void DestroyingLink( CommunicationLink *pCL ); // Link tr�gt sich im Destruktor aus
};
class ICommunicationManagerClient
{
friend class CommonSocketFunctions;
protected:
- virtual BOOL RetryConnect() { return FALSE; } // Kann dann eventuell die Applikation starten
+ virtual sal_Bool RetryConnect() { return sal_False; } // Kann dann eventuell die Applikation starten
};
class TCPIO;
class SimpleCommunicationLinkViaSocket : public CommunicationLink
{
public:
- virtual BOOL IsCommunicationError();
- virtual BOOL StopCommunication();
+ virtual sal_Bool IsCommunicationError();
+ virtual sal_Bool StopCommunication();
virtual ByteString GetCommunicationPartner( CM_NameType eType );
virtual ByteString GetMyName( CM_NameType eType );
@@ -339,10 +339,10 @@ protected:
void SetStreamSocket( osl::StreamSocket* pSocket );
SvStream *pReceiveStream;
- BOOL DoReceiveDataStream(); /// Recieve DataPacket from Socket
- virtual BOOL SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL);
+ sal_Bool DoReceiveDataStream(); /// Recieve DataPacket from Socket
+ virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL);
bool IsReceiveReady();
- BOOL bIsRequestShutdownPending;
+ sal_Bool bIsRequestShutdownPending;
virtual void WaitForShutdown()=0;
void SetNewPacketAsCurrent();
};
@@ -352,16 +352,16 @@ class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommun
public:
SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket );
~SimpleCommunicationLinkViaSocketWithReceiveCallbacks();
- virtual BOOL ReceiveDataStream();
+ virtual sal_Bool ReceiveDataStream();
protected:
- virtual BOOL ShutdownCommunication(); /// Really stop the Communication
+ virtual sal_Bool ShutdownCommunication(); /// Really stop the Communication
virtual void WaitForShutdown();
};
class CommonSocketFunctions
{
public:
- BOOL DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort );
+ sal_Bool DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort );
protected:
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0;
};
@@ -371,13 +371,13 @@ class SingleCommunicationManagerClientViaSocket : public SingleCommunicationMana
public:
using CommunicationManager::StartCommunication;
- SingleCommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel = FALSE );
- SingleCommunicationManagerClientViaSocket( BOOL bUseMultiChannel = FALSE );
- virtual BOOL StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );}
- virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );}
+ SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False );
+ SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False );
+ virtual sal_Bool StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );}
+ virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );}
private:
ByteString aHostToTalk;
- ULONG nPortToTalk;
+ sal_uLong nPortToTalk;
protected:
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
};
diff --git a/automation/source/app/testbasi.cxx b/automation/source/app/testbasi.cxx
index 101d72b3471b..87ecf3e72045 100644
--- a/automation/source/app/testbasi.cxx
+++ b/automation/source/app/testbasi.cxx
@@ -43,7 +43,7 @@ TYPEINIT1(TTBasic,MyBasic)
/*class MyFactory : public SbxFactory
{
public:
- virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
+ virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
};
static SampleObjectFac aFac1;
@@ -52,7 +52,7 @@ static CommunicationFactory aComManFac;
static ProcessFactory aProcessFac;
static short nInst = 0;
-SbxBase* MyFactory::Create( UINT16 nSbxId, UINT32 nCr )
+SbxBase* MyFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCr )
{
if( nCr == SBXCR_TEST && nSbxId == SBXID_MYBASIC )
return new MyBasic;
@@ -87,7 +87,7 @@ void TTBasic::LoadIniFile()
((TestToolObj*)pTestObject)->LoadIniFile();
}
-SbTextType TTBasic::GetSymbolType( const String &rSymbol, BOOL bWasTTControl )
+SbTextType TTBasic::GetSymbolType( const String &rSymbol, sal_Bool bWasTTControl )
{
return ((TestToolObj*)pTestObject)->GetSymbolType( rSymbol, bWasTTControl );
}
@@ -102,7 +102,7 @@ IMPL_LINK( TTBasic, CErrorImpl, ErrorEntry*, pData )
return CError( pData->nError, pData->aText, pData->nLine, pData->nCol1, pData->nCol2 );
}
-BOOL TTBasic::Compile( SbModule* p )
+sal_Bool TTBasic::Compile( SbModule* p )
{
p->SetComment( ((TestToolObj*)pTestObject)->GetRevision(p->GetSource()) );
SbModule* pOldModule = GetCompileModule();
@@ -110,7 +110,7 @@ BOOL TTBasic::Compile( SbModule* p )
p->SetSource( ((TestToolObj*)pTestObject)->PreCompile(p->GetSource()) );
SetCompileModule( pOldModule );
if ( ((TestToolObj*)pTestObject)->WasPrecompilerError() )
- return FALSE;
+ return sal_False;
return MyBasic::Compile( p );
}
@@ -140,7 +140,7 @@ void TTBasic::ReportRuntimeError( AppBasEd *pEditWin )
MyBasic::ReportRuntimeError( pEditWin );
}
-void TTBasic::DebugFindNoErrors( BOOL bDebugFindNoErrors )
+void TTBasic::DebugFindNoErrors( sal_Bool bDebugFindNoErrors )
{
((TestToolObj*)pTestObject)->DebugFindNoErrors( bDebugFindNoErrors );
}
diff --git a/automation/source/app/testbasi.hxx b/automation/source/app/testbasi.hxx
index 89d870a66cb4..2d8cbb5dca39 100644
--- a/automation/source/app/testbasi.hxx
+++ b/automation/source/app/testbasi.hxx
@@ -45,7 +45,7 @@ public:
TYPEINFO();
TTBasic();
~TTBasic();
- BOOL Compile( SbModule* );
+ sal_Bool Compile( SbModule* );
static MyBasic* CreateMyBasic();
// nicht mit #ifdefs klammern, da diese Headerdatei für testtool und basic
@@ -54,10 +54,10 @@ public:
// SbxObject *pTestObject; // für das Testtool; ansonsten NULL
void LoadIniFile();
- SbTextType GetSymbolType( const String &Symbol, BOOL bWasTTControl ); // Besimmt den erweiterten Symboltyp für das Syntaxhighlighting
+ SbTextType GetSymbolType( const String &Symbol, sal_Bool bWasTTControl ); // Besimmt den erweiterten Symboltyp für das Syntaxhighlighting
virtual const String GetSpechialErrorText();
virtual void ReportRuntimeError( AppBasEd *pEditWin );
- virtual void DebugFindNoErrors( BOOL bDebugFindNoErrors );
+ virtual void DebugFindNoErrors( sal_Bool bDebugFindNoErrors );
};
SV_DECL_IMPL_REF(TTBasic)
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx
index 7f44e1cf032f..95086c1e8c2a 100644
--- a/automation/source/communi/communi.cxx
+++ b/automation/source/communi/communi.cxx
@@ -52,11 +52,11 @@
#undef SV_IMPL_PTRARR_SORT
#define SV_IMPL_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
- OSL_FAIL("Das Element der Liste wurde nicht gelöscht"); \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
+ OSL_FAIL("Das Element der Liste wurde nicht gel�scht"); \
SvPtrarr::Remove( nP, nL ); \
} \
} \
@@ -73,8 +73,8 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
, nConnectionClosedEventId( 0 )
, nDataReceivedEventId( 0 )
-, bShutdownStarted( FALSE )
-, bDestroying( FALSE )
+, bShutdownStarted( sal_False )
+, bDestroying( sal_False )
{
SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl ));
if ( !pMPostUserEvent )
@@ -88,7 +88,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM
CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
{
- bDestroying = TRUE;
+ bDestroying = sal_True;
StopCommunication();
while ( nConnectionClosedEventId || nDataReceivedEventId )
GetpApp()->Yield();
@@ -98,8 +98,8 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
{
GetpApp()->RemoveUserEvent( nConnectionClosedEventId );
nConnectionClosedEventId = 0;
- INFO_MSG( CByteString("Event gelöscht"),
- CByteString( "ConnectionClosedEvent aus Queue gelöscht"),
+ INFO_MSG( CByteString("Event gel�scht"),
+ CByteString( "ConnectionClosedEvent aus Queue gel�scht"),
CM_MISC, NULL );
}
}
@@ -110,14 +110,14 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
GetpApp()->RemoveUserEvent( nDataReceivedEventId );
nDataReceivedEventId = 0;
delete GetServiceData();
- INFO_MSG( CByteString("Event gelöscht"),
- CByteString( "DataReceivedEvent aus Queue gelöscht"),
+ INFO_MSG( CByteString("Event gel�scht"),
+ CByteString( "DataReceivedEvent aus Queue gel�scht"),
CM_MISC, NULL );
}
}
}
-BOOL CommunicationLinkViaSocket::ShutdownCommunication()
+sal_Bool CommunicationLinkViaSocket::ShutdownCommunication()
{
if ( isRunning() )
{
@@ -129,7 +129,7 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication()
if ( GetStreamSocket() ) // Mal wieder nach oben verschoben, da sonst nicht vom Read runtergesprungen wird.
GetStreamSocket()->close();
- resume(); // So daß das run auch die Schleife verlassen kann
+ resume(); // So da� das run auch die Schleife verlassen kann
join();
@@ -145,10 +145,10 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication()
join();
}
- return TRUE;
+ return sal_True;
}
-BOOL CommunicationLinkViaSocket::StopCommunication()
+sal_Bool CommunicationLinkViaSocket::StopCommunication()
{
if ( !bShutdownStarted )
{
@@ -157,7 +157,7 @@ BOOL CommunicationLinkViaSocket::StopCommunication()
else
{
WaitForShutdown();
- return TRUE;
+ return sal_True;
}
}
@@ -177,7 +177,7 @@ void CommunicationLinkViaSocket::WaitForShutdown()
aShutdownTimer.SetTimeout( 30000 ); // Should be 30 Seconds
aShutdownTimer.SetTimeoutHdl( LINK( this, CommunicationLinkViaSocket, ShutdownLink ) );
aShutdownTimer.Start();
- bShutdownStarted = TRUE;
+ bShutdownStarted = sal_True;
}
if ( bDestroying )
{
@@ -191,14 +191,14 @@ void CommunicationLinkViaSocket::WaitForShutdown()
}
}
-BOOL CommunicationLinkViaSocket::IsCommunicationError()
+sal_Bool CommunicationLinkViaSocket::IsCommunicationError()
{
return !isRunning() || SimpleCommunicationLinkViaSocket::IsCommunicationError();
}
void CommunicationLinkViaSocket::run()
{
- BOOL bWasError = FALSE;
+ sal_Bool bWasError = sal_False;
while ( schedule() && !bWasError && GetStreamSocket() )
{
if ( bWasError |= !DoReceiveDataStream() )
@@ -227,10 +227,10 @@ void CommunicationLinkViaSocket::run()
}
}
-BOOL CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol )
+sal_Bool CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol )
{
if ( !isRunning() )
- return FALSE;
+ return sal_False;
return SimpleCommunicationLinkViaSocket::DoTransferDataStream( pDataStream, nProtocol );
}
@@ -240,7 +240,7 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
{
{
osl::MutexGuard aGuard( aMConnectionClosed );
- nConnectionClosedEventId = 0; // Achtung!! alles andere muß oben gemacht werden.
+ nConnectionClosedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden.
}
ShutdownCommunication();
return CommunicationLink::ConnectionClosed( );
@@ -251,7 +251,7 @@ long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG )
{
{
osl::MutexGuard aGuard( aMDataReceived );
- nDataReceivedEventId = 0; // Achtung!! alles andere muß oben gemacht werden.
+ nDataReceivedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden.
}
return CommunicationLink::DataReceived( );
}
@@ -264,9 +264,9 @@ IMPL_LINK( CommunicationLinkViaSocket, PutDataReceivedHdl, CommunicationLinkViaS
-MultiCommunicationManager::MultiCommunicationManager( BOOL bUseMultiChannel )
+MultiCommunicationManager::MultiCommunicationManager( sal_Bool bUseMultiChannel )
: CommunicationManager( bUseMultiChannel )
-, bGracefullShutdown( TRUE )
+, bGracefullShutdown( sal_True )
{
ActiveLinks = new CommunicationLinkList;
InactiveLinks = new CommunicationLinkList;
@@ -281,8 +281,8 @@ MultiCommunicationManager::~MultiCommunicationManager()
Timer aTimeout;
aTimeout.SetTimeout( 40000 );
aTimeout.Start();
- USHORT nLinkCount = 0;
- USHORT nNewLinkCount = 0;
+ sal_uInt16 nLinkCount = 0;
+ sal_uInt16 nNewLinkCount = 0;
while ( aTimeout.IsActive() )
{
GetpApp()->Yield();
@@ -297,9 +297,9 @@ 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
- USHORT i = ActiveLinks->Count();
+ // 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-- )
{
CommunicationLinkRef rTempLink = ActiveLinks->GetObject( i );
@@ -310,7 +310,7 @@ MultiCommunicationManager::~MultiCommunicationManager()
delete ActiveLinks;
/// Die Links zwischen ConnectionClosed und Destruktor.
- /// Hier NICHT gerefcounted, da sie sich sonst im Kreis festhaten würden,
+ /// 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-- )
@@ -322,44 +322,44 @@ MultiCommunicationManager::~MultiCommunicationManager()
delete InactiveLinks;
}
-BOOL MultiCommunicationManager::StopCommunication()
+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.
- USHORT i = ActiveLinks->Count();
+ // 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++; // Hochz�hlen, da Verbindung sich nicht (sofort) beenden l�sst.
i--;
}
return nFail == 0;
}
-BOOL MultiCommunicationManager::IsLinkValid( CommunicationLink* pCL )
+sal_Bool MultiCommunicationManager::IsLinkValid( CommunicationLink* pCL )
{
if ( ActiveLinks->Seek_Entry( pCL ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-USHORT MultiCommunicationManager::GetCommunicationLinkCount()
+sal_uInt16 MultiCommunicationManager::GetCommunicationLinkCount()
{
return ActiveLinks->Count();
}
-CommunicationLinkRef MultiCommunicationManager::GetCommunicationLink( USHORT nNr )
+CommunicationLinkRef MultiCommunicationManager::GetCommunicationLink( sal_uInt16 nNr )
{
return ActiveLinks->GetObject( nNr );
}
void MultiCommunicationManager::CallConnectionOpened( CommunicationLink* pCL )
{
- CommunicationLinkRef rHold(pCL); // Hält den Zeiger bis zum Ende des calls
+ CommunicationLinkRef rHold(pCL); // H�lt den Zeiger bis zum Ende des calls
ActiveLinks->C40_PTR_INSERT(CommunicationLink, pCL);
rHold->AddRef();
@@ -368,11 +368,11 @@ 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); // H�lt denm Zeiger bis zum Ende des calls
CommunicationManager::CallConnectionClosed( pCL );
- USHORT nPos;
+ sal_uInt16 nPos;
if ( ActiveLinks->Seek_Entry( pCL, &nPos ) )
{
InactiveLinks->C40_PTR_INSERT(CommunicationLink, pCL); // Ohne Reference
@@ -383,13 +383,13 @@ void MultiCommunicationManager::CallConnectionClosed( CommunicationLink* pCL )
bIsCommunicationRunning = ActiveLinks->Count() > 0;
// delete pCL;
#if OSL_DEBUG_LEVEL > 1
- rHold->bFlag = TRUE;
+ rHold->bFlag = sal_True;
#endif
}
void MultiCommunicationManager::DestroyingLink( CommunicationLink *pCL )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if ( InactiveLinks->Seek_Entry( pCL, &nPos ) )
InactiveLinks->Remove( nPos );
pCL->InvalidateManager();
@@ -397,7 +397,7 @@ void MultiCommunicationManager::DestroyingLink( CommunicationLink *pCL )
-CommunicationManagerClient::CommunicationManagerClient( BOOL bUseMultiChannel )
+CommunicationManagerClient::CommunicationManagerClient( sal_Bool bUseMultiChannel )
: MultiCommunicationManager( bUseMultiChannel )
{
ByteString aApplication("Something inside ");
@@ -407,7 +407,7 @@ CommunicationManagerClient::CommunicationManagerClient( BOOL bUseMultiChannel )
-CommunicationManagerServerViaSocket::CommunicationManagerServerViaSocket( ULONG nPort, USHORT nMaxCon, BOOL bUseMultiChannel )
+CommunicationManagerServerViaSocket::CommunicationManagerServerViaSocket( sal_uLong nPort, sal_uInt16 nMaxCon, sal_Bool bUseMultiChannel )
: CommunicationManagerServer( bUseMultiChannel )
, nPortToListen( nPort )
, nMaxConnections( nMaxCon )
@@ -420,15 +420,15 @@ CommunicationManagerServerViaSocket::~CommunicationManagerServerViaSocket()
StopCommunication();
}
-BOOL CommunicationManagerServerViaSocket::StartCommunication()
+sal_Bool CommunicationManagerServerViaSocket::StartCommunication()
{
if ( !pAcceptThread )
pAcceptThread = new CommunicationManagerServerAcceptThread( this, nPortToListen, nMaxConnections );
- return TRUE;
+ return sal_True;
}
-BOOL CommunicationManagerServerViaSocket::StopCommunication()
+sal_Bool CommunicationManagerServerViaSocket::StopCommunication()
{
// Erst den Acceptor anhalten
delete pAcceptThread;
@@ -445,7 +445,7 @@ void CommunicationManagerServerViaSocket::AddConnection( CommunicationLink *pNew
}
-CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon )
+CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, sal_uLong nPort, sal_uInt16 nMaxCon )
: pMyServer( pServer )
, pAcceptorSocket( NULL )
, nPortToListen( nPort )
@@ -478,7 +478,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread(
pAcceptorSocket = NULL;
}
#else
- DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread Übersprungen!!!! (wegen Solaris BUG)\n");
+ DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread �bersprungen!!!! (wegen Solaris BUG)\n");
#endif
{
osl::MutexGuard aGuard( aMAddConnection );
@@ -487,11 +487,11 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread(
GetpApp()->RemoveUserEvent( nAddConnectionEventId );
nAddConnectionEventId = 0;
CommunicationLinkRef xNewConnection = GetNewConnection();
- INFO_MSG( CByteString("Event gelöscht"),
- CByteString( "AddConnectionEvent aus Queue gelöscht"),
+ INFO_MSG( CByteString("Event gel�scht"),
+ CByteString( "AddConnectionEvent aus Queue gel�scht"),
CM_MISC, xNewConnection );
xNewConnection->InvalidateManager();
- xNewConnection.Clear(); // sollte das Objekt hier löschen
+ xNewConnection.Clear(); // sollte das Objekt hier l�schen
}
}
}
@@ -577,14 +577,14 @@ IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYAR
}
-CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel )
+CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel )
: CommunicationManagerClient( bUseMultiChannel )
, aHostToTalk( aHost )
, nPortToTalk( nPort )
{
}
-CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( BOOL bUseMultiChannel )
+CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel )
: CommunicationManagerClient( bUseMultiChannel )
, aHostToTalk( "" )
, nPortToTalk( 0 )
diff --git a/automation/source/inc/cmdbasestream.hxx b/automation/source/inc/cmdbasestream.hxx
index 0170b08aefe0..ce3ee45e095f 100644
--- a/automation/source/inc/cmdbasestream.hxx
+++ b/automation/source/inc/cmdbasestream.hxx
@@ -49,20 +49,25 @@ protected:
public:
- void GenError( SmartId *pUId, comm_String *pString );
+ void GenError( rtl::OString *pUId, comm_String *pString );
void GenReturn( comm_USHORT nRet, comm_ULONG nNr );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_String *pString );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_BOOL bBool );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_String *pString );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool );
+
+ void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr );
+ void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString );
+ void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool );
+ void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr );
// MacroRecorder
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_BOOL bBool );
- void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_ULONG nNr );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ); // also used outside MacroRecorder
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool );
+ void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr );
void Read ( comm_USHORT &nNr );
void Read ( comm_ULONG &nNr );
@@ -77,10 +82,10 @@ public:
// Complex Datatypes to be handled system dependent
virtual void Read ( comm_String *&pString );
- virtual void Read ( SmartId* &pId );
+ virtual void Read ( rtl::OString* &pId );
virtual void Write( comm_String *pString );
- virtual void Write( SmartId* pId );
+ virtual void Write( rtl::OString* pId );
};
#endif
diff --git a/automation/source/inc/rcontrol.hxx b/automation/source/inc/rcontrol.hxx
index afc3bd8c4e74..13102892da08 100644
--- a/automation/source/inc/rcontrol.hxx
+++ b/automation/source/inc/rcontrol.hxx
@@ -37,12 +37,12 @@
#ifndef _RCONTROL_HXX
#define _RCONTROL_HXX
-#define UID_ACTIVE 0
+#define UID_ACTIVE "UID_ACTIVE"
#define SI_IPCCommandBlock 1
#define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal
#define SI_DirectCommandBlock 2
-#define SIControl 3
+#define SIControl 3 // remove after numeric HelpIDs are completely removed and no legacy testtool is used anymore
#define SISlot 4
#define SIFlow 5
#define SICommand 6
@@ -207,7 +207,7 @@
#define M_LAST_NO_RETURN 200
#if ( M_LAST_NO_RETURN >= M_WITH_RETURN )
-#error "Bereich überschritten"
+#error "Bereich �berschritten"
#endif
#define M_Exists ( M_WITH_RETURN | 1 )
@@ -315,7 +315,7 @@
#define _RC_LAST_NO_RETURN 27
#if ( _RC_LAST_NO_RETURN >= M_WITH_RETURN )
-#error "Bereich überschritten"
+#error "Bereich �berschritten"
#endif
// Befehle mit Returnwert
@@ -374,21 +374,21 @@
#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 // Initiiert R�ckmeldung des Status
+#define F_Sequence 102 // �bergibt Sequence Nummer (1. in jedem 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_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
+#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
+// f�r F_ProfileInfo
#define S_ProfileReset 201 // nNr1 = Anzahl Borders
- // Achtung!! Diese Defines müssen aufeinanderfolgende Nummern haben!!
+ // Achtung!! Diese Defines m�ssen aufeinanderfolgende Nummern haben!!
#define S_ProfileBorder1 202 // nNr1 = Border1 in ms
#define S_ProfileBorder2 203 // nNr1 = Border2 in ms
#define S_ProfileBorder3 204 // nNr1 = Border3 in ms
@@ -397,7 +397,7 @@
#define S_ProfileTime 210 // nNr1 = remote Zeit des Befehls
#define S_ProfileDump 211 // Gibt die daten aus.
-// für F_DirectLoging
+// f�r 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
+// Konstanten f�r das ALignment des gesuchten Splitters
#define CONST_ALIGN_LEFT 120
#define CONST_ALIGN_TOP 121
#define CONST_ALIGN_RIGHT 122
@@ -455,8 +455,8 @@
#define PARAM_BOOL_2 0x0080
#define PARAM_SBXVALUE_1 0x0400 // hier mit 0x0400 Weiter!!! Siehe Oben!
-// Zusätzliche Beschreibung!! wird auch mit dem Rest verodert
-//#define PARAM_STR_RAW 0x8000 // Der Zeichensatz der Strings wird nicht konvertiert(für Fareastern)
+// 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 ERR_SEND_TIMEOUT 100
#define ERR_EXEC_TIMEOUT 101
diff --git a/automation/source/inc/testapp.hxx b/automation/source/inc/testapp.hxx
index 6760fb229af7..c5d04c1fee62 100644
--- a/automation/source/inc/testapp.hxx
+++ b/automation/source/inc/testapp.hxx
@@ -31,7 +31,6 @@
#include <basic/sbmod.hxx>
#include <basic/testtool.hxx>
-#include <vcl/smartid.hxx>
class CommunicationLink;
class CommunicationManagerClientViaSocketTT;
@@ -56,10 +55,10 @@ class MyBasic;
class ErrorEntry
{
public:
- ErrorEntry(ULONG nNr, String aStr = String()) : nError(nNr),aText(aStr),nLine(0),nCol1(0),nCol2(0) {}
- ErrorEntry(ULONG nNr, String aStr, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 )
+ ErrorEntry(sal_uLong nNr, String aStr = String()) : nError(nNr),aText(aStr),nLine(0),nCol1(0),nCol2(0) {}
+ ErrorEntry(sal_uLong nNr, String aStr, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 )
: nError(nNr),aText(aStr),nLine(l),nCol1(c1),nCol2(c2) {}
- ULONG nError;
+ sal_uLong nError;
String aText;
xub_StrLen nLine;
xub_StrLen nCol1;
@@ -70,7 +69,7 @@ SV_DECL_PTRARR_DEL(CErrors, ErrorEntry*, 1, 1)
struct ControlDefLoad {
const char* Kurzname;
- ULONG nUId;
+ sal_uLong nUId;
};
class TestToolObj: public SbxObject
@@ -82,24 +81,24 @@ public:
TestToolObj( String aName, MyBasic* pBas ); // Pfade aus INI, IPC benutzen
~TestToolObj();
void LoadIniFile(); // Laden der IniEinstellungen, die durch den ConfigDialog geändert werden können
- void DebugFindNoErrors( BOOL bDebugFindNoErrors );
+ void DebugFindNoErrors( sal_Bool bDebugFindNoErrors );
private:
- BOOL bWasPrecompilerError; // True wenn beim letzten Precompile ein Fehler auftrat
- BOOL CError( ULONG, const String&, xub_StrLen, xub_StrLen, xub_StrLen );
+ sal_Bool bWasPrecompilerError; // True wenn beim letzten Precompile ein Fehler auftrat
+ 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 );
- xub_StrLen PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, USHORT &nLabelCount );
+ xub_StrLen PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, sal_uInt16 &nLabelCount );
void PreCompileDispatchParts( String &aSource, String aStart, String aEnd, String aFinalLable );
public:
String GetRevision(String const &aSourceIn); // find Revision in the sourcecode
String PreCompile(String const &aSourceIn); // try catch; testcase endcase ..
- BOOL WasPrecompilerError(); // True wenn beim letzten Precompile ein Fehler auftrat
+ sal_Bool WasPrecompilerError(); // True wenn beim letzten Precompile ein Fehler auftrat
void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
virtual SbxVariable* Find( const String&, SbxClassType );
// String aKeyPlusClasses; // Pfad für keycodes & classes & res_type (Aus Configdatei)
DECL_LINK( ReturnResultsLink, CommunicationLink* );
- BOOL ReturnResults( SvStream *pIn ); // Rücklieferung des Antwortstreams über IPC oder TCP/IP oder direkt
+ sal_Bool ReturnResults( SvStream *pIn ); // Rücklieferung des Antwortstreams über IPC oder TCP/IP oder direkt
void SetLogHdl( const Link& rLink ) { aLogHdl = rLink; }
const Link& GetLogHdl() const { return aLogHdl; }
@@ -121,25 +120,25 @@ public:
private:
ImplTestToolObj *pImpl; // Alles was von der Implementation abhängt
static const CErrors* GetFehlerListe() { return pFehlerListe; }
- BOOL bUseIPC;
+ sal_Bool bUseIPC;
Link aLogHdl; // Zum Logen der Fehlermeldungen im Testtool
Link aWinInfoHdl; // Anzeigen der Windows/Controls der zu testenden App
Link aModuleWinExistsHdl; // Prüft ob das Modul schon im Editor geladen ist
Link aCErrorHdl; // Melden von Compilererror
Link aWriteStringHdl; // Schreiben von text (e.g. MakroRecorder)
- BOOL bReturnOK; // Bricht WaitForAnswer ab
+ sal_Bool bReturnOK; // Bricht WaitForAnswer ab
CRevNames *pShortNames; // Aktuell verwendete Controls, zur gewinnung des Namens aus Fehlermeldung
- ULONG nSequence; // Sequence um Antwort und Anfrage zu syncronisieren
- SmartId aNextReturnId; // Id des Returnwertes i.e. UId
+ 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
-#define FLAT TRUE
+#define FLAT sal_True
String ProgPath; // Dateiname der zu Testenden APP; Gesetzt über Start
String aLogFileName; // Momentaner Logfilename (Wie Programmdatei aber mit .res)
- BOOL IsBlock; // Innerhalb Begin/EndBlock
- BOOL SingleCommandBlock; // Implizit um jedes kommando ein Begin/EndBlock
+ sal_Bool IsBlock; // Innerhalb Begin/EndBlock
+ sal_Bool SingleCommandBlock; // Implizit um jedes kommando ein Begin/EndBlock
CmdStream *In;
void AddName(String &aBisher, String &aNeu ); // Name eventuell mit / anhängen
@@ -153,31 +152,31 @@ private:
CNames *m_pReverseUIds; // Langnamen nach Nummer
- USHORT nMyVar; // Wievielte Var aus Pool ist dran
+ sal_uInt16 nMyVar; // Wievielte Var aus Pool ist dran
void InitTestToolObj();
CommunicationManagerClientViaSocketTT *pCommunicationManager;
void SendViaSocket();
- BOOL Load( String aFileName, SbModule *pMod );
+ sal_Bool Load( String aFileName, SbModule *pMod );
- void ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, BOOL bIsFlat = FALSE );
- void ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName );
- BOOL ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls );
- BOOL WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls );
+ void ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, sal_Bool bIsFlat = sal_False );
+ void ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByName );
+ sal_Bool ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls );
+ sal_Bool WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls );
void ReadHidLstByNumber();
- void SortControlsByNumber( BOOL bIncludeActive = FALSE );
+ void SortControlsByNumber( sal_Bool bIncludeActive = sal_False );
- String GetMethodName( ULONG nMethodId );
- String GetKeyName( USHORT nKeyCode );
+ String GetMethodName( sal_uLong nMethodId );
+ String GetKeyName( sal_uInt16 nKeyCode );
void WaitForAnswer ();
DECL_LINK( IdleHdl, Application* );
DECL_LINK( CallDialogHandler, Application* );
String aDialogHandlerName;
- USHORT nWindowHandlerCallLevel;
+ sal_uInt16 nWindowHandlerCallLevel;
- USHORT nIdleCount;
+ sal_uInt16 nIdleCount;
// wenn DialogHandler gesetzt wird er im IdleHandler inkrementiert und
// in WaitForAnswer rückgesetzt. Übersteigt er einen gewissen wert, gehe ich davon aus,
// daß WaitForAnswer still ligt und rufe die DialogHander Sub im BASIC auf.
@@ -185,7 +184,7 @@ private:
void BeginBlock();
void EndBlock();
- SbTextType GetSymbolType( const String &rSymbol, BOOL bWasControl );
+ SbTextType GetSymbolType( const String &rSymbol, sal_Bool bWasControl );
static ControlDefLoad const arR_Cmds[];
static CNames *pRCommands;
diff --git a/automation/source/inc/testtool.hxx b/automation/source/inc/testtool.hxx
index 78a56b3160eb..30543fcedeb5 100644
--- a/automation/source/inc/testtool.hxx
+++ b/automation/source/inc/testtool.hxx
@@ -47,9 +47,9 @@ class ImplRemoteControl
{
friend class StatementFlow;
- BOOL m_bIdleInserted;
+ sal_Bool m_bIdleInserted;
AutoTimer m_aIdleTimer;
- BOOL m_bInsideExecutionLoop;
+ sal_Bool m_bInsideExecutionLoop;
#if OSL_DEBUG_LEVEL > 1
EditWindow *m_pDbgWin;
#endif
@@ -57,7 +57,7 @@ class ImplRemoteControl
public:
ImplRemoteControl();
~ImplRemoteControl();
- BOOL QueCommands( ULONG nServiceId, SvStream *pIn );
+ sal_Bool QueCommands( sal_uLong nServiceId, SvStream *pIn );
SvStream* GetReturnStream();
DECL_LINK( IdleHdl, Application* );
diff --git a/automation/source/miniapp/editwin.cxx b/automation/source/miniapp/editwin.cxx
index 5568b5152320..395c9deb350a 100644
--- a/automation/source/miniapp/editwin.cxx
+++ b/automation/source/miniapp/editwin.cxx
@@ -34,13 +34,13 @@
#include <vcl/msgbox.hxx>
-BOOL GHEditWindow::Close()
+sal_Bool GHEditWindow::Close()
{
if (aInhalt.IsModified())
{
}
delete(this);
- return TRUE;
+ return sal_True;
}
void GHEditWindow::Resize()
@@ -64,7 +64,7 @@ void GHEditWindow::Clear()
aInhalt.SetText(String());
}
-void GHEditWindow::AddText( String aNew, BOOL bMoveToEnd)
+void GHEditWindow::AddText( String aNew, sal_Bool bMoveToEnd)
{
String aOld = aInhalt.GetText();
@@ -110,11 +110,11 @@ void EditFileWindow::LoadFile()
All.ConvertLineEnd();
- AddText(All,FALSE);
+ AddText(All,sal_False);
}
-BOOL EditFileWindow::Close()
+sal_Bool EditFileWindow::Close()
{
if (aInhalt.IsModified() && QueryBox(this,WB_DEF_YES | WB_YES_NO_CANCEL, String(aFileName).AppendAscii("\nhas been changed.\n\nSave file?")).Execute())
diff --git a/automation/source/miniapp/editwin.hxx b/automation/source/miniapp/editwin.hxx
index bf7cbfa3ca34..ed10acec2646 100644
--- a/automation/source/miniapp/editwin.hxx
+++ b/automation/source/miniapp/editwin.hxx
@@ -39,7 +39,7 @@ protected:
MultiLineEdit aInhalt;
- virtual BOOL Close(); // derived
+ virtual sal_Bool Close(); // derived
void Resize();
public:
@@ -48,7 +48,7 @@ public:
GHEditWindow(Window * pParent, String aName = CUniString("Neues Fenster"), WinBits iWstyle = WB_STDWORK);
void Clear();
- void AddText( String aNew, BOOL bMoveToEnd = TRUE);
+ void AddText( String aNew, sal_Bool bMoveToEnd = sal_True);
};
@@ -57,7 +57,7 @@ class EditFileWindow : public GHEditWindow
{
String aFileName;
- virtual BOOL Close(); // derived
+ virtual sal_Bool Close(); // derived
void LoadFile();
public:
diff --git a/automation/source/miniapp/servres.cxx b/automation/source/miniapp/servres.cxx
index 3cbb4bf3c80c..1bd795fd4041 100644
--- a/automation/source/miniapp/servres.cxx
+++ b/automation/source/miniapp/servres.cxx
@@ -35,7 +35,7 @@
#include "servres.hxx"
-ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, BOOL bFreeRes )
+ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, sal_Bool bFreeRes )
: ModalDialog( pParent, rResId ),
aCheckBox1( this, ResId( 1, *rResId.GetResMgr() ) ),
aTriStateBox1( this, ResId( 1, *rResId.GetResMgr() ) ),
@@ -53,7 +53,7 @@ ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, cons
if( bFreeRes ) FreeResource();
}
-MenuMENU_CLIENT::MenuMENU_CLIENT( const ResId & rResId, BOOL )
+MenuMENU_CLIENT::MenuMENU_CLIENT( const ResId & rResId, sal_Bool )
: MenuBar( rResId )
{
// No subresources, automatic free resource
diff --git a/automation/source/miniapp/servres.hrc b/automation/source/miniapp/servres.hrc
index 2f95a34a60b6..6efd2ce57460 100644
--- a/automation/source/miniapp/servres.hrc
+++ b/automation/source/miniapp/servres.hrc
@@ -29,9 +29,9 @@
#define IDM_FILE 1
#define IDM_FILE_OPEN_TEST 2
#define IDM_FILE_EXIT 3
-#define IDM_FILE_EXIT_HELP 4
-#define IDM_FILE_OPEN_TEST_HELP 1
-#define IDM_FILE_HELP 3
+#define IDM_FILE_EXIT_HELP "AUTOMATION_IDM_FILE_EXIT_HELP"
+#define IDM_FILE_OPEN_TEST_HELP "AUTOMATION_IDM_FILE_OPEN_TEST_HELP"
+#define IDM_FILE_HELP "AUTOMATION_IDM_FILE_HELP"
#define GROSSER_TEST_DLG 256
#define IDM_TEST 5
#define IDM_TEST_GROSS 6
diff --git a/automation/source/miniapp/servres.hxx b/automation/source/miniapp/servres.hxx
index c93c758ec229..72584163c7cd 100644
--- a/automation/source/miniapp/servres.hxx
+++ b/automation/source/miniapp/servres.hxx
@@ -52,14 +52,14 @@ protected:
DateBox aDateBox1;
FixedText aFixedText1;
public:
- ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, BOOL bFreeRes = TRUE );
+ ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, sal_Bool bFreeRes = sal_True );
};
class MenuMENU_CLIENT : public MenuBar
{
protected:
public:
- MenuMENU_CLIENT( const ResId & rResId, BOOL bFreeRes = TRUE );
+ MenuMENU_CLIENT( const ResId & rResId, sal_Bool bFreeRes = sal_True );
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/source/miniapp/servres.src b/automation/source/miniapp/servres.src
index 426be8b81532..c1af1caa775a 100644
--- a/automation/source/miniapp/servres.src
+++ b/automation/source/miniapp/servres.src
@@ -54,7 +54,7 @@ ModalDialog GROSSER_TEST_DLG
};
OKButton 1
{
- HelpID = 1 ;
+ HelpID = "hid1" ;
Pos = MAP_APPFONT ( 132 , 92 ) ;
Size = MAP_APPFONT ( 64 , 12 ) ;
TabStop = TRUE ;
diff --git a/automation/source/miniapp/servuid.hxx b/automation/source/miniapp/servuid.hxx
index 7460c097606a..019479cc65a3 100644
--- a/automation/source/miniapp/servuid.hxx
+++ b/automation/source/miniapp/servuid.hxx
@@ -25,16 +25,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#define UID_GROSSER_TEST_DLG 101
-#define UID_CheckBox 202
-#define UID_TriStateBox 303
-#define UID_OKButton 404
-#define UID_TimeField 505
-#define UID_MultiLineEdit 606
-#define UID_RadioButton1 707
-#define UID_RadioButton2 708
-#define UID_MultiListBox 809
-#define UID_ComboBox 910
-#define UID_DateBox 1011
+#define UID_GROSSER_TEST_DLG "AUTOMATION_UID_GROSSER_TEST_DLG"
+#define UID_CheckBox "AUTOMATION_UID_CheckBox"
+#define UID_TriStateBox "AUTOMATION_UID_TriStateBox"
+#define UID_OKButton "AUTOMATION_UID_OKButton"
+#define UID_TimeField "AUTOMATION_UID_TimeField"
+#define UID_MultiLineEdit "AUTOMATION_UID_MultiLineEdit"
+#define UID_RadioButton1 "AUTOMATION_UID_RadioButton1"
+#define UID_RadioButton2 "AUTOMATION_UID_RadioButton2"
+#define UID_MultiListBox "AUTOMATION_UID_MultiListBox"
+#define UID_ComboBox "AUTOMATION_UID_ComboBox"
+#define UID_DateBox "AUTOMATION_UID_DateBox"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx
index c60365f18033..2209ef23b4cc 100644
--- a/automation/source/miniapp/testapp.cxx
+++ b/automation/source/miniapp/testapp.cxx
@@ -97,11 +97,11 @@ void MainWindow::TestGross()
}
-BOOL MainWindow::Close()
+sal_Bool MainWindow::Close()
{
WorkWindow::Close();
FileExit();
- return TRUE;
+ return sal_True;
}
void MainWindow::FileExit()
@@ -110,7 +110,7 @@ void MainWindow::FileExit()
}
-void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent)
+void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, sal_uInt16 Indent)
{
String sIndent,aText;
sIndent.Expand(5*Indent);
@@ -119,9 +119,10 @@ void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent)
aText.SearchAndReplaceAllAscii("\n",CUniString("\\n"));
aEditWin->AddText(String(sIndent).AppendAscii("Text: ").Append(aText).AppendAscii("\n"));
- aEditWin->AddText(String(sIndent).AppendAscii("Help: ").Append(String::CreateFromInt64(pBase->GetHelpId())).AppendAscii(":").Append(pBase->GetQuickHelpText()).AppendAscii(":").Append(pBase->GetHelpText()).AppendAscii("\n"));
+ // FIXME: HELPID
+ aEditWin->AddText(String(sIndent).AppendAscii("Help: ").Append(String(rtl::OStringToOUString(pBase->GetHelpId(), RTL_TEXTENCODING_UTF8))).AppendAscii(":").Append(pBase->GetQuickHelpText()).AppendAscii(":").Append(pBase->GetHelpText()).AppendAscii("\n"));
- USHORT i;
+ sal_uInt16 i;
for (i = 0 ; i < pBase->GetChildCount() ; i++)
{
Tree(aEditWin,pBase->GetChild(i),Indent+1);
@@ -193,7 +194,7 @@ void MyApp::Property( ApplicationProperty& rProp )
}
-USHORT MyDispatcher::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT nMode)
+sal_uInt16 MyDispatcher::ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs, sal_uInt16 nMode)
{
(void) ppArgs; // avoid warning about unused parameter
(void) nMode; // avoid warning about unused parameter
diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx
index 498ee04af136..65bfe777d0d1 100644
--- a/automation/source/miniapp/testapp.hxx
+++ b/automation/source/miniapp/testapp.hxx
@@ -58,12 +58,12 @@ class MainWindow : public WorkWindow
public:
MainWindow(MyApp *pAppl);
- virtual BOOL Close(); // derived
+ virtual sal_Bool Close(); // derived
void FileExit();
void FileOpen();
void TestGross();
- void Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent);
+ void Tree(GHEditWindow *aEditWin, Window *pBase, sal_uInt16 Indent);
void WinTree();
void SysDlg();
DECL_LINK(MenuSelectHdl,MenuBar*);
@@ -77,8 +77,8 @@ class MyDispatcher
public:
MyDispatcher(MainWindow *MainWin) : pMainWin(MainWin) {};
virtual ~MyDispatcher() {};
- virtual USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs = 0, USHORT nMode = 0);
- virtual void SetExecuteMode( USHORT nMode )
+ virtual sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs = 0, sal_uInt16 nMode = 0);
+ virtual void SetExecuteMode( sal_uInt16 nMode )
{
(void) nMode; /* avoid warning about unused parameter */
}; // Ist hier sowieso egal
diff --git a/automation/source/server/XMLParser.cxx b/automation/source/server/XMLParser.cxx
index 8de072898297..ef73d2ef2e9b 100644
--- a/automation/source/server/XMLParser.cxx
+++ b/automation/source/server/XMLParser.cxx
@@ -89,9 +89,9 @@ void SAL_CALL SVInputStream::skipBytes( sal_Int32 nBytesToSkip ) throw (::com::s
sal_Int32 SAL_CALL SVInputStream::available( ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
- ULONG nCurrent = pStream->Tell();
- ULONG nSize = pStream->Seek( STREAM_SEEK_TO_END );
- ULONG nAvailable = nSize - nCurrent;
+ sal_uLong nCurrent = pStream->Tell();
+ sal_uLong nSize = pStream->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nAvailable = nSize - nCurrent;
pStream->Seek( nCurrent );
return nAvailable;
}
@@ -160,8 +160,8 @@ class ElementNode : public Node
public:
ElementNode( const String& aName, Reference < XAttributeList > xAttributes );
void AppendNode( NodeRef xNewNode );
- ULONG GetChildCount(){ return aDocumentNodeList.Count(); }
- NodeRef GetChild( USHORT nIndex ){ return aDocumentNodeList.GetObject( nIndex ); }
+ sal_uLong GetChildCount(){ return aDocumentNodeList.Count(); }
+ NodeRef GetChild( sal_uInt16 nIndex ){ return aDocumentNodeList.GetObject( nIndex ); }
Reference < XAttributeList > GetAttributes(){ return xAttributeList; }
String GetNodeName() { return aNodeName; }
@@ -208,7 +208,7 @@ class SAXParser : public cppu::WeakImplHelper2< XErrorHandler, XDocumentHandler
NodeRef xTreeRoot;
NodeRef xCurrentNode;
- ULONG nTimestamp;
+ sal_uLong nTimestamp;
ParseAction aAction;
public:
@@ -219,11 +219,11 @@ public:
NodeRef GetCurrentNode(){ return xCurrentNode; }
void SetCurrentNode( NodeRef xCurrent ){ xCurrentNode = xCurrent; }
NodeRef GetRootNode(){ return xTreeRoot; }
- ULONG GetTimestamp(){ return nTimestamp; }
+ sal_uLong GetTimestamp(){ return nTimestamp; }
void Touch(){ nTimestamp = Time::GetSystemTicks(); }
// Methods SAXParser
- BOOL Parse( ParseAction aAct );
+ sal_Bool Parse( ParseAction aAct );
String GetErrors(){ return aErrors; }
// Methods XErrorHandler
@@ -254,13 +254,13 @@ SAXParser::~SAXParser()
xParser.clear();
}
-BOOL SAXParser::Parse( ParseAction aAct )
+sal_Bool SAXParser::Parse( ParseAction aAct )
{
aAction = aAct;
Touch();
SvStream* pStream = new SvFileStream( aFilename, STREAM_STD_READ );
if ( pStream->GetError() )
- return FALSE;
+ return sal_False;
InputSource sSource;
sSource.aInputStream = new SVInputStream( pStream ); // is refcounted and hence deletet appropriately
@@ -296,8 +296,8 @@ BOOL SAXParser::Parse( ParseAction aAct )
xParser->setDocumentHandler( NULL ); // otherwile Object holds itself
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
@@ -365,13 +365,13 @@ void SAXParser::characters( const ::rtl::OUString& aChars ) throw (::com::sun::s
{
if ( aAction == COLLECT_DATA_IGNORE_WHITESPACE )
{ // check for whitespace
- BOOL bAllWhitespace = TRUE;
+ sal_Bool bAllWhitespace = sal_True;
for ( int i = 0 ; bAllWhitespace && i < aChars.getLength() ; i++ )
if ( aChars[i] != 10 // LF
&& aChars[i] != 13 // CR
&& aChars[i] != ' ' // Blank
&& aChars[i] != '\t' ) // Tab
- bAllWhitespace = FALSE;
+ bAllWhitespace = sal_False;
if ( bAllWhitespace )
return;
}
@@ -457,7 +457,7 @@ void StatementCommand::HandleSAXParser()
{
if ( !pSAXParser->Parse( PARSE_ONLY ) )
ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetErrors() );
+ pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetErrors() );
}
xParserKeepaliveReference.clear();
@@ -487,7 +487,7 @@ void StatementCommand::HandleSAXParser()
if ( !pSAXParser->Parse( aAction ) )
ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetErrors() );
+ pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetErrors() );
}
}
else
@@ -496,7 +496,7 @@ void StatementCommand::HandleSAXParser()
break;
case RC_SAXGetNodeType:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() );
}
break;
case RC_SAXGetAttributeCount:
@@ -511,23 +511,23 @@ void StatementCommand::HandleSAXParser()
switch ( nMethodId )
{
case RC_SAXGetElementName:
- pRet->GenReturn ( RET_Value, aSmartMethodId, pElementNode->GetNodeName() );
+ pRet->GenReturn ( RET_Value, nMethodId, pElementNode->GetNodeName() );
break;
case RC_SAXGetChildCount:
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pElementNode->GetChildCount() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pElementNode->GetChildCount() );
break;
case RC_SAXGetAttributeCount:
if ( xAttributeList.is() )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)xAttributeList->getLength() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)xAttributeList->getLength() );
else
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)0 );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)0 );
break;
case RC_SAXGetAttributeName:
{
- if( (nParams & PARAM_USHORT_1) && ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
+ if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
{
String aRet( xAttributeList->getNameByIndex( nNr1-1 ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aRet );
+ pRet->GenReturn ( RET_Value, nMethodId, aRet );
}
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
@@ -536,15 +536,15 @@ void StatementCommand::HandleSAXParser()
case RC_SAXGetAttributeValue:
// Number or String
{
- if( (nParams & PARAM_USHORT_1) && ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
+ if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
{
String aRet( xAttributeList->getValueByIndex( nNr1-1 ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aRet );
+ pRet->GenReturn ( RET_Value, nMethodId, aRet );
}
else if( (nParams & PARAM_STR_1) && xAttributeList.is() )
{
String aRet( xAttributeList->getValueByName( aString1 ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aRet );
+ pRet->GenReturn ( RET_Value, nMethodId, aRet );
}
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
@@ -565,7 +565,7 @@ void StatementCommand::HandleSAXParser()
{
NodeRef xNode=pSAXParser->GetCurrentNode();
CharacterNode* aCharacterNode = (CharacterNode*)(&xNode);
- pRet->GenReturn ( RET_Value, aSmartMethodId, aCharacterNode->GetCharacters() );
+ pRet->GenReturn ( RET_Value, nMethodId, aCharacterNode->GetCharacters() );
}
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
@@ -576,22 +576,22 @@ void StatementCommand::HandleSAXParser()
case RC_SAXHasElement:
// Number or String
{
- BOOL bCheckOnly = nMethodId == RC_SAXHasElement;
+ sal_Bool bCheckOnly = nMethodId == RC_SAXHasElement;
if( (nParams & PARAM_USHORT_1) && !(nParams & PARAM_STR_1) )
{
if ( nNr1 == 0 )
{
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetCurrentNode()->GetParent().Is() );
+ pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetCurrentNode()->GetParent().Is() );
else if ( pSAXParser->GetCurrentNode()->GetParent().Is() )
pSAXParser->SetCurrentNode( pSAXParser->GetCurrentNode()->GetParent() );
}
else if ( !pElementNode )
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
else if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, ValueOK( aSmartMethodId, String(), nNr1, pElementNode->GetChildCount() ) );
- else if ( ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) )
+ pRet->GenReturn ( RET_Value, nMethodId, ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) );
+ else if ( ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) )
pSAXParser->SetCurrentNode( pElementNode->GetChild( nNr1-1 ) );
}
else if( (nParams & PARAM_STR_1) )
@@ -599,16 +599,16 @@ void StatementCommand::HandleSAXParser()
if ( aString1.EqualsAscii( "/" ) )
{
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)TRUE );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)sal_True );
else
pSAXParser->SetCurrentNode( pSAXParser->GetRootNode() );
}
else if ( aString1.Copy(0,2).EqualsAscii( "*:" ) )
{
- ULONG nTimestamp = (ULONG)aString1.GetToken( 1, ':' ).ToInt64();
- ULONG nPointer = (ULONG)aString1.GetToken( 2, ':' ).ToInt64();
+ sal_uLong nTimestamp = (sal_uLong)aString1.GetToken( 1, ':' ).ToInt64();
+ sal_uLong nPointer = (sal_uLong)aString1.GetToken( 2, ':' ).ToInt64();
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) );
else
if ( pSAXParser->GetTimestamp() == nTimestamp )
{
@@ -622,13 +622,13 @@ void StatementCommand::HandleSAXParser()
}
else if ( pElementNode )
{
- USHORT nNthOccurrence;
+ sal_uInt16 nNthOccurrence;
if( (nParams & PARAM_USHORT_1) )
nNthOccurrence = nNr1;
else
nNthOccurrence = 1;
- USHORT i;
+ sal_uInt16 i;
NodeRef xNew;
for ( i = 0 ; i < pElementNode->GetChildCount() && !xNew.Is() ; i++ )
{
@@ -651,7 +651,7 @@ void StatementCommand::HandleSAXParser()
xNew.Clear();
}
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, xNew.Is() );
+ pRet->GenReturn ( RET_Value, nMethodId, xNew.Is() );
else
if ( xNew.Is() )
pSAXParser->SetCurrentNode( xNew );
@@ -660,7 +660,7 @@ void StatementCommand::HandleSAXParser()
}
else
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)FALSE );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)sal_False );
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
}
@@ -670,15 +670,15 @@ void StatementCommand::HandleSAXParser()
break;
case RC_SAXGetElementPath:
{
- DBG_ASSERT( sizeof( ULONG ) == sizeof ( void* ), "Pointertype has different size than ULONG");
+ DBG_ASSERT( sizeof( sal_uIntPtr ) == sizeof ( void* ), "Pointertype has different size than sal_uIntPtr");
String aPath;
aPath.AppendAscii( "*:" );
aPath.Append( String::CreateFromInt64( pSAXParser->GetTimestamp() ) );
aPath.AppendAscii( ":" );
NodeRef xNode=pSAXParser->GetCurrentNode();
Node* pNode = (Node*)(&xNode);
- aPath.Append( String::CreateFromInt64( (ULONG)pNode ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aPath );
+ aPath.Append( String::CreateFromInt64( (sal_uIntPtr)pNode ) );
+ pRet->GenReturn ( RET_Value, nMethodId, aPath );
}
break;
diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx
index 2e15e18794f2..dcb01a44ce5a 100644
--- a/automation/source/server/cmdbasestream.cxx
+++ b/automation/source/server/cmdbasestream.cxx
@@ -51,7 +51,7 @@ CmdBaseStream::~CmdBaseStream()
{
}
-void CmdBaseStream::GenError (SmartId *pUId, comm_String *pString )
+void CmdBaseStream::GenError (rtl::OString *pUId, comm_String *pString )
{
Write(comm_USHORT(SIReturnError));
Write(pUId);
@@ -66,46 +66,95 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_ULONG nUId )
Write(comm_USHORT(PARAM_NONE)); // Typ der folgenden Parameter
}
-void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr )
+void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
- Write(pUId);
+ if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
+ Write(comm_ULONG(0));
+ else
+ Write(pUId);
Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter
Write(nNr);
}
-void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_String *pString )
+void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_String *pString )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
- Write(pUId);
+ if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
+ Write(comm_ULONG(0));
+ else
+ Write(pUId);
Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter
Write(pString);
}
-void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_BOOL bBool )
+void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
- Write(pUId);
+ if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
+ Write(comm_ULONG(0));
+ else
+ Write(pUId);
Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(bBool);
}
-void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool )
+void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
- Write(pUId);
+ if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
+ Write(comm_ULONG(0));
+ else
+ Write(pUId);
Write(comm_USHORT(PARAM_ULONG_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(nNr);
Write(pString);
Write(bBool);
}
+void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr )
+{
+ Write(comm_USHORT(SIReturn));
+ Write(nRet);
+ Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed)
+ Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter
+ Write(nNr);
+}
+
+void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString )
+{
+ Write(comm_USHORT(SIReturn));
+ Write(nRet);
+ Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed)
+ Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter
+ Write(pString);
+}
+
+void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool )
+{
+ Write(comm_USHORT(SIReturn));
+ Write(nRet);
+ Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed)
+ Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter
+ Write(bBool);
+}
+
+void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr )
+{
+ Write(comm_USHORT(SIReturn));
+ Write(nRet);
+ Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed)
+ Write(comm_USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter
+ Write(nNr);
+}
+
+
// MacroRecorder
-void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod )
+void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
@@ -114,7 +163,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet
Write(nMethod);
}
-void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString )
+void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
@@ -124,7 +173,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet
Write(pString);
}
-void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool )
+void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
@@ -135,7 +184,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet
Write(bBool);
}
-void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_BOOL bBool )
+void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
@@ -145,7 +194,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet
Write(bBool);
}
-void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_ULONG nNr )
+void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
@@ -284,10 +333,10 @@ void CmdBaseStream::Read ( comm_String* &pString )
(void) pString; /* avoid warning about unused parameter */
OSL_FAIL("Read ( comm_String* &pString ) Not Implemented");
}
-void CmdBaseStream::Read ( SmartId* &pId )
+void CmdBaseStream::Read ( rtl::OString* &pId )
{
(void) pId; /* avoid warning about unused parameter */
- OSL_FAIL("Read ( SmartId* &pId ) Not Implemented");
+ OSL_FAIL("Read ( rtl::OString* &pId ) Not Implemented");
}
void CmdBaseStream::Write( comm_String *pString )
@@ -295,10 +344,10 @@ void CmdBaseStream::Write( comm_String *pString )
(void) pString; /* avoid warning about unused parameter */
OSL_FAIL("Write( comm_String *pString ) Not Implemented");
}
-void CmdBaseStream::Write( SmartId* pId )
+void CmdBaseStream::Write( rtl::OString* pId )
{
(void) pId; /* avoid warning about unused parameter */
- OSL_FAIL("Write( SmartId* pId ) Not Implemented");
+ OSL_FAIL("Write( rtl::OString* pId ) Not Implemented");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/source/server/editwin.cxx b/automation/source/server/editwin.cxx
index 5d3e1502b187..8056eebd6c02 100644
--- a/automation/source/server/editwin.cxx
+++ b/automation/source/server/editwin.cxx
@@ -63,14 +63,14 @@ void ImpWorkWindow::Resize()
m_aInhalt.SetPosSizePixel( Point(), GetOutputSizePixel() );
}
-BOOL EditWindow::Close()
+sal_Bool EditWindow::Close()
{
if ( pImpWorkWindow )
{
delete pImpWorkWindow;
pImpWorkWindow = NULL;
}
- return TRUE;
+ return sal_True;
}
void EditWindow::Show()
@@ -78,7 +78,7 @@ void EditWindow::Show()
if ( Check() )
pImpWorkWindow->Show();
else
- bShowWin = TRUE;
+ bShowWin = sal_True;
}
void EditWindow::Hide()
@@ -86,7 +86,7 @@ void EditWindow::Hide()
if ( Check() )
pImpWorkWindow->Hide();
else
- bShowWin = FALSE;
+ bShowWin = sal_False;
}
EditWindow::EditWindow( WorkWindow *pParent, const String &rName, WinBits iWstyle )
@@ -95,7 +95,7 @@ EditWindow::EditWindow( WorkWindow *pParent, const String &rName, WinBits iWstyl
, aMemName(rName)
, iMemWstyle(iWstyle)
, nTextLen(0)
-, bQuiet(FALSE)
+, bQuiet(sal_False)
{
}
@@ -104,7 +104,7 @@ EditWindow::~EditWindow()
Close();
}
-BOOL EditWindow::Check()
+sal_Bool EditWindow::Check()
{
if ( ! pImpWorkWindow && Application::IsInExecute() )
{
@@ -114,7 +114,7 @@ BOOL EditWindow::Check()
aMemPreWinText.Erase();
if ( bShowWin )
pImpWorkWindow->Show();
- return TRUE;
+ return sal_True;
}
return pImpWorkWindow != NULL;
}
diff --git a/automation/source/server/editwin.hxx b/automation/source/server/editwin.hxx
index d01a824c3bdd..9b6d8b925f04 100644
--- a/automation/source/server/editwin.hxx
+++ b/automation/source/server/editwin.hxx
@@ -40,14 +40,14 @@ class EditWindow
{
protected:
ImpWorkWindow *pImpWorkWindow;
- BOOL check();
+ sal_Bool check();
WorkWindow *pMemParent;
String aMemName;
WinBits iMemWstyle;
String aMemPreWinText;
- BOOL bShowWin;
+ sal_Bool bShowWin;
xub_StrLen nTextLen; // aus Performanzgründen eigene Länge mitführen
@@ -61,9 +61,9 @@ public:
void AddText( const String &rNew );
void AddText( const sal_Char* rNew );
- virtual BOOL Close(); // derived
- BOOL bQuiet;
- BOOL Check();
+ virtual sal_Bool Close(); // derived
+ sal_Bool bQuiet;
+ sal_Bool Check();
};
#endif
diff --git a/automation/source/server/prof_nul.cxx b/automation/source/server/prof_nul.cxx
index 3fb9d92a7597..46e1e3789d7b 100644
--- a/automation/source/server/prof_nul.cxx
+++ b/automation/source/server/prof_nul.cxx
@@ -83,7 +83,7 @@ String TTProfiler::GetSysdepProfileHeader()
// Zustand merken
-void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *, USHORT )
+void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *, sal_uInt16 )
{};
diff --git a/automation/source/server/prof_usl.cxx b/automation/source/server/prof_usl.cxx
index a20e81606d7b..b7ca8037b0e1 100644
--- a/automation/source/server/prof_usl.cxx
+++ b/automation/source/server/prof_usl.cxx
@@ -86,7 +86,7 @@ String TTProfiler::GetSysdepProfileHeader()
// Zustand merken
-void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, USHORT )
+void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, sal_uInt16 )
{
SvFileStream aStream( String::CreateFromAscii("/proc/self/psinfo"), STREAM_READ ); // Das ist ein expliziter Pfad für UNXSOL!
if ( aStream.IsOpen() )
@@ -123,8 +123,8 @@ String TTProfiler::GetSysdepProfileLine( SysdepProfileSnapshot *pStart, SysdepPr
aProfile += Pad( String::CreateFromInt64(DIFF_MS( pStart, pStop, mprusage.pr_rtime ) / AVER( pStart, pStop, mprusage.pr_count )), 7 );
- ULONG d_utime = DIFF_MS( pStart, pStop, mpstatus.pr_utime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cutime );
- ULONG d_stime = DIFF_MS( pStart, pStop, mpstatus.pr_stime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cstime );
+ sal_uLong d_utime = DIFF_MS( pStart, pStop, mpstatus.pr_utime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cutime );
+ sal_uLong d_stime = DIFF_MS( pStart, pStop, mpstatus.pr_stime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cstime );
aProfile += Pad( String::CreateFromInt64(d_utime), 7 );
aProfile += Pad( String::CreateFromInt64(d_stime), 7 );
diff --git a/automation/source/server/profiler.cxx b/automation/source/server/profiler.cxx
index 1f9a63c18bd9..c11ddce1014a 100644
--- a/automation/source/server/profiler.cxx
+++ b/automation/source/server/profiler.cxx
@@ -43,10 +43,10 @@
TTProfiler::TTProfiler()
: mpStart( NULL )
, mpEnd( NULL )
-, bIsProfileIntervalStarted( FALSE )
-, bIsProfilingPerCommand( FALSE )
-, bIsPartitioning( FALSE )
-, bIsAutoProfiling( FALSE )
+, bIsProfileIntervalStarted( sal_False )
+, bIsProfilingPerCommand( sal_False )
+, bIsPartitioning( sal_False )
+, bIsAutoProfiling( sal_False )
, pSysDepStatic( NULL )
{
InitSysdepProfiler();
@@ -94,13 +94,13 @@ String TTProfiler::GetProfileHeader()
}
-void TTProfiler::StartProfileInterval( BOOL bReadAnyway )
+void TTProfiler::StartProfileInterval( sal_Bool bReadAnyway )
{
if ( !bIsProfileIntervalStarted || bReadAnyway )
{
GetProfileSnapshot( mpStart );
GetSysdepProfileSnapshot( mpStart->pSysdepProfileSnapshot, PROFILE_START );
- bIsProfileIntervalStarted = TRUE;
+ bIsProfileIntervalStarted = sal_True;
}
}
@@ -108,10 +108,10 @@ String TTProfiler::GetProfileLine( ProfileSnapshot *pStart, ProfileSnapshot *pEn
{
String aProfileString;
- aProfileString += Pad(GetpApp()->GetAppLocaleDataWrapper().getDuration( DIFF( pStart, pEnd, aTime) , TRUE, TRUE ), 12);
+ aProfileString += Pad(GetpApp()->GetAppLocaleDataWrapper().getDuration( DIFF( pStart, pEnd, aTime) , sal_True, sal_True ), 12);
- ULONG nProcessTicks = DIFF( pStart, pEnd, nProcessTicks );
- ULONG nSystemTicks = DIFF( pStart, pEnd, nSystemTicks );
+ sal_uLong nProcessTicks = DIFF( pStart, pEnd, nProcessTicks );
+ sal_uLong nSystemTicks = DIFF( pStart, pEnd, nSystemTicks );
if ( nSystemTicks )
{
aProfileString += Pad(UniString::CreateFromInt32( (100 * nProcessTicks) / nSystemTicks ), 11);
@@ -146,7 +146,7 @@ void TTProfiler::EndProfileInterval()
{
GetProfileSnapshot( mpEnd );
GetSysdepProfileSnapshot( mpEnd->pSysdepProfileSnapshot, PROFILE_END );
- bIsProfileIntervalStarted = FALSE;
+ bIsProfileIntervalStarted = sal_False;
}
@@ -160,32 +160,32 @@ void TTProfiler::GetProfileSnapshot( ProfileSnapshot *pProfileSnapshot )
void TTProfiler::StartProfilingPerCommand() // Jeden Befehl mitschneiden
{
- bIsProfilingPerCommand = TRUE;
+ bIsProfilingPerCommand = sal_True;
}
void TTProfiler::StopProfilingPerCommand()
{
- bIsProfilingPerCommand = FALSE;
+ bIsProfilingPerCommand = sal_False;
}
void TTProfiler::StartPartitioning()
{
- bIsPartitioning = TRUE;
+ bIsPartitioning = sal_True;
}
void TTProfiler::StopPartitioning()
{
- bIsPartitioning = TRUE;
+ bIsPartitioning = sal_True;
}
-ULONG TTProfiler::GetPartitioningTime()
+sal_uLong TTProfiler::GetPartitioningTime()
{
return DIFF( mpStart, mpEnd, nSystemTicks );
}
-void TTProfiler::StartAutoProfiling( ULONG nMSec )
+void TTProfiler::StartAutoProfiling( sal_uLong nMSec )
{
if ( !bIsAutoProfiling )
{
@@ -196,7 +196,7 @@ void TTProfiler::StartAutoProfiling( ULONG nMSec )
GetProfileSnapshot( pAutoStart );
GetSysdepProfileSnapshot( pAutoStart->pSysdepProfileSnapshot, PROFILE_START );
SetTimeout( nMSec );
- bIsAutoProfiling = TRUE;
+ bIsAutoProfiling = sal_True;
Start();
}
@@ -233,14 +233,14 @@ void TTProfiler::StopAutoProfiling()
if ( bIsAutoProfiling )
{
Stop();
- bIsAutoProfiling = FALSE;
+ bIsAutoProfiling = sal_False;
}
}
-//String TTProfiler::Hex( ULONG nNr )
-String TTProfiler::Dec( ULONG nNr )
+//String TTProfiler::Hex( sal_uLong nNr )
+String TTProfiler::Dec( sal_uLong nNr )
{
String aRet(UniString::CreateFromInt32(nNr));
if ( nNr < 100 )
diff --git a/automation/source/server/profiler.hxx b/automation/source/server/profiler.hxx
index cd6f309844a4..8bcb058bd4af 100644
--- a/automation/source/server/profiler.hxx
+++ b/automation/source/server/profiler.hxx
@@ -42,14 +42,14 @@
struct SysdepProfileSnapshot;
-struct SysdepStaticData; // Nicht wirklich statisch, sondern statisch über mehrere Snapshots
+struct SysdepStaticData; // Nicht wirklich statisch, sondern statisch �ber mehrere Snapshots
struct ProfileSnapshot
{
Time aTime;
SysdepProfileSnapshot *pSysdepProfileSnapshot;
- ULONG nProcessTicks;
- ULONG nSystemTicks;
+ sal_uLong nProcessTicks;
+ sal_uLong nSystemTicks;
};
@@ -59,25 +59,25 @@ public:
TTProfiler();
~TTProfiler();
- String GetProfileHeader(); // Titelzeile für Logdatei
- void StartProfileInterval( BOOL bReadAnyway = FALSE ); // Zustand merken
+ String GetProfileHeader(); // Titelzeile f�r Logdatei
+ void StartProfileInterval( sal_Bool bReadAnyway = sal_False ); // Zustand merken
void EndProfileInterval(); // Informationszeile zusammenbauen
String GetProfileLine( String &aPrefix );
void StartProfilingPerCommand(); // Jeden Befehl mitschneiden
void StopProfilingPerCommand();
- BOOL IsProfilingPerCommand() { return bIsProfilingPerCommand; }
+ sal_Bool IsProfilingPerCommand() { return bIsProfilingPerCommand; }
void StartPartitioning();
void StopPartitioning();
- BOOL IsPartitioning() { return bIsPartitioning; }
- ULONG GetPartitioningTime();
+ sal_Bool IsPartitioning() { return bIsPartitioning; }
+ sal_uLong GetPartitioningTime();
- void StartAutoProfiling( ULONG nMSec ); // Automatisch alle nMSec Milisekunden sampeln
+ void StartAutoProfiling( sal_uLong nMSec ); // Automatisch alle nMSec Milisekunden sampeln
String GetAutoProfiling(); // Aktuelle `Sammlung` abholen
void StopAutoProfiling(); // Sampeln beenden
- BOOL IsAutoProfiling() { return bIsAutoProfiling; }
+ sal_Bool IsAutoProfiling() { return bIsAutoProfiling; }
private:
@@ -89,20 +89,20 @@ private:
ProfileSnapshot *mpStart;
ProfileSnapshot *mpEnd;
- BOOL bIsProfileIntervalStarted;
+ sal_Bool bIsProfileIntervalStarted;
//
- BOOL bIsProfilingPerCommand;
- BOOL bIsPartitioning;
+ sal_Bool bIsProfilingPerCommand;
+ sal_Bool bIsPartitioning;
-// Für das Automatische Profiling in festen Intervallen
+// F�r das Automatische Profiling in festen Intervallen
ProfileSnapshot *pAutoStart;
ProfileSnapshot *pAutoEnd;
- BOOL bIsAutoProfiling;
+ sal_Bool bIsAutoProfiling;
String aAutoProfileBuffer;
virtual void Timeout();
@@ -110,11 +110,11 @@ private:
// Einige Hilfsfunktionen
-// String Hex( ULONG nNr );
- String Dec( 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 Hex( sal_uLong nNr );
+ 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
-/* Ab hier werden die Methoden Systemabhängig in den entsprechenden cxx implementiert
+/* Ab hier werden die Methoden Systemabh�ngig in den entsprechenden cxx implementiert
Sie werden von den oberen Methoden gerufen.
*/
@@ -126,11 +126,11 @@ private:
SysdepProfileSnapshot *NewSysdepSnapshotData();
void DeleteSysdepSnapshotData( SysdepProfileSnapshot *pSysdepProfileSnapshot );
- // Titelzeile für Logdatei
+ // Titelzeile f�r Logdatei
String GetSysdepProfileHeader();
// Zustand merken
- void GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, USHORT nMode = PROFILE_START | PROFILE_END );
+ 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 d233dede5164..ef6f90b88b57 100644
--- a/automation/source/server/recorder.cxx
+++ b/automation/source/server/recorder.cxx
@@ -57,9 +57,9 @@ MacroRecorder::MacroRecorder()
, pActionParent( NULL )
, aKeyUniqueID()
, pKeyWin( NULL )
-, bKeyFollowFocus( FALSE )
-, m_bRecord( FALSE )
-, m_bLog( FALSE )
+, bKeyFollowFocus( sal_False )
+, m_bRecord( sal_False )
+, m_bLog( sal_False )
{
aHookRefresh.SetTimeout( 500 );
aHookRefresh.SetTimeoutHdl( LINK( this, MacroRecorder, HookRefreshHdl) );
@@ -106,41 +106,41 @@ IMPL_LINK( MacroRecorder, HookRefreshHdl, void*, EMPTYARG )
return 0;
}
-void MacroRecorder::LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod, USHORT nParam )
+void MacroRecorder::LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod, sal_uInt16 nParam )
{
- ::comphelper::UiEventsLogger::logVcl( aParentID.GetText(), nVCLWindowType, aID.GetText(), aMethod, nParam );
+ ::comphelper::UiEventsLogger::logVcl( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod, nParam );
}
-void MacroRecorder::LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod )
+void MacroRecorder::LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod )
{
- ::comphelper::UiEventsLogger::logVcl( aParentID.GetText(), nVCLWindowType, aID.GetText(), aMethod );
+ ::comphelper::UiEventsLogger::logVcl( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod );
}
Window* MacroRecorder::GetParentWithID( Window* pThis )
{
Window *pOverlap = pThis->GetWindow( WINDOW_OVERLAP );
- while ( pOverlap != pThis && !pThis->GetSmartUniqueOrHelpId().HasAny() && pThis->GET_REAL_PARENT() )
+ while ( pOverlap != pThis && !pThis->GetUniqueOrHelpId().getLength() && pThis->GET_REAL_PARENT() )
pThis = pThis->GET_REAL_PARENT();
return pThis;
}
-SmartId MacroRecorder::GetParentID( Window* pThis )
+rtl::OString MacroRecorder::GetParentID( Window* pThis )
{
if ( pThis->GetParent() )
- return pThis->GetParent()->GetSmartUniqueOrHelpId();
+ return pThis->GetParent()->GetUniqueOrHelpId();
else
- return SmartId();
+ return rtl::OString();
}
IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
- BOOL bSendData = FALSE;
+ sal_Bool bSendData = sal_False;
if ( pEvent->ISA( VclWindowEvent ) )
{
VclWindowEvent* pWinEvent = ( VclWindowEvent* ) pEvent;
Window* pWin = pWinEvent->GetWindow();
- ULONG nEventID = pWinEvent->GetId();
+ sal_uLong nEventID = pWinEvent->GetId();
#if OSL_DEBUG_LEVEL > 1
if ( nEventID >= 1001 && nEventID != VCLEVENT_WINDOW_KEYUP )
nEventID = pWinEvent->GetId(); // Just something to set a breakpoint
@@ -168,18 +168,18 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
// we cannot access pKeyWin since it might have dissapeared
if ( bKeyFollowFocus )
- StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (USHORT)M_TypeKeys, aKeyString, bKeyFollowFocus );
+ StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (sal_uInt16)M_TypeKeys, aKeyString, bKeyFollowFocus );
else
- StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (USHORT)M_TypeKeys, aKeyString );
+ StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (sal_uInt16)M_TypeKeys, aKeyString );
#if OSL_DEBUG_LEVEL > 1
- StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (USHORT)M_TypeKeys, String::CreateFromInt32( nEventID ) );
+ StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (sal_uInt16)M_TypeKeys, String::CreateFromInt32( nEventID ) );
#endif
- bSendData = TRUE;
+ bSendData = sal_True;
}
// cleanup
aKeyString.Erase();
pKeyWin = NULL;
- bKeyFollowFocus = FALSE;
+ bKeyFollowFocus = sal_False;
}
switch ( pWin->GetType() )
@@ -190,12 +190,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case VCLEVENT_WINDOW_ACTIVATE:
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pWin->GetSmartUniqueOrHelpId().GetNum()) ); //GetNum() ULONG != comm_ULONG on 64bit
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), Id2Str( pWin->GetUniqueOrHelpId() ) );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( SmartId(), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("SetPage") );
+ LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("SetPage") );
}
break;
}
@@ -210,12 +210,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Check );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Check );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Check") );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Check") );
}
}
}
@@ -240,12 +240,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), nMethod );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
}
}
break;
@@ -273,12 +273,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case VCLEVENT_LISTBOX_SELECT:
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Select"), ((ListBox*)pWin)->GetSelectEntryPos() );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Select"), ((ListBox*)pWin)->GetSelectEntryPos() );
}
break;
}
@@ -301,20 +301,20 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
pEditModify = NULL;
aEditModifyString.Erase();
- USHORT nPos = ((ComboBox*)pWin)->GetEntryPos(((ComboBox*)pWin)->GetText());
+ sal_uInt16 nPos = ((ComboBox*)pWin)->GetEntryPos(((ComboBox*)pWin)->GetText());
if ( m_bRecord )
{
if ( nPos == COMBOBOX_ENTRY_NOTFOUND )
Sound::Beep();
else
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Select, (comm_ULONG) nPos+1 );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, (comm_ULONG) nPos+1 );
+ bSendData = sal_True;
}
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Select"), nPos );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Select"), nPos );
}
}
}
@@ -329,8 +329,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
case VCLEVENT_BUTTON_CLICK:
Window* pParent = pWin->GetParent();
- BOOL bDone = FALSE;
- if ( pParent->IsDialog() && !pWin->GetSmartUniqueOrHelpId().HasAny() )
+ sal_Bool bDone = sal_False;
+ if ( pParent->IsDialog() && !pWin->GetUniqueOrHelpId().getLength() )
{
switch ( pParent->GetType() )
{
@@ -346,8 +346,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
ButtonDialog* pBD = (ButtonDialog*)pParent;
// we have to find the current Button ID ourselves since it is not generated at this point :-(
- USHORT nCurrentButtonId = 0xffff; // Some wild value to wak up people
- USHORT i;
+ sal_uInt16 nCurrentButtonId = 0xffff; // Some wild value to wak up people
+ sal_uInt16 i;
for ( i = 0; i < pBD->GetButtonCount() ; i++ )
{
if ( pBD->GetPushButton( pBD->GetButtonId(i) ) == pWin )
@@ -370,18 +370,18 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
if ( m_bRecord )
{
if ( nMethod != M_Click )
- StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId( 0 ), nMethod );
+ StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod );
else
- StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId( 0 ), nMethod, (comm_ULONG)nCurrentButtonId );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod, (comm_ULONG)nCurrentButtonId );
+ bSendData = sal_True;
}
if ( m_bLog )
{
if ( nMethod != M_Click )
- LogVCL( SmartId(), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod );
+ LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
else
- LogVCL( SmartId(), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod, nCurrentButtonId );
- bDone = TRUE;
+ LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod, nCurrentButtonId );
+ bDone = sal_True;
}
}
break;
@@ -399,13 +399,13 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pParent->GetSmartUniqueOrHelpId(), nMethod );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pParent->GetUniqueOrHelpId(), nMethod );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod );
- bDone = TRUE;
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
+ bDone = sal_True;
}
}
break;
@@ -413,16 +413,16 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- if ( !bSendData && pWin->GetSmartUniqueOrHelpId().HasAny() )
+ if ( !bSendData && pWin->GetUniqueOrHelpId().getLength() )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Click );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click );
+ bSendData = sal_True;
}
}
if ( m_bLog )
{
if ( !bDone )
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Click") );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Click") );
}
}
break;
@@ -456,12 +456,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), nMethod );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
}
}
break;
@@ -478,12 +478,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case VCLEVENT_BUTTON_CLICK:
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Click );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Click") );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Click") );
}
break;
}
@@ -500,13 +500,13 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
// compare to 1 for floating ToolBoxes
if ( m_bRecord )
{
- if ( !pWin->GetSmartUniqueOrHelpId().HasAny() || pWin->GetSmartUniqueOrHelpId().Matches( 1 ) )
+ if ( !pWin->GetUniqueOrHelpId().getLength() /* || pWin->GetUniqueOrHelpId().Matches( 1 ) */ )
// generate direct Button access
- StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) );
+ StatementList::pRet->GenReturn( RET_MacroRecorder, Str2Id( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) );
else
// access via Toolbox
- StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetSmartUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pTB->GetHelpId( pTB->GetCurItemId() )) ); // GetHelpId() ULONG != comm_ULONG on 64bit
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), Id2Str( pTB->GetHelpId( pTB->GetCurItemId() ) ) );
+ bSendData = sal_True;
}
}
break;
@@ -534,8 +534,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
pKeyWin = pWin;
Window *pIdWin = GetParentWithID( pWin );
if ( pIdWin != pWin )
- bKeyFollowFocus = TRUE;
- aKeyUniqueID = pIdWin->GetSmartUniqueOrHelpId();
+ bKeyFollowFocus = sal_True;
+ aKeyUniqueID = pIdWin->GetUniqueOrHelpId();
if ( ( !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) &&
(( aKeyCode.GetGroup() == KEYGROUP_NUM) ||
( aKeyCode.GetGroup() == KEYGROUP_ALPHA) ||
@@ -579,7 +579,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
// case 1 .. 0xffff:
DBG_TRACE3( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin );
-// BOOL bx = ((DockingWindow*)pWin)->IsFloatingMode();
+// sal_Bool bx = ((DockingWindow*)pWin)->IsFloatingMode();
// break;
}
break;
@@ -598,12 +598,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
if ( m_bRecord )
{
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), M_SetText, aEditModifyString );
- bSendData = TRUE;
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), M_SetText, aEditModifyString );
+ bSendData = sal_True;
}
if ( m_bLog )
{
- LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Modify") );
+ LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Modify") );
}
pEditModify = NULL;
aEditModifyString.Erase(); //could be somewhat lengthy
@@ -655,7 +655,7 @@ MacroRecorder* MacroRecorder::GetMacroRecorder()
return pMacroRecorder;
}
-BOOL MacroRecorder::HasMacroRecorder()
+sal_Bool MacroRecorder::HasMacroRecorder()
{
::osl::MutexGuard aGuard( getRecorderMutex() );
return pMacroRecorder != NULL;
diff --git a/automation/source/server/recorder.hxx b/automation/source/server/recorder.hxx
index fff786d1484d..cde7b91e31c5 100644
--- a/automation/source/server/recorder.hxx
+++ b/automation/source/server/recorder.hxx
@@ -28,7 +28,6 @@
#include <tools/string.hxx>
#include <tools/link.hxx>
-#include <vcl/smartid.hxx>
#include <vcl/timer.hxx>
class ToolBox;
@@ -39,7 +38,7 @@ class MacroRecorder
{
private:
Window* GetParentWithID( Window* pThis );
- SmartId GetParentID( Window* pThis );
+ rtl::OString GetParentID( Window* pThis );
Link aEventListenerHdl;
DECL_LINK( EventListener, VclSimpleEvent* );
@@ -52,17 +51,17 @@ private:
// record keys
String aKeyString;
- SmartId aKeyUniqueID; // has to be remembered seperately since Window might be gone when needed
+ rtl::OString aKeyUniqueID; // has to be remembered seperately since Window might be gone when needed
Window* pKeyWin;
- BOOL bKeyFollowFocus;
+ sal_Bool bKeyFollowFocus;
AutoTimer aHookRefresh;
void AddEventHooks();
void RemoveEventHooks();
DECL_LINK( HookRefreshHdl, void* );
- void LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod, USHORT aParam );
- void LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod );
+ void LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod, sal_uInt16 aParam );
+ void LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod );
static MacroRecorder *pMacroRecorder;
@@ -71,16 +70,16 @@ private:
void CheckDelete();
// Actions to perform
- BOOL m_bRecord;
- BOOL m_bLog;
+ sal_Bool m_bRecord;
+ sal_Bool m_bLog;
public:
- void SetActionRecord( BOOL bRecord = TRUE ) { m_bRecord = bRecord; CheckDelete(); };
- void SetActionLog( BOOL bLog = TRUE ) { m_bLog = bLog; CheckDelete(); };
+ void SetActionRecord( sal_Bool bRecord = sal_True ) { m_bRecord = bRecord; CheckDelete(); };
+ void SetActionLog( sal_Bool bLog = sal_True ) { m_bLog = bLog; CheckDelete(); };
static MacroRecorder* GetMacroRecorder();
- static BOOL HasMacroRecorder();
+ static sal_Bool HasMacroRecorder();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/source/server/retstrm.cxx b/automation/source/server/retstrm.cxx
index 1e89d1826ddd..abe79215ddec 100644
--- a/automation/source/server/retstrm.cxx
+++ b/automation/source/server/retstrm.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_automation.hxx"
#include <tools/stream.hxx>
+#include <basic/ttstrhlp.hxx>
#include "retstrm.hxx"
#include "rcontrol.hxx"
@@ -48,41 +49,50 @@ RetStream::~RetStream()
delete pSammel;
}
-void RetStream::GenError ( SmartId aUId, String aString )
+void RetStream::GenError ( rtl::OString aUId, String aString )
{
CmdBaseStream::GenError ( &aUId, &aString );
}
-void RetStream::GenReturn ( USHORT nRet, SmartId aUId, String aString )
+void RetStream::GenReturn ( sal_uInt16 nRet, rtl::OString aUId, String aString )
{
CmdBaseStream::GenReturn ( nRet, &aUId, &aString );
}
-void RetStream::GenReturn ( USHORT nRet, SmartId aUId, SbxValue &aValue )
-{
- Write(USHORT(SIReturn));
- Write(nRet);
- Write(&aUId);
- Write(USHORT(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter
- Write(aValue);
-}
-
-void RetStream::GenReturn ( USHORT nRet, SmartId aUId, comm_ULONG nNr, String aString, BOOL bBool )
+void RetStream::GenReturn ( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool )
{
CmdBaseStream::GenReturn ( nRet, &aUId, nNr, &aString, bBool );
}
-void RetStream::GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString )
+// MacroRecorder
+void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString )
{
CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString );
}
-void RetStream::GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString, BOOL bBool )
+void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool )
{
CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString, bBool );
}
+void RetStream::GenReturn ( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue )
+{
+ Write(sal_uInt16(SIReturn));
+ Write(nRet);
+ Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed)
+ Write(sal_uInt16(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter
+ Write(aValue);
+}
+
+void RetStream::GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString )
+{
+ CmdBaseStream::GenReturn ( nRet, nMethod, &aString );
+}
+
+
+
+
void RetStream::Write( String *pString )
{
CmdBaseStream::Write( pString->GetBuffer(), pString->Len() );
@@ -90,20 +100,15 @@ void RetStream::Write( String *pString )
void RetStream::Write( SbxValue &aValue )
{
- *pSammel << USHORT( BinSbxValue );
+ *pSammel << sal_uInt16( BinSbxValue );
aValue.Store( *pSammel );
}
-void RetStream::Write( SmartId* pId )
+void RetStream::Write( rtl::OString* pId )
{
- DBG_ASSERT( !pId->HasString() || !pId->HasNumeric(), "SmartId contains Number and String. using String only." );
- if ( pId->HasString() )
- {
- String aTmp( pId->GetStr() );
- Write( &aTmp );
- }
- else
- Write( static_cast<comm_ULONG>(pId->GetNum()) ); ////GetNum() ULONG != comm_ULONG on 64bit
+ //HELPID BACKWARD (should use ByteString or OString)
+ String aTmp( Id2Str( *pId ) );
+ Write( &aTmp );
}
diff --git a/automation/source/server/retstrm.hxx b/automation/source/server/retstrm.hxx
index fb66ef3bfa74..d21650898933 100644
--- a/automation/source/server/retstrm.hxx
+++ b/automation/source/server/retstrm.hxx
@@ -29,7 +29,6 @@
#define _RETSTRM_HXX
#include <basic/sbxvar.hxx>
-#include <vcl/smartid.hxx>
#include "cmdbasestream.hxx"
class SvStream;
@@ -42,23 +41,28 @@ public:
~RetStream();
using CmdBaseStream::GenError;
- void GenError( SmartId aUId, String aString );
+ void GenError( rtl::OString aUId, String aString );
using CmdBaseStream::GenReturn;
void GenReturn( comm_USHORT nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );}
- void GenReturn( comm_USHORT nRet, SmartId aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );}
- void GenReturn( comm_USHORT nRet, SmartId aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );}
+ void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );}
+ void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );}
+
// MacroRecorder
- void GenReturn( comm_USHORT nRet, SmartId aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );}
- void GenReturn( comm_USHORT nRet, SmartId aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );}
- void GenReturn( comm_USHORT nRet, SmartId aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );}
+ void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder
+ void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );}
+ void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );}
+
+ void GenReturn( sal_uInt16 nRet, rtl::OString aUId, String aString );
+ void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool );
+
+// needed for RemoteCommand and Profiling
+ void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue );
+ void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString );
- void GenReturn( USHORT nRet, SmartId aUId, String aString );
- void GenReturn( USHORT nRet, SmartId aUId, SbxValue &aValue );
- void GenReturn( USHORT nRet, SmartId aUId, comm_ULONG nNr, String aString, BOOL bBool );
// MacroRecorder
- void GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString );
- void GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString, BOOL bBool );
+ void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString );
+ void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool );
void Reset();
SvStream* GetStream();
@@ -72,7 +76,7 @@ public:
void Write( SbxValue &aValue );
// Complex Datatypes to be handled system dependent
- virtual void Write( SmartId* pId );
+ virtual void Write( rtl::OString* pId );
virtual void Write( String *pString );
SvStream *pSammel;
diff --git a/automation/source/server/scmdstrm.cxx b/automation/source/server/scmdstrm.cxx
index 977236cc5a3f..7a95e19f9414 100644
--- a/automation/source/server/scmdstrm.cxx
+++ b/automation/source/server/scmdstrm.cxx
@@ -57,7 +57,7 @@ void SCmdStream::Read (String* &pString)
if ( !pString )
pString = new String();
comm_UniChar* pStr;
- USHORT nLenInChars;
+ sal_uInt16 nLenInChars;
CmdBaseStream::Read( pStr, nLenInChars );
*pString = String( pStr, nLenInChars );
@@ -67,7 +67,7 @@ void SCmdStream::Read (String* &pString)
void SCmdStream::Read (String &aString)
{
comm_UniChar* pStr;
- USHORT nLenInChars;
+ sal_uInt16 nLenInChars;
CmdBaseStream::Read( pStr, nLenInChars );
aString = String( pStr, nLenInChars );
@@ -76,8 +76,8 @@ void SCmdStream::Read (String &aString)
void SCmdStream::Read ( SfxPoolItem *&pItem )
{
- USHORT nType;
- USHORT nId;
+ sal_uInt16 nType;
+ sal_uInt16 nId;
Read(nId);
#if OSL_DEBUG_LEVEL > 1
StatementList::m_pDbgWin->AddText( "Parameter: " );
@@ -146,7 +146,7 @@ void SCmdStream::Read ( SfxPoolItem *&pItem )
void SCmdStream::Read ( ::com::sun::star::beans::PropertyValue &rItem )
{
- USHORT nType;
+ sal_uInt16 nType;
String aId;
Read(aId);
rItem.Name = rtl::OUString( aId );
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index 322d70522fe3..4f233afe8068 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -84,16 +84,16 @@ void SAL_CALL osl_TestToolDebugPrint( const sal_Char *pString )
#endif
-ULONG RemoteControlCommunicationManager::nPortIs = TT_PORT_NOT_INITIALIZED;
-USHORT RemoteControlCommunicationManager::nComm = 0;
-BOOL RemoteControlCommunicationManager::bQuiet = FALSE;
+sal_uLong RemoteControlCommunicationManager::nPortIs = TT_PORT_NOT_INITIALIZED;
+sal_uInt16 RemoteControlCommunicationManager::nComm = 0;
+sal_Bool RemoteControlCommunicationManager::bQuiet = sal_False;
#if OSL_DEBUG_LEVEL > 1
RemoteControlCommunicationManager::RemoteControlCommunicationManager( EditWindow * pDbgWin )
#else
RemoteControlCommunicationManager::RemoteControlCommunicationManager()
#endif
-: CommunicationManagerServerViaSocket( GetPort(), 1, TRUE )
+: CommunicationManagerServerViaSocket( GetPort(), 1, sal_True )
#if OSL_DEBUG_LEVEL > 1
, m_pDbgWin( pDbgWin )
#endif
@@ -108,7 +108,7 @@ RemoteControlCommunicationManager::RemoteControlCommunicationManager()
{
SetInfoType( CM_SHORT_TEXT | CM_ALL );
ByteString aByteString;
- InfoMsg( InfoString( aByteString, CM_ALL ) ); // Anzeigen, daß wir da sind
+ InfoMsg( InfoString( aByteString, CM_ALL ) ); // Anzeigen, da� wir da sind
}
}
@@ -149,7 +149,7 @@ IMPL_LINK( RemoteControlCommunicationManager, SetWinCaption, Timer*, EMPTYARG )
}
else
{ // Dann Probieren wir es eben in 1 Sekunde nochmal
- pTimer = new Timer(); // Wird im Link gelöscht
+ pTimer = new Timer(); // Wird im Link gel�scht
pTimer->SetTimeout( 1000 );
pTimer->SetTimeoutHdl( LINK( this, RemoteControlCommunicationManager, SetWinCaption ) );
pTimer->Start();
@@ -169,20 +169,20 @@ void RemoteControlCommunicationManager::InfoMsg( InfoString aMsg )
#endif
}
-ULONG RemoteControlCommunicationManager::GetPort()
+sal_uLong RemoteControlCommunicationManager::GetPort()
{
if ( TT_PORT_NOT_INITIALIZED == nPortIs )
{ // Read Config
- USHORT i;
+ sal_uInt16 i;
// are we to be automated at all?
- BOOL bAutomate = FALSE;
+ sal_Bool bAutomate = sal_False;
for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
{
if ( Application::GetCommandLineParam( i ).EqualsIgnoreCaseAscii("/enableautomation")
|| Application::GetCommandLineParam( i ).EqualsIgnoreCaseAscii("-enableautomation"))
{
- bAutomate = TRUE;
+ bAutomate = sal_True;
break;
}
}
@@ -225,11 +225,11 @@ ULONG RemoteControlCommunicationManager::GetPort()
nPortIs = aConf.ReadKey("TTPort","0").ToInt32();
- // noch prüfen ob dieses Office getestet werden soll.
+ // noch pr�fen ob dieses Office getestet werden soll.
if ( !bAutomate || aConf.ReadKey( aNoTesttoolKey, "" ) != "" )
nPortIs = 0;
- nComm = (USHORT)aConf.ReadKey("Comm","0").ToInt32();
+ nComm = (sal_uInt16)aConf.ReadKey("Comm","0").ToInt32();
if ( nComm )
aConf.DeleteKey("Comm");
@@ -248,7 +248,7 @@ class ExtraIdle : public AutoTimer
{
virtual void Timeout();
- USHORT nStep;
+ sal_uInt16 nStep;
ImplRemoteControl *pRemoteControl;
public:
ExtraIdle( ImplRemoteControl *pRC );
@@ -277,16 +277,16 @@ void ExtraIdle::Timeout()
return;
}
- // Müssen wir selbst idlen?
+ // M�ssen wir selbst idlen?
#if OSL_DEBUG_LEVEL > 1
- ULONG nLastInputInterval = Application::GetLastInputInterval();
- BOOL bIsInModalMode = Application::IsInModalMode();
+ sal_uLong nLastInputInterval = Application::GetLastInputInterval();
+ sal_Bool bIsInModalMode = Application::IsInModalMode();
if ( bIsInModalMode || nLastInputInterval < MIN_IDLE )
#else
if ( Application::IsInModalMode() || Application::GetLastInputInterval() < MIN_IDLE )
#endif
{
- if ( nStep ) // Schon angefangen? dann abbrechen, sonst später nochmal
+ if ( nStep ) // Schon angefangen? dann abbrechen, sonst sp�ter nochmal
{
if ( nStep < 15 )
{
@@ -314,11 +314,11 @@ void ExtraIdle::Timeout()
}
- switch ( nStep++ ) // Probieren ob wir noch was machen können
+ switch ( nStep++ ) // Probieren ob wir noch was machen k�nnen
{
case 0:
{
- SfxPoolItem *pItem = new SfxStringItem((USHORT)StatementList::pTTProperties->nSidNewDocDirect, CUniString("swriter/web") );
+ SfxPoolItem *pItem = new SfxStringItem((sal_uInt16)StatementList::pTTProperties->nSidNewDocDirect, CUniString("swriter/web") );
new StatementSlot( StatementList::pTTProperties->nSidNewDocDirect, pItem );
SetTimeout(30000);
return;
@@ -378,7 +378,7 @@ void ExtraIdle::Timeout()
#endif
#ifdef TT_CODE
- for ( USHORT i = 0 ; i < aStr.Len() ; i++ )
+ for ( sal_uInt16 i = 0 ; i < aStr.Len() ; i++ )
{
if ( aStr.GetChar(i) < 32 || aStr.GetChar(i) > 126 )
{
@@ -563,7 +563,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
if ( StatementList::MaybeResetSafeReschedule() )
{
- StatementList::bExecuting = FALSE; // Wird nacher im SafeReschedule wieder zurückgesetzt
+ StatementList::bExecuting = sal_False; // Wird nacher im SafeReschedule wieder zur�ckgesetzt
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "SafeReschedule has been reset\n" );
#endif
@@ -590,14 +590,14 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
}
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
#endif
- return 0; // Garnicht erst irgendwelchen blödsinn machen
+ return 0; // Garnicht erst irgendwelchen bl�dsinn machen
}
while( StatementList::pFirst && ( !StatementList::bReadingCommands || StatementList::bDying ) )
- // Schleift hier bis Befehl nicht zurückkommt,
- // Wird dann rekursiv über IdleHdl und PostUserEvent aufgerufen.
+ // Schleift hier bis Befehl nicht zur�ckkommt,
+ // Wird dann rekursiv �ber IdleHdl und PostUserEvent aufgerufen.
{
- m_bInsideExecutionLoop = TRUE;
+ m_bInsideExecutionLoop = sal_True;
#ifdef TIMERIDLE
m_aIdleTimer.Stop();
m_aIdleTimer.Start();
@@ -611,7 +611,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
#endif
- return 0; // So dass die App nochmal ´ne chance bekommt
+ return 0; // So dass die App nochmal �ne chance bekommt
}
}
else
@@ -623,7 +623,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
#endif
- return 0; // So dass die App nochmal ´ne chance bekommt
+ return 0; // So dass die App nochmal �ne chance bekommt
}
}
catch( ... )
@@ -639,8 +639,8 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
pDlg->Show();
OSL_FAIL("GPF");
pC->ReportError( GEN_RES_STR0( S_GPF_ABORT ) );
- StatementList::bDying = TRUE;
- while ( StatementList::pFirst ) // Kommandos werden übersprungen
+ StatementList::bDying = sal_True;
+ while ( StatementList::pFirst ) // Kommandos werden �bersprungen
StatementList::NormalReschedule();
delete pDlg;
}
@@ -652,10 +652,10 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG )
}
}
- m_bInsideExecutionLoop = FALSE;
+ m_bInsideExecutionLoop = sal_False;
}
- StatementList::aWindowWaitUId = SmartId(); // Warten rücksetzen, da handler sowieso verlassen wird
+ StatementList::aWindowWaitUId = rtl::OString(); // Warten r�cksetzen, da handler sowieso verlassen wird
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Leaving CommandHdl\n" );
@@ -671,9 +671,9 @@ IMPL_LINK( ImplRemoteControl, QueCommandsEvent, CommunicationLink*, pCL )
return 0;
}
-BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
+sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn )
{
- USHORT nId;
+ sal_uInt16 nId;
if( !m_bIdleInserted )
{
@@ -684,11 +684,11 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
#else
GetpApp()->InsertIdleHdl( LINK( this, ImplRemoteControl, IdleHdl ), 1 );
#endif
- m_bIdleInserted = TRUE;
+ m_bIdleInserted = sal_True;
}
- StatementList::bReadingCommands = TRUE;
+ StatementList::bReadingCommands = sal_True;
#if OSL_DEBUG_LEVEL > 1
if (!m_pDbgWin->bQuiet)
@@ -700,8 +700,8 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
if( nServiceId != SI_IPCCommandBlock && nServiceId != SI_DirectCommandBlock )
{
- DBG_ERROR1( "Ungültiger Request :%i", (int)nServiceId );
- return FALSE;
+ DBG_ERROR1( "Ung�ltiger Request :%i", (int)nServiceId );
+ return sal_False;
}
SCmdStream *pCmdStream = new SCmdStream(pIn);
@@ -713,28 +713,28 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
{
case SICommand:
{
- new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angehängt
+ new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SIControl:
case SIStringControl:
{
- new StatementControl( pCmdStream, nId ); // Wird im Konstruktor an Liste angehängt
+ new StatementControl( pCmdStream, nId ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SISlot:
{
- new StatementSlot( pCmdStream ); // Wird im Konstruktor an Liste angehängt
+ new StatementSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SIUnoSlot:
{
- new StatementUnoSlot( pCmdStream ); // Wird im Konstruktor an Liste angehängt
+ new StatementUnoSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
case SIFlow:
{
- new StatementFlow( nServiceId, pCmdStream, this ); // Wird im Konstruktor an Liste angehängt
+ new StatementFlow( nServiceId, pCmdStream, this ); // Wird im Konstruktor an Liste angeh�ngt
break;
}
default:
@@ -748,7 +748,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
}
}
- StatementList::bReadingCommands = FALSE;
+ StatementList::bReadingCommands = sal_False;
delete pCmdStream;
#if OSL_DEBUG_LEVEL > 1
@@ -764,7 +764,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn )
GetpApp()->PostUserEvent( LINK( this, ImplRemoteControl, CommandHdl ) );
}
- return TRUE;
+ return sal_True;
}
@@ -776,8 +776,8 @@ SvStream* ImplRemoteControl::GetReturnStream()
}
ImplRemoteControl::ImplRemoteControl()
-: m_bIdleInserted( FALSE )
-, m_bInsideExecutionLoop( FALSE )
+: m_bIdleInserted( sal_False )
+, m_bInsideExecutionLoop( sal_False )
#if OSL_DEBUG_LEVEL > 1
, m_pDbgWin(NULL)
#endif
@@ -787,8 +787,11 @@ ImplRemoteControl::ImplRemoteControl()
if ( RemoteControlCommunicationManager::GetPort() != TT_NO_PORT_DEFINED || RemoteControlCommunicationManager::nComm )
{
m_pDbgWin = new EditWindow( NULL, CUniString("Debug Window"), WB_VSCROLL );
- m_pDbgWin->bQuiet = TRUE;
+ m_pDbgWin->bQuiet = sal_True;
m_pDbgWin->Hide();
+ m_pDbgWin->bQuiet = sal_False;
+ m_pDbgWin->Show();
+
StatementList::m_pDbgWin = m_pDbgWin;
}
#endif
@@ -819,26 +822,26 @@ ImplRemoteControl::ImplRemoteControl()
ImplRemoteControl::~ImplRemoteControl()
{
if ( MacroRecorder::HasMacroRecorder() )
- MacroRecorder::GetMacroRecorder()->SetActionRecord( FALSE ); // Will delete MacroRecorder if necessary
+ MacroRecorder::GetMacroRecorder()->SetActionRecord( sal_False ); // Will delete MacroRecorder if necessary
- StatementList::bDying = TRUE;
+ StatementList::bDying = sal_True;
#if OSL_DEBUG_LEVEL > 1
if ( m_pDbgWin )
- m_pDbgWin->bQuiet = TRUE; // Keine Ausgabe mehr im Debugwindow
+ m_pDbgWin->bQuiet = sal_True; // Keine Ausgabe mehr im Debugwindow
#endif
#ifdef DBG_UTIL
- // Zurücksetzen, so daß nachfolgende Assertions nicht verloren gehen
+ // Zur�cksetzen, so da� nachfolgende Assertions nicht verloren gehen
DbgSetPrintTestTool( NULL );
osl_setDebugMessageFunc( StatementCommand::pOriginal_osl_DebugMessageFunc );
#endif
if ( StatementList::pFirst )
- { // Es sind noch Kommandos da, also auch eine Möglichkeit zurückzusenden.
+ { // Es sind noch Kommandos da, also auch eine M�glichkeit zur�ckzusenden.
StatementList::pFirst->ReportError( GEN_RES_STR0( S_APP_SHUTDOWN ) );
- while ( StatementList::pFirst ) // Kommandos werden übersprungen
- StatementList::NormalReschedule(); // Fehler zurückgeschickt
+ while ( StatementList::pFirst ) // Kommandos werden �bersprungen
+ StatementList::NormalReschedule(); // Fehler zur�ckgeschickt
}
if ( pServiceMgr )
@@ -864,7 +867,7 @@ ImplRemoteControl::~ImplRemoteControl()
#else
GetpApp()->RemoveIdleHdl( LINK( this, ImplRemoteControl, IdleHdl ) );
#endif
- m_bIdleInserted = FALSE;
+ m_bIdleInserted = sal_False;
}
delete pServiceMgr;
}
@@ -905,7 +908,7 @@ extern "C" void CreateEventLogger()
extern "C" void DestroyEventLogger()
{
- MacroRecorder::GetMacroRecorder()->SetActionLog( FALSE ); // Will delete MacroRecorder if necessary
+ MacroRecorder::GetMacroRecorder()->SetActionLog( sal_False ); // Will delete MacroRecorder if necessary
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/source/server/server.hxx b/automation/source/server/server.hxx
index e07ad2b0f6e4..7b4850474ad3 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 ULONG(0xFFFFFFFF) // Eigentlich ja noch mehr, aber soll mal reichen
+#define TT_PORT_NOT_INITIALIZED sal_uLong(0xFFFFFFFF) // Eigentlich ja noch mehr, aber soll mal reichen
#define TT_NO_PORT_DEFINED 0
class RemoteControlCommunicationManager : public CommunicationManagerServerViaSocket
@@ -41,12 +41,12 @@ class RemoteControlCommunicationManager : public CommunicationManagerServerViaSo
#endif
String aOriginalWinCaption;
String aAdditionalWinCaption;
- BOOL bIsPortValid;
+ sal_Bool bIsPortValid;
DECL_LINK( SetWinCaption, Timer* = NULL);
Timer* pTimer;
virtual void InfoMsg( InfoString aMsg );
- static ULONG nPortIs;
- static BOOL bQuiet;
+ static sal_uLong nPortIs;
+ static sal_Bool bQuiet;
public:
#if OSL_DEBUG_LEVEL > 1
@@ -59,8 +59,8 @@ public:
virtual void ConnectionOpened( CommunicationLink* pCL );
virtual void ConnectionClosed( CommunicationLink* pCL );
- static ULONG GetPort();
- static USHORT nComm;
+ static sal_uLong GetPort();
+ static sal_uInt16 nComm;
#if OSL_DEBUG_LEVEL > 1
// virtual void DataReceived( CommunicationLink* pCL );
diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx
index fbc046cddf42..e8be99121ce6 100644
--- a/automation/source/server/sta_list.cxx
+++ b/automation/source/server/sta_list.cxx
@@ -57,45 +57,45 @@
TTProfiler *StatementList::pProfiler = NULL;
StatementList *StatementList::pFirst = NULL;
-BOOL StatementList::bReadingCommands = FALSE;
-BOOL StatementList::bIsInReschedule = FALSE;
-USHORT StatementList::nModalCount = 0;
+sal_Bool StatementList::bReadingCommands = sal_False;
+sal_Bool StatementList::bIsInReschedule = sal_False;
+sal_uInt16 StatementList::nModalCount = 0;
Window *StatementList::pLastFocusWindow = NULL;
-BOOL StatementList::bWasDragManager = FALSE;
-BOOL StatementList::bWasPopupMenu = FALSE;
-BOOL StatementList::bBasicWasRunning = FALSE;
+sal_Bool StatementList::bWasDragManager = sal_False;
+sal_Bool StatementList::bWasPopupMenu = sal_False;
+sal_Bool StatementList::bBasicWasRunning = sal_False;
RetStream *StatementList::pRet = NULL;
-BOOL StatementList::IsError = FALSE;
-BOOL StatementList::bDying = FALSE;
-BOOL StatementList::bExecuting = FALSE;
+sal_Bool StatementList::IsError = sal_False;
+sal_Bool StatementList::bDying = sal_False;
+sal_Bool StatementList::bExecuting = sal_False;
StatementList *StatementList::pCurrentProfileStatement = NULL;
-BOOL StatementList::bUsePostEvents = TRUE;
+sal_Bool StatementList::bUsePostEvents = sal_True;
#if OSL_DEBUG_LEVEL > 1
EditWindow *StatementList::m_pDbgWin;
#endif
-SmartId StatementList::aWindowWaitUId = SmartId();
+rtl::OString StatementList::aWindowWaitUId = rtl::OString();
Window *StatementList::pWindowWaitPointer = NULL;
-SmartId StatementList::aWindowWaitOldHelpId = SmartId();
-SmartId StatementList::aWindowWaitOldUniqueId = SmartId();
-USHORT StatementList::nUseBindings = 0;
+rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString();
+rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString();
+sal_uInt16 StatementList::nUseBindings = 0;
-SmartId StatementList::aSubMenuId1 = SmartId(); // Untermenüs bei PopupMenus
-SmartId StatementList::aSubMenuId2 = SmartId(); // erstmal 2-Stufig
-SmartId StatementList::aSubMenuId3 = SmartId(); // and now even 3 levels #i31512#
+sal_uInt16 StatementList::aSubMenuId1 = 0; // Untermen�s bei PopupMenus
+sal_uInt16 StatementList::aSubMenuId2 = 0; // erstmal 2-Stufig
+sal_uInt16 StatementList::aSubMenuId3 = 0; // and now even 3 levels #i31512#
SystemWindow *StatementList::pMenuWindow = NULL;
TTProperties *StatementList::pTTProperties = NULL;
-USHORT StatementList::nMinTypeKeysDelay = 0; // Verzögerung der einzelnen Anschläge für TypeKeys
-USHORT StatementList::nMaxTypeKeysDelay = 0;
-BOOL StatementList::bDoTypeKeysDelay = FALSE;
+sal_uInt16 StatementList::nMinTypeKeysDelay = 0; // Verz�gerung der einzelnen Anschl�ge f�r TypeKeys
+sal_uInt16 StatementList::nMaxTypeKeysDelay = 0;
+sal_Bool StatementList::bDoTypeKeysDelay = sal_False;
Window* StatementList::pFirstDocFrame = NULL;
-BOOL StatementList::bIsSlotInExecute = FALSE;
+sal_Bool StatementList::bIsSlotInExecute = sal_False;
-BOOL StatementList::bCatchGPF = TRUE;
+sal_Bool StatementList::bCatchGPF = sal_True;
IMPL_GEN_RES_STR;
@@ -118,7 +118,7 @@ TTSettings* GetTTSettings()
// Translate
pTTSettings->pTranslateWin = NULL;
- pTTSettings->bToTop = TRUE;
+ pTTSettings->bToTop = sal_True;
}
return pTTSettings;
@@ -127,14 +127,15 @@ TTSettings* GetTTSettings()
-#define IS_WINP_CLOSING(pWin) (pWin->GetSmartHelpId().Matches( 4321 ) && pWin->GetSmartUniqueId().Matches( 1234 ))
+// FIXME: HELPID
+#define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "TT_Win_is_closing_HID" ) && pWin->GetUniqueId().equals( "TT_Win_is_closing_UID" ))
StatementList::StatementList()
: nRetryCount(MAX_RETRIES)
-, bStatementInQue(FALSE)
+, bStatementInQue(sal_False)
{
if (!pRet)
- pRet = new RetStream; // so Spät wie möglich, aber dennoch Zentral und auf jeden Fall rechtzeitig, da pRet private ist.
+ pRet = new RetStream; // so Sp�t wie m�glich, aber dennoch Zentral und auf jeden Fall rechtzeitig, da pRet private ist.
}
void StatementList::InitProfile()
@@ -146,7 +147,7 @@ void StatementList::InitProfile()
#if OSL_DEBUG_LEVEL > 1
if ( pCurrentProfileStatement != NULL && pCurrentProfileStatement != this )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") );
+ pRet->GenReturn( RET_ProfileInfo, 0, CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") );
#endif
pCurrentProfileStatement = this;
}
@@ -162,18 +163,19 @@ void StatementList::SendProfile( String aText )
pProfiler->EndProfileInterval();
if ( pProfiler->IsProfilingPerCommand() )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetProfileLine( aText ) );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileLine( aText ) );
if ( pProfiler->IsPartitioning() )
- pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileTime ), static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() ULONG != comm_ULONG on 64bit
+ // FIXME: HELPID
+ pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() sal_uLong != comm_ULONG on 64bit
}
if ( pProfiler->IsAutoProfiling() )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetAutoProfiling() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
#if OSL_DEBUG_LEVEL > 1
if ( pCurrentProfileStatement == NULL )
- pRet->GenReturn( RET_ProfileInfo, SmartId(), CUniString("SendProfile ohne InitProfile\n") );
+ pRet->GenReturn( RET_ProfileInfo, 0, CUniString("SendProfile ohne InitProfile\n") );
#endif
pCurrentProfileStatement = NULL;
}
@@ -181,11 +183,11 @@ void StatementList::SendProfile( String aText )
void StatementList::QueStatement(StatementList *pAfterThis)
{
- DBG_ASSERT(!bStatementInQue,"QueStatement für bereits eingetragenes Statement -> Abgebrochen");
+ DBG_ASSERT(!bStatementInQue,"QueStatement f�r bereits eingetragenes Statement -> Abgebrochen");
if ( bStatementInQue )
return;
- bStatementInQue = TRUE;
+ bStatementInQue = sal_True;
if ( pAfterThis )
{
if ( pAfterThis->bStatementInQue )
@@ -199,7 +201,7 @@ void StatementList::QueStatement(StatementList *pAfterThis)
pFirst = this;
}
}
- else // am Ende einfügen
+ else // am Ende einf�gen
{
pNext = NULL;
if( !pFirst )
@@ -218,7 +220,7 @@ void StatementList::QueStatement(StatementList *pAfterThis)
void StatementList::Advance()
{ // pFirst ist static!
pFirst = pNext;
- bStatementInQue = FALSE;
+ bStatementInQue = sal_False;
pNext = NULL;
}
@@ -231,7 +233,7 @@ StatementList::~StatementList()
DBG_ASSERT(!bReadingCommands,"Deleting commands while reading them!");
}
-Window* StatementList::GetDocWin( USHORT nNr )
+Window* StatementList::GetDocWin( sal_uInt16 nNr )
{
Window* pBase = Application::GetFirstTopLevelWindow();
@@ -248,10 +250,10 @@ Window* StatementList::GetDocWin( USHORT nNr )
return NULL;
}
-USHORT StatementList::GetDocFrameCount()
+sal_uInt16 StatementList::GetDocFrameCount()
{
Window* pBase = Application::GetFirstTopLevelWindow();
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while ( pBase )
{
@@ -262,10 +264,10 @@ USHORT StatementList::GetDocFrameCount()
return nCount;
}
-USHORT StatementList::GetDocWinCount()
+sal_uInt16 StatementList::GetDocWinCount()
{
Window* pBase = Application::GetFirstTopLevelWindow();
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while ( pBase )
{
@@ -276,12 +278,12 @@ USHORT StatementList::GetDocWinCount()
return nCount;
}
-Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeBase )
+Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase )
{
if ( !pBase && !aSearch.HasSearchFlag( SEARCH_NO_TOPLEVEL_WIN ) )
{
- BOOL bSearchFocusFirst = aSearch.HasSearchFlag( SEARCH_FOCUS_FIRST );
+ sal_Bool bSearchFocusFirst = aSearch.HasSearchFlag( SEARCH_FOCUS_FIRST );
Window *pControl = NULL;
if ( bSearchFocusFirst )
@@ -348,7 +350,7 @@ Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeB
}
-Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL MaybeBase )
+Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase )
{
if ( !pBase )
return NULL;
@@ -358,7 +360,7 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May
Window *pResult = NULL;
- USHORT i;
+ sal_uInt16 i;
for( i = 0 ; i < pBase->GetChildCount() && !pResult; i++ )
pResult = SearchClientWin( pBase->GetChild(i), aSearch );
@@ -366,26 +368,26 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May
}
-BOOL SearchUID::IsWinOK( Window *pWin )
+sal_Bool SearchUID::IsWinOK( Window *pWin )
{
- if ( aUId.Matches( pWin->GetSmartUniqueOrHelpId() ) )
+ if ( aUId.equals( pWin->GetUniqueOrHelpId() ) )
{
if ( ( pWin->IsEnabled() || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pWin->IsVisible() )
- return TRUE;
+ return sal_True;
else
{
if ( !pMaybeResult )
pMaybeResult = pWin;
- return FALSE;
+ return sal_False;
}
}
else if ( pWin->GetType() == WINDOW_TOOLBOX ) // Buttons and Controls on ToolBox.
{
ToolBox *pTB = ((ToolBox*)pWin);
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pTB->GetItemCount() ; i++ )
{
- if ( aUId.Matches( pTB->GetItemCommand(pTB->GetItemId( i )) ) || aUId.Matches( pTB->GetHelpId(pTB->GetItemId( i )) ) )
+ if ( aUId.equals( Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ) ) || aUId.equals( pTB->GetHelpId(pTB->GetItemId( i )) ) )
{ // ID matches.
Window *pItemWin;
pItemWin = pTB->GetItemWindow( pTB->GetItemId( i ) );
@@ -397,17 +399,17 @@ BOOL SearchUID::IsWinOK( Window *pWin )
{ // We got a Button, see if its valid also.
if ( ( pTB->IsItemEnabled(pTB->GetItemId(i)) || HasSearchFlag( SEARCH_FIND_DISABLED ) )
&& pTB->IsItemVisible(pTB->GetItemId(i)) )
- return TRUE; // We got a Button.
+ return sal_True; // We got a Button.
else
{ // better a disabled Button on a valid ToolBox than an invalid ToolBox as below
pMaybeResult = pTB;
- return FALSE;
+ return sal_False;
}
}
else if ( !pMaybeResult )
{ // invalid ToolBox
pMaybeResult = pTB;
- return FALSE;
+ return sal_False;
}
}
if ( pItemWin )
@@ -417,23 +419,23 @@ BOOL SearchUID::IsWinOK( Window *pWin )
{
if ( !pAlternateResult ) // only take the first found ItemWindow #i35365
pAlternateResult = pItemWin; // since we cannot return a Window here
- return FALSE; // continue searching to prefer a window with the right ID #i32292
+ return sal_False; // continue searching to prefer a window with the right ID #i32292
}
else if ( !pMaybeResult )
{
pMaybeResult = pItemWin;
- return FALSE;
+ return sal_False;
}
}
}
}
- return FALSE;
+ return sal_False;
}
else
- return FALSE;
+ return sal_False;
}
-Window* StatementList::SearchTree( SmartId aUId ,BOOL bSearchButtonOnToolbox )
+Window* StatementList::SearchTree( rtl::OString aUId ,sal_Bool bSearchButtonOnToolbox )
{
SearchUID aSearch(aUId,bSearchButtonOnToolbox);
@@ -447,19 +449,19 @@ Window* StatementList::SearchTree( SmartId aUId ,BOOL bSearchButtonOnToolbox )
}
-BOOL SearchWinPtr::IsWinOK( Window *pWin )
+sal_Bool SearchWinPtr::IsWinOK( Window *pWin )
{
return pWin == pTest;
}
-BOOL StatementList::WinPtrValid(Window *pTest)
+sal_Bool StatementList::WinPtrValid(Window *pTest)
{
SearchWinPtr aSearch( pTest );
return SearchAllWin( NULL, aSearch ) != NULL;
}
-BOOL SearchRT::IsWinOK( Window *pWin )
+sal_Bool SearchRT::IsWinOK( Window *pWin )
{
if ( pWin->IsVisible() && pWin->GetType() == mnRT )
{
@@ -467,15 +469,15 @@ BOOL SearchRT::IsWinOK( Window *pWin )
if ( mnSkip )
{
mnSkip--;
- return FALSE;
+ return sal_False;
}
else
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase, USHORT nSkip, BOOL bSearchAll )
+Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase, sal_uInt16 nSkip, sal_Bool bSearchAll )
{
SearchRT aSearch( nRT, 0, nSkip );
if ( bSearchAll )
@@ -486,7 +488,7 @@ Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase
return SearchAllWin( pBase, aSearch, MaybeBase );
}
-USHORT StatementList::CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase )
+sal_uInt16 StatementList::CountWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase )
{
SearchRT aSearch( nRT, SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN, 0xFFFF );
@@ -494,7 +496,7 @@ USHORT StatementList::CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBas
return aSearch.GetCount();
}
-BOOL SearchScroll::IsWinOK( Window *pWin )
+sal_Bool SearchScroll::IsWinOK( Window *pWin )
{
if ( SearchRT::IsWinOK( pWin ) )
{
@@ -502,10 +504,10 @@ BOOL SearchScroll::IsWinOK( Window *pWin )
return (( pWin->GetStyle() & WB_HORZ ) && ( nDirection == CONST_ALIGN_BOTTOM ))
|| (( pWin->GetStyle() & WB_VERT ) && ( nDirection == CONST_ALIGN_RIGHT ));
}
- return FALSE;
+ return sal_False;
}
-ScrollBar* StatementList::GetScrollBar( Window *pBase, USHORT nDirection, BOOL MaybeBase )
+ScrollBar* StatementList::GetScrollBar( Window *pBase, sal_uInt16 nDirection, sal_Bool MaybeBase )
{
SearchScroll aSearch( nDirection, SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN );
@@ -513,12 +515,12 @@ ScrollBar* StatementList::GetScrollBar( Window *pBase, USHORT nDirection, BOOL M
}
-BOOL SearchPopupFloatingWin::IsWinOK( Window *pWin )
+sal_Bool SearchPopupFloatingWin::IsWinOK( Window *pWin )
{
return pWin->IsVisible() && pWin->GetType() == WINDOW_FLOATINGWINDOW && ((FloatingWindow*)pWin)->IsInPopupMode();
}
-Window* StatementList::GetPopupFloatingWin( BOOL MaybeBase )
+Window* StatementList::GetPopupFloatingWin( sal_Bool MaybeBase )
{
SearchPopupFloatingWin aSearch;
@@ -533,7 +535,7 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu )
if ( pBaseMenu->GetWindow() == pWin )
return pBaseMenu;
- USHORT i;
+ sal_uInt16 i;
i = 0;
while ( i < pBaseMenu->GetItemCount() )
{
@@ -561,16 +563,16 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu )
return pMenu;
}
- USHORT nSkip = 0;
+ sal_uInt16 nSkip = 0;
Window* pMenuBarWin = NULL;
- while ( (pMenuBarWin = GetWinByRT( NULL, WINDOW_MENUBARWINDOW, TRUE, nSkip++, TRUE )) != NULL )
+ while ( (pMenuBarWin = GetWinByRT( NULL, WINDOW_MENUBARWINDOW, sal_True, nSkip++, sal_True )) != NULL )
{
Window* pParent = pMenuBarWin->GET_REAL_PARENT();
if ( pParent && pParent->GetType() == WINDOW_BORDERWINDOW && pParent->IsVisible() )
{
Menu* pMenu = NULL;
// find Menu of MenuBarWindow
- USHORT nCount;
+ sal_uInt16 nCount;
for ( nCount = 0 ; nCount < pParent->GetChildCount() ; nCount++ )
{
if ( pParent->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW )
@@ -594,25 +596,25 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu )
}
-BOOL SearchActive::IsWinOK( Window *pWin )
+sal_Bool SearchActive::IsWinOK( Window *pWin )
{
// only matches ResID due to problems with UNIX Window Managers
return pWin->IsVisible() && ( (nRT == WINDOW_ANYTYPE && IsDialog(pWin) ) || pWin->GetType() == nRT );
}
-Window* StatementList::GetActive( WindowType nRT, BOOL MaybeBase )
+Window* StatementList::GetActive( WindowType nRT, sal_Bool MaybeBase )
{
SearchActive aSearch( nRT );
return SearchAllWin( NULL, aSearch, MaybeBase );
}
-BOOL SearchFadeSplitWin::IsWinOK( Window *pWin )
+sal_Bool SearchFadeSplitWin::IsWinOK( Window *pWin )
{
#if OSL_DEBUG_LEVEL > 1
if ( pWin->GetType() == WINDOW_SPLITWINDOW )
{
- BOOL bResult;
+ sal_Bool bResult;
WindowAlign aAlign;
bResult = pWin->IsVisible();
bResult = ((SplitWindow*)pWin)->IsFadeInButtonVisible();
@@ -626,7 +628,7 @@ BOOL SearchFadeSplitWin::IsWinOK( Window *pWin )
/*&& ((SplitWindow*)pWin)->IsAutoHideButtonVisible()*/ && ((SplitWindow*)pWin)->GetAlign() == nAlign;
}
-Window* StatementList::GetFadeSplitWin( Window *pBase, WindowAlign nAlign, BOOL MaybeBase )
+Window* StatementList::GetFadeSplitWin( Window *pBase, WindowAlign nAlign, sal_Bool MaybeBase )
{
SearchFadeSplitWin aSearch( nAlign );
@@ -654,13 +656,13 @@ Window* StatementList::GetMouseWin()
return NULL;
}
-Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase )
+Window* StatementList::GetFocus( WindowType nRT, sal_Bool MaybeBase )
{
if ( nRT == WINDOW_TABCONTROL )
{
Window *pResult = GetActive( WINDOW_TABDIALOG, MaybeBase);
- for( USHORT i = 0 ; pResult && i < pResult->GetChildCount(); i++ )
+ for( sal_uInt16 i = 0 ; pResult && i < pResult->GetChildCount(); i++ )
if ( pResult->GetChild(i)->GetType() == nRT )
return pResult->GetChild(i);
}
@@ -668,7 +670,7 @@ Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase )
return NULL;
}
-Window* StatementList::GetAnyActive( BOOL MaybeBase )
+Window* StatementList::GetAnyActive( sal_Bool MaybeBase )
{
Window *pControl;
@@ -757,7 +759,7 @@ Window* StatementList::GetFirstDocFrame()
return pFirstDocFrame;
}
-BOOL StatementList::IsFirstDocFrame( Window* pWin )
+sal_Bool StatementList::IsFirstDocFrame( Window* pWin )
{
return pWin && ( pWin == GetFirstDocFrame() || ( GetFirstDocFrame() && pWin == GetFirstDocFrame()->GetWindow( WINDOW_CLIENT ) ) ) && ( GetFirstDocFrame() && IsDocFrame( GetFirstDocFrame() ) );
}
@@ -766,7 +768,7 @@ MenuBar* StatementList::GetDocFrameMenuBar( Window* pWin )
{
if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW )
{
- USHORT nCount;
+ sal_uInt16 nCount;
for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ )
{
if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW )
@@ -777,35 +779,35 @@ MenuBar* StatementList::GetDocFrameMenuBar( Window* pWin )
}
// a Doc Frame is a Document or the Backing Window
-BOOL StatementList::IsDocFrame( Window* pWin )
+sal_Bool StatementList::IsDocFrame( Window* pWin )
{
if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW )
{
- USHORT nCount;
- BOOL bHasWorkWindow = FALSE;
- BOOL bHasMenuBar = FALSE;
+ sal_uInt16 nCount;
+ sal_Bool bHasWorkWindow = sal_False;
+ sal_Bool bHasMenuBar = sal_False;
// #91724# it is now necessary to sort out the IME WIndow in Solaris as well.
// so now we check for existence of WINDOW_WORKWINDOW and newly for
// WINDOW_MENUBARWINDOW which contains the Menu and the close/min/max buttons
for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ )
{
if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW )
- bHasWorkWindow = TRUE;
+ bHasWorkWindow = sal_True;
if ( pWin->GetChild( nCount )->GetType() == WINDOW_MENUBARWINDOW )
- bHasMenuBar = TRUE;
+ bHasMenuBar = sal_True;
}
return bHasWorkWindow && bHasMenuBar;
}
- return FALSE;
+ return sal_False;
}
// a Doc Win is a real document (not the Backing Window)
-BOOL StatementList::IsDocWin( Window* pWin )
+sal_Bool StatementList::IsDocWin( Window* pWin )
{
if ( pWin && IsDocFrame( pWin ) )
{
if ( GetDocFrameCount() != 1 )
- return TRUE;
+ return sal_True;
else
{
// check for the close button to see if we are the last one or only the backing Window
@@ -813,28 +815,28 @@ BOOL StatementList::IsDocWin( Window* pWin )
return GetDocFrameMenuBar( pWin )->HasCloser();
}
}
- return FALSE;
+ return sal_False;
}
-BOOL StatementList::IsIMEWin( Window* pWin ) // Input Window for CJK under Solaris
+sal_Bool StatementList::IsIMEWin( Window* pWin ) // Input Window for CJK under Solaris
{
if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW )
{
- USHORT nCount;
- BOOL bHasWorkWindow = FALSE;
- BOOL bHasWindow = FALSE;
+ sal_uInt16 nCount;
+ sal_Bool bHasWorkWindow = sal_False;
+ sal_Bool bHasWindow = sal_False;
// #91724# it is now necessary to sort out the IME WIndow in Solaris as well.
// so now we check for existence of WINDOW_WORKWINDOW and newly for
// WINDOW_WINDOW which contains the Menu and the close/min/max buttons
for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ )
if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW )
- bHasWorkWindow = TRUE;
+ bHasWorkWindow = sal_True;
for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ )
if ( pWin->GetChild( nCount )->GetType() == WINDOW_WINDOW )
- bHasWindow = TRUE;
+ bHasWindow = sal_True;
return bHasWorkWindow && !bHasWindow;
}
- return FALSE;
+ return sal_False;
}
UniString StatementList::Tree(Window *pBase, int Indent)
@@ -948,7 +950,7 @@ String StatementList::ClientTree(Window *pBase, int Indent)
WRITE(sIndent);
WRITEc("UId : ");
- WRITE(UIdString(pBase->GetSmartUniqueOrHelpId()));
+ WRITE(Id2Str(pBase->GetUniqueOrHelpId()));
WRITEc(":0x");
WRITE(
String::CreateFromInt64(
@@ -982,7 +984,7 @@ String StatementList::ClientTree(Window *pBase, int Indent)
WRITEc("\n");
aReturn.ConvertLineEnd();
- USHORT i;
+ sal_uInt16 i;
for (i = 0 ; i < pBase->GetChildCount() ; i++)
{
aReturn += ClientTree(pBase->GetChild(i),Indent+1);
@@ -991,7 +993,7 @@ String StatementList::ClientTree(Window *pBase, int Indent)
}
-BOOL StatementList::CheckWindowWait()
+sal_Bool StatementList::CheckWindowWait()
{
static Time StartTime = Time(0L); // Abbruch wenn Fenster absolut nicht schliesst.
if ( StartTime == Time(0L) )
@@ -1005,7 +1007,7 @@ BOOL StatementList::CheckWindowWait()
if ( WinPtrValid(pWindowWaitPointer) && IS_WINP_CLOSING(pWindowWaitPointer) )
{
#if OSL_DEBUG_LEVEL > 1
- m_pDbgWin->AddText( aWindowWaitUId.GetText().AppendAscii(" Still Open. RType=") );
+ m_pDbgWin->AddText( Id2Str(aWindowWaitUId).AppendAscii(" Still Open. RType=") );
m_pDbgWin->AddText( String::CreateFromInt32( pWindowWaitPointer->GetType() ).AppendAscii("\n") );
#endif
@@ -1015,47 +1017,47 @@ BOOL StatementList::CheckWindowWait()
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Close timed out. Going on!! " );
#endif
- pWindowWaitPointer->SetSmartHelpId(aWindowWaitOldHelpId, SMART_SET_ALL);
- pWindowWaitPointer->SetSmartUniqueId(aWindowWaitOldUniqueId, SMART_SET_ALL);
+ pWindowWaitPointer->SetHelpId(aWindowWaitOldHelpId);
+ pWindowWaitPointer->SetUniqueId(aWindowWaitOldUniqueId);
- aWindowWaitUId = SmartId();
+ aWindowWaitUId = rtl::OString();
pWindowWaitPointer = NULL;
StartTime = Time(0L);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
pWindowWaitPointer = NULL;
- aWindowWaitUId = SmartId();
+ aWindowWaitUId = rtl::OString();
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Closed, Going on.\n" );
#endif
}
StartTime = Time(0L);
- return TRUE;
+ return sal_True;
}
void StatementList::ReportError(String aMessage)
{
- ReportError ( SmartId(), aMessage );
+ ReportError ( rtl::OString(), aMessage );
}
-void StatementList::ReportError(SmartId aUId, String aMessage)
+void StatementList::ReportError(rtl::OString aUId, String aMessage)
{
pRet->GenError ( aUId, aMessage );
- IsError = TRUE;
+ IsError = sal_True;
}
-void StatementList::ReportError(String aMessage, ULONG nWhatever)
+void StatementList::ReportError(String aMessage, sal_uLong nWhatever)
{
ReportError ( aMessage.AppendAscii(" ").Append(UniString::CreateFromInt32(nWhatever)));
}
-void StatementList::DirectLog( ULONG nType, String aMessage )
+void StatementList::DirectLog( sal_uLong nType, String aMessage )
{
if ( pRet )
- pRet->GenReturn( RET_DirectLoging, SmartId(nType), aMessage );
+ pRet->GenReturn( RET_DirectLoging, (sal_uInt16) nType, aMessage );
}
@@ -1069,15 +1071,15 @@ void StatementList::DirectLog( ULONG nType, String aMessage )
} \
}
-void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect )
+void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, sal_Bool bForceDirect )
{
if ( StatementList::bUsePostEvents && !bForceDirect )
{
if ( StatementList::WinPtrValid( pWin ) )
{
- ULONG nID1;
- ULONG nID2;
+ sal_uLong nID1;
+ sal_uLong nID2;
nID1 = Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, pWin, &aKEvnt );
nID2 = Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, pWin, &aKEvnt );
// wait after posting both events so deleting pWin will remove the second event also
@@ -1101,7 +1103,7 @@ void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect )
Size aSize = pWin->GetOutputSize();
aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
- CommandEvent aEvent( aPos, COMMAND_CONTEXTMENU, FALSE );
+ CommandEvent aEvent( aPos, COMMAND_CONTEXTMENU, sal_False );
ImplCommand( pWin, aEvent );
}
}
@@ -1111,13 +1113,13 @@ void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect )
}
};
-void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
+void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect )
{
if ( StatementList::bUsePostEvents && !bForceDirect )
{
if ( StatementList::WinPtrValid( pWin ) )
{
- ULONG nID;
+ sal_uLong nID;
nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, pWin, &aMEvnt );
ImplEventWait( nID );
}
@@ -1134,13 +1136,13 @@ void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
}
};
-void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
+void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect )
{
if ( StatementList::bUsePostEvents && !bForceDirect )
{
if ( StatementList::WinPtrValid( pWin ) )
{
- ULONG nID;
+ sal_uLong nID;
nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pWin, &aMEvnt );
ImplEventWait( nID );
}
@@ -1151,13 +1153,13 @@ void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
}
};
-void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
+void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect )
{
if ( StatementList::bUsePostEvents && !bForceDirect )
{
if ( StatementList::WinPtrValid( pWin ) )
{
- ULONG nID;
+ sal_uLong nID;
nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, pWin, &aMEvnt );
ImplEventWait( nID );
}
@@ -1166,7 +1168,7 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
{
if ( pWin->IsTracking() )
{
- // siehe #64693 die Position ist für Toolboxen relevant
+ // siehe #64693 die Position ist f�r Toolboxen relevant
// #60020 Jetzt hoffentlich kein GPF mehr
// Zuerst Tracking beenden ohne Event
pWin->EndTracking( ENDTRACK_DONTCALLHDL );
@@ -1179,7 +1181,7 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect )
}
};
-void ImplEventWait( ULONG nID )
+void ImplEventWait( sal_uLong nID )
{
while ( !Application::IsProcessedMouseOrKeyEvent( nID ) )
Application::Yield();
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index e363f83c5195..7036ee8b1051 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -35,6 +35,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/uieventslogger.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/menubtn.hxx>
@@ -59,10 +60,10 @@
#include <vcl/fixed.hxx>
#include <vcl/wrkwin.hxx>
#include <osl/diagnose.h>
-#include <vcl/wintypes.hxx>
#include <svtools/valueset.hxx>
#include <svtools/roadmap.hxx>
#include <svtools/table/tablecontrol.hxx>
+#include <svtools/table/tablecontrolinterface.hxx>
#include <svl/poolitem.hxx>
#include <svtools/extensionlistbox.hxx>
// Hat keinen Includeschutz
@@ -117,11 +118,11 @@ SV_DECL_REF(SbxValue)
SV_IMPL_REF(SbxValue)
CommunicationLink *StatementFlow::pCommLink = NULL;
-BOOL StatementFlow::bUseIPC = TRUE;
-BOOL StatementFlow::bSending = FALSE;
+sal_Bool StatementFlow::bUseIPC = sal_True;
+sal_Bool StatementFlow::bSending = sal_False;
ImplRemoteControl *StatementFlow::pRemoteControl = NULL;
-USHORT StatementCommand::nDirPos = 0;
+sal_uInt16 StatementCommand::nDirPos = 0;
Dir *StatementCommand::pDir = NULL;
pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = NULL;
@@ -131,31 +132,31 @@ pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = N
#define SET_WINP_CLOSING(pWin) \
pWindowWaitPointer = pWin; \
- aWindowWaitUId = pControl->GetSmartUniqueOrHelpId(); \
- aWindowWaitOldHelpId = pWin->GetSmartHelpId(); \
- aWindowWaitOldUniqueId = pWin->GetSmartUniqueId(); \
- pWin->SetSmartHelpId( SmartId(4321) ); \
- pWin->SetSmartUniqueId( SmartId(1234) );
+ aWindowWaitUId = pControl->GetUniqueOrHelpId(); \
+ aWindowWaitOldHelpId = pWin->GetHelpId(); \
+ aWindowWaitOldUniqueId = pWin->GetUniqueId(); \
+ pWin->SetHelpId( rtl::OString("TT_Win_is_closing_HID") ); \
+ pWin->SetUniqueId( rtl::OString("TT_Win_is_closing_UID") );
-StatementFlow::StatementFlow( StatementList *pAfterThis, USHORT nArtP )
+StatementFlow::StatementFlow( StatementList *pAfterThis, sal_uInt16 nArtP )
: nArt(nArtP)
, nParams(0)
, nSNr1(0)
, nLNr1(0)
, aString1()
-, bBool1(FALSE)
+, bBool1(sal_False)
{
QueStatement( pAfterThis );
}
-StatementFlow::StatementFlow( ULONG nServiceId, SCmdStream *pCmdIn, ImplRemoteControl *pRC )
+StatementFlow::StatementFlow( sal_uLong nServiceId, SCmdStream *pCmdIn, ImplRemoteControl *pRC )
: nArt(0)
, nParams(0)
, nSNr1(0)
, nLNr1(0)
, aString1()
-, bBool1(FALSE)
+, bBool1(sal_False)
{
QueStatement( NULL );
bUseIPC = (nServiceId == SI_IPCCommandBlock);
@@ -190,10 +191,10 @@ void StatementFlow::SendViaSocket()
OSL_FAIL("SendViaSocket called recursively. Aborted!!!");
return;
}
- bSending = TRUE;
+ bSending = sal_True;
if ( pCommLink )
{
- if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // tritt ein Fehler auf, so wird sofort gelöscht ...
+ if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // tritt ein Fehler auf, so wird sofort gel�scht ...
pCommLink = NULL;
}
else
@@ -203,11 +204,11 @@ void StatementFlow::SendViaSocket()
}
pRet->Reset();
- bSending = FALSE;
- IsError = FALSE;
+ bSending = sal_False;
+ IsError = sal_False;
}
-BOOL StatementFlow::Execute()
+sal_Bool StatementFlow::Execute()
{
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Executing Flow: " );
@@ -221,16 +222,16 @@ BOOL StatementFlow::Execute()
if ( !bUseIPC )
{
- // bBool1 wurde im CTOR auf FALSE initialisiert
+ // bBool1 wurde im CTOR auf sal_False initialisiert
if ( !bBool1 ) // also erster Durchlauf
{
pRemoteControl->pRetStream = pRet->GetStream();
- bBool1 = TRUE; // wurde im CTOR auf FALSE initialisiert
+ bBool1 = sal_True; // wurde im CTOR auf sal_False initialisiert
nRetryCount = nRetryCount * 4;
}
if ( pRemoteControl->pRetStream && (nRetryCount--) ) // also solange nicht abgeholt
{
- return FALSE; // Bitte einmal vom Callstack runter
+ return sal_False; // Bitte einmal vom Callstack runter
}
}
@@ -245,7 +246,7 @@ BOOL StatementFlow::Execute()
if ( !bUseIPC )
{ // wird oben abgehandelt
pRet->Reset();
- IsError = FALSE;
+ IsError = sal_False;
}
else
SendViaSocket();
@@ -268,37 +269,14 @@ BOOL StatementFlow::Execute()
}
delete this;
- return TRUE;
+ return sal_True;
}
// neue Hilfsfunktion, die stetig erweitert werden muss
-static short ImpGetRType( Window *pWin, SmartId aUId )
+static short ImpGetRType( Window *pWin )
{
- ULONG nUId = aUId.GetNum(); // GetNum() is always zero if no num is defined
- // GGGg gggg::gggg gggg::ggLL LLLl::llll llll
- DBG_ASSERT( pWin, "missing Parameter" );
- short nRT;
- if( (nUId & 0xE0000000) == 0 ) // keine auto ID
- nRT = C_NoType;
- else {
- if( (nUId & 0x1FF) == 0 ) // globale Resource GH: soweit ich das verstanden habe 1FF
- nRT = (short)(C_TabPage - 1 + (nUId >> 29));
- else
- nRT = (short)((nUId & 0x00003E00) >> 9);
- if ( nRT == C_TabPage ) // wegen TabDialog.UId = TabPage.UId
- nRT = C_NoType;
- else
- {
-#ifndef DBG_UTIL
- return nRT;
-#endif
- }
- }
-
-#ifdef DBG_UTIL
- short n = nRT;
-#endif
+ short nRT = C_NoType;
WindowType eRT = pWin->GetType();
switch( eRT ) {
case WINDOW_WINDOW: nRT = C_Window ; break;
@@ -355,15 +333,6 @@ static short ImpGetRType( Window *pWin, SmartId aUId )
case WINDOW_DIALOG: nRT = C_Dialog; break;
}
-#ifdef DBG_UTIL
- // Die Werte n sind bei den WindowTypen nicht mehr vergeben, werden aber in der AutoID noch verwendet
- // Sie werden jetzt durch den Typ nRT implementiert.
- DBG_ASSERT( n == C_NoType || n == nRT
- || ( n == C_ImageButton && nRT == C_PushButton )
- || ( n == C_TriStateBox && nRT == C_CheckBox )
- || ( n == C_ImageRadioButton && nRT == C_RadioButton )
- , "error in algorithm" );
-#endif
return nRT;
}
@@ -387,7 +356,7 @@ StatementSlot::StatementSlot( SCmdStream *pCmdIn )
{
nAnzahl++;
pItemArr = new SfxPoolItem*[nAnzahl];
- for (USHORT i = 0 ; i+1 < nAnzahl ; i++)
+ for (sal_uInt16 i = 0 ; i+1 < nAnzahl ; i++)
pCmdIn->Read( pItemArr[i] );
pItemArr[nAnzahl-1] = NULL;
}
@@ -396,7 +365,7 @@ StatementSlot::StatementSlot( SCmdStream *pCmdIn )
{
aArgs.realloc(nAnzahl);
PropertyValue* pArg = aArgs.getArray();
- for (USHORT i = 0 ; i < nAnzahl ; i++)
+ for (sal_uInt16 i = 0 ; i < nAnzahl ; i++)
pCmdIn->Read( pArg[i] );
}
break;
@@ -409,15 +378,15 @@ StatementSlot::StatementSlot()
: nAnzahl( 0 )
, pItemArr(NULL)
, nFunctionId( 0 )
-, bMenuClosed(FALSE)
+, bMenuClosed(sal_False)
{}
-StatementSlot::StatementSlot( ULONG nSlot, SfxPoolItem* pItem )
+StatementSlot::StatementSlot( sal_uLong nSlot, SfxPoolItem* pItem )
: pItemArr(NULL)
-, bMenuClosed(FALSE)
+, bMenuClosed(sal_False)
{
QueStatement( NULL );
- nFunctionId = USHORT(nSlot);
+ nFunctionId = sal_uInt16(nSlot);
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Reading Slot: " );
m_pDbgWin->AddText( String::CreateFromInt32( nFunctionId ) );
@@ -440,7 +409,7 @@ StatementSlot::~StatementSlot()
{
if ( pItemArr )
{
- for (USHORT i = 0 ; i+1 < nAnzahl ; i++)
+ for (sal_uInt16 i = 0 ; i+1 < nAnzahl ; i++)
delete pItemArr[i];
delete[] pItemArr;
}
@@ -470,7 +439,7 @@ void StatementSlot::AddReferer()
aArgs.realloc(nAnzahl);
pArg = aArgs.getArray();
pArg[nAnzahl-1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SynchronMode" ));
- pArg[nAnzahl-1].Value <<= sal_Bool( TRUE );
+ pArg[nAnzahl-1].Value <<= sal_Bool( sal_True );
}
class SlotStatusListener : public cppu::WeakImplHelper1< XStatusListener >
@@ -484,13 +453,13 @@ public:
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
// local Members
- BOOL bDisposed;
- BOOL bEnabled;
+ sal_Bool bDisposed;
+ sal_Bool bEnabled;
};
SlotStatusListener::SlotStatusListener()
-: bDisposed( FALSE )
-, bEnabled( TRUE )
+: bDisposed( sal_False )
+, bEnabled( sal_True )
{}
// XStatusListener
@@ -502,10 +471,10 @@ void SAL_CALL SlotStatusListener::statusChanged( const ::com::sun::star::frame::
// XEventListener
void SAL_CALL SlotStatusListener::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
{
- bDisposed = TRUE;
+ bDisposed = sal_True;
}
-BOOL StatementSlot::Execute()
+sal_Bool StatementSlot::Execute()
{
if ( IsError )
{
@@ -517,7 +486,7 @@ BOOL StatementSlot::Execute()
Advance();
delete this;
- return TRUE;
+ return sal_True;
}
InitProfile();
@@ -537,22 +506,22 @@ BOOL StatementSlot::Execute()
if ( !bMenuClosed )
{
pPopup->EndExecute(0);
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
- bMenuClosed = TRUE;
+ bMenuClosed = sal_True;
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Closed contextmenu\n" );
#endif
- return FALSE;
+ return sal_False;
}
else if ( nRetryCount-- )
{
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Waiting for contextmenu to close\n" );
#endif
- return FALSE;
+ return sal_False;
}
else
ReportError( GEN_RES_STR0( S_MENU_NOT_CLOSING ) );
@@ -638,9 +607,9 @@ BOOL StatementSlot::Execute()
ReportError( GEN_RES_STR0( S_SLOT_IN_EXECUTE ) );
else
{
- bIsSlotInExecute = TRUE;
+ bIsSlotInExecute = sal_True;
xDisp->dispatch( aTargetURL, aArgs );
- bIsSlotInExecute = FALSE;
+ bIsSlotInExecute = sal_False;
}
}
else
@@ -661,12 +630,12 @@ BOOL StatementSlot::Execute()
{
case TT_PR_ERR_NODISPATCHER:
{
- ReportError( SmartId(nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED_NO_DISPATCHER ) );
+ ReportError( rtl::OString::valueOf((sal_Int32)nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED_NO_DISPATCHER ) );
}
break;
case TT_PR_ERR_NOEXECUTE:
{
- ReportError(SmartId(nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED ) );
+ ReportError( rtl::OString::valueOf((sal_Int32)nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED ) );
}
break;
}
@@ -675,14 +644,14 @@ BOOL StatementSlot::Execute()
/* Neues Verfahren ab 334!
- Neue Methode zum einstellen, daß Modale Dialoge immer Asynchron aufgerufen werden
+ 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 */
+ und Testen ob Slot �berhaupt durch UI aufgerufen werden kann */
SendProfile( SlotString( nFunctionId ) );
delete this;
- return TRUE;
+ return sal_True;
}
@@ -701,9 +670,8 @@ StatementUnoSlot::StatementUnoSlot(SCmdStream *pIn)
}
-StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId, USHORT Params, USHORT Nr1 )
+StatementCommand::StatementCommand( StatementList *pAfterThis, sal_uInt16 MethodId, sal_uInt16 Params, sal_uInt16 Nr1 )
: nMethodId( MethodId )
-, aSmartMethodId()
, nParams(Params)
, nNr1(Nr1)
, nNr2(0)
@@ -712,16 +680,15 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId,
, nLNr1(0)
, aString1()
, aString2()
-, bBool1(FALSE)
-, bBool2(FALSE)
+, bBool1(sal_False)
+, bBool2(sal_False)
{
QueStatement( pAfterThis );
- aSmartMethodId = SmartId( nMethodId );
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Directly adding Conmmand:" );
m_pDbgWin->AddText( " Methode: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( " Params:" );
if( nParams & PARAM_USHORT_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );}
if( nParams & PARAM_USHORT_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );}
@@ -739,7 +706,6 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId,
StatementCommand::StatementCommand( SCmdStream *pCmdIn )
: nMethodId(0)
-, aSmartMethodId()
, nParams(0)
, nNr1(0)
, nNr2(0)
@@ -748,12 +714,11 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
, nLNr1(0)
, aString1()
, aString2()
-, bBool1(FALSE)
-, bBool2(FALSE)
+, bBool1(sal_False)
+, bBool2(sal_False)
{
QueStatement( NULL );
pCmdIn->Read( nMethodId );
- aSmartMethodId = SmartId( nMethodId );
pCmdIn->Read( nParams );
if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nNr1 );
@@ -769,7 +734,7 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Reading Conmmand:" );
m_pDbgWin->AddText( " Methode: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( " Params:" );
if( nParams & PARAM_USHORT_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );}
if( nParams & PARAM_USHORT_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );}
@@ -788,14 +753,14 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "*Deleting all Commands:\n" );
#endif
- bReadingCommands = FALSE;
- while ( StatementList::pFirst != this ) // Alles Löschen außer mich selbst
+ bReadingCommands = sal_False;
+ while ( StatementList::pFirst != this ) // Alles L�schen au�er mich selbst
{
StatementList *pDeQue = StatementList::pFirst;
pDeQue->Advance();
delete pDeQue;
}
- bReadingCommands = TRUE;
+ bReadingCommands = sal_True;
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "*Done deleting all Commands:\n" );
#endif
@@ -803,14 +768,14 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
}
-void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst )
+void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Bool bFirst )
{
if ( IsDialog(pBase) && !bFirst )
return;
if ( bFirst )
- pRet->GenReturn ( RET_WinInfo, SmartId(), (comm_ULONG)nConf | DH_MODE_DATA_VALID, UniString(), TRUE );
+ pRet->GenReturn ( RET_WinInfo, rtl::OString(), (comm_ULONG)nConf | DH_MODE_DATA_VALID, UniString(), sal_True );
if ( bFirst )
{
@@ -819,9 +784,9 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
pBase = pBase->GetParent();
}
- { // Klammerung, so daß der String nicht während der Rekursion bestehen bleibt
+ { // Klammerung, so da� der String nicht w�hrend der Rekursion bestehen bleibt
String aName;
- BOOL bSkip = FALSE;
+ sal_Bool bSkip = sal_False;
switch ( pBase->GetType() )
{
@@ -887,8 +852,9 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
break;
default:
- if ( pBase->GetSmartUniqueOrHelpId().Equals( SmartId() ) && !( nConf & DH_MODE_ALLWIN ) )
- bSkip = TRUE;
+ if ( ( pBase->GetUniqueOrHelpId().getLength() == 0 ) && !( nConf & DH_MODE_ALLWIN ) )
+ bSkip = sal_True;
+ break;
}
if ( !bSkip )
@@ -918,19 +884,15 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
aTypeSuffix.AppendAscii( "/Unknown", 8 );
}
- SmartId aId = pBase->GetSmartUniqueOrHelpId();
- if ( aId.HasString() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( aId.GetStr() ), (comm_ULONG)pBase->GetType(),
- TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE );
- if ( !aId.HasString() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( aId.GetNum() ), (comm_ULONG)pBase->GetType(),
- TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE );
+ rtl::OString aId = pBase->GetUniqueOrHelpId();
+ pRet->GenReturn ( RET_WinInfo, aId, (comm_ULONG)pBase->GetType(),
+ TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), sal_False );
if ( pBase->GetType() == WINDOW_TOOLBOX ) // Buttons und Controls auf Toolboxen.
{
ToolBox *pTB = ((ToolBox*)pBase);
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pTB->GetItemCount() ; i++ )
{
aName = String();
@@ -944,25 +906,25 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
if ( pTB->GetItemType( i ) == TOOLBOXITEM_BUTTON && ( !pItemWin || !pItemWin->IsVisible() ) )
{
if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BUTTON,
- TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE );
+ pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)WINDOW_BUTTON,
+ TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False );
if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BUTTON,
- TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE );
+ pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BUTTON,
+ TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False );
}
else
{
if ( pItemWin )
{
if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)pItemWin->GetType(),
- TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE );
+ pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)pItemWin->GetType(),
+ TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), sal_False );
if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)pItemWin->GetType(),
- TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE );
- USHORT ii;
+ pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)pItemWin->GetType(),
+ TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), sal_False );
+ sal_uInt16 ii;
for( ii = 0 ; ii < pItemWin->GetChildCount(); ii++ )
- WriteControlData( pItemWin->GetChild(ii), nConf, FALSE );
+ WriteControlData( pItemWin->GetChild(ii), nConf, sal_False );
}
else
{
@@ -990,11 +952,11 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
DBG_ERROR1( "Unknown TOOLBOXITEM %i", pTB->GetItemType( i ) );
}
if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE,
- aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE );
+ pRet->GenReturn ( RET_WinInfo, Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE,
+ aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False );
if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE,
- aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE );
+ pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BASE,
+ aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False );
}
}
}
@@ -1012,41 +974,41 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
|| pBase->GetType() == WINDOW_QUERYBOX )
{
ButtonDialog *pBD = ((ButtonDialog*)pBase);
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pBD->GetButtonCount() ; i++ )
{
aName = String();
if ( aName.Len() == 0 )
aName = pBD->GetPushButton( pBD->GetButtonId(i) )->GetText();
- String aID;
+ ByteString aID;
switch ( pBD->GetButtonId(i) )
{
case BUTTONID_OK:
- aID.AssignAscii("Ok");
+ aID.Assign("Ok");
break;
case BUTTONID_CANCEL:
- aID.AssignAscii("Cancel");
+ aID.Assign("Cancel");
break;
case BUTTONID_YES:
- aID.AssignAscii("Yes");
+ aID.Assign("Yes");
break;
case BUTTONID_NO:
- aID.AssignAscii("No");
+ aID.Assign("No");
break;
case BUTTONID_RETRY:
- aID.AssignAscii("Retry");
+ aID.Assign("Retry");
break;
case BUTTONID_HELP:
- aID.AssignAscii("Help");
+ aID.Assign("Help");
break;
default:
- aID = UniString::CreateFromInt32( pBD->GetButtonId(i) );
+ aID = ByteString::CreateFromInt32( pBD->GetButtonId(i) );
break;
}
- pRet->GenReturn ( RET_WinInfo, SmartId( aID ), (comm_ULONG)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So daß der Text angezeigt wird!
+ pRet->GenReturn ( RET_WinInfo, aID, (comm_ULONG)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So da� der Text angezeigt wird!
TypeString(pBD->GetPushButton( pBD->GetButtonId(i) )->GetType()).AppendAscii(": ").Append(aName)
- .AppendAscii(" ButtonId = ").Append(aID), FALSE );
+ .AppendAscii(" ButtonId = ").AppendAscii( aID.GetBuffer() ), sal_False );
}
return; // ButtonDialog ist hier schon komplett abgehandelt.
@@ -1057,10 +1019,10 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
if ( pMenu ) // Menus
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pMenu->GetItemCount() ; i++ )
{
- USHORT nID = pMenu->GetItemId( i );
+ sal_uInt16 nID = pMenu->GetItemId( i );
aName = String();
if ( aName.Len() == 0 )
@@ -1093,11 +1055,11 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
DBG_ERROR1( "Unknown MENUITEM %i", pMenu->GetItemType( i ) );
}
if ( pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( pMenu->GetItemCommand(nID) ), (comm_ULONG)0,
- aMenuItemType.AppendAscii(": ").Append(aName), FALSE );
+ pRet->GenReturn ( RET_WinInfo, Str2Id( pMenu->GetItemCommand(nID) ), (comm_ULONG)0,
+ aMenuItemType.AppendAscii(": ").Append(aName), sal_False );
if ( !pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, SmartId( nID ), (comm_ULONG)0,
- aMenuItemType.AppendAscii(": ").Append(aName), FALSE );
+ pRet->GenReturn ( RET_WinInfo, rtl::OString::valueOf( (sal_Int32)nID ), (comm_ULONG)0,
+ aMenuItemType.AppendAscii(": ").Append(aName), sal_False );
}
}
@@ -1106,8 +1068,8 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
}
}
- for( USHORT i = 0 ; i < pBase->GetChildCount(); i++ )
- WriteControlData( pBase->GetChild(i), nConf, FALSE );
+ for( sal_uInt16 i = 0 ; i < pBase->GetChildCount(); i++ )
+ WriteControlData( pBase->GetChild(i), nConf, sal_False );
}
class SysWinContainer : public WorkWindow
@@ -1128,7 +1090,7 @@ SysWinContainer::SysWinContainer( ToolBox *pClient )
{
pDock = new DockingWindow( this );
pClientWin->SetParent( pDock );
- pClientWin->SetFloatingMode( FALSE );
+ pClientWin->SetFloatingMode( sal_False );
SetText( pClient->GetText() );
SetPosPixel( Point( 1,40 ) );
Resize();
@@ -1159,10 +1121,10 @@ void SysWinContainer::Resizing( Size& rSize )
{
Size aSize;
Size aBestSize;
- USHORT i;
- BOOL bHasValue = FALSE;
- ULONG nBestValue = 0;
- ULONG nThisValue;
+ sal_uInt16 i;
+ sal_Bool bHasValue = sal_False;
+ sal_uLong nBestValue = 0;
+ sal_uLong nThisValue;
for ( i=1 ; i<=1 ; i++ )
{
aSize = pClientWin->CalcWindowSizePixel( i );
@@ -1171,7 +1133,7 @@ void SysWinContainer::Resizing( Size& rSize )
{
nBestValue = nThisValue;
aBestSize = aSize;
- bHasValue = TRUE;
+ bHasValue = sal_True;
}
}
rSize = aBestSize;
@@ -1182,15 +1144,15 @@ class DisplayHidWin : public ToolBox
{
Edit *pEdit;
Size aMinEditSize;
- USHORT nLastItemID;
- BOOL bIsDraging;
- BOOL bIsPermanentDraging;
- void SetDraging( BOOL bNewDraging );
+ sal_uInt16 nLastItemID;
+ sal_Bool bIsDraging;
+ sal_Bool bIsPermanentDraging;
+ void SetDraging( sal_Bool bNewDraging );
Image *pShow, *pShow2;
- BOOL bConfigChanged;
- void EnableButtons( ULONG nConf );
+ sal_Bool bConfigChanged;
+ void EnableButtons( sal_uLong nConf );
- ULONG nEventHookID;
+ sal_uLong nEventHookID;
static long stub_VCLEventHookProc( NotifyEvent& rEvt, void* pData )
{
return ((DisplayHidWin*)pData)->VCLEventHook( rEvt );
@@ -1202,9 +1164,9 @@ class DisplayHidWin : public ToolBox
SysWinContainer *pContainer;
// aborting by pressing shist twice
- BOOL bOldShift;
+ sal_Bool bOldShift;
Time aLatest;
- USHORT nShiftCount;
+ sal_uInt16 nShiftCount;
public:
DisplayHidWin();
@@ -1217,26 +1179,26 @@ public:
void SetDisplayText( const String &aNewText ){ pEdit->SetText(aNewText); }
String GetDisplayText() const { return pEdit->GetText(); }
- BOOL IsDisplayTextModified() const { return pEdit->IsModified(); }
+ sal_Bool IsDisplayTextModified() const { return pEdit->IsModified(); }
void ClearDisplayTextModified() const { pEdit->ClearModifyFlag(); }
- void SetConfig( ULONG nConf );
- ULONG GetConfig();
+ void SetConfig( sal_uLong nConf );
+ sal_uLong GetConfig();
- BOOL IsConfigChanged() { return bConfigChanged; }
- void ConfigSent() { bConfigChanged = FALSE; }
+ sal_Bool IsConfigChanged() { return bConfigChanged; }
+ void ConfigSent() { bConfigChanged = sal_False; }
- BOOL IsSendData() { return GetItemState( TT_SEND_DATA ) == STATE_CHECK; }
+ sal_Bool IsSendData() { return GetItemState( TT_SEND_DATA ) == STATE_CHECK; }
- BOOL IsDraging() { return bIsDraging; }
+ sal_Bool IsDraging() { return bIsDraging; }
Window* LastMouseMoveWin() { return pLastMouseMoveWin; }
};
DisplayHidWin::DisplayHidWin()
: ToolBox( StatementList::GetFirstDocFrame(), TTProperties::GetSvtResId(DisplayHidToolBox) )
-, bIsDraging( FALSE )
-, bIsPermanentDraging( FALSE )
+, bIsDraging( sal_False )
+, bIsPermanentDraging( sal_False )
, pShow( NULL )
, pShow2( NULL )
, pLastMouseMoveWin( NULL )
@@ -1265,7 +1227,7 @@ DisplayHidWin::~DisplayHidWin()
delete pEdit;
}
-void DisplayHidWin::SetDraging( BOOL bNewDraging )
+void DisplayHidWin::SetDraging( sal_Bool bNewDraging )
{
if ( !pShow )
pShow = new Image( GetItemImage( TT_SHOW ) );
@@ -1280,9 +1242,9 @@ void DisplayHidWin::SetDraging( BOOL bNewDraging )
bIsDraging = bNewDraging;
}
-void DisplayHidWin::EnableButtons( ULONG nConf )
+void DisplayHidWin::EnableButtons( sal_uLong nConf )
{
- BOOL bSend = BOOL(nConf & DH_MODE_SEND_DATA);
+ sal_Bool bSend = sal_Bool(nConf & DH_MODE_SEND_DATA);
EnableItem( TT_ALLWIN, bSend );
EnableItem( TT_KURZNAME, bSend );
EnableItem( TT_LANGNAME, bSend );
@@ -1300,7 +1262,7 @@ void DisplayHidWin::Click()
nLastItemID = GetCurItemId();
if ( nLastItemID == TT_SHOW )
{
- SetDraging( TRUE );
+ SetDraging( sal_True );
}
ToolBox::Click();
}
@@ -1312,8 +1274,8 @@ void DisplayHidWin::Select()
SetItemState( GetCurItemId(), STATE_CHECK );
if ( GetCurItemId() == TT_SHOW )
{
- bIsPermanentDraging = TRUE;
- SetDraging( TRUE );
+ bIsPermanentDraging = sal_True;
+ SetDraging( sal_True );
}
}
else
@@ -1321,8 +1283,8 @@ void DisplayHidWin::Select()
SetItemState( GetCurItemId(), STATE_NOCHECK );
if ( GetCurItemId() == TT_SHOW )
{
- bIsPermanentDraging = FALSE;
- SetDraging( FALSE );
+ bIsPermanentDraging = sal_False;
+ SetDraging( sal_False );
}
}
if ( GetCurItemId() == TT_SEND_DATA )
@@ -1331,7 +1293,7 @@ void DisplayHidWin::Select()
}
}
-void DisplayHidWin::SetConfig( ULONG nConf )
+void DisplayHidWin::SetConfig( sal_uLong nConf )
{
SetItemState( TT_KURZNAME, ( nConf & DH_MODE_KURZNAME ) ? STATE_CHECK : STATE_NOCHECK );
SetItemState( TT_LANGNAME, ( nConf & DH_MODE_LANGNAME ) ? STATE_CHECK : STATE_NOCHECK );
@@ -1340,9 +1302,9 @@ void DisplayHidWin::SetConfig( ULONG nConf )
EnableButtons( nConf );
}
-ULONG DisplayHidWin::GetConfig()
+sal_uLong DisplayHidWin::GetConfig()
{
- ULONG nConf = 0;
+ sal_uLong nConf = 0;
if ( GetItemState( TT_KURZNAME ) == STATE_CHECK )
nConf |= DH_MODE_KURZNAME;
if ( GetItemState( TT_LANGNAME ) == STATE_CHECK )
@@ -1383,8 +1345,8 @@ long DisplayHidWin::VCLEventHook( NotifyEvent& rEvt )
nShiftCount++;
if ( nShiftCount == 4 && aLatest > Time() )
{
- bIsPermanentDraging = FALSE;
- SetDraging( FALSE );
+ bIsPermanentDraging = sal_False;
+ SetDraging( sal_False );
SetItemState( TT_SHOW, STATE_NOCHECK );
}
}
@@ -1392,23 +1354,23 @@ long DisplayHidWin::VCLEventHook( NotifyEvent& rEvt )
}
if ( ( ( EVENT_MOUSEBUTTONUP == rEvt.GetType() && rEvt.GetMouseEvent()->GetButtons() == MOUSE_LEFT) || ( EVENT_MOUSEMOVE == rEvt.GetType() && !rEvt.GetMouseEvent()->GetButtons() ) )
&& IsDraging() && !bIsPermanentDraging )
- SetDraging( FALSE );
+ SetDraging( sal_False );
return 0;
}
-BOOL StatementCommand::DisplayHID()
+sal_Bool StatementCommand::DisplayHID()
{
- // Return TRUE -> reexecute command
+ // Return sal_True -> reexecute command
- if ( !bBool2 ) // Wird auf FALSE initialisiert
+ if ( !bBool2 ) // Wird auf sal_False initialisiert
{
- bBool2 = TRUE; // Wir sind initialisiert.
+ bBool2 = sal_True; // Wir sind initialisiert.
GetTTSettings()->pDisplayInstance = this; // Und haben die Macht (Alle anderen beenden sich)
if ( !(nParams & PARAM_ULONG_1) )
{
- if( GetTTSettings()->pDisplayHidWin ) // Nichts verändern
+ if( GetTTSettings()->pDisplayHidWin ) // Nichts ver�ndern
nLNr1 = GetTTSettings()->pDisplayHidWin->GetConfig();
else // Beim ersten Aufruf wollen wir alles richtig einstellen
nLNr1 = DH_MODE_KURZNAME | DH_MODE_LANGNAME;
@@ -1426,7 +1388,7 @@ BOOL StatementCommand::DisplayHID()
if ( GetTTSettings()->pDisplayInstance && GetTTSettings()->pDisplayInstance != this )
{
DBG_WARNING("Mehrere DisplayHID am laufen");
- return FALSE; // Noch eine andere Instanz macht das gleiche!
+ return sal_False; // Noch eine andere Instanz macht das gleiche!
}
if ( !GetTTSettings()->pDisplayHidWin )
@@ -1444,8 +1406,8 @@ BOOL StatementCommand::DisplayHID()
}
else
{
- GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->Enable( TRUE, TRUE );
- GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->EnableInput( TRUE, TRUE );
+ GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->Enable( sal_True, sal_True );
+ GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->EnableInput( sal_True, sal_True );
}
@@ -1465,8 +1427,8 @@ BOOL StatementCommand::DisplayHID()
RasterOp aROp = WinPtr->GetRasterOp(); \
WinPtr->SetRasterOp( ROP_XOR ); \
Size aSz = WinPtr->PixelToLogic( WinPtr->GetSizePixel() );\
- ULONG nMaxCornerRadius = WinPtr->PixelToLogic( Point( 80, 0 ) ).X();\
- ULONG iCorner = std::max ((ULONG) 8, (ULONG) std::min( nMaxCornerRadius, (ULONG) std::min((ULONG) (aSz.Width() / 6), (ULONG)(aSz.Height() / 6))));\
+ sal_uLong nMaxCornerRadius = WinPtr->PixelToLogic( Point( 80, 0 ) ).X();\
+ sal_uLong iCorner = std::max ((sal_uLong) 8, (sal_uLong) std::min( nMaxCornerRadius, (sal_uLong) std::min((sal_uLong) (aSz.Width() / 6), (sal_uLong)(aSz.Height() / 6))));\
WinPtr->DrawRect(Rectangle(Point(),aSz), iCorner, iCorner);\
WinPtr->SetLineColor( aLineColMem ); \
WinPtr->SetFillColor( aFillColMem ); \
@@ -1508,10 +1470,10 @@ BOOL StatementCommand::DisplayHID()
if ( GetTTSettings()->Act )
{
SET_WIN(GetTTSettings()->Act);
- GetTTSettings()->pDisplayHidWin->SetDisplayText(GetTTSettings()->Act->GetSmartUniqueOrHelpId().GetText().AppendAscii(" WinType: ")
+ GetTTSettings()->pDisplayHidWin->SetDisplayText( Id2Str(GetTTSettings()->Act->GetUniqueOrHelpId()).AppendAscii(" WinType: ")
.Append(UniString::CreateFromInt64(GetTTSettings()->Act->GetType())).AppendAscii(" ").Append(GetTTSettings()->Act->GetText()));
- if ( GetTTSettings()->Act && !GetTTSettings()->Act->GetSmartUniqueId().Equals( GetTTSettings()->Act->GetSmartHelpId() ) )
- GetTTSettings()->pDisplayHidWin->SetText(UniString( TTProperties::GetSvtResId( TT_ALTERNATE_CAPTION ) ).Append(GetTTSettings()->Act->GetSmartHelpId().GetText()));
+ if ( GetTTSettings()->Act && !GetTTSettings()->Act->GetUniqueId().equals( GetTTSettings()->Act->GetHelpId() ) )
+ GetTTSettings()->pDisplayHidWin->SetText(UniString( TTProperties::GetSvtResId( TT_ALTERNATE_CAPTION ) ).AppendAscii(GetTTSettings()->Act->GetHelpId().getStr()));
else
GetTTSettings()->pDisplayHidWin->SetText( GetTTSettings()->aOriginalCaption );
}
@@ -1520,9 +1482,10 @@ BOOL StatementCommand::DisplayHID()
}
else if ( GetTTSettings()->Act )
{
- if ( GetTTSettings()->pDisplayHidWin->IsDisplayTextModified() && GetTTSettings()->pDisplayHidWin->GetDisplayText().Len() > 0 )
+ // allow setting a HelpID manually (just enter the ID in the displayHID Window and terminate it by |
+ if ( GetTTSettings()->pDisplayHidWin->IsDisplayTextModified() && GetTTSettings()->pDisplayHidWin->GetDisplayText().GetTokenCount( '|' ) > 1 )
{
- GetTTSettings()->Act->SetSmartUniqueId( SmartId( GetTTSettings()->pDisplayHidWin->GetDisplayText().ToInt32() ) );
+ GetTTSettings()->Act->SetUniqueId( Str2Id( GetTTSettings()->pDisplayHidWin->GetDisplayText().GetToken( '|' ) ) );
GetTTSettings()->pDisplayHidWin->ClearDisplayTextModified();
}
}
@@ -1530,7 +1493,7 @@ BOOL StatementCommand::DisplayHID()
if ( GetTTSettings()->pDisplayHidWin->IsSendData() && GetTTSettings()->Act )
{
if ( !StatementFlow::bSending )
- { // Normalerweise syncronisierung über Protokoll. Hier ist das aber asyncron!!!
+ { // Normalerweise syncronisierung �ber Protokoll. Hier ist das aber asyncron!!!
WriteControlData( GetTTSettings()->Act, GetTTSettings()->pDisplayHidWin->GetConfig() );
new StatementFlow( this, F_EndCommandBlock ); // Kommando zum Senden erzeugen und in que eintragen
}
@@ -1546,7 +1509,7 @@ BOOL StatementCommand::DisplayHID()
}
if ( pFirst == this ) // Sollte immer so sein, aber besser isses
- if ( pNext ) // Befehle warten auf Ausführung
+ if ( pNext ) // Befehle warten auf Ausf�hrung
{ // An Ende neu einsortieren
Advance();
QueStatement( NULL );
@@ -1587,15 +1550,15 @@ private:
Window *Old;
Window *Act;
Window *pTranslateWin;
- BOOL bSelecting;
+ sal_Bool bSelecting;
- BOOL bAvailable;
- BOOL bNext;
+ sal_Bool bAvailable;
+ sal_Bool bNext;
- BOOL TestChangedDataSaved();
+ sal_Bool TestChangedDataSaved();
- ULONG nEventHookID;
+ sal_uLong nEventHookID;
static long stub_VCLEventHookProc( NotifyEvent& rEvt, void* pData )
{
return ((TranslateWin*)pData)->VCLEventHook( rEvt );
@@ -1607,11 +1570,11 @@ public:
TranslateWin();
~TranslateWin();
- static String MarkShortcutErrors( Window* pBase, BOOL bMark );
+ static String MarkShortcutErrors( Window* pBase, sal_Bool bMark );
- BOOL IsTranslationAvailable(){ return bAvailable; }
- BOOL IsNextDialog(){ return bNext; }
- void ResetNextDialog(){ bNext = FALSE; }
+ sal_Bool IsTranslationAvailable(){ return bAvailable; }
+ sal_Bool IsNextDialog(){ return bNext; }
+ void ResetNextDialog(){ bNext = sal_False; }
Window* GetTranslationWindow(){ return pTranslateWin; }
String GetOriginalText(){ return FixedTextTT_FT_OLD.GetText(); }
@@ -1635,9 +1598,9 @@ TranslateWin::TranslateWin()
, Old( NULL )
, Act( NULL )
, pTranslateWin( NULL )
-, bSelecting( FALSE )
-, bAvailable( FALSE )
-, bNext( FALSE )
+, bSelecting( sal_False )
+, bAvailable( sal_False )
+, bNext( sal_False )
{
FreeResource();
PushButtonTT_PB_NEXT.SetClickHdl( LINK( this, TranslateWin, DoNext ) );
@@ -1656,7 +1619,7 @@ TranslateWin::~TranslateWin()
Application::RemoveEventHook( nEventHookID );
}
-BOOL TranslateWin::TestChangedDataSaved()
+sal_Bool TranslateWin::TestChangedDataSaved()
{
if ( ( EditTT_E_NEW.GetText().CompareTo( FixedTextTT_FT_OLD.GetText() ) != COMPARE_EQUAL
|| EditTT_E_COMMENT.GetText().Len() )
@@ -1665,7 +1628,7 @@ BOOL TranslateWin::TestChangedDataSaved()
return MessBox( this, TTProperties::GetSvtResId( TT_DISCARD_CHANGED_DATA ) ).Execute() == RET_YES;
}
else
- return TRUE;
+ return sal_True;
}
IMPL_LINK( TranslateWin, DoAccept, PushButton*, EMPTYARG )
@@ -1676,7 +1639,7 @@ IMPL_LINK( TranslateWin, DoAccept, PushButton*, EMPTYARG )
EditTT_E_NEW.Disable();
EditTT_E_COMMENT.Disable();
PushButtonTT_PB_ACCEPT.Disable();
- bAvailable = TRUE;
+ bAvailable = sal_True;
return 0;
}
@@ -1690,7 +1653,7 @@ IMPL_LINK( TranslateWin, DoNext, PushButton*, EMPTYARG )
EditTT_E_NEW.Disable();
EditTT_E_COMMENT.Disable();
PushButtonTT_PB_ACCEPT.Disable();
- bNext = TRUE;
+ bNext = sal_True;
}
return 0;
}
@@ -1699,14 +1662,14 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG )
{
if ( bSelecting )
{
- bSelecting = FALSE;
+ bSelecting = sal_False;
}
else
{
if ( TestChangedDataSaved() )
{
PushButtonTT_PB_RESTORE.Disable();
- bSelecting = TRUE;
+ bSelecting = sal_True;
}
}
return 0;
@@ -1723,7 +1686,7 @@ 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
+ { // Im ersten schritt nur in der UI zur�ck
pTranslateWin->SetText( sTT_E_OLD );
}
else
@@ -1732,7 +1695,7 @@ IMPL_LINK( TranslateWin, DoRestore, PushButton*, EMPTYARG )
PushButtonTT_PB_RESTORE.Disable();
}
if ( StatementList::WinPtrValid( pTranslateWin ) )
- MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), TRUE );
+ MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), sal_True );
return 0;
}
@@ -1756,7 +1719,7 @@ IMPL_LINK( TranslateWin, ShowInplace, Timer*, EMPTYARG )
sTT_E_NEW.SearchAndReplaceAll( CUniString("\\t"), CUniString("\t") );
pTranslateWin->SetText( sTT_E_NEW );
- MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), TRUE );
+ MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), sal_True );
}
return 0;
}
@@ -1774,7 +1737,7 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt )
if ( Act )
{
Window *pWin = Act;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0 ; i < Act->GetChildCount() ; i++ )
{
pWin = Act->GetChild(i);
@@ -1832,7 +1795,7 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt )
pTranslateWin = Act;
if ( pTranslateWin )
{
- MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), TRUE );
+ MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), sal_True );
// alle CRs quoten (NF)
String sTT_E_NEW( pTranslateWin->GetText());
sTT_E_NEW.SearchAndReplaceAll( CUniString("\n"), CUniString("\\n") );
@@ -1847,7 +1810,7 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt )
EditTT_E_COMMENT.Enable();
PushButtonTT_PB_ACCEPT.Enable();
}
- bSelecting = FALSE;
+ bSelecting = sal_False;
}
}
@@ -1861,11 +1824,11 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt )
class FindShortcutErrors: public Search
{
String aShortcuts,aDoubleShortcuts;
- USHORT nAction;
+ sal_uInt16 nAction;
public:
FindShortcutErrors();
- virtual BOOL IsWinOK( Window *pWin );
- void SetAction( USHORT nA );
+ virtual sal_Bool IsWinOK( Window *pWin );
+ void SetAction( sal_uInt16 nA );
String GetDoubleShortcuts() { return aDoubleShortcuts; }
};
@@ -1875,7 +1838,7 @@ FindShortcutErrors::FindShortcutErrors()
SetAction( FDS_ACTION_COLLECT ); // Wir fange immer mit sammeln an, ODER??
}
-void FindShortcutErrors::SetAction( USHORT nA )
+void FindShortcutErrors::SetAction( sal_uInt16 nA )
{
nAction = nA;
if ( FDS_ACTION_COLLECT == nAction )
@@ -1885,14 +1848,14 @@ void FindShortcutErrors::SetAction( USHORT nA )
}
}
-BOOL FindShortcutErrors::IsWinOK( Window *pWin )
+sal_Bool FindShortcutErrors::IsWinOK( Window *pWin )
{
if ( pWin->IsReallyVisible() )
{
String aText = pWin->GetText();
xub_StrLen nPos = aText.Search('~');
String aShortcut;
- BOOL bHasAccel = FALSE;
+ sal_Bool bHasAccel = sal_False;
if ( nPos != STRING_NOTFOUND )
{
aShortcut = aText.Copy( nPos+1, 1 );
@@ -1912,7 +1875,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin )
break;
case FDS_ACTION_MARK:
{
- BOOL bMissing = FALSE;
+ sal_Bool bMissing = sal_False;
if ( !bHasAccel && aText.Len() ) // should there be an accelarator defined
{
@@ -1926,7 +1889,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin )
(pChild->GetType() == WINDOW_PUSHBUTTON) )
{
if ( !pChild->GetText().EqualsAscii( "..." ) )
- bMissing = TRUE;
+ bMissing = sal_True;
}
if ( pChild->GetType() == WINDOW_FIXEDTEXT )
@@ -1956,7 +1919,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin )
(pTempChild->GetType() == WINDOW_DATEBOX) ||
(pTempChild->GetType() == WINDOW_TIMEBOX) )
{
- bMissing = TRUE;
+ bMissing = sal_True;
}
}
}
@@ -2004,22 +1967,22 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin )
pWin->SetControlBackground();
}
- return FALSE;
+ return sal_False;
}
-String TranslateWin::MarkShortcutErrors( Window* pBase, BOOL bMark )
+String TranslateWin::MarkShortcutErrors( Window* pBase, sal_Bool bMark )
{
if ( pBase )
{
FindShortcutErrors aFinder;
if ( bMark )
{
- StatementList::SearchAllWin( pBase, aFinder, TRUE ); // collect Shortcuts first
+ StatementList::SearchAllWin( pBase, aFinder, sal_True ); // collect Shortcuts first
aFinder.SetAction( FDS_ACTION_MARK );
}
else
aFinder.SetAction( FDS_ACTION_UNMARK );
- StatementList::SearchAllWin( pBase, aFinder, TRUE );
+ StatementList::SearchAllWin( pBase, aFinder, sal_True );
return aFinder.GetDoubleShortcuts();
}
return UniString();
@@ -2029,40 +1992,40 @@ void TranslateWin::EnableTranslation()
{
PushButtonTT_PB_SELECT.Enable();
PushButtonTT_PB_NEXT.Enable();
- bAvailable = FALSE;
- bNext = FALSE;
+ bAvailable = sal_False;
+ bNext = sal_False;
}
void StatementCommand::Translate()
{
// Es wurde eine initale UniqueId mitgegeben. Dann nur die dopelten Shortcuts liefern
- if( (nParams & PARAM_ULONG_1) && nLNr1 )
+ if( (nParams & PARAM_STR_1) && nLNr1 )
{
String aDouble;
- Window *pWin = SearchTree( SmartId( nLNr1 ) ,FALSE );
+ Window *pWin = SearchTree( Str2Id( aString1 ) ,sal_False );
if ( pWin )
{
pWin = pWin->GetWindow( WINDOW_OVERLAP );
- aDouble = TranslateWin::MarkShortcutErrors( pWin, TRUE );
+ aDouble = TranslateWin::MarkShortcutErrors( pWin, sal_True );
}
- pRet->GenReturn ( RET_Value, aSmartMethodId, aDouble );
+ pRet->GenReturn ( RET_Value, nMethodId, aDouble );
return;
}
if ( !GetTTSettings()->pTranslateWin )
{
GetTTSettings()->pTranslateWin = new TranslateWin;
- GetTTSettings()->bToTop = TRUE;
+ GetTTSettings()->bToTop = sal_True;
}
GetTTSettings()->pTranslateWin->Show();
if ( GetTTSettings()->bToTop )
{
GetTTSettings()->pTranslateWin->ToTop();
- GetTTSettings()->bToTop = FALSE;
+ GetTTSettings()->bToTop = sal_False;
}
- GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( TRUE, TRUE );
+ GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( sal_True, sal_True );
if ( GetTTSettings()->pTranslateWin->IsTranslationAvailable() )
{
@@ -2076,15 +2039,15 @@ 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->GetSmartUniqueOrHelpId().HasAny() && pNew->GetChildCount() == 1 )
+ // Bei Dockingwindoes das kanze Geraffel von Docking Floating �berspringen
+ while ( IsDialog( pNew ) && !pNew->GetUniqueOrHelpId().getLength() && pNew->GetChildCount() == 1 )
pNew = pNew->GetChild( 0 );
pTranslationWindow = pNew;
}
aTranslation = CUniString("0;");
- aTranslation += pTranslationWindow->GetSmartUniqueOrHelpId().GetText();
+ aTranslation += Id2Str( pTranslationWindow->GetUniqueOrHelpId() );
aTranslation += ';';
aTranslation += TypeString( pTranslationWindow->GetType() );
@@ -2098,7 +2061,7 @@ void StatementCommand::Translate()
if ( pParentDialog )
{
- aTranslation += pParentDialog->GetSmartUniqueOrHelpId().GetText();
+ aTranslation += Id2Str(pParentDialog->GetUniqueOrHelpId());
aTranslation += ';';
aTranslation += TypeString( pParentDialog->GetType() );
}
@@ -2127,37 +2090,37 @@ void StatementCommand::Translate()
// alle TABSs quoten ()
aTranslation.SearchAndReplaceAll( CUniString("\t"), CUniString("\\t") );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aTranslation );
+ pRet->GenReturn ( RET_Value, nMethodId, aTranslation );
GetTTSettings()->pTranslateWin->EnableTranslation();
- GetTTSettings()->bToTop = TRUE;
+ GetTTSettings()->bToTop = sal_True;
}
else
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
+ pRet->GenReturn ( RET_Value, nMethodId, String() );
GetTTSettings()->pTranslateWin->EnableTranslation();
ErrorBox err( GetTTSettings()->pTranslateWin, TTProperties::GetSvtResId( TT_NO_CONTROL ));
err.Execute();
- GetTTSettings()->bToTop = TRUE;
+ GetTTSettings()->bToTop = sal_True;
}
}
else if ( GetTTSettings()->pTranslateWin->IsNextDialog() )
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, CUniString("1") );
+ pRet->GenReturn ( RET_Value, nMethodId, CUniString("1") );
GetTTSettings()->pTranslateWin->ResetNextDialog();
GetTTSettings()->pTranslateWin->LoseFocus();
- GetTTSettings()->bToTop = TRUE;
+ GetTTSettings()->bToTop = sal_True;
}
else
{
GetTTSettings()->pTranslateWin->EnableTranslation();
- pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
+ pRet->GenReturn ( RET_Value, nMethodId, String() );
}
}
Window* StatementCommand::GetNextOverlap( Window* pBase )
-{ // Findet irgendwelche Overlap-Fenster, die schließbar aussehen
- // Eventuell muß noch die Auswahl verfeinert werden.
+{ // Findet irgendwelche Overlap-Fenster, die schlie�bar aussehen
+ // Eventuell mu� noch die Auswahl verfeinert werden.
if ( pBase->GetType() != WINDOW_BORDERWINDOW )
pBase = pBase->GetWindow( WINDOW_OVERLAP );
@@ -2190,7 +2153,7 @@ Window* StatementCommand::GetNextOverlap( Window* pBase )
Window* StatementCommand::GetNextRecoverWin()
{
- // über die TopLevelWindows der App iterieren
+ // �ber die TopLevelWindows der App iterieren
Window* pBase = Application::GetFirstTopLevelWindow();
Window *pControl = NULL;
Window* pMyFirstDocFrame = NULL;
@@ -2212,7 +2175,7 @@ Window* StatementCommand::GetNextRecoverWin()
}
// dann das Fenster selbst Schliessen
- // erstes DocWin überspringen
+ // erstes DocWin �berspringen
// 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;
@@ -2232,25 +2195,25 @@ Window* StatementCommand::GetNextRecoverWin()
return NULL;
}
-BOOL StatementCommand::Execute()
+sal_Bool StatementCommand::Execute()
{
if ( IsError )
{
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Skipping Command: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
#endif
Advance();
delete this;
- return TRUE;
+ return sal_True;
}
InitProfile();
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Executing Command: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
#endif
@@ -2261,7 +2224,7 @@ BOOL StatementCommand::Execute()
#if OSL_DEBUG_LEVEL > 1
#define REPORT_WIN_CLOSED(pControl, aInfo) \
_REPORT_WIN_CLOSED(pControl, aInfo) \
- m_pDbgWin->AddText( aInfo.AppendAscii(" \"").Append( pControl->GetText() ).AppendAscii("\" geschlossen, RType = ").Append( TypeString(pControl->GetType()) ).AppendAscii(", UId = ").Append( UIdString(pControl->GetSmartUniqueOrHelpId()) ) );
+ m_pDbgWin->AddText( aInfo.AppendAscii(" \"").Append( pControl->GetText() ).AppendAscii("\" geschlossen, RType = ").Append( TypeString(pControl->GetType()) ).AppendAscii(", UId = ").Append( UIdString( pControl->GetUniqueOrHelpId() ) ) );
#else
#define REPORT_WIN_CLOSED(pControl, aInfo) _REPORT_WIN_CLOSED(pControl, aInfo)
#endif
@@ -2278,7 +2241,7 @@ BOOL StatementCommand::Execute()
aString1.AppendAscii("\" geschlossen, RType = ");\
aString1 += TypeString(pControl->GetType()); \
aString1.AppendAscii(", UId = "); \
- aString1 += UIdString(pControl->GetSmartUniqueOrHelpId());
+ aString1 += UIdString(pControl->GetUniqueOrHelpId());
switch ( nMethodId )
@@ -2287,33 +2250,33 @@ BOOL StatementCommand::Execute()
if ( !bBool1 )
{
nLNr1 = Time().GetTime() + nNr1/10;
- bBool1 = TRUE;
+ bBool1 = sal_True;
}
if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit
- return FALSE;
+ return sal_False;
break;
case RC_DisplayHid:
if ( DisplayHID() )
- return FALSE;
+ return sal_False;
break;
case RC_ResetApplication:
{
if ( !bBool1 )
{
nRetryCount = 150; // das sollte reichen.
- bBool1 = TRUE; // Nur beim ersten mal!
+ bBool1 = sal_True; // Nur beim ersten mal!
nNr1 = 1; // Welcher Button ist dran?
nLNr1 = 0; // Speichern des AppWin
aString1 = UniString(); // Liste der geschlossenen Fenster
- // So daß nacher auch wieder alles auf Default steht
+ // So da� nacher auch wieder alles auf Default steht
nUseBindings = 0;
- bCatchGPF = TRUE;
- bUsePostEvents = TRUE;
+ bCatchGPF = sal_True;
+ bUsePostEvents = sal_True;
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
if ( !nRetryCount )
@@ -2323,7 +2286,7 @@ BOOL StatementCommand::Execute()
if ( pControl )
{
- bBool2 = FALSE; // flag for wait when all windows are closed
+ bBool2 = sal_False; // flag for wait when all windows are closed
pControl->GrabFocus();
if ( pControl->GetType() != WINDOW_DOCKINGWINDOW
@@ -2334,12 +2297,12 @@ BOOL StatementCommand::Execute()
&& pControl->GetType() != WINDOW_BORDERWINDOW
&& nRetryCount-- )
{
- short nRT = ImpGetRType( pControl, pControl->GetSmartUniqueOrHelpId() );
+ 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
+ { // Bei Tabcontrol den zugeh�rigen Tabdialog nehmen
pControl = pControl->GET_REAL_PARENT();
- nRT = ImpGetRType( pControl, pControl->GetSmartUniqueOrHelpId() );
+ nRT = ImpGetRType( pControl );
}
switch( nRT )
@@ -2404,7 +2367,7 @@ BOOL StatementCommand::Execute()
break;
default:
{
- USHORT nID = pBD->GetButtonId( nNr1-10 );
+ sal_uInt16 nID = pBD->GetButtonId( nNr1-10 );
if ( nID != BUTTONID_HELP )
{
REPORT_WIN_CLOSED(pControl, CUniString("Message Box (").Append( UniString::CreateFromInt32(nID) ).AppendAscii(")"));
@@ -2425,7 +2388,7 @@ BOOL StatementCommand::Execute()
#endif
break;
}
- return FALSE;
+ return sal_False;
}
else
{
@@ -2437,12 +2400,12 @@ BOOL StatementCommand::Execute()
SET_WINP_CLOSING(pControl);
((DockingWindow*)pControl)->Close();
- // Eigentlich nur bei TaskWindows! Hoffen wir mal, daß keine anderen DockingWindows dazwischen hauen.
+ // Eigentlich nur bei TaskWindows! Hoffen wir mal, da� keine anderen DockingWindows dazwischen hauen.
if ( (Window*)nLNr1 != pControl )
- nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen
- nLNr1 = (ULONG)pControl;
+ nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en
+ nLNr1 = (sal_uLong)pControl;
- return FALSE;
+ return sal_False;
}
}
if ( nRetryCount--
@@ -2469,10 +2432,10 @@ BOOL StatementCommand::Execute()
// nur bei TaskWindows!
if ( (Window*)nLNr1 != pControl )
- nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen
- nLNr1 = (ULONG)pControl;
+ nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en
+ nLNr1 = (sal_uLong)pControl;
- return FALSE;
+ return sal_False;
}
}
}
@@ -2486,8 +2449,8 @@ BOOL StatementCommand::Execute()
// Eigentlich nur bei TaskWindows!
if ( (Window*)nLNr1 != pControl )
- nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen
- nLNr1 = (ULONG)pControl;
+ nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en
+ nLNr1 = (sal_uLong)pControl;
return FALSE;
}
@@ -2499,12 +2462,12 @@ BOOL StatementCommand::Execute()
if ( !bBool2 )
{
nLNr1 = Time().GetTime() + 100; // 100 = 1 Second
- bBool2 = TRUE;
+ bBool2 = sal_True;
}
if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit
- return FALSE;
+ return sal_False;
else
- pRet->GenReturn ( RET_Value, aSmartMethodId, aString1);
+ pRet->GenReturn ( RET_Value, nMethodId, aString1);
}
break;
case RC_WaitSlot:
@@ -2514,16 +2477,16 @@ BOOL StatementCommand::Execute()
if ( !bBool1 )
{
nLNr1 = Time().GetTime() + nNr1/10;
- bBool1 = TRUE;
+ bBool1 = sal_True;
}
if ( !bIsSlotInExecute )
- pRet->GenReturn ( RET_Value, aSmartMethodId, comm_USHORT(CONST_WSFinished) );
+ pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSFinished) );
else
{
if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit
- return FALSE;
- pRet->GenReturn ( RET_Value, aSmartMethodId, comm_USHORT(CONST_WSTimeout) );
+ return sal_False;
+ pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSTimeout) );
}
}
break;
@@ -2540,11 +2503,11 @@ BOOL StatementCommand::Execute()
case RC_ResetApplication:
case RC_WaitSlot:
- case RC_AppAbort: // Sofortiges Löschen aller Befehle
+ case RC_AppAbort: // Sofortiges L�schen aller Befehle
break;
case RC_Assert:
{
- ByteString aAssertion( "Diese Assertion wurde vom Testtool per Befehl ausgelöst" );
+ ByteString aAssertion( "Diese Assertion wurde vom Testtool per Befehl ausgel�st" );
aAssertion = ByteString( String( aAssertion, RTL_TEXTENCODING_MS_1252 ), RTL_TEXTENCODING_UTF8 );
DBG_ASSERT( !aString1.Len(), ByteString( aString1, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
DBG_ASSERT( aString1.Len(), aAssertion.GetBuffer() );
@@ -2571,32 +2534,32 @@ BOOL StatementCommand::Execute()
break;
case RC_ApplicationBusy:
{
- BOOL bWait = FALSE;
+ sal_Bool bWait = sal_False;
ReportError( GEN_RES_STR0( S_NO_ACTIVE_WINDOW ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, bWait );
+ pRet->GenReturn ( RET_Value, nMethodId, bWait );
break;
}
case RC_GetClipboard:
{
::rtl::OUString aTemp;
::svt::OStringTransfer::PasteString( aTemp, GetFirstDocFrame() );
- pRet->GenReturn ( RET_Value, aSmartMethodId, String( aTemp ) );
+ pRet->GenReturn ( RET_Value, nMethodId, String( aTemp ) );
}
break;
case RC_SetClipboard:
::svt::OStringTransfer::CopyString(aString1,GetFirstDocFrame());
break;
case RC_WinTree:
- pRet->GenReturn ( RET_Value, aSmartMethodId, Tree( NULL, 0));
+ pRet->GenReturn ( RET_Value, nMethodId, Tree( NULL, 0));
break;
#if OSL_DEBUG_LEVEL > 1
case RC_NoDebug:
- m_pDbgWin->bQuiet = TRUE;
+ m_pDbgWin->bQuiet = sal_True;
m_pDbgWin->Hide();
m_pDbgWin->Clear();
break;
case RC_Debug:
- m_pDbgWin->bQuiet = FALSE;
+ m_pDbgWin->bQuiet = sal_False;
m_pDbgWin->Show();
break;
#endif
@@ -2611,7 +2574,9 @@ BOOL StatementCommand::Execute()
else if ( !IsDialog(pWin) )
ReportError( GEN_RES_STR0( S_NO_DIALOG_IN_GETACTIVE ) );
else
- pRet->GenReturn( RET_Value, aSmartMethodId, static_cast<comm_ULONG>(pWin->GetSmartUniqueOrHelpId().GetNum())); //GetNum() ULONG != comm_ULONG on 64bit
+ {
+ pRet->GenReturn( RET_Value, nMethodId, Id2Str(pWin->GetUniqueOrHelpId()) );
+ }
}
break;
case RC_UseBindings:
@@ -2623,10 +2588,10 @@ BOOL StatementCommand::Execute()
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
+ // 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)
+ // ein String wird in das Logfile �bernommen(sonst passiert nichts)
if( !(nParams & PARAM_BOOL_1) || bBool1 )
{
if ( !pProfiler )
@@ -2643,8 +2608,8 @@ BOOL StatementCommand::Execute()
}
pProfiler->StartAutoProfiling( nNr1 );
- // Der Header ist abhängig vom Modus
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetProfileHeader() );
+ // Der Header ist abh�ngig vom Modus
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() );
}
else if ( nParams & PARAM_USHORT_1 )
{ // Partitioning initialisieren: Profile true [,nNr][,nNr][,nNr][,nNr]
@@ -2654,35 +2619,35 @@ BOOL StatementCommand::Execute()
if ( nParams & PARAM_USHORT_3 ) { nAnzahl++; };
if ( nParams & PARAM_USHORT_4 ) { nAnzahl++; };
- // Hier werden die Parameter ans Testtool zurück übertragen.
- // Das ist zwar etwas eigenartig, aber ansonsten müsste man im Testtool
+ // 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.
- pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileReset ), nAnzahl );
+ pRet->GenReturn( RET_ProfileInfo, S_ProfileReset, nAnzahl );
// Und die einzelnen Grenzen
- if ( nParams & PARAM_USHORT_1 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder1 ), (comm_ULONG)nNr1 ); };
- if ( nParams & PARAM_USHORT_2 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder2 ), (comm_ULONG)nNr2 ); };
- if ( nParams & PARAM_USHORT_3 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder3 ), (comm_ULONG)nNr3 ); };
- if ( nParams & PARAM_USHORT_4 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder4 ), (comm_ULONG)nNr4 ); };
+ if ( nParams & PARAM_USHORT_1 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder1, (comm_ULONG)nNr1 ); };
+ if ( nParams & PARAM_USHORT_2 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder2, (comm_ULONG)nNr2 ); };
+ if ( nParams & PARAM_USHORT_3 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder3, (comm_ULONG)nNr3 ); };
+ if ( nParams & PARAM_USHORT_4 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder4, (comm_ULONG)nNr4 ); };
pProfiler->StartPartitioning();
}
else if( nParams == PARAM_STR_1 ) // Genau ein String!
{ // Nur einen String ins Profiling aufnehmen
aString1 += '\n';
- pRet->GenReturn( RET_ProfileInfo, SmartId(), aString1 );
+ pRet->GenReturn( RET_ProfileInfo, 0, aString1 );
}
else
{ // Normales Profiling je Kommando: profile
if ( pProfiler->IsAutoProfiling() )
{
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetAutoProfiling() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
pProfiler->StopAutoProfiling();
}
pProfiler->StartProfilingPerCommand();
- // Der Header ist abhängig vom Modus
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetProfileHeader() );
+ // Der Header ist abh�ngig vom Modus
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() );
}
}
else // Profiling wieder ausschalten: Profile false
@@ -2693,13 +2658,13 @@ BOOL StatementCommand::Execute()
if ( pProfiler->IsAutoProfiling() )
{
- pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetAutoProfiling() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
pProfiler->StopAutoProfiling();
}
if ( pProfiler->IsPartitioning() )
{
- pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileDump ), (comm_ULONG)0 );
+ pRet->GenReturn( RET_ProfileInfo, S_ProfileDump, (comm_ULONG)0 );
pProfiler->StopPartitioning();
}
@@ -2722,7 +2687,7 @@ BOOL StatementCommand::Execute()
MenuBar *pMenuBar = NULL;
Menu *pMenu;
- USHORT nErr = GetCurrentMenues( pPopup, pMenuBar, pMenu );
+ sal_uInt16 nErr = GetCurrentMenues( pPopup, pMenuBar, pMenu );
if ( !pMenu )
{
@@ -2733,7 +2698,7 @@ BOOL StatementCommand::Execute()
break;
}
- USHORT nItemCount = 0;
+ sal_uInt16 nItemCount = 0;
switch ( nMethodId )
{
case RC_MenuGetItemCount:
@@ -2743,8 +2708,8 @@ BOOL StatementCommand::Execute()
nItemCount = pMenu->GetItemCount();
if ( pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES )
{ // jep, we have to adjust the count
- BOOL bLastWasSeperator = TRUE; // TRUE for Separator at the top
- for ( USHORT i = 0 ; i < pMenu->GetItemCount() ; i++ )
+ sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top
+ for ( sal_uInt16 i = 0 ; i < pMenu->GetItemCount() ; i++ )
{
if ( !pMenu->IsItemEnabled( pMenu->GetItemId( i ) ) )
nItemCount--;
@@ -2763,7 +2728,7 @@ BOOL StatementCommand::Execute()
}
// for certain methods calculate the physical index (reinserting the hidden entries)
- USHORT nPhysicalIndex = 0;
+ sal_uInt16 nPhysicalIndex = 0;
switch ( nMethodId )
{
case RC_MenuGetItemId:
@@ -2772,9 +2737,9 @@ BOOL StatementCommand::Execute()
nPhysicalIndex = nNr1;
if ( pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES )
{ // jep, we have to adjust the position
- BOOL bLastWasSeperator = TRUE; // TRUE for Separator at the top
- USHORT nVisibleCount = 0;
- for ( USHORT i = 0 ; i < pMenu->GetItemCount() && nVisibleCount < nNr1 ; i++ )
+ sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top
+ sal_uInt16 nVisibleCount = 0;
+ for ( sal_uInt16 i = 0 ; i < pMenu->GetItemCount() && nVisibleCount < nNr1 ; i++ )
{
if ( pMenu->IsItemEnabled( pMenu->GetItemId( i ) )
&& !( pMenu->GetItemType( i ) == MENUITEM_SEPARATOR && bLastWasSeperator ) )
@@ -2797,78 +2762,78 @@ BOOL StatementCommand::Execute()
{
case RC_MenuGetItemCount:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)nItemCount );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)nItemCount );
}
break;
case RC_MenuGetItemId:
{
- if ( ValueOK(aSmartMethodId, RcString( nMethodId ),nNr1,nItemCount) )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pMenu->GetItemId(nPhysicalIndex-1) );
+ if ( ValueOK( rtl::OString(), RcString( nMethodId ),nNr1,nItemCount) )
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pMenu->GetItemId(nPhysicalIndex-1) );
}
break;
case RC_MenuGetItemPos:
{
- USHORT nLogicalPos = pMenu->GetItemPos(nNr1);
+ sal_uInt16 nLogicalPos = pMenu->GetItemPos(nNr1);
if ( MENU_ITEM_NOTFOUND != nLogicalPos && pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES )
{ // jep, we have to adjust the position
if ( !pMenu->IsItemEnabled( nNr1 ) )
nLogicalPos = MENU_ITEM_NOTFOUND;
else
{
- BOOL bLastWasSeperator = FALSE;
+ sal_Bool bLastWasSeperator = sal_False;
for ( int i = nLogicalPos ; i >= 0 ; i-- )
{
- if ( !pMenu->IsItemEnabled( pMenu->GetItemId( sal::static_int_cast< USHORT >(i) ) ) ||
- ( pMenu->GetItemType( sal::static_int_cast< USHORT >(i) ) == MENUITEM_SEPARATOR && bLastWasSeperator ) )
+ if ( !pMenu->IsItemEnabled( pMenu->GetItemId( sal::static_int_cast< sal_uInt16 >(i) ) ) ||
+ ( pMenu->GetItemType( sal::static_int_cast< sal_uInt16 >(i) ) == MENUITEM_SEPARATOR && bLastWasSeperator ) )
nLogicalPos--;
- bLastWasSeperator = pMenu->GetItemType( sal::static_int_cast< USHORT >(i) ) == MENUITEM_SEPARATOR;
+ bLastWasSeperator = pMenu->GetItemType( sal::static_int_cast< sal_uInt16 >(i) ) == MENUITEM_SEPARATOR;
}
}
}
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)(nLogicalPos+1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)(nLogicalPos+1) );
}
break;
case RC_MenuIsSeperator:
{
- if ( ValueOK(aSmartMethodId, RcString( nMethodId ),nNr1,nItemCount) )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)(pMenu->GetItemType(nPhysicalIndex-1) == MENUITEM_SEPARATOR) );
+ if ( ValueOK( rtl::OString(), RcString( nMethodId ),nNr1,nItemCount) )
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)(pMenu->GetItemType(nPhysicalIndex-1) == MENUITEM_SEPARATOR) );
}
break;
case RC_MenuIsItemChecked:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)pMenu->IsItemChecked(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)pMenu->IsItemChecked(nNr1) );
}
break;
case RC_MenuIsItemEnabled:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)pMenu->IsItemEnabled(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)pMenu->IsItemEnabled(nNr1) );
}
break;
case RC_MenuGetItemText:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (String)pMenu->GetItemText(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (String)pMenu->GetItemText(nNr1) );
}
break;
case RC_MenuGetItemCommand:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (String)pMenu->GetItemCommand(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (String)pMenu->GetItemCommand(nNr1) );
}
break;
case RC_MenuHasSubMenu:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (BOOL)(pMenu->GetPopupMenu(nNr1) != NULL) );
+ pRet->GenReturn ( RET_Value, nMethodId, (sal_Bool)(pMenu->GetPopupMenu(nNr1) != NULL) );
}
break;
case RC_MenuSelect:
{
if ( pMenu->GetPopupMenu(nNr1) )
{
- if ( !aSubMenuId1.GetNum() )
- aSubMenuId1 = SmartId(nNr1);
- else if ( !aSubMenuId2.GetNum() )
- aSubMenuId2 = SmartId(nNr1);
- else if ( !aSubMenuId3.GetNum() )
- aSubMenuId3 = SmartId(nNr1);
+ if ( !aSubMenuId1 )
+ aSubMenuId1 = nNr1;
+ else if ( !aSubMenuId2 )
+ aSubMenuId2 = nNr1;
+ else if ( !aSubMenuId3 )
+ aSubMenuId3 = nNr1;
if ( pPopup )
pPopup->SelectEntry(nNr1);
@@ -2880,17 +2845,17 @@ BOOL StatementCommand::Execute()
if ( pPopup )
{
pPopup->EndExecute(nNr1);
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
else
{
pMenuBar->SelectEntry(nNr1);
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
}
@@ -2958,7 +2923,7 @@ BOOL StatementCommand::Execute()
{
String aPath;
- USHORT nDirFlags = 0;
+ sal_uInt16 nDirFlags = 0;
// from basic/source/inc/runtime.hxx
#define Sb_ATTR_NORMAL 0x0000
#define Sb_ATTR_HIDDEN 0x0002
@@ -2981,27 +2946,20 @@ BOOL StatementCommand::Execute()
}
else
{
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( (nParams & PARAM_USHORT_1) )
nDirFlags = nFlags = nNr1;
else
nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY;
// Nur diese Bitmaske ist unter Windows erlaubt
- #ifdef WIN
- if( nFlags & ~0x1E )
- {
- nDirFlags = 0;
- StarBASIC::Error( SbERR_BAD_ARGUMENT );
- }
- #endif
// Sb_ATTR_VOLUME wird getrennt gehandelt
if( nDirFlags & Sb_ATTR_VOLUME )
aPath = aEntry.GetVolume();
else
{
// Die richtige Auswahl treffen
- USHORT nMode = FSYS_KIND_FILE;
+ sal_uInt16 nMode = FSYS_KIND_FILE;
if( nFlags & Sb_ATTR_DIRECTORY )
nMode |= FSYS_KIND_DIR;
if( nFlags == Sb_ATTR_DIRECTORY )
@@ -3026,36 +2984,12 @@ BOOL StatementCommand::Execute()
}
DirEntry aNextEntry=(*(pDir))[nDirPos++];
aPath = aNextEntry.GetName();
- #ifdef WIN
- aNextEntry.ToAbs();
- String sFull(aNextEntry.GetFull());
- unsigned nFlags;
-
- if (_dos_getfileattr( sFull.GetStr(), &nFlags ))
- nErrorcode = FSYS_ERR_NOTEXISTS;
- else
- {
- INT16 nCurFlags = nDirFlags;
- if( (nCurFlags == Sb_ATTR_NORMAL)
- && !(nFlags & ( _A_HIDDEN | _A_SYSTEM | _A_VOLID | _A_SUBDIR ) ) )
- break;
- else if( (nCurFlags & Sb_ATTR_HIDDEN) && (nFlags & _A_HIDDEN) )
- break;
- else if( (nCurFlags & Sb_ATTR_SYSTEM) && (nFlags & _A_SYSTEM) )
- break;
- else if( (nCurFlags & Sb_ATTR_VOLUME) && (nFlags & _A_VOLID) )
- break;
- else if( (nCurFlags & Sb_ATTR_DIRECTORY) && (nFlags & _A_SUBDIR) )
- break;
- }
- #else
break;
- #endif
}
}
if ( !nErrorcode )
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, aPath );
+ pRet->GenReturn ( RET_Value, nMethodId, aPath );
}
}
@@ -3067,7 +3001,7 @@ BOOL StatementCommand::Execute()
if ( FSYS_ERR_OK == nErrorcode )
{
FileStat aFS( aFile );
- pRet->GenReturn ( RET_Value, aSmartMethodId, static_cast<comm_ULONG>(aFS.GetSize()) ); //GetSize() ULONG != comm_ULONG on 64bit
+ pRet->GenReturn ( RET_Value, nMethodId, static_cast<comm_ULONG>(aFS.GetSize()) ); //GetSize() sal_uLong != comm_ULONG on 64bit
nErrorcode = aFS.GetError();
}
}
@@ -3094,7 +3028,7 @@ BOOL StatementCommand::Execute()
SbxValueRef xValue = new SbxValue( SbxDATE );
xValue->PutDate( fSerial );
- pRet->GenReturn ( RET_Value, aSmartMethodId, *xValue );
+ pRet->GenReturn ( RET_Value, nMethodId, *xValue );
}
}
break;
@@ -3205,7 +3139,7 @@ BOOL StatementCommand::Execute()
ReportError( GEN_RES_STR1( S_POINTER_OUTSIDE_APPWIN, RcString( nMethodId ) ) );
aPointer = Pointer( POINTER_NULL );
}
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)aPointer.GetStyle() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)aPointer.GetStyle() );
}
break;
case RC_UnpackStorage:
@@ -3223,7 +3157,7 @@ BOOL StatementCommand::Execute()
}
#if OSL_DEBUG_LEVEL > 1
- USHORT nEntries = Dir( aDestPath, FSYS_KIND_FILE | FSYS_KIND_DIR ).Count();
+ sal_uInt16 nEntries = Dir( aDestPath, FSYS_KIND_FILE | FSYS_KIND_DIR ).Count();
(void) nEntries; /* avoid warning about unused parameter */
#endif
// The Count is only larger than 2 is the path is a directory which is not empty
@@ -3274,7 +3208,7 @@ BOOL StatementCommand::Execute()
break;
case RC_ExistsSysDialog:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)xPicker.is() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)xPicker.is() );
}
break;
default:
@@ -3308,21 +3242,21 @@ BOOL StatementCommand::Execute()
case RC_RecordMacro:
{
if ( ! (nParams & PARAM_BOOL_1) )
- bBool1 = TRUE;
+ bBool1 = sal_True;
MacroRecorder::GetMacroRecorder()->SetActionRecord( bBool1 );
}
break;
case RC_GetDocumentCount :
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_USHORT)GetDocWinCount() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_USHORT)GetDocWinCount() );
}
break;
case RC_ActivateDocument :
{
if( nParams & PARAM_USHORT_1 )
{
- if ( ValueOK(aSmartMethodId, RcString( nMethodId ), nNr1, GetDocWinCount() ) )
+ if ( ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, GetDocWinCount() ) )
{
Window* pWin = GetDocWin( nNr1-1 );
if ( pWin )
@@ -3338,7 +3272,7 @@ BOOL StatementCommand::Execute()
break;
case RC_GetSystemLanguage :
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_USHORT)Application::GetSettings().GetLanguage() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_USHORT)Application::GetSettings().GetLanguage() );
}
break;
case RC_CatchGPF :
@@ -3346,18 +3280,18 @@ BOOL StatementCommand::Execute()
if( (nParams & PARAM_BOOL_1) )
bCatchGPF = bBool1;
else
- bCatchGPF = TRUE;
+ bCatchGPF = sal_True;
}
break;
case RC_IsProduct :
{
- BOOL bIsProduct;
+ sal_Bool bIsProduct;
#ifdef DBG_UTIL
- bIsProduct = FALSE;
+ bIsProduct = sal_False;
#else
- bIsProduct = TRUE;
+ bIsProduct = sal_True;
#endif
- pRet->GenReturn ( RET_Value, aSmartMethodId, (BOOL)bIsProduct );
+ pRet->GenReturn ( RET_Value, nMethodId, (sal_Bool)bIsProduct );
}
break;
case RC_UsePostEvents :
@@ -3365,7 +3299,7 @@ BOOL StatementCommand::Execute()
if( (nParams & PARAM_BOOL_1) )
bUsePostEvents = bBool1;
else
- bUsePostEvents = TRUE;
+ bUsePostEvents = sal_True;
}
break;
default:
@@ -3373,38 +3307,38 @@ BOOL StatementCommand::Execute()
}
SendProfile( RcString(nMethodId) );
delete this;
- return TRUE;
+ return sal_True;
}
-BOOL StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir )
+sal_Bool StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir )
{
SvStorageInfoList aList;
xStorage->FillInfoList( &aList );
- for( USHORT i = 0; i < aList.Count(); i++ )
+ for( sal_uInt16 i = 0; i < aList.Count(); i++ )
{
SvStorageInfo& rInfo = aList.GetObject( i );
String aName = rInfo.GetName();
DirEntry aPath ( aBaseDir );
aPath += DirEntry( aName );
- BOOL bIsStorage = xStorage->IsStorage( aName );
+ sal_Bool bIsStorage = xStorage->IsStorage( aName );
if ( bIsStorage )
{
SotStorageRef xSubStorage = xStorage->OpenSotStorage( aName, STREAM_STD_READ );
if ( xSubStorage->GetError() )
{
ReportError( GEN_RES_STR2(S_UNPACKING_STORAGE_FAILED, aName, aPath.GetFull()) );
- return FALSE;
+ return sal_False;
}
UnpackStorage( xSubStorage, aPath );
}
else
{
- if ( !aPath.MakeDir( TRUE ) )
+ if ( !aPath.MakeDir( sal_True ) )
{
ReportError( GEN_RES_STR1(S_CANNOT_CREATE_DIRECTORY, aPath.GetFull()) );
- return FALSE;
+ return sal_False;
}
SotStorageStreamRef xStream = xStorage->OpenSotStream( aName, STREAM_STD_READ );
SvFileStream aDestination( aPath.GetFull(), STREAM_STD_READWRITE | STREAM_TRUNC );
@@ -3412,16 +3346,16 @@ BOOL StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir
if ( aDestination.GetError() != ERRCODE_NONE )
{
ReportError( GEN_RES_STR2(S_UNPACKING_STORAGE_FAILED, aName, aPath.GetFull()) );
- return FALSE;
+ return sal_False;
}
aDestination.Close();
}
}
- return TRUE;
+ return sal_True;
}
-StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
+StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdType )
: StatementList()
, nNr1( 0 )
, nNr2( 0 )
@@ -3430,21 +3364,26 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
, nLNr1( 0 )
, aString1()
, aString2()
-, bBool1(FALSE)
-, bBool2(FALSE)
+, bBool1(sal_False)
+, bBool2(sal_False)
{
QueStatement( NULL );
+ //HELPID BACKWARD (SIControl is no longer needed)
if ( nControlIdType == SIControl )
{
comm_ULONG nId;
pCmdIn->Read( nId );
- aUId = SmartId( nId );
+ aUId = rtl::OString( nId );
+ if ( nId == 0 )
+ aUId = UID_ACTIVE;
+ else
+ ReportError( aUId, GEN_RES_STR1c( S_INTERNAL_ERROR, "using numeric HelpID from old Testtool" ) );
}
else if ( nControlIdType == SIStringControl )
{
String aId;
pCmdIn->Read( aId );
- aUId = SmartId( aId );
+ aUId = Str2Id( aId );
}
else
{
@@ -3466,7 +3405,7 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Reading Control: UId: " );
- m_pDbgWin->AddText( aUId.GetText() );
+ m_pDbgWin->AddText( Id2Str( aUId ) );
m_pDbgWin->AddText( " Methode: " );
m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( " Params:" );
@@ -3481,10 +3420,10 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
#endif
}
-BOOL IsDialog(Window *pWin)
+sal_Bool IsDialog(Window *pWin)
{ // Alles was von SystemWindow abgeleitet ist
if ( !pWin )
- return FALSE;
+ return sal_False;
switch (pWin->GetType())
{
@@ -3514,17 +3453,17 @@ BOOL IsDialog(Window *pWin)
case WINDOW_PATHDIALOG:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
-BOOL IsAccessable(Window *pWin)
+sal_Bool IsAccessable(Window *pWin)
{
if ( pWin == NULL )
- return FALSE;
+ return sal_False;
return pWin->IsEnabled() && pWin->IsInputEnabled();
}
@@ -3534,8 +3473,8 @@ BOOL IsAccessable(Window *pWin)
// neue Hilfsfunktion
static Window*ImpGetButton( Window *pBase, WinBits nMask, WinBits nWinBits )
{
- USHORT n = pBase->GetChildCount();
- for( USHORT i = 0 ; i < n; i++ ) {
+ sal_uInt16 n = pBase->GetChildCount();
+ for( sal_uInt16 i = 0 ; i < n; i++ ) {
Window *pChild = pBase->GetChild(i);
if( pChild->GetType() == WINDOW_OKBUTTON
|| pChild->GetType() == WINDOW_CANCELBUTTON
@@ -3547,12 +3486,12 @@ static Window*ImpGetButton( Window *pBase, WinBits nMask, WinBits nWinBits )
return NULL;
}
-BOOL StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeichnung )
+sal_Bool StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeichnung )
{
if ( pControl && ( ( ( IsAccessable(pControl) || (nMethodId & M_WITH_RETURN) ) &&
pControl->IsVisible() ) ||
- aUId.Matches( UID_ACTIVE ) ) )
- return TRUE;
+ aUId.equals( UID_ACTIVE ) ) )
+ return sal_True;
else
{
UniString aBezeichnung( cBezeichnung, RTL_TEXTENCODING_ASCII_US );
@@ -3569,30 +3508,30 @@ BOOL StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeichnung
m_pDbgWin->AddText( aBezeichnung.AppendAscii(" NotFound or Disabled or Invisible") );
#endif
- return FALSE;
+ return sal_False;
}
}
-BOOL StatementList::ValueOK( SmartId aId, String aBezeichnung, ULONG nValue, ULONG nMax )
+sal_Bool StatementList::ValueOK( rtl::OString aId, String aBezeichnung, sal_uLong nValue, sal_uLong nMax )
{
if ( nMax < nValue )
{
if ( aBezeichnung.Len() > 0 )
ReportError( aId, GEN_RES_STR3( S_NUMBER_TOO_BIG, aBezeichnung, UniString::CreateFromInt32( nValue ), UniString::CreateFromInt32( nMax ) ) );
- return FALSE;
+ return sal_False;
}
if ( nValue < 1 )
{
if ( aBezeichnung.Len() > 0 )
ReportError( aId, GEN_RES_STR3c3( S_NUMBER_TOO_SMALL, aBezeichnung, UniString::CreateFromInt32( nValue ), "1" ) );
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-USHORT StatementList::GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu )
+sal_uInt16 StatementList::GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu )
{
if ( WinPtrValid( pMenuWindow ) )
pMenuBar = pMenuWindow->GetMenuBar();
@@ -3608,24 +3547,21 @@ USHORT StatementList::GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar,
if ( !pMenu )
return 1;
- if ( aSubMenuId1.GetNum() )
+ if ( aSubMenuId1 )
{
- pPopup = pMenu->GetPopupMenu(
- sal::static_int_cast< USHORT >(aSubMenuId1.GetNum()));
+ pPopup = pMenu->GetPopupMenu( aSubMenuId1 );
pMenu = pPopup;
}
- if ( pMenu && aSubMenuId2.GetNum() )
+ if ( pMenu && aSubMenuId2 )
{
- pPopup = pMenu->GetPopupMenu(
- sal::static_int_cast< USHORT >(aSubMenuId2.GetNum()));
+ pPopup = pMenu->GetPopupMenu( aSubMenuId2 );
pMenu = pPopup;
}
- if ( pMenu && aSubMenuId3.GetNum() )
+ if ( pMenu && aSubMenuId3 )
{
- pPopup = pMenu->GetPopupMenu(
- sal::static_int_cast< USHORT >(aSubMenuId3.GetNum()));
+ pPopup = pMenu->GetPopupMenu( aSubMenuId3 );
pMenu = pPopup;
}
@@ -3681,8 +3617,8 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin )
aDiff *= 1000;
aDiff /= nSteps;
- StatementList::bExecuting = TRUE; // Bah ist das ein ekliger Hack
- // Das verhindert, daß schon der nächste Befehl ausgeführt wird.
+ StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack
+ // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird.
for ( ; nSteps ; nSteps-- )
{
@@ -3694,37 +3630,37 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin )
SafeReschedule();
}
pControl->SetPointerPosPixel(aZiel);
- StatementList::bExecuting = FALSE; // Bah ist das ein ekliger Hack
+ StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack
}
-BOOL StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow )
+sal_Bool StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow )
{
if ( bDoTypeKeysDelay )
{
- ULONG nTimeWait = nMinTypeKeysDelay;
+ sal_uLong nTimeWait = nMinTypeKeysDelay;
if ( nMaxTypeKeysDelay != nMinTypeKeysDelay )
nTimeWait += Time::GetSystemTicks() % ( nMaxTypeKeysDelay - nMinTypeKeysDelay );
Timer aTimer;
aTimer.SetTimeout( nTimeWait );
aTimer.Start();
- StatementList::bExecuting = TRUE; // Bah ist das ein ekliger Hack
- // Das verhindert, daß schon der nächste Befehl ausgeführt wird.
+ StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack
+ // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird.
while ( aTimer.IsActive() )
{
- SafeReschedule( TRUE );
+ SafeReschedule( sal_True );
}
- StatementList::bExecuting = FALSE; // Bah ist das ein ekliger Hack
+ StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack
if ( !WinPtrValid(pTestWindow ) )
{
ReportError( aUId, GEN_RES_STR1( S_WINDOW_DISAPPEARED, MethodString( nMethodId ) ) );
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
-BOOL StatementControl::HandleVisibleControls( Window *pControl )
+sal_Bool StatementControl::HandleVisibleControls( Window *pControl )
{
if( pControl ) // Also auch bei Disabled nicht jedoch bei Invisible
{
@@ -3738,11 +3674,11 @@ 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r Border
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3757,11 +3693,11 @@ 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r Border
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3776,11 +3712,11 @@ 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r Border
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3788,11 +3724,11 @@ 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r Border
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3801,11 +3737,11 @@ 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r 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(); // Sonderbehandlung f�r Border
if ( (nParams & PARAM_BOOL_1) && bBool1 )
pControl = pControl->GetWindow( WINDOW_OVERLAP );
@@ -3819,15 +3755,15 @@ BOOL StatementControl::HandleVisibleControls( Window *pControl )
nParams |= PARAM_USHORT_2;
nParams |= PARAM_USHORT_3;
nParams |= PARAM_USHORT_4;
- nNr1 = (USHORT)-aStart.X();
- nNr2 = (USHORT)-aStart.Y();
- nNr3 = (USHORT)pControl->GetSizePixel().Width() + 2*(USHORT)aStart.X();
- nNr4 = (USHORT)pControl->GetSizePixel().Height() + 2*(USHORT)aStart.Y();
+ nNr1 = (sal_uInt16)-aStart.X();
+ nNr2 = (sal_uInt16)-aStart.Y();
+ nNr3 = (sal_uInt16)pControl->GetSizePixel().Width() + 2*(sal_uInt16)aStart.X();
+ nNr4 = (sal_uInt16)pControl->GetSizePixel().Height() + 2*(sal_uInt16)aStart.Y();
}
- nNr1 = std::max((USHORT)-aStart.X(),nNr1);
- nNr2 = std::max((USHORT)-aStart.Y(),nNr2);
- nNr3 = std::min((USHORT)(pControl->GetSizePixel().Width() + 2*(USHORT)aStart.X()),nNr3);
- nNr4 = std::min((USHORT)(pControl->GetSizePixel().Height() + 2*(USHORT)aStart.Y()),nNr4);
+ nNr1 = std::max((sal_uInt16)-aStart.X(),nNr1);
+ nNr2 = std::max((sal_uInt16)-aStart.Y(),nNr2);
+ nNr3 = std::min((sal_uInt16)(pControl->GetSizePixel().Width() + 2*(sal_uInt16)aStart.X()),nNr3);
+ nNr4 = std::min((sal_uInt16)(pControl->GetSizePixel().Height() + 2*(sal_uInt16)aStart.Y()),nNr4);
}
if( nParams & PARAM_USHORT_4 )
{ // Zuschneiden
@@ -3850,7 +3786,7 @@ BOOL StatementControl::HandleVisibleControls( Window *pControl )
break;
case M_GetFixedTextCount:
{
- pRet->GenReturn ( RET_Value, aUId, CountWinByRT( pControl, WINDOW_FIXEDTEXT, TRUE ) );
+ pRet->GenReturn ( RET_Value, aUId, CountWinByRT( pControl, WINDOW_FIXEDTEXT, sal_True ) );
}
break;
case M_GetFixedText:
@@ -3858,27 +3794,27 @@ BOOL StatementControl::HandleVisibleControls( Window *pControl )
if( ( nParams & PARAM_USHORT_1 ) == 0 )
nNr1 = 1;
- FixedText* pFixedText = (FixedText*)GetWinByRT( pControl, WINDOW_FIXEDTEXT, TRUE, nNr1-1 );
+ FixedText* pFixedText = (FixedText*)GetWinByRT( pControl, WINDOW_FIXEDTEXT, sal_True, nNr1-1 );
if ( pFixedText )
pRet->GenReturn ( RET_Value, aUId, pFixedText->GetText() );
else
- ValueOK(aUId, MethodString( nMethodId ),nNr1,CountWinByRT( pControl, WINDOW_FIXEDTEXT, TRUE ) );
+ ValueOK(aUId, MethodString( nMethodId ),nNr1,CountWinByRT( pControl, WINDOW_FIXEDTEXT, sal_True ) );
}
break;
default:
- return FALSE;
+ return sal_False;
}
SendProfile( UIdString( aUId ).Append('.').Append( MethodString( nMethodId ) ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL StatementControl::HandleCommonMethods( Window *pControl )
+sal_Bool StatementControl::HandleCommonMethods( Window *pControl )
{
- switch( nMethodId ) // Diese können an jedem Window ausgeführt werden
+ switch( nMethodId ) // Diese k�nnen an jedem Window ausgef�hrt werden
{
- case M_Exists: // Oben schon Behandelt. Unterdrückt hier nur Fehler
+ case M_Exists: // Oben schon Behandelt. Unterdr�ckt hier nur Fehler
case M_NotExists:
case M_IsEnabled:
case M_IsVisible:
@@ -3902,14 +3838,14 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
if( !(nParams & PARAM_USHORT_1) ) // Anzahl wiederholungen
nNr1 = 1;
if( !(nParams & PARAM_BOOL_1) ) // Follow Focus
- bBool1 = FALSE; // so bleibt das bisherige Verhalten
+ bBool1 = sal_False; // so bleibt das bisherige Verhalten
if ( !bBool1 ) // Altes Verhalten
pControl->GrabFocus();
else // If focus is not inside given control we grab it once.
{
Window *pFocus = GetpApp()->GetFocusWindow();
- if ( !pFocus || !pControl->IsWindowOrChild( pFocus, TRUE ) )
+ if ( !pFocus || !pControl->IsWindowOrChild( pFocus, sal_True ) )
pControl->GrabFocus();
}
@@ -3918,7 +3854,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
if ( pControl->GetType() == WINDOW_COMBOBOX )
{ // Bei COMBOBOX an das Edit direkt liefern
Window *pTemp = NULL;
- for ( USHORT i = 0 ; i < pControl->GetChildCount() && !pTemp ; i++ )
+ for ( sal_uInt16 i = 0 ; i < pControl->GetChildCount() && !pTemp ; i++ )
if ( pControl->GetChild( i )->GetType() == WINDOW_EDIT )
pTemp = pControl->GetChild( i );
if ( pTemp )
@@ -3932,22 +3868,22 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
if ( StatementList::bUsePostEvents )
{ // grab focus every time
Window *pFocus = GetpApp()->GetFocusWindow();
- if ( !pFocus || !pControl->IsWindowOrChild( pFocus, TRUE ) )
+ if ( !pFocus || !pControl->IsWindowOrChild( pFocus, sal_True ) )
pControl->GrabFocus();
}
if ( bBool1 ) // Jedesmal das FocusWindow finden
{
Window *pFocus = GetpApp()->GetFocusWindow();
- if ( pFocus && pControl->IsWindowOrChild( pFocus, TRUE ) )
+ if ( pFocus && pControl->IsWindowOrChild( pFocus, sal_True ) )
pDeliverHere = pFocus;
else // sonst fallback auf das Basisfenster
pDeliverHere = pControl;
}
pDeliverHere = pDeliverHere->GetPreferredKeyInputWindow();
KeyEvent aEvent;
- if ( ((USHORT)aString1.GetChar(i)) <= 7 )
+ if ( ((sal_uInt16)aString1.GetChar(i)) <= 7 )
{
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch (aString1.GetChar(i))
{
case 1: nVal = aString1.GetChar(i+1) + (aString1.GetChar(i+2) << 8);
@@ -3964,8 +3900,8 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
}
// #105672#
// find out the keycode
- USHORT nKeygroup = nVal & KEYGROUP_TYPE;
- USHORT nKeyCode = nVal & KEY_CODE;
+ sal_uInt16 nKeygroup = nVal & KEYGROUP_TYPE;
+ sal_uInt16 nKeyCode = nVal & KEY_CODE;
sal_Unicode aCh;
switch (nKeygroup)
{
@@ -4010,7 +3946,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
else if ( aCh >= '0' && aCh <= '9' )
aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_NUM + aCh-'0', 0));
else if ( aPrintableMisc.Search(aCh) != STRING_NOTFOUND )
- aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_MISC + (USHORT)aPrintableMisc.Search(aCh), 0));
+ aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_MISC + (sal_uInt16)aPrintableMisc.Search(aCh), 0));
else // Sollte eigentlich nicht auftreten
aEvent = KeyEvent(aCh, KeyCode());
}
@@ -4024,7 +3960,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
break;
#define CalcMouseButton\
- USHORT nButton = MOUSE_LEFT;\
+ sal_uInt16 nButton = MOUSE_LEFT;\
if ( (nParams & PARAM_USHORT_3) )\
{\
switch ( nNr3 )\
@@ -4121,10 +4057,10 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
Edit *pMyEd = new Edit(pDlg,WB_CENTER | WB_BORDER );
pMyEd->SetSizePixel(Size(100,30));
- pDlg->SetText(UniString("Schließen", RTL_TEXTENCODING_ISO_8859_1));
+ pDlg->SetText(UniString("Schlie�en", RTL_TEXTENCODING_ISO_8859_1));
pDlg->Show();
pMyEd->Show();
- ULONG nTime = Time().GetTime();
+ sal_uLong nTime = Time().GetTime();
while (pDlg->IsVisible())
{
@@ -4146,9 +4082,9 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
break;
case M_OpenContextMenu:
{
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
Point aPos;
ToolBox* pTB = (ToolBox*)pControl;
@@ -4158,7 +4094,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
}
else
{
- BOOL bAtMousePos = ( nParams & PARAM_BOOL_1 ) && bBool1;
+ sal_Bool bAtMousePos = ( nParams & PARAM_BOOL_1 ) && bBool1;
if ( bAtMousePos )
{
aPos = pControl->GetPointerPosPixel();
@@ -4177,9 +4113,9 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
break;
case M_UseMenu:
{
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
while ( pControl && !( ( pControl->GetType() == WINDOW_SYSWINDOW || pControl->GetType() == WINDOW_WORKWINDOW ) && ControlOK( pControl, "" ) ) )
@@ -4232,7 +4168,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
break;
}
- pControl = pTemp; // So daß wir unten ohne Fehler durchkommen
+ pControl = pTemp; // So da� wir unten ohne Fehler durchkommen
SplitWindow *pSW = (SplitWindow*) pTemp;
switch( nMethodId )
@@ -4276,7 +4212,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
StatusBar *pStatus = NULL;
while ( !pStatus && pControl )
{
- pStatus = (StatusBar*)GetWinByRT( pControl, WINDOW_STATUSBAR, TRUE );
+ pStatus = (StatusBar*)GetWinByRT( pControl, WINDOW_STATUSBAR, sal_True );
pControl = pControl->GET_REAL_PARENT();
}
@@ -4353,10 +4289,10 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
ScrollBar *pScroll = NULL;
- USHORT nSteps = 2;
+ sal_uInt16 nSteps = 2;
while ( !pScroll && pControl && nSteps-- )
{
- pScroll = GetScrollBar( pControl, nNr1, TRUE );
+ pScroll = GetScrollBar( pControl, nNr1, sal_True );
pControl = pControl->GET_REAL_PARENT();
}
@@ -4365,9 +4301,9 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
case M_HasScrollBar:
{
if ( pScroll )
- pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)TRUE );
+ pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_True );
else
- pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)FALSE );
+ pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_False );
}
break;
case M_IsScrollBarEnabled:
@@ -4384,47 +4320,47 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
}
break;
default:
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL StatementControl::Execute()
+sal_Bool StatementControl::Execute()
{
Window *pControl;
- BOOL bStatementDone = TRUE;
+ sal_Bool bStatementDone = sal_True;
if ( IsError )
{
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Skipping Window: " );
- m_pDbgWin->AddText( aUId.GetText() );
+ m_pDbgWin->AddText( Id2Str( aUId ) );
m_pDbgWin->AddText( " Method: " );
m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
#endif
Advance();
delete this;
- return TRUE;
+ return sal_True;
}
InitProfile();
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Executing Window: " );
- m_pDbgWin->AddText( aUId.GetText() );
+ m_pDbgWin->AddText( Id2Str( aUId ) );
m_pDbgWin->AddText( " Method: " );
m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
#endif
- if ( aUId.Matches( UID_ACTIVE ) )
+ if ( aUId.equals( UID_ACTIVE ) )
pControl = GetAnyActive();
else
{
- BOOL bSearchButtonOnToolbox = (nParams == PARAM_NONE) && ((M_Click == nMethodId) || (M_TearOff == nMethodId) || (M_IsEnabled == nMethodId) || (M_OpenMenu == nMethodId));
+ sal_Bool bSearchButtonOnToolbox = (nParams == PARAM_NONE) && ((M_Click == nMethodId) || (M_TearOff == nMethodId) || (M_IsEnabled == nMethodId) || (M_OpenMenu == nMethodId));
bSearchButtonOnToolbox |= (nParams == PARAM_USHORT_1) && (M_GetState == nMethodId);
if ( nMethodId == M_TypeKeys || nMethodId == M_MouseDown
|| nMethodId == M_MouseUp || nMethodId == M_MouseMove
@@ -4441,7 +4377,7 @@ BOOL StatementControl::Execute()
if ( pControl && pControl->GetType() == WINDOW_TOOLBOX )
{
- if ( !aUId.Matches( pControl->GetSmartUniqueOrHelpId() ) )
+ if ( !aUId.equals( pControl->GetUniqueOrHelpId() ) )
{ // Also wenn wir irgendwas auf einer Toolbox gefunden haben
switch ( nMethodId )
{
@@ -4465,13 +4401,13 @@ BOOL StatementControl::Execute()
case M_Exists:
case M_NotExists:
Time aT;
- USHORT aSeconds = aT.GetMin()*60+aT.GetSec();
- if ( !bBool2 ) // wurde im Konstruktor auf FALSE gesetzt
+ sal_uInt16 aSeconds = aT.GetMin()*60+aT.GetSec();
+ if ( !bBool2 ) // wurde im Konstruktor auf sal_False gesetzt
{
- bBool2 = TRUE;
+ bBool2 = sal_True;
nNr2 = aSeconds;
if( !(nParams & PARAM_USHORT_1) )
- nNr1 = 0; // defaultmäßig sofort zurück
+ nNr1 = 0; // defaultm��ig sofort zur�ck
}
if ( aSeconds < nNr2 ) // Falls die Stunde umgesprungen ist
aSeconds += 60*60;
@@ -4480,18 +4416,18 @@ BOOL StatementControl::Execute()
pControl = NULL;
if ( ((nMethodId == M_Exists) && pControl) ||
((nMethodId == M_NotExists) && !pControl) )
- { // Wenn Bedingung erfüllt
- pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)TRUE );
+ { // Wenn Bedingung erf�llt
+ pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_True );
}
else
if ( aSeconds <= nNr2 + nNr1 ) // Zeit ist noch nicht abgelaufen
- return FALSE;
+ return sal_False;
else
- pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)FALSE );
+ pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_False );
Advance();
delete this;
- return TRUE;
+ return sal_True;
}
@@ -4499,7 +4435,7 @@ BOOL StatementControl::Execute()
if( pControl ) // Das Fenster Existiert irgendwo, kann aber auch hidden sein!
{
- nRT = ImpGetRType( pControl, aUId ); // If not Numeric pControl is used
+ nRT = ImpGetRType( pControl );
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Type is: " );
m_pDbgWin->AddText( String::CreateFromInt32( nRT ) );
@@ -4533,7 +4469,7 @@ BOOL StatementControl::Execute()
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( CUniString("Reschedule command (").Append( UniString::CreateFromInt32(nRetryCount) ).AppendAscii(")\n") );
#endif
- return FALSE;
+ return sal_False;
}
if( ControlOK( pControl, "" ) )
@@ -4541,13 +4477,13 @@ BOOL StatementControl::Execute()
if ( nMethodId == M_OpenContextMenu && !bBool2 )
{
pControl->GrabFocus(); // to get asyncron focus on unix
- bBool2 = TRUE;
- return FALSE;
+ bBool2 = sal_True;
+ return sal_False;
}
// 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 // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht
&& nMethodId != M_MouseDown
&& nMethodId != M_MouseUp
&& nMethodId != M_MouseMove )
@@ -4560,12 +4496,12 @@ BOOL StatementControl::Execute()
{
SafeReschedule();
if ( !WinPtrValid( pControl ) )
- return FALSE;
+ return sal_False;
}
if ( !pControl->HasFocus() ) // to get asyncronous focus
{
- bBool2 = TRUE;
- return FALSE;
+ bBool2 = sal_True;
+ return sal_False;
}
}
}
@@ -4576,7 +4512,7 @@ BOOL StatementControl::Execute()
if ( HandleVisibleControls( pControl ) )
{
delete this;
- return TRUE;
+ return sal_True;
}
if( ControlOK( pControl, "Window/Control" ) )
{
@@ -4588,7 +4524,7 @@ BOOL StatementControl::Execute()
|| nRT == C_TreeListBox
)
|| nMethodId == M_OpenContextMenu )
- && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gewünscht
+ && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht
&& nMethodId != M_MouseDown
&& nMethodId != M_MouseUp
&& nMethodId != M_MouseMove )
@@ -4629,38 +4565,40 @@ BOOL StatementControl::Execute()
}
break;
case M_GetPage:
- pRet->GenReturn ( RET_Value, aUId, ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetSmartUniqueOrHelpId().GetText());
+ pRet->GenReturn ( RET_Value, aUId, Id2Str( ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetUniqueOrHelpId() ) );
break;
case M_SetPage :
{ // Wegen lokaler Variablen
TabControl *pTControl = ((TabControl*)pControl);
- USHORT nActive = pTControl->GetCurPageId();
- USHORT i,anz;
- SmartId aID;
- SmartId aWantedID;
+ sal_uInt16 nActive = pTControl->GetCurPageId();
+ sal_uInt16 i,anz;
+ rtl::OString aID;
+ rtl::OString aWantedID;
+ //HELPID BACKWARD (No numbers please (remove PARAM_ULONG_1 part)
if ( (nParams & PARAM_ULONG_1) )
{
- aWantedID = SmartId( nLNr1 );
+ //aWantedID = rtl::OString( nLNr1 );
+ ReportError( aUId, GEN_RES_STR1c( S_INTERNAL_ERROR, "using numeric HelpID from old Testtool" ) );
}
else if ( (nParams & PARAM_STR_1) )
{
- aWantedID = SmartId( aString1 );
+ aWantedID = Str2Id( aString1 );
}
else
ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
i = pTControl->GetPagePos( pTControl->GetCurPageId() );
- for ( anz=0 ; anz < pTControl->GetPageCount() && !aID.Matches( aWantedID ) ; anz++ )
+ for ( anz=0 ; anz < pTControl->GetPageCount() && !aID.equals( aWantedID ) ; anz++ )
{
pTControl->SelectTabPage( pTControl->GetPageId(i) );
- aID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetSmartUniqueOrHelpId();
+ aID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetUniqueOrHelpId();
i++;
if ( i >= pTControl->GetPageCount() )
i = 0;
if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) ) // 3 Mal aufrufen
break;
}
- if ( !aID.Matches( aWantedID ) )
+ if ( !aID.equals( aWantedID ) )
{
pTControl->SelectTabPage( nActive );
ReportError( aWantedID, GEN_RES_STR1( S_TABPAGE_NOT_FOUND, MethodString( nMethodId ) ) );
@@ -4822,21 +4760,21 @@ BOOL StatementControl::Execute()
case M_Select:
case M_MultiSelect:
{
- BOOL bUnselectBeforeSelect = ( nMethodId == M_Select );
- BOOL bFehler = FALSE;
+ sal_Bool bUnselectBeforeSelect = ( nMethodId == M_Select );
+ sal_Bool bFehler = sal_False;
if ( ! (nParams & PARAM_BOOL_1) )
- bBool1 = TRUE;
+ bBool1 = sal_True;
if ( nMethodId == M_MultiSelect && nRT == C_ListBox )
{
ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "ListBox" ) );
- bFehler = TRUE;
+ bFehler = sal_True;
}
if ( !bBool1 && nMethodId == M_Select )
{
ReportError( aUId, GEN_RES_STR1( S_NO_SELECT_FALSE, MethodString( nMethodId ) ) );
- bFehler = TRUE;
+ bFehler = sal_True;
}
if ( !bFehler )
@@ -4844,7 +4782,7 @@ BOOL StatementControl::Execute()
if( nParams & PARAM_STR_1 )
{
ListBox *pLB = ((ListBox*)pControl);
- USHORT nPos;
+ sal_uInt16 nPos;
if ( (nPos = pLB->GetEntryPos( aString1 )) == LISTBOX_ENTRY_NOTFOUND )
ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) );
else
@@ -4899,7 +4837,7 @@ BOOL StatementControl::Execute()
break;
case M_GetSelIndex :
{
- USHORT nPos = ((ComboBox*)pControl)->GetEntryPos(((ComboBox*)pControl)->GetText());
+ sal_uInt16 nPos = ((ComboBox*)pControl)->GetEntryPos(((ComboBox*)pControl)->GetText());
if ( nPos == COMBOBOX_ENTRY_NOTFOUND )
nPos = 0;
else
@@ -4984,10 +4922,10 @@ BOOL StatementControl::Execute()
((MoreButton*)pControl)->Click();
break;
case M_Open :
- ((MoreButton*)pControl)->SetState(TRUE);
+ ((MoreButton*)pControl)->SetState(sal_True);
break;
case M_Close :
- ((MoreButton*)pControl)->SetState(FALSE);
+ ((MoreButton*)pControl)->SetState(sal_False);
break;
default:
ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "MoreButton" ) );
@@ -5085,16 +5023,16 @@ BOOL StatementControl::Execute()
aMEvnt = MouseEvent( aPt,1,MOUSE_SIMPLECLICK,MOUSE_LEFT );
ImplMouseButtonDown( pControl, aMEvnt, FORCE_DIRECT_CALL );
- ULONG nStart = Time::GetSystemTicks();
- ULONG nDelay = pControl->GetSettings().GetMouseSettings().GetActionDelay();
+ sal_uLong nStart = Time::GetSystemTicks();
+ sal_uLong nDelay = pControl->GetSettings().GetMouseSettings().GetActionDelay();
while ( ( Time::GetSystemTicks() - nStart ) < nDelay + 100 )
SafeReschedule();
ImplMouseButtonUp ( pControl, aMEvnt, FORCE_DIRECT_CALL );
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
break;
@@ -5106,38 +5044,29 @@ BOOL StatementControl::Execute()
case C_ToolBox:
{
ToolBox *pTB = ((ToolBox*)pControl);
- if ( !aUId.Matches( pTB->GetSmartUniqueOrHelpId() ) ) // Also Button auf der ToolBox gefunden
+ if ( !aUId.equals( pTB->GetUniqueOrHelpId() ) ) // So we found a Button on the ToolBox
{
if ( (nParams == PARAM_NONE) || (nParams == PARAM_USHORT_1) )
- { // Wir fälschen einen Parameter
- if ( aUId.HasNumeric() )
- {
- nParams |= PARAM_ULONG_1;
- nLNr1 = USHORT( aUId.GetNum() );
- DBG_ASSERT( nLNr1 <= 0xFFFF, "ID on ToolBox > 0xFFFF" );
- }
- else
- {
- nParams |= PARAM_STR_1;
- aString1 = aUId.GetStr();
- }
+ { // Wir f�lschen einen Parameter
+ nParams |= PARAM_STR_1;
+ aString1 = Id2Str( aUId );
}
else
ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
}
#define FIND_ITEM\
- USHORT nItemPos = 0;\
- BOOL bItemFound = FALSE;\
+ sal_uInt16 nItemPos = 0;\
+ sal_Bool bItemFound = sal_False;\
{\
- SmartId aButtonId;\
+ rtl::OString aButtonId;\
if( nParams & PARAM_STR_1 )\
- aButtonId = SmartId( aString1 );\
- if( nParams & PARAM_ULONG_1 )\
- aButtonId = SmartId( nLNr1 );\
- for ( nItemPos = 0; nItemPos < pTB->GetItemCount() && !aButtonId.Matches(pTB->GetItemCommand(pTB->GetItemId(nItemPos))) &&\
- !aButtonId.Matches(pTB->GetHelpId(pTB->GetItemId(nItemPos))) ; nItemPos++ ) {}\
- bItemFound = aButtonId.Matches(pTB->GetItemCommand(pTB->GetItemId(nItemPos))) || aButtonId.Matches(pTB->GetHelpId(pTB->GetItemId(nItemPos)));\
+ aButtonId = Str2Id( aString1 );\
+ else\
+ ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );\
+ for ( nItemPos = 0; nItemPos < pTB->GetItemCount() && !aButtonId.equals(Str2Id( pTB->GetItemCommand(pTB->GetItemId(nItemPos)) )) &&\
+ !aButtonId.equals(pTB->GetHelpId(pTB->GetItemId(nItemPos))) ; nItemPos++ ) {}\
+ bItemFound = aButtonId.equals(Str2Id( pTB->GetItemCommand(pTB->GetItemId(nItemPos)) )) || aButtonId.equals(pTB->GetHelpId(pTB->GetItemId(nItemPos)));\
if ( !bItemFound )\
ReportError( aUId, GEN_RES_STR1( S_HELPID_ON_TOOLBOX_NOT_FOUND, MethodString( nMethodId ) ) );\
else\
@@ -5145,12 +5074,12 @@ BOOL StatementControl::Execute()
if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled && nMethodId != M_GetState )\
{\
ReportError( aUId, GEN_RES_STR1( S_BUTTON_DISABLED_ON_TOOLBOX, MethodString( nMethodId ) ) );\
- bItemFound = FALSE;\
+ bItemFound = sal_False;\
}\
else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) && nMethodId != M_GetState )\
{\
ReportError( aUId, GEN_RES_STR1( S_BUTTON_HIDDEN_ON_TOOLBOX, MethodString( nMethodId ) ) );\
- bItemFound = FALSE;\
+ bItemFound = sal_False;\
}\
else\
{\
@@ -5161,10 +5090,10 @@ BOOL StatementControl::Execute()
{ /* Try the multi line way */\
if ( pTB->GetItemRect(pTB->GetItemId(nItemPos)).IsEmpty() )\
{\
- USHORT nLine = pTB->GetCurLine();\
+ sal_uInt16 nLine = pTB->GetCurLine();\
do\
{\
- pTB->ShowLine( FALSE );\
+ pTB->ShowLine( sal_False );\
for ( int i = 1 ; i < 30 ; i++ )\
SafeReschedule();\
}\
@@ -5174,12 +5103,12 @@ BOOL StatementControl::Execute()
if ( pTB->GetItemRect(pTB->GetItemId(nItemPos)).IsEmpty() )\
{\
ReportError( aUId, GEN_RES_STR1( S_CANNOT_MAKE_BUTTON_VISIBLE_IN_TOOLBOX, MethodString( nMethodId ) ) );\
- bItemFound = FALSE;\
+ bItemFound = sal_False;\
}\
}\
}\
}\
- }\
+ }
switch( nMethodId )
{
@@ -5196,9 +5125,9 @@ BOOL StatementControl::Execute()
{
pTB->ExecuteCustomMenu();
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
new StatementCommand( this, RC_MenuSelect, PARAM_USHORT_1, pTB->GetItemId(nItemPos) + TOOLBOX_MENUITEM_START );
@@ -5226,13 +5155,13 @@ BOOL StatementControl::Execute()
Window *pWin = NULL;
// Wait for the window to open.
- StatementList::bExecuting = TRUE; // Bah ist das ein ekliger Hack
- { // Das verhindert, daß schon der nächste Befehl ausgeführt wird.
+ StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack
+ { // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird.
Time aDelay;
while ( !pWin && ( (pWin = GetPopupFloatingWin()) == NULL ) && ( Time() - aDelay ).GetSec() < 15 )
SafeReschedule();
}
- StatementList::bExecuting = FALSE; // Bah ist das ein ekliger Hack
+ StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack
if ( pWin && pWin->GetType() == WINDOW_FLOATINGWINDOW )
{
@@ -5261,9 +5190,9 @@ BOOL StatementControl::Execute()
ImplMouseButtonUp( pTB, aMEvnt);
// Das Fenster ist offen.
- aSubMenuId1 = SmartId();
- aSubMenuId2 = SmartId();
- aSubMenuId3 = SmartId();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
}
@@ -5282,24 +5211,26 @@ BOOL StatementControl::Execute()
FIND_ITEM;
if ( bItemFound ) // FIND_ITEM Erfolgreich
{
- switch (nNr1)
- {
- case 0:
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetHelpId(pTB->GetItemId(nItemPos)));
- break;
- case 1:
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemType(nItemPos));
- break;
- case 2:
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemState(pTB->GetItemId(nItemPos)));
- break;
- case 3:
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemId(nItemPos));
- break;
- default:
- pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0));
- break;
- }
+ if ( ValueOK( aUId, CUniString("GetState"), nNr1, 4 ) )
+ switch (nNr1)
+ {
+ case 0:
+ pRet->GenReturn ( RET_Value, aUId, Id2Str( pTB->GetHelpId(pTB->GetItemId(nItemPos)) ) );
+ break;
+ case 1:
+ pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemType(nItemPos));
+ break;
+ case 2:
+ pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemState(pTB->GetItemId(nItemPos)));
+ break;
+ case 3:
+ pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemId(nItemPos));
+ break;
+ default:
+ ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
+ pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0));
+ break;
+ }
}
}
break;
@@ -5365,9 +5296,9 @@ BOOL StatementControl::Execute()
if ( pThisEntry )
{
SvLBoxString* pItem = NULL;
- USHORT nValidTextItemCount = 0;
+ sal_uInt16 nValidTextItemCount = 0;
{
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
SvLBoxItem *pMyItem;
while ( ( nValidTextItemCount < nNr1 ) && nIndex < pThisEntry->ItemCount() )
{
@@ -5405,7 +5336,7 @@ BOOL StatementControl::Execute()
break;
case M_Select :
if ( ! (nParams & PARAM_BOOL_1) )
- bBool1 = TRUE;
+ bBool1 = sal_True;
if( nParams & PARAM_STR_1 )
{
ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) );
@@ -5608,7 +5539,7 @@ BOOL StatementControl::Execute()
break;
case C_Control:
{
- USHORT nRealControlType = 0;
+ sal_uInt16 nRealControlType = 0;
if ( dynamic_cast< EditBrowseBox* >(pControl) )
nRealControlType = CONST_CTBrowseBox;
else if ( dynamic_cast< ValueSet* >(pControl) )
@@ -5642,9 +5573,9 @@ BOOL StatementControl::Execute()
break;
case M_GetColumnCount :
{
- USHORT nColCount = pEBBox->GetColumnCount();
+ sal_uInt16 nColCount = pEBBox->GetColumnCount();
comm_USHORT nUnfrozenColCount = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i=0 ; i < nColCount ; i++ )
{
if ( !pEBBox->IsFrozen( pEBBox->GetColumnId( i ) ) )
@@ -5669,9 +5600,9 @@ BOOL StatementControl::Execute()
{
if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,pEBBox->GetRowCount() ) )
{
- USHORT nColCount = pEBBox->GetColumnCount();
+ sal_uInt16 nColCount = pEBBox->GetColumnCount();
comm_USHORT nUnfrozenColCount = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i=0 ; i < nColCount ; i++ )
{
if ( !pEBBox->IsFrozen( pEBBox->GetColumnId( i ) ) )
@@ -5805,13 +5736,13 @@ BOOL StatementControl::Execute()
else if ( (nParams & PARAM_STR_1) )
{
pELB->select( aString1 );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if ( pELB->getSelIndex() == EXTENSION_LISTBOX_ENTRY_NOTFOUND )
- bSuccess = FALSE;
+ bSuccess = sal_False;
else
{
if ( !aString1.Equals( String( pELB->getItemName( pELB->getSelIndex() ) ) ) )
- bSuccess = FALSE;
+ bSuccess = sal_False;
}
if ( !bSuccess )
ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) );
@@ -5847,7 +5778,8 @@ BOOL StatementControl::Execute()
ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() ))
{
::svt::table::PTableModel pModel = pTC->GetModel();
- Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1];
+ Any aCell;
+ pModel->getCellContent( nNr1-1, nNr2-1, aCell );
pRet->GenReturn ( RET_Value, aUId, String( aCell.getValueTypeName() ));
}
}
@@ -5858,7 +5790,8 @@ BOOL StatementControl::Execute()
ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() ))
{
::svt::table::PTableModel pModel = pTC->GetModel();
- Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1];
+ Any aCell;
+ pModel->getCellContent( nNr1-1, nNr2-1, aCell );
Type aType = aCell.getValueType();
TypeClass eTypeClass = aType.getTypeClass();
@@ -5926,7 +5859,7 @@ BOOL StatementControl::Execute()
Point aPos( aSize.Width() / 2, aSize.Height() / 2 );
long nStep = aSize.Height() / 4;
::svt::table::RowPos nLastPos;
- while ( ( nLastPos = pTC->GetCurrentRow( aPos ) ) != nNr1-1 && nStep > 0 )
+ while ( ( nLastPos = pTC->getTableControlInterface().hitTest( aPos ).nRow ) != nNr1-1 && nStep > 0 )
{
if ( nLastPos > nNr1-1 || nLastPos == ROW_INVALID )
aPos.Y() -= nStep;
@@ -5934,7 +5867,7 @@ BOOL StatementControl::Execute()
aPos.Y() += nStep;
nStep /= 2;
}
- if ( pTC->GetCurrentRow( aPos ) == nNr1-1 )
+ if ( pTC->getTableControlInterface().hitTest( aPos ).nRow == nNr1-1 )
{
MouseEvent aMEvnt(aPos,1,MOUSE_SIMPLECLICK|MOUSE_SELECT,MOUSE_LEFT,KEY_MOD1);
pTC->getSelEngine()->SelMouseButtonDown( aMEvnt );
@@ -5951,13 +5884,13 @@ BOOL StatementControl::Execute()
}
break;
case M_GetSelCount :
- pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRows().size() ));
+ pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowCount() ));
break;
case M_GetSelIndex :
if ( ! (nParams & PARAM_USHORT_1) )
nNr1 = 1;
- if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRows().size() ) )
- pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRows()[nNr1-1] +1 ) );
+ if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRowCount() ) )
+ pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowIndex( nNr1-1 ) +1 ) );
break;
default:
ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "TableControl" ) );
@@ -5997,13 +5930,13 @@ BOOL StatementControl::Execute()
break;
case M_Dock :
if ( ((DockingWindow*)pControl)->IsFloatingMode() )
- ((DockingWindow*)pControl)->SetFloatingMode(FALSE);
+ ((DockingWindow*)pControl)->SetFloatingMode(sal_False);
else
ReportError( aUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) );
break;
case M_Undock :
if ( !((DockingWindow*)pControl)->IsFloatingMode() )
- ((DockingWindow*)pControl)->SetFloatingMode(TRUE);
+ ((DockingWindow*)pControl)->SetFloatingMode(sal_True);
else
ReportError( aUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) );
break;
@@ -6011,7 +5944,7 @@ BOOL StatementControl::Execute()
pRet->GenReturn ( RET_Value, aUId, (comm_BOOL) !((DockingWindow*)pControl)->IsFloatingMode());
break;
case M_Close:
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((DockingWindow*)pControl)->Close();
break;
@@ -6087,7 +6020,7 @@ BOOL StatementControl::Execute()
break;
}
case M_Close:
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((FloatingWindow*)pControl)->Close();
break;
@@ -6110,7 +6043,7 @@ BOOL StatementControl::Execute()
AnimateMouse( pControl, MitteOben);
break;
case M_Close:
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((SystemWindow*)pControl)->Close();
break;
@@ -6119,7 +6052,7 @@ BOOL StatementControl::Execute()
Window *pChild = GetWinByRT( pControl, WINDOW_OKBUTTON );
if( ControlOK( pChild, "OK Button" ) )
{
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((Button*)pChild)->Click();
}
@@ -6130,7 +6063,7 @@ BOOL StatementControl::Execute()
Window *pChild = GetWinByRT( pControl, WINDOW_CANCELBUTTON );
if( ControlOK( pChild, "Cancel Button" ) )
{
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((Button*)pChild)->Click();
}
@@ -6167,7 +6100,7 @@ BOOL StatementControl::Execute()
AnimateMouse( pControl, MitteOben);
break;
case M_Close:
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((WorkWindow*)pControl)->Close();
break;
@@ -6184,14 +6117,14 @@ BOOL StatementControl::Execute()
pRet->GenReturn ( RET_Value, aUId, comm_BOOL (!((WorkWindow*)pControl)->IsMaximized() && !((WorkWindow*)pControl)->IsMinimized()) );
break;
case M_Minimize :
- ((WorkWindow*)pControl)->Maximize( FALSE );
+ ((WorkWindow*)pControl)->Maximize( sal_False );
((WorkWindow*)pControl)->Minimize();
break;
case M_Maximize :
((WorkWindow*)pControl)->Maximize();
break;
case M_Restore :
- ((WorkWindow*)pControl)->Maximize( FALSE );
+ ((WorkWindow*)pControl)->Maximize( sal_False );
((WorkWindow*)pControl)->Restore();
break;
case M_Help: // Alles was unten weiterbehandelt werden soll
@@ -6210,7 +6143,7 @@ BOOL StatementControl::Execute()
case C_ErrorBox:
case C_QueryBox:
{
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
MessBox* pMB = (MessBox*)pControl;
switch( nMethodId )
{
@@ -6221,17 +6154,17 @@ BOOL StatementControl::Execute()
pRet->GenReturn ( RET_Value, aUId, comm_BOOL( pMB->GetCheckBoxState() == STATE_CHECK) );
break;
case M_Check :
- pMB->SetCheckBoxState( TRUE );
+ pMB->SetCheckBoxState( sal_True );
break;
case M_UnCheck :
- pMB->SetCheckBoxState( FALSE );
+ pMB->SetCheckBoxState( sal_False );
break;
case M_GetText :
pRet->GenReturn ( RET_Value, aUId, pMB->GetMessText());
break;
default:
- bDone = FALSE;
+ bDone = sal_False;
break;
}
if ( bDone )
@@ -6253,9 +6186,6 @@ BOOL StatementControl::Execute()
AnimateMouse( pControl, Mitte);
break;
case M_OK:
-#if ( BUTTONID_OK != RET_OK )
-#error BUTTONID_OK != RET_OK
-#endif
if ( pBD->GetPushButton( BUTTONID_OK ) )
{
SET_WINP_CLOSING(pControl);
@@ -6405,7 +6335,7 @@ BOOL StatementControl::Execute()
}
else
{
- bStatementDone=TRUE;
+ bStatementDone=sal_True;
}
}
return bStatementDone;
diff --git a/automation/source/server/statemnt.hxx b/automation/source/server/statemnt.hxx
index 63385b804ed4..d7f63a39cd91 100644
--- a/automation/source/server/statemnt.hxx
+++ b/automation/source/server/statemnt.hxx
@@ -35,7 +35,7 @@
#ifndef _STATEMNT_HXX
#define _STATEMNT_HXX
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <tools/string.hxx>
#include <tools/debug.hxx>
#include <tools/time.hxx>
@@ -46,7 +46,6 @@
#include <basic/sbstar.hxx>
#include <vcl/event.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <vcl/smartid.hxx>
#include <automation/commtypes.hxx>
class Window;
@@ -85,9 +84,9 @@ extern "C"
#define GET_REAL_PARENT() GetWindow( WINDOW_REALPARENT )
// switch behaviour of ImplMouse* and ImplKeyInput
-#define FORCE_DIRECT_CALL TRUE
+#define FORCE_DIRECT_CALL sal_True
-typedef USHORT SearchFlags;
+typedef sal_uInt16 SearchFlags;
#define SEARCH_NOOVERLAP ((SearchFlags) 0x0001)
#define SEARCH_NO_TOPLEVEL_WIN ((SearchFlags) 0x0002)
#define SEARCH_FOCUS_FIRST ((SearchFlags) 0x0004)
@@ -100,15 +99,15 @@ public:
Search( SearchFlags nSearchFlags = 0): nmSearchFlags(nSearchFlags) {}
virtual ~Search() {}
- virtual BOOL IsWinOK( Window *pWin ) = 0;
+ virtual sal_Bool IsWinOK( Window *pWin ) = 0;
SearchFlags GetSearchFlags() { return nmSearchFlags; }
void AddSearchFlags( SearchFlags aNewFlags ) { nmSearchFlags |= aNewFlags; }
void RemoveSearchFlags( SearchFlags aRemoveFlags ) { nmSearchFlags &= ( ~aRemoveFlags ); }
- BOOL HasSearchFlag( SearchFlags aQueryFlag ) { return (nmSearchFlags & aQueryFlag) == aQueryFlag; }
+ sal_Bool HasSearchFlag( SearchFlags aQueryFlag ) { return (nmSearchFlags & aQueryFlag) == aQueryFlag; }
};
-BOOL IsDialog(Window *pWin); // Ist *pWin von SystemWindow abgeleitet (Kann es Active sein)
-BOOL IsAccessable(Window *pWin); // Ist *pWin Zugreifbar (über IsEnabled und Parents geprüft)
+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)
class SafePointer
@@ -136,7 +135,7 @@ struct TTSettings
// Translate
TranslateWin *pTranslateWin;
- BOOL bToTop;
+ sal_Bool bToTop;
};
@@ -152,37 +151,37 @@ private:
protected:
StatementList();
- USHORT nRetryCount;
+ sal_uInt16 nRetryCount;
void QueStatement(StatementList *pAfterThis);
- BOOL bStatementInQue;
- static USHORT nUseBindings;
+ sal_Bool bStatementInQue;
+ static sal_uInt16 nUseBindings;
static TTProfiler *pProfiler;
void InitProfile();
void SendProfile( String aText );
static StatementList *pCurrentProfileStatement;
- static BOOL bIsInReschedule;
- static USHORT nModalCount;
- static Window *pLastFocusWindow; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen
- static BOOL bWasDragManager; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen
- static BOOL bWasPopupMenu; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen
- static BOOL bBasicWasRunning;
+ 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 sal_Bool bBasicWasRunning;
- static USHORT nMinTypeKeysDelay; /// Verzögerung der einzelnen Anschläge für TypeKeys
- static USHORT nMaxTypeKeysDelay;
- static BOOL bDoTypeKeysDelay;
+ static sal_uInt16 nMinTypeKeysDelay; /// Verz�gerung der einzelnen Anschl�ge f�r TypeKeys
+ static sal_uInt16 nMaxTypeKeysDelay;
+ static sal_Bool bDoTypeKeysDelay;
static Window* pFirstDocFrame;
- static BOOL bIsSlotInExecute;
+ static sal_Bool bIsSlotInExecute;
public:
- static BOOL IsInReschedule() { return bIsInReschedule; }
- void SafeReschedule( BOOL bYield = FALSE ) // Setzt Flag, so daß nicht schon der nächste Befehl ausgeführt wird
+ 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
{
nModalCount = Application::GetModalModeCount();
- bIsInReschedule = TRUE;
+ bIsInReschedule = sal_True;
pLastFocusWindow = GetpApp()->GetFocusWindow();
bWasDragManager = false /*!= DragManager::GetDragManager()*/;
bWasPopupMenu = NULL != PopupMenu::GetActivePopupMenu();
@@ -193,29 +192,29 @@ public:
else
GetpApp()->Reschedule();
bExecuting = bWasExecuting;
- bBasicWasRunning = FALSE;
- bWasPopupMenu = FALSE;
- bWasDragManager = FALSE;
+ bBasicWasRunning = sal_False;
+ bWasPopupMenu = sal_False;
+ bWasDragManager = sal_False;
pLastFocusWindow = NULL;
- bIsInReschedule = FALSE;
+ bIsInReschedule = sal_False;
nModalCount = 0;
}
- static BOOL MaybeResetSafeReschedule()
- { // Implementierung muß hier zwar nicht sein, ist aber übersichtlicher so
+ static sal_Bool MaybeResetSafeReschedule()
+ { // Implementierung mu� hier zwar nicht sein, ist aber �bersichtlicher so
if ( !bIsInReschedule )
- return FALSE;
+ return sal_False;
if ( pLastFocusWindow != GetpApp()->GetFocusWindow()
|| ( Application::GetModalModeCount() > nModalCount )
|| ( PopupMenu::GetActivePopupMenu() && !bWasPopupMenu )
|| ( StarBASIC::IsRunning() && !bBasicWasRunning ) )
{
- bIsInReschedule = FALSE;
+ bIsInReschedule = sal_False;
pLastFocusWindow = NULL;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
static void NormalReschedule() // Setzt das flag nicht
{
@@ -224,82 +223,82 @@ public:
#define Reschedule RescheduleNichtBenutzen_StattdessenSafeRescheduleAnStatementList
static Window* GetMouseWin();
- static BOOL WinPtrValid(Window *pTest);
- static Window* SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeBase = TRUE );
+ static sal_Bool WinPtrValid(Window *pTest);
+ static Window* SearchAllWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase = sal_True );
protected:
- static Window* SearchClientWin( Window *pBase, Search &aSearch, BOOL MaybeBase = TRUE );
-
- Window* SearchTree( SmartId aUId, BOOL bSearchButtonOnToolbox = FALSE );
- Window* GetActive( WindowType nRT, BOOL MaybeBase = TRUE );
- Window* GetFocus( WindowType nRT, BOOL MaybeBase = TRUE );
- Window* GetAnyActive( BOOL MaybeBase = TRUE );
- ScrollBar* GetScrollBar( Window *pBase, USHORT nDirection, BOOL MaybeBase = TRUE );
- Window* GetPopupFloatingWin( BOOL MaybeBase = TRUE );
+ static Window* SearchClientWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase = sal_True );
+
+ Window* SearchTree( rtl::OString aUId, sal_Bool bSearchButtonOnToolbox = sal_False );
+ Window* GetActive( WindowType nRT, sal_Bool MaybeBase = sal_True );
+ Window* GetFocus( WindowType nRT, sal_Bool MaybeBase = sal_True );
+ Window* GetAnyActive( sal_Bool MaybeBase = sal_True );
+ ScrollBar* GetScrollBar( Window *pBase, sal_uInt16 nDirection, sal_Bool MaybeBase = sal_True );
+ Window* GetPopupFloatingWin( sal_Bool MaybeBase = sal_True );
Menu* GetMatchingMenu( Window* pWin, Menu* pBaseMenu = NULL );
- Window* GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase = TRUE, USHORT nSkip = 0, BOOL bSearchAll = FALSE );
- USHORT CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase = TRUE );
- Window* GetDocWin( USHORT nNr );
- USHORT GetDocWinCount();
- Window* GetFadeSplitWin( Window *pBase, WindowAlign nAlign, BOOL MaybeBase = TRUE );
- BOOL ValueOK(SmartId nId, String aBezeichnung, ULONG nValue, ULONG nMax);
+ Window* GetWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase = sal_True, sal_uInt16 nSkip = 0, sal_Bool bSearchAll = sal_False );
+ sal_uInt16 CountWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase = sal_True );
+ Window* GetDocWin( sal_uInt16 nNr );
+ sal_uInt16 GetDocWinCount();
+ Window* GetFadeSplitWin( Window *pBase, WindowAlign nAlign, sal_Bool MaybeBase = sal_True );
+ sal_Bool ValueOK(rtl::OString nId, String aBezeichnung, sal_uLong nValue, sal_uLong nMax);
- USHORT GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu );
+ sal_uInt16 GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu );
public:
virtual ~StatementList();
void Advance();
- virtual BOOL Execute() = 0;
+ 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)
-** TRUE bedeutet, dass alles klar gegangen ist
-** FALSE bedeutet nochmal Bitte
+** 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
***************************************************************************/
void ReportError(String aMessage);
- void ReportError(SmartId aUId, String aMessage);
- void ReportError(String aMessage, ULONG nWhatever);
+ void ReportError(rtl::OString aUId, String aMessage);
+ void ReportError(String aMessage, sal_uLong nWhatever);
- static void DirectLog( ULONG nType, String aString );
+ static void DirectLog( sal_uLong nType, String aString );
String Tree(Window *pBase, int Indent);
String ClientTree(Window *pBase, int Indent);
StatementList *pNext;
static StatementList /**pCurrent,*/ *pFirst;
- static BOOL bReadingCommands;
- static SmartId aWindowWaitUId;
+ static sal_Bool bReadingCommands;
+ static rtl::OString aWindowWaitUId;
static Window *pWindowWaitPointer;
- static SmartId aWindowWaitOldHelpId;
- static SmartId aWindowWaitOldUniqueId;
+ static rtl::OString aWindowWaitOldHelpId;
+ static rtl::OString aWindowWaitOldUniqueId;
static RetStream *pRet;
- static BOOL IsError;
- static BOOL bDying;
- static BOOL bExecuting; // Gesetzt, wenn ein Befehl rescheduled ohne einen neuen Befehl zu erlauben
- BOOL bWasExecuting; // Wurde bei einem MaybeResetSafeReschedule resettet, so wird der Zustand danach wiederhergestellt
- static SmartId aSubMenuId1; // Untermenüs bei PopupMenus
- static SmartId aSubMenuId2; // erstmal 2-Stufig
- static SmartId aSubMenuId3; // and now even 3 levels #i31512#
+ 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_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
- BOOL CheckWindowWait(); //True heisst, dass Window noch existiert
+ sal_Bool CheckWindowWait(); //True heisst, dass Window noch existiert
//False -> Window weg;
static void SetFirstDocFrame( Window* pWin );
static Window* GetFirstDocFrame();
- static BOOL IsFirstDocFrame( Window* pWin );
- static BOOL IsDocWin( Window* pWin );
- static BOOL IsIMEWin( Window* pWin ); // Input Window for CJK under Solaris
- static BOOL IsDocFrame( Window* pWin );
+ static sal_Bool IsFirstDocFrame( Window* pWin );
+ static sal_Bool IsDocWin( Window* pWin );
+ static sal_Bool IsIMEWin( Window* pWin ); // Input Window for CJK under Solaris
+ static sal_Bool IsDocFrame( Window* pWin );
static MenuBar* GetDocFrameMenuBar( Window* pWin );
- static USHORT GetDocFrameCount();
+ static sal_uInt16 GetDocFrameCount();
- static BOOL bCatchGPF;
+ static sal_Bool bCatchGPF;
- static BOOL bUsePostEvents; // use Application::Post*Event or own impl to handle key and mouseevents
+ static sal_Bool bUsePostEvents; // use Application::Post*Event or own impl to handle key and mouseevents
#if OSL_DEBUG_LEVEL > 1
static EditWindow *m_pDbgWin;
@@ -309,20 +308,20 @@ public:
class StatementSlot : public StatementList //Slots aufrufen
{
protected:
- USHORT nAnzahl;
+ sal_uInt16 nAnzahl;
SfxPoolItem **pItemArr;
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aArgs;
- USHORT nFunctionId; // can get removed when the old (numeric) slothandling is removed
+ sal_uInt16 nFunctionId; // can get removed when the old (numeric) slothandling is removed
String aUnoUrl;
- BOOL bMenuClosed;
+ sal_Bool bMenuClosed;
StatementSlot();
void AddReferer();
public:
StatementSlot( SCmdStream *pIn );
- StatementSlot( ULONG nSlot, SfxPoolItem* pItem = NULL );
+ StatementSlot( sal_uLong nSlot, SfxPoolItem* pItem = NULL );
virtual ~StatementSlot();
- virtual BOOL Execute();
+ virtual sal_Bool Execute();
};
class StatementUnoSlot : public StatementSlot //Uno Slots aufrufen
@@ -331,37 +330,36 @@ public:
StatementUnoSlot(SCmdStream *pIn);
};
-class StatementCommand : public StatementList // Befehl ausführen (wintree, resetaplication ...)
+class StatementCommand : public StatementList // Befehl ausf�hren (wintree, resetaplication ...)
{
friend class ImplRemoteControl;
protected:
- USHORT nMethodId;
- SmartId aSmartMethodId;
- USHORT nParams;
+ sal_uInt16 nMethodId;
+ sal_uInt16 nParams;
comm_USHORT nNr1,nNr2,nNr3,nNr4;
comm_ULONG nLNr1;
String aString1,aString2;
- BOOL bBool1,bBool2;
+ sal_Bool bBool1,bBool2;
Window* GetNextOverlap( Window* pBase );
Window* GetNextRecoverWin();
- static USHORT nDirPos;
+ static sal_uInt16 nDirPos;
static Dir *pDir;
static pfunc_osl_printDebugMessage pOriginal_osl_DebugMessageFunc;
- BOOL UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir );
+ sal_Bool UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir );
void HandleSAXParser();
public:
StatementCommand( SCmdStream *pIn );
- StatementCommand( StatementList *pAfterThis, USHORT MethodId, USHORT Params, USHORT Nr1 );
- virtual BOOL Execute();
- BOOL DisplayHID();
+ StatementCommand( StatementList *pAfterThis, sal_uInt16 MethodId, sal_uInt16 Params, sal_uInt16 Nr1 );
+ virtual sal_Bool Execute();
+ sal_Bool DisplayHID();
void Translate();
- void WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst = TRUE );
+ void WriteControlData( Window *pBase, sal_uLong nConf, sal_Bool bFirst = sal_True );
};
@@ -371,48 +369,48 @@ enum TTHotSpots { MitteLinks, Mitte, MitteOben };
class StatementControl : public StatementList
{
protected:
- SmartId aUId;
- USHORT nMethodId;
- USHORT nParams;
+ rtl::OString aUId;
+ sal_uInt16 nMethodId;
+ sal_uInt16 nParams;
comm_USHORT nNr1,nNr2,nNr3,nNr4;
comm_ULONG nLNr1;
String aString1,aString2;
- BOOL bBool1,bBool2;
- BOOL ControlOK( Window *pControl, const sal_Char* aBezeichnung );
+ sal_Bool bBool1,bBool2;
+ sal_Bool ControlOK( Window *pControl, const sal_Char* aBezeichnung );
void AnimateMouse( Window *pControl, TTHotSpots aWohin );
void AnimateMouse( Window *pControl, Point aWohin );
- BOOL MaybeDoTypeKeysDelay( Window *pTestWindow );
+ sal_Bool MaybeDoTypeKeysDelay( Window *pTestWindow );
- BOOL HandleVisibleControls( Window *pControl );
- BOOL HandleCommonMethods( Window *pControl );
+ sal_Bool HandleVisibleControls( Window *pControl );
+ sal_Bool HandleCommonMethods( Window *pControl );
public:
- StatementControl( SCmdStream *pIn, USHORT nControlType );
- virtual BOOL Execute();
+ StatementControl( SCmdStream *pIn, sal_uInt16 nControlType );
+ virtual sal_Bool Execute();
};
class StatementFlow : public StatementList // Kommunikation mit Sequence
{
- USHORT nArt;
+ sal_uInt16 nArt;
- USHORT nParams;
+ sal_uInt16 nParams;
comm_USHORT nSNr1;
comm_ULONG nLNr1;
String aString1;
- BOOL bBool1;
+ sal_Bool bBool1;
public:
- StatementFlow (ULONG nServiceId, SCmdStream *pIn, ImplRemoteControl *pRC );
- StatementFlow( StatementList *pAfterThis, USHORT nArtP );
- virtual BOOL Execute();
+ StatementFlow (sal_uLong nServiceId, SCmdStream *pIn, ImplRemoteControl *pRC );
+ StatementFlow( StatementList *pAfterThis, sal_uInt16 nArtP );
+ virtual sal_Bool Execute();
static CommunicationLink *pCommLink;
- static BOOL bSending;
+ static sal_Bool bSending;
- static BOOL bUseIPC; // Soll zur rückmeldung IPC verwendet werden?
- static ImplRemoteControl *pRemoteControl; // Static für 2. Constructor
+ static sal_Bool bUseIPC; // Soll zur r�ckmeldung IPC verwendet werden?
+ static ImplRemoteControl *pRemoteControl; // Static f�r 2. Constructor
private:
void SendViaSocket();
@@ -422,11 +420,11 @@ class SearchUID : public Search
{
Window *pMaybeResult;
Window *pAlternateResult;
- SmartId aUId;
- BOOL bSearchButtonOnToolbox;
+ rtl::OString aUId;
+ sal_Bool bSearchButtonOnToolbox;
public:
- SearchUID( SmartId aUIdP, BOOL bSearchButtonOnToolboxP ): Search( SEARCH_FOCUS_FIRST ), pMaybeResult(NULL), pAlternateResult(NULL), aUId(aUIdP), bSearchButtonOnToolbox(bSearchButtonOnToolboxP) {}
- virtual BOOL IsWinOK( Window *pWin );
+ SearchUID( rtl::OString aUIdP, sal_Bool bSearchButtonOnToolboxP ): Search( SEARCH_FOCUS_FIRST ), pMaybeResult(NULL), pAlternateResult(NULL), aUId(aUIdP), bSearchButtonOnToolbox(bSearchButtonOnToolboxP) {}
+ virtual sal_Bool IsWinOK( Window *pWin );
Window* GetMaybeWin() { return pMaybeResult; }
Window* GetAlternateResultWin() { return pAlternateResult; }
};
@@ -435,53 +433,53 @@ class SearchActive : public Search
WindowType nRT;
public:
SearchActive( WindowType nRTP ): nRT(nRTP) {}
- virtual BOOL IsWinOK( Window *pWin );
+ virtual sal_Bool IsWinOK( Window *pWin );
};
class SearchPopupFloatingWin : public Search
{
public:
SearchPopupFloatingWin(): Search( SEARCH_FOCUS_FIRST ) {}
- virtual BOOL IsWinOK( Window *pWin );
+ virtual sal_Bool IsWinOK( Window *pWin );
};
class SearchRT : public Search
{
WindowType mnRT;
- USHORT mnSkip;
- USHORT mnCount;
+ sal_uInt16 mnSkip;
+ sal_uInt16 mnCount;
public:
- SearchRT( WindowType nRTP, SearchFlags nSearchFlags, USHORT nSkip = 0 ): Search(nSearchFlags), mnRT(nRTP), mnSkip( nSkip ), mnCount( 0 ) {}
- virtual BOOL IsWinOK( Window *pWin );
- USHORT GetCount(){ return mnCount; }
+ SearchRT( WindowType nRTP, SearchFlags nSearchFlags, sal_uInt16 nSkip = 0 ): Search(nSearchFlags), mnRT(nRTP), mnSkip( nSkip ), mnCount( 0 ) {}
+ virtual sal_Bool IsWinOK( Window *pWin );
+ sal_uInt16 GetCount(){ return mnCount; }
};
class SearchScroll : public SearchRT
{
- USHORT nDirection;
+ sal_uInt16 nDirection;
public:
- SearchScroll( USHORT nDir, SearchFlags nSearchFlags ): SearchRT(WINDOW_SCROLLBAR, nSearchFlags), nDirection(nDir) {}
- virtual BOOL IsWinOK( Window *pWin );
+ SearchScroll( sal_uInt16 nDir, SearchFlags nSearchFlags ): SearchRT(WINDOW_SCROLLBAR, nSearchFlags), nDirection(nDir) {}
+ virtual sal_Bool IsWinOK( Window *pWin );
};
class SearchWinPtr : public Search
{
Window *pTest;
public:
SearchWinPtr( Window *pTestP ): pTest(pTestP) {}
- virtual BOOL IsWinOK( Window *pWin );
+ virtual sal_Bool IsWinOK( Window *pWin );
};
class SearchFadeSplitWin : public Search
{
WindowAlign nAlign;
public:
SearchFadeSplitWin( WindowAlign nAlignP ): nAlign(nAlignP) {}
- virtual BOOL IsWinOK( Window *pWin );
+ virtual sal_Bool IsWinOK( Window *pWin );
};
-void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect=FALSE );
-void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect=FALSE );
-void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect=FALSE );
-void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect=FALSE );
+void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, sal_Bool bForceDirect=sal_False );
+void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False );
+void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False );
+void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False );
void ImplCommand( Window* pWin, CommandEvent &aCmdEvnt );
-void ImplEventWait( ULONG nID );
+void ImplEventWait( sal_uLong nID );
#endif
diff --git a/automation/source/simplecm/packethandler.cxx b/automation/source/simplecm/packethandler.cxx
index b691b6f5ffd1..4cd2ad7d3106 100644
--- a/automation/source/simplecm/packethandler.cxx
+++ b/automation/source/simplecm/packethandler.cxx
@@ -87,8 +87,8 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
nLen = 0;
pData = NULL;
- comm_BOOL bWasError = FALSE;
- comm_BOOL bForceMultiChannelThisPacket = FALSE;
+ comm_BOOL bWasError = sal_False;
+ comm_BOOL bForceMultiChannelThisPacket = sal_False;
if ( pReceiver )
{
comm_UINT32 nBytes = 0;
@@ -97,14 +97,14 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
READ_SOCKET( &nBytes, sizeof(nBytes) )
if ( bWasError )
- return FALSE;
+ return sal_False;
- if ( 0xFFFFFFFF == nBytes ) // Expliziter Request für dieses Datenpaket auf MultiChannel umzuschalten
+ if ( 0xFFFFFFFF == nBytes ) // Expliziter Request f�r dieses Datenpaket auf MultiChannel umzuschalten
{
READ_SOCKET( &nBytes, sizeof(nBytes) )
if ( bWasError )
- return FALSE;
- bForceMultiChannelThisPacket = TRUE;
+ return sal_False;
+ bForceMultiChannelThisPacket = sal_True;
}
nBytes = NETDWORD( nBytes );
@@ -114,17 +114,17 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
comm_ULONG nReadSoFar = 0;
comm_ULONG nHeaderReadSoFar = 0;
- // Prüfbyte für Längenangabe
+ // Pr�fbyte f�r L�ngenangabe
unsigned char nLenCheck = 0;
READ_SOCKET_LEN( &nLenCheck, 1, nReadSoFar );
- // Stimmt das Prüfbyte?
+ // 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?
+ // reicht der Header �ber das Ende hinaus?
bWasError |= !(nBytes >= nReadSoFar + nHeaderBytes);
READ_SOCKET_LEN( &nReceiveHeaderType, 2, nHeaderReadSoFar );
@@ -145,15 +145,15 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
default:
{
OSL_FAIL("Unbekannter Headertyp in der Kommunikation");
- bWasError = TRUE;
+ bWasError = sal_True;
}
}
if ( bWasError )
- return FALSE;
+ return sal_False;
- /// Längen anpassen und ggf restheader überlesen.
+ /// L�ngen anpassen und ggf restheader �berlesen.
while ( nHeaderBytes > nHeaderReadSoFar )
{
unsigned char nDummy;
@@ -183,12 +183,12 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
if ( bWasError )
{
::operator delete(pData), pData = 0;
- return FALSE;
+ return sal_False;
}
nLen = nBytes;
}
else
- bWasError = TRUE;
+ bWasError = sal_True;
return !bWasError;
}
@@ -206,12 +206,12 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen )
comm_BOOL PacketHandler::TransferData( const void* pData, comm_UINT32 nLen, CMProtocol nProtocol )
{
comm_UINT32 nBuffer = nLen;
- comm_BOOL bWasError = FALSE;
+ comm_BOOL bWasError = sal_False;
#ifndef FORCE_MULTI_CHANNEL_HEADERS
if ( bMultiChannel )
#endif
- nBuffer += 1+2+2+2; // für einen CH_SimpleMultiChannel
+ nBuffer += 1+2+2+2; // f�r einen CH_SimpleMultiChannel
#ifdef FORCE_MULTI_CHANNEL_HEADERS
if ( !bMultiChannel )
@@ -238,7 +238,7 @@ 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; // L�nge des Headers f�r einen CH_SimpleMultiChannel
n16 = NETWORD( n16 );
WRITE_SOCKET( &n16, 2 );
@@ -256,14 +256,14 @@ comm_BOOL PacketHandler::TransferData( const void* pData, comm_UINT32 nLen, CMPr
comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void* pData, comm_UINT32 nLen )
{
- comm_BOOL bWasError = FALSE;
+ comm_BOOL bWasError = sal_False;
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() ) Wir senden immer FFFFFFFF vorweg -> immer MultiChannel (Oder GPF bei �lteren)
+ nBuffer += 1+2+2; // f�r einen CH_Handshake
- nBuffer += 2; // für den Typ des Handshakes
+ nBuffer += 2; // f�r den Typ des Handshakes
switch ( aHandshakeType )
{
@@ -307,7 +307,7 @@ 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; // L�nge des Headers f�r einen CH_Handshake
n16 = NETWORD( n16 );
WRITE_SOCKET( &n16, 2 );
diff --git a/automation/source/simplecm/packethandler.hxx b/automation/source/simplecm/packethandler.hxx
index d4da137196ca..8ea04d96f043 100644
--- a/automation/source/simplecm/packethandler.hxx
+++ b/automation/source/simplecm/packethandler.hxx
@@ -57,7 +57,7 @@ protected:
comm_UINT16 nReceiveHeaderType;
public:
- PacketHandler( ITransmiter* pTransmitter_, IReceiver* pReceiver_, comm_BOOL bMC = FALSE );
+ PacketHandler( ITransmiter* pTransmitter_, IReceiver* pReceiver_, comm_BOOL bMC = sal_False );
comm_UINT16 GetReceiveProtocol() const { return nReceiveProtocol; }
comm_UINT16 GetReceiveHeaderType() const { return nReceiveHeaderType; }
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx
index d71df2e7237d..01c37e99e26b 100644
--- a/automation/source/simplecm/simplecm.cxx
+++ b/automation/source/simplecm/simplecm.cxx
@@ -56,11 +56,11 @@ CommunicationLink::CommunicationLink( CommunicationManager *pMan )
: pMyManager(pMan)
, pServiceData(NULL)
, nServiceProtocol( 0 )
-, bIsInsideCallback( FALSE )
+, bIsInsideCallback( sal_False )
, nTotalBytes( 0 )
, maApplication("Undefined")
#if OSL_DEBUG_LEVEL > 1
-, bFlag( FALSE )
+, bFlag( sal_False )
, nSomething( 0 )
#endif
{
@@ -70,7 +70,7 @@ CommunicationLink::~CommunicationLink()
{
#if OSL_DEBUG_LEVEL > 1
if ( !bFlag ) // bFlag will be set if deletion is expected else we can set a breakpoint
- bFlag = FALSE;
+ bFlag = sal_False;
#endif
if ( pMyManager )
pMyManager->DestroyingLink( this );
@@ -104,14 +104,14 @@ IMPL_LINK( CommunicationLink, DataReceived, void*, EMPTYARG )
return 1;
}
-BOOL CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol )
+sal_Bool CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol )
{
INFO_MSG( CByteString("S :").Append( GetCommunicationPartner( CM_FQDN ) ),
CByteString("Daten Senden:").Append( GetCommunicationPartner( CM_FQDN ) ),
CM_SEND, this );
- BOOL bWasError = FALSE;
+ sal_Bool bWasError = sal_False;
- UINT32 nBuffer;
+ sal_uInt32 nBuffer;
nBuffer = pDataStream->SeekRel(0) +1;
bWasError = pPacketHandler->TransferData( ((SvMemoryStream*)pDataStream)->GetData(), nBuffer, nProtocol ) != C_ERROR_NONE;
@@ -125,7 +125,7 @@ BOOL CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol
return !bWasError;
}
-BOOL CommunicationLink::TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol )
+sal_Bool CommunicationLink::TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol )
{
aLastAccess = DateTime();
nTotalBytes += pDataStream->Seek( STREAM_SEEK_TO_END );
@@ -144,7 +144,7 @@ SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( Communicatio
, aMyName()
, pStreamSocket( pSocket )
, pReceiveStream( NULL )
-, bIsRequestShutdownPending( FALSE )
+, bIsRequestShutdownPending( sal_False )
{
pTCPIO = new TCPIO( pStreamSocket );
pPacketHandler = new PacketHandler( (ITransmiter*) pTCPIO, pTCPIO, pMyManager->IsMultiChannel() );
@@ -167,7 +167,7 @@ void SimpleCommunicationLinkViaSocket::SetStreamSocket( osl::StreamSocket* pSock
pStreamSocket = pSocket;
}
-BOOL SimpleCommunicationLinkViaSocket::StopCommunication()
+sal_Bool SimpleCommunicationLinkViaSocket::StopCommunication()
{
CommunicationLinkRef rHold(this); // avoid deleting this link before the end of the method
if ( !IsCommunicationError() ) // Meaning that the Communication is still runnung
@@ -178,10 +178,10 @@ BOOL SimpleCommunicationLinkViaSocket::StopCommunication()
SendHandshake( CH_REQUEST_ShutdownLink );
}
WaitForShutdown();
- return TRUE;
+ return sal_True;
}
-BOOL SimpleCommunicationLinkViaSocket::IsCommunicationError()
+sal_Bool SimpleCommunicationLinkViaSocket::IsCommunicationError()
{
return !pStreamSocket;
}
@@ -264,9 +264,9 @@ SvStream* SimpleCommunicationLinkViaSocket::GetBestCommunicationStream()
if ( !bWasError )\
{nTotal += nLength;}
-BOOL SimpleCommunicationLinkViaSocket::DoReceiveDataStream()
+sal_Bool SimpleCommunicationLinkViaSocket::DoReceiveDataStream()
{
- BOOL bWasError = FALSE;
+ sal_Bool bWasError = sal_False;
void* pBuffer = NULL;
comm_UINT32 nLen;
bWasError = pPacketHandler->ReceiveData( pBuffer, nLen ) != C_ERROR_NONE;
@@ -275,7 +275,7 @@ BOOL SimpleCommunicationLinkViaSocket::DoReceiveDataStream()
pReceiveStream = GetBestCommunicationStream();
DBG_ASSERT( pReceiveStream->IsA() == ID_MEMORYSTREAM, "CommunicationStream is not an SvMemoryStream. Communication has to be reimplemented here!");
if ( pReceiveStream->IsA() == ID_MEMORYSTREAM )
- ((SvMemoryStream*)pReceiveStream)->SetBuffer( pBuffer, nLen, TRUE, nLen );
+ ((SvMemoryStream*)pReceiveStream)->SetBuffer( pBuffer, nLen, sal_True, nLen );
DBG_ASSERT( pReceiveStream, "Datastream is NULL");
}
@@ -298,13 +298,13 @@ void SimpleCommunicationLinkViaSocket::SetNewPacketAsCurrent()
nServiceHeaderType = pPacketHandler->GetReceiveHeaderType();
}
-BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeType, SvStream* pData )
+sal_Bool SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeType, SvStream* pData )
{
- BOOL bWasError;
+ sal_Bool bWasError;
if ( pData )
{
- UINT32 nBuffer;
+ sal_uInt32 nBuffer;
nBuffer = pData->Seek( STREAM_SEEK_TO_END );
bWasError = !pPacketHandler->SendHandshake( aHandshakeType, ((SvMemoryStream*)pData)->GetData(), nBuffer );
}
@@ -328,7 +328,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy
case CH_RESPONSE_HandshakeAlive:
break;
case CH_REQUEST_ShutdownLink:
- bIsRequestShutdownPending = TRUE;
+ bIsRequestShutdownPending = sal_True;
break;
case CH_ShutdownLink:
break;
@@ -373,24 +373,24 @@ void SimpleCommunicationLinkViaSocketWithReceiveCallbacks::WaitForShutdown()
ReceiveDataStream();
}
-BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream()
+sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream()
{
if ( DoReceiveDataStream() )
{
SetNewPacketAsCurrent();
StartCallback();
DataReceived();
- return TRUE;
+ return sal_True;
}
else
{
StartCallback();
ShutdownCommunication();
- return FALSE;
+ return sal_False;
}
}
-BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication()
+sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication()
{
if ( GetStreamSocket() )
GetStreamSocket()->shutdown();
@@ -404,14 +404,14 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication
ConnectionClosed();
- return TRUE;
+ return sal_True;
}
-CommunicationManager::CommunicationManager( BOOL bUseMultiChannel )
+CommunicationManager::CommunicationManager( sal_Bool bUseMultiChannel )
: nInfoType( CM_NONE )
-, bIsCommunicationRunning( FALSE )
+, bIsCommunicationRunning( sal_False )
, maApplication("Unknown")
, bIsMultiChannel( bUseMultiChannel )
{
@@ -422,18 +422,18 @@ CommunicationManager::~CommunicationManager()
xLastNewLink.Clear();
}
-BOOL CommunicationManager::StartCommunication( String aApp, String aParams )
+sal_Bool CommunicationManager::StartCommunication( String aApp, String aParams )
{
(void) aApp; /* avoid warning about unused parameter */
(void) aParams; /* avoid warning about unused parameter */
- return FALSE;
+ return sal_False;
}
-BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort )
+sal_Bool CommunicationManager::StartCommunication( ByteString aHost, sal_uLong nPort )
{
(void) aHost; /* avoid warning about unused parameter */
(void) nPort; /* avoid warning about unused parameter */
- return FALSE;
+ return sal_False;
}
ByteString CommunicationManager::GetMyName( CM_NameType )
@@ -447,7 +447,7 @@ void CommunicationManager::CallConnectionOpened( CommunicationLink* pCL )
pCL->StartCallback(); // Sollte bereits vor dem Aufruf gerufen werden
pCL->aStart = DateTime();
pCL->aLastAccess = pCL->aStart;
- bIsCommunicationRunning = TRUE;
+ bIsCommunicationRunning = sal_True;
pCL->SetApplication( GetApplication() );
xLastNewLink = pCL;
@@ -480,7 +480,7 @@ void CommunicationManager::CallDataReceived( CommunicationLink* pCL )
{
pCL->StartCallback(); // Sollte bereits vor dem Aufruf gerufen werden
pCL->aLastAccess = DateTime();
- CommunicationLinkRef rHold(pCL); // Hält den Zeiger bis zum Ende des calls
+ CommunicationLinkRef rHold(pCL); // H�lt den Zeiger bis zum Ende des calls
// should be impossible but happens for mysterious reasons
if ( !pCL->pServiceData )
@@ -494,7 +494,7 @@ void CommunicationManager::CallDataReceived( CommunicationLink* pCL )
if ( CH_Handshake == pCL->nServiceHeaderType )
{
SvStream *pData = pCL->GetServiceData();
- USHORT nType;
+ sal_uInt16 nType;
pData->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); // Unfortulately it is written this way :((
*pData >> nType;
pData->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -566,12 +566,12 @@ void CommunicationManager::CallInfoMsg( InfoString aMsg )
InfoMsg( aMsg );
}
-void CommunicationManager::SetApplication( const ByteString& aApp, BOOL bRunningLinks )
+void CommunicationManager::SetApplication( const ByteString& aApp, sal_Bool bRunningLinks )
{
maApplication = aApp;
if ( bRunningLinks )
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0 ; i < GetCommunicationLinkCount() ; i++ )
GetCommunicationLink( i )->SetApplication( aApp );
}
@@ -579,7 +579,7 @@ void CommunicationManager::SetApplication( const ByteString& aApp, BOOL bRunning
-SingleCommunicationManager::SingleCommunicationManager( BOOL bUseMultiChannel )
+SingleCommunicationManager::SingleCommunicationManager( sal_Bool bUseMultiChannel )
: CommunicationManager( bUseMultiChannel )
{
xActiveLink = NULL;
@@ -593,31 +593,31 @@ SingleCommunicationManager::~SingleCommunicationManager()
pInactiveLink->InvalidateManager();
}
-BOOL SingleCommunicationManager::StopCommunication()
+sal_Bool SingleCommunicationManager::StopCommunication()
{
if ( xActiveLink.Is() )
{
- BOOL bSuccess = xActiveLink->StopCommunication();
+ sal_Bool bSuccess = xActiveLink->StopCommunication();
if ( pInactiveLink )
pInactiveLink->InvalidateManager();
pInactiveLink = xActiveLink;
xActiveLink.Clear();
return bSuccess;
}
- return TRUE;
+ return sal_True;
}
-BOOL SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL )
+sal_Bool SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL )
{
return &xActiveLink == pCL;
}
-USHORT SingleCommunicationManager::GetCommunicationLinkCount()
+sal_uInt16 SingleCommunicationManager::GetCommunicationLinkCount()
{
return IsCommunicationRunning()?1:0;
}
-CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( USHORT )
+CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( sal_uInt16 )
{
return xActiveLink;
}
@@ -630,7 +630,7 @@ void SingleCommunicationManager::CallConnectionOpened( CommunicationLink* pCL )
if ( pInactiveLink )
pInactiveLink->InvalidateManager();
pInactiveLink = xActiveLink;
- xActiveLink->StopCommunication(); // Den alten Link brutal abwürgen
+ xActiveLink->StopCommunication(); // Den alten Link brutal abw�rgen
}
xActiveLink = pCL;
CommunicationManager::CallConnectionOpened( pCL );
@@ -645,7 +645,7 @@ void SingleCommunicationManager::CallConnectionClosed( CommunicationLink* pCL )
pInactiveLink->InvalidateManager();
pInactiveLink = xActiveLink;
xActiveLink.Clear();
- bIsCommunicationRunning = FALSE;
+ bIsCommunicationRunning = sal_False;
}
void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL )
@@ -655,7 +655,7 @@ void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL )
}
-SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel )
+SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel )
: SingleCommunicationManager( bUseMultiChannel )
, aHostToTalk( aHost )
, nPortToTalk( nPort )
@@ -663,7 +663,7 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo
}
-SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( BOOL bUseMultiChannel )
+SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel )
: SingleCommunicationManager( bUseMultiChannel )
, aHostToTalk()
, nPortToTalk( 0 )
@@ -671,7 +671,7 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo
}
-BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort )
+sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort )
{
osl::SocketAddr Addr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ), nPort );
osl::ConnectorSocket *pConnSocket;
@@ -688,14 +688,14 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo
{
pConnSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 );
pCM->CallConnectionOpened( CreateCommunicationLink( pCM, pConnSocket ) );
- return TRUE;
+ return sal_True;
}
else
delete pConnSocket;
} while ( pCMC->RetryConnect() );
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx
index 23eb3bc7e1bb..d24fa7f232b0 100644
--- a/automation/source/testtool/cmdstrm.cxx
+++ b/automation/source/testtool/cmdstrm.cxx
@@ -65,8 +65,8 @@ CmdStream::~CmdStream()
#define PUT_CHAR(ch) \
- USHORT nMCode = nModify + ch; \
- USHORT _Code = 1; \
+ sal_uInt16 nMCode = nModify + ch; \
+ sal_uInt16 _Code = 1; \
if ( (nMCode & 0xFF) == 0 ) \
_Code |= 2; \
if ( (nMCode >> 8) == 0 ) \
@@ -92,16 +92,17 @@ String CmdStream::WandleKeyEventString( String aKeys )
String Work = aKeys.Copy(nPos1+1,nPos2-nPos1+1-2);
aKeys.Erase(nPos1,nPos2-nPos1+1); // Inclusive Spitze Klammern weg
String Result, Token;
- USHORT nModify = 0;
+ sal_uInt16 nModify = 0;
while ( Work.Len() > 0 )
{
Token = Work.GetToken(0,' ');
Work.Erase(0,Token.Len()+1);
- ControlDef WhatName(Token,SmartId());
- USHORT nElement;
+ ControlDef WhatName(Token,rtl::OString());
+ sal_uInt16 nElement;
if (pKeyCodes->Seek_Entry(&WhatName,&nElement))
{
- USHORT nCode = (USHORT) pKeyCodes->GetObject(nElement)->pData->aUId.GetNum();
+ // FIXME: HELPID
+ sal_uInt16 nCode = 0;//(sal_uInt16) pKeyCodes->GetObject(nElement)->pData->aUId.GetNum();
if ( nCode >= KEY_SHIFT )
nModify ^= nCode;
else
@@ -167,17 +168,17 @@ String CmdStream::WandleKeyEventString( String aKeys )
}
-void CmdStream::WriteSortedParams( SbxArray* rPar, BOOL IsKeyString )
+void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
{
- USHORT nParams = PARAM_NONE;
- USHORT nNr1=0,nNr2=0,nNr3=0,nNr4=0;
+ sal_uInt16 nParams = PARAM_NONE;
+ sal_uInt16 nNr1=0,nNr2=0,nNr3=0,nNr4=0;
comm_ULONG nLNr1=0;
String aString1,aString2;
- BOOL bBool1=FALSE,bBool2=FALSE;
+ sal_Bool bBool1=sal_False,bBool2=sal_False;
if ( rPar )
{
- for ( USHORT i = 1; i < rPar->Count() ; i++)
+ for ( sal_uInt16 i = 1; i < rPar->Count() ; i++)
{
switch (rPar->Get( i )->GetType())
{
@@ -307,27 +308,27 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, BOOL IsKeyString )
if( nParams & PARAM_BOOL_2 ) Write( bBool2 );
}
-void CmdStream::GenCmdCommand( USHORT nNr, SbxArray* rPar )
+void CmdStream::GenCmdCommand( sal_uInt16 nNr, SbxArray* rPar )
{
- Write(USHORT(SICommand));
+ Write(sal_uInt16(SICommand));
Write(nNr);
WriteSortedParams(rPar, (nNr & M_KEY_STRING) != 0 );
}
-void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar )
+void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar )
{
- Write(USHORT(SISlot));
+ Write(sal_uInt16(SISlot));
Write(nNr);
if (rPar)
{
- USHORT nAnz = (rPar->Count()-1) >> 1; // Geteilt durch 2
+ sal_uInt16 nAnz = (rPar->Count()-1) >> 1; // Geteilt durch 2
Write(nAnz);
- BOOL bWriteUnoSlot = rPar->Get( 1 )->GetType() == SbxSTRING;
+ sal_Bool bWriteUnoSlot = rPar->Get( 1 )->GetType() == SbxSTRING;
- for (USHORT n = 1 ; n <= nAnz ; n++)
+ for (sal_uInt16 n = 1 ; n <= nAnz ; n++)
{
/// #59513# nicht mehr ben�tigt
-// ULONG nUserData = rPar->Get( 2*n-1 )->GetUserData();
+// 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.
if ( bWriteUnoSlot )
@@ -343,7 +344,7 @@ void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar )
case SbxUINT:
case SbxSINGLE:
if ( !bWriteUnoSlot )
- Write( (USHORT)BinUSHORT );
+ Write( (sal_uInt16)BinUSHORT );
Write(rPar->Get( 2*n )->GetUShort());
break;
case SbxLONG:
@@ -352,18 +353,18 @@ void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar )
case SbxSALUINT64:
case SbxDOUBLE:
if ( !bWriteUnoSlot )
- Write( (USHORT)BinULONG );
+ Write( (sal_uInt16)BinULONG );
Write(rPar->Get( 2*n )->GetULong());
break;
case SbxSTRING:
case SbxCHAR:
if ( !bWriteUnoSlot )
- Write( (USHORT)BinString);
+ Write( (sal_uInt16)BinString);
Write((String)rPar->Get( 2*n )->GetString()); // Cast f�r OS/2
break;
case SbxBOOL:
if ( !bWriteUnoSlot )
- Write( (USHORT)BinBool);
+ Write( (sal_uInt16)BinBool);
Write(rPar->Get( 2*n )->GetBool());
break;
default:
@@ -376,20 +377,20 @@ void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar )
}
}
else
- Write(USHORT(0));
+ Write(sal_uInt16(0));
}
void CmdStream::GenCmdUNOSlot( const String &aURL )
{
- Write( USHORT(SIUnoSlot) );
-/* Write( USHORT(0) ); // Hier wird im Office die SID_OPENURL Eingetragen.
+ 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.
// Da auch die ID f�r das PoolItem im Office entnommen werden mu� hier also kein PoolItem
// gesendet werden.
- Write( USHORT(0) ); // Anzahl PoolItems
+ Write( sal_uInt16(0) ); // Anzahl PoolItems
// Stattdessen wird noch eine extra String gesendet, der dann Officeseitig in ein
// SfxStringItem mit entsprechender ID gewandelt wird.
@@ -398,57 +399,57 @@ void CmdStream::GenCmdUNOSlot( const String &aURL )
Write( aURL ); // Die UNO URL eben
}
-void CmdStream::GenCmdControl( comm_ULONG nUId, USHORT nMethodId, SbxArray* rPar )
+void CmdStream::GenCmdControl( comm_ULONG nUId, sal_uInt16 nMethodId, SbxArray* rPar )
{
- Write(USHORT(SIControl));
+ Write(sal_uInt16(SIControl));
Write(nUId);
Write(nMethodId);
WriteSortedParams(rPar, (nMethodId & M_KEY_STRING) != 0 );
}
-void CmdStream::GenCmdControl( String aUId, USHORT nMethodId, SbxArray* rPar )
+void CmdStream::GenCmdControl( String aUId, sal_uInt16 nMethodId, SbxArray* rPar )
{
- Write(USHORT(SIStringControl));
+ Write(sal_uInt16(SIStringControl));
Write(aUId);
Write(nMethodId);
WriteSortedParams(rPar, (nMethodId & M_KEY_STRING) != 0 );
}
-void CmdStream::GenCmdFlow( USHORT nArt )
+void CmdStream::GenCmdFlow( sal_uInt16 nArt )
{
- Write(USHORT(SIFlow));
+ Write(sal_uInt16(SIFlow));
Write(nArt);
- Write(USHORT(PARAM_NONE)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_NONE)); // Typ der folgenden Parameter
}
-void CmdStream::GenCmdFlow( USHORT nArt, USHORT nNr1 )
+void CmdStream::GenCmdFlow( sal_uInt16 nArt, sal_uInt16 nNr1 )
{
- Write(USHORT(SIFlow));
+ Write(sal_uInt16(SIFlow));
Write(nArt);
- Write(USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_USHORT_1)); // Typ der folgenden Parameter
Write(nNr1);
}
-void CmdStream::GenCmdFlow( USHORT nArt, comm_ULONG nNr1 )
+void CmdStream::GenCmdFlow( sal_uInt16 nArt, comm_ULONG nNr1 )
{
- Write(USHORT(SIFlow));
+ Write(sal_uInt16(SIFlow));
Write(nArt);
- Write(USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_ULONG_1)); // Typ der folgenden Parameter
Write(nNr1);
}
-void CmdStream::GenCmdFlow( USHORT nArt, String aString1 )
+void CmdStream::GenCmdFlow( sal_uInt16 nArt, String aString1 )
{
- Write(USHORT(SIFlow));
+ Write(sal_uInt16(SIFlow));
Write(nArt);
- Write(USHORT(PARAM_STR_1)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_STR_1)); // Typ der folgenden Parameter
Write(aString1);
}
-void CmdStream::Write( String aString, BOOL IsKeyString )
+void CmdStream::Write( String aString, sal_Bool IsKeyString )
{
if ( IsKeyString )
- Write( WandleKeyEventString( aString ), FALSE );
+ Write( WandleKeyEventString( aString ), sal_False );
else
Write( aString.GetBuffer(), aString.Len() );
}
diff --git a/automation/source/testtool/cmdstrm.hxx b/automation/source/testtool/cmdstrm.hxx
index 547f80bcc26e..d9c3cec49c73 100644
--- a/automation/source/testtool/cmdstrm.hxx
+++ b/automation/source/testtool/cmdstrm.hxx
@@ -38,22 +38,22 @@ public:
CmdStream();
~CmdStream();
- void WriteSortedParams( SbxArray* rPar, BOOL IsKeyString = FALSE );
+ void WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString = sal_False );
- void GenCmdCommand( USHORT nNr, SbxArray* rPar );
+ void GenCmdCommand( sal_uInt16 nNr, SbxArray* rPar );
- void GenCmdSlot( USHORT nNr, SbxArray* rPar );
+ void GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar );
void GenCmdUNOSlot( const String &aURL );
- void GenCmdControl( comm_ULONG nUId, USHORT nMethodId, SbxArray* rPar );
- void GenCmdControl( String aUId, USHORT nMethodId, SbxArray* rPar );
+ void GenCmdControl( comm_ULONG nUId, sal_uInt16 nMethodId, SbxArray* rPar );
+ void GenCmdControl( String aUId, sal_uInt16 nMethodId, SbxArray* rPar );
- void GenCmdFlow( USHORT nArt );
- void GenCmdFlow( USHORT nArt, USHORT nNr1 );
- void GenCmdFlow( USHORT nArt, comm_ULONG nNr1 );
- void GenCmdFlow( USHORT nArt, String aString1 );
+ void GenCmdFlow( sal_uInt16 nArt );
+ void GenCmdFlow( sal_uInt16 nArt, sal_uInt16 nNr1 );
+ void GenCmdFlow( sal_uInt16 nArt, comm_ULONG nNr1 );
+ void GenCmdFlow( sal_uInt16 nArt, String aString1 );
void Reset(comm_ULONG nSequence);
@@ -71,7 +71,7 @@ private:
void Write( const comm_UniChar* aString, comm_USHORT nLenInChars ){CmdBaseStream::Write( aString, nLenInChars );}
void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );}
// new
- void Write( String aString, BOOL IsKeyString = FALSE );
+ void Write( String aString, sal_Bool IsKeyString = sal_False );
SvMemoryStream *pSammel;
};
diff --git a/automation/source/testtool/comm_bas.cxx b/automation/source/testtool/comm_bas.cxx
index 10cb95570804..7c42d225987e 100644
--- a/automation/source/testtool/comm_bas.cxx
+++ b/automation/source/testtool/comm_bas.cxx
@@ -44,9 +44,9 @@
// 2) Methoden:
// CommunicationLink StartCommunication( Host, Port )
// StopAllCommunication // Alle Kommunikation wird abgebrochen
-// BOOL IsCommunicationRunning // Läuft noch irgendwas
+// sal_Bool IsCommunicationRunning // Läuft noch irgendwas
// String GetMyName Der eigene Name
-// BOOL IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig
+// sal_Bool IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig
// SetCommunicationEventHandler( String ) // Diese Funktion wird aufgerufen bei jedem Event
// Der CommunicationLink hat folgende Elemente:
@@ -141,8 +141,8 @@ CommunicationWrapper::Methods CommunicationWrapper::aLinkMethods[] = {
// Konstruktor für den Manager
CommunicationWrapper::CommunicationWrapper( const String& rClass ) : SbxObject( rClass )
, m_pLink( NULL )
-, m_bIsManager( TRUE )
-, m_bCatchOpen( FALSE )
+, m_bIsManager( sal_True )
+, m_bCatchOpen( sal_False )
, m_pNewLink( NULL )
{
m_pMethods = &aManagerMethods[0];
@@ -155,8 +155,8 @@ CommunicationWrapper::CommunicationWrapper( const String& rClass ) : SbxObject(
// Konstruktor für den Link
CommunicationWrapper::CommunicationWrapper( CommunicationLink *pThisLink ) : SbxObject( CUniString("Link") )
, m_pLink( pThisLink )
-, m_bIsManager( FALSE )
-, m_bCatchOpen( FALSE )
+, m_bIsManager( sal_False )
+, m_bCatchOpen( sal_False )
, m_pNewLink( NULL )
{
m_pMethods = &aLinkMethods[0];
@@ -187,12 +187,12 @@ SbxVariable* CommunicationWrapper::Find( const String& rName, SbxClassType t )
// sonst suchen
Methods* p = m_pMethods;
short nIndex = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
while( p->nArgs != -1 )
{
if( rName.CompareIgnoreCaseToAscii( p->pName ) == COMPARE_EQUAL )
{
- bFound = TRUE; break;
+ bFound = sal_True; break;
}
nIndex += ( p->nArgs & _ARGSMASK ) + 1;
p = m_pMethods + nIndex;
@@ -229,22 +229,22 @@ void CommunicationWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
{
SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar = pVar->GetParameters();
- USHORT nIndex = (USHORT) pVar->GetUserData();
+ sal_uInt16 nIndex = (sal_uInt16) pVar->GetUserData();
// kein Index: weiterreichen!
if( nIndex )
{
- ULONG t = pHint->GetId();
+ sal_uLong t = pHint->GetId();
if( t == SBX_HINT_INFOWANTED )
pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) );
else
{
- BOOL bWrite = FALSE;
+ sal_Bool bWrite = sal_False;
if( t == SBX_HINT_DATACHANGED )
- bWrite = TRUE;
+ bWrite = sal_True;
if( t == SBX_HINT_DATAWANTED || bWrite )
{
// Parameter-Test fuer Methoden:
- USHORT nPar = m_pMethods[ --nIndex ].nArgs & 0x00FF;
+ sal_uInt16 nPar = m_pMethods[ --nIndex ].nArgs & 0x00FF;
// Element 0 ist der Returnwert
if( ( !pPar && nPar )
|| ( pPar && pPar->Count() != nPar+1 ) )
@@ -274,7 +274,7 @@ SbxInfo* CommunicationWrapper::GetInfo( short nIdx )
{
p++;
String aName( p->pName, RTL_TEXTENCODING_ASCII_US );
- USHORT nIFlags = ( p->nArgs >> 8 ) & 0x03;
+ sal_uInt16 nIFlags = ( p->nArgs >> 8 ) & 0x03;
if( p->nArgs & _OPT )
nIFlags |= SBX_OPTIONAL;
pRetInfo->AddParam( aName, p->eType, nIFlags );
@@ -328,21 +328,21 @@ void CommunicationWrapper::Events( String aType, CommunicationLink* pLink )
////////////////////////////////////////////////////////////////////////////
-// Properties und Methoden legen beim Get (bPut = FALSE) den Returnwert
-// im Element 0 des Argv ab; beim Put (bPut = TRUE) wird der Wert aus
+// 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.
// Die Methoden:
// Manager
-void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL /*bWrite*/ )
+void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ )
{ // CommunicationLink StartCommunication( Host, Port )
- m_bCatchOpen = TRUE;
+ m_bCatchOpen = sal_True;
if ( m_pManager->StartCommunication( ByteString( pPar->Get( 1 )->GetString(), RTL_TEXTENCODING_UTF8 ), pPar->Get( 2 )->GetULong() ) )
{
while ( !m_pNewLink )
GetpApp()->Reschedule();
- m_bCatchOpen = FALSE;
+ m_bCatchOpen = sal_False;
CommunicationWrapper *pNewLinkWrapper = new CommunicationWrapper( m_pNewLink );
m_pNewLink = NULL;
pVar->PutObject( pNewLinkWrapper );
@@ -350,28 +350,28 @@ void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPa
}
-void CommunicationWrapper::MStopAllCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, BOOL /*bWrite*/ )
+void CommunicationWrapper::MStopAllCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
{ // StopAllCommunication // Alle Kommunikation wird abgebrochen
m_pManager->StopCommunication();
}
-void CommunicationWrapper::MIsCommunicationRunning( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ )
-{ // BOOL IsCommunicationRunning // Läuft noch irgendwas
+void CommunicationWrapper::MIsCommunicationRunning( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
+{ // sal_Bool IsCommunicationRunning // Läuft noch irgendwas
pVar->PutBool( m_pManager->IsCommunicationRunning() );
}
-void CommunicationWrapper::MGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ )
+void CommunicationWrapper::MGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
{ // String GetMyName Der eigene Name
pVar->PutString( UniString( m_pManager->GetMyName( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) );
}
-void CommunicationWrapper::MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, BOOL /*bWrite*/ )
-{ // BOOL IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig
+void CommunicationWrapper::MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ )
+{ // sal_Bool IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig
CommunicationWrapper *pWrapper = (CommunicationWrapper*)(pPar->Get( 1 )->GetObject());
pVar->PutBool( m_pManager->IsLinkValid( pWrapper->GetCommunicationLink() ) );
}
-void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/, SbxArray* pPar, BOOL /*bWrite*/ )
+void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/, SbxArray* pPar, sal_Bool /*bWrite*/ )
{ // SetCommunicationEventHandler( String ) // Diese Funktion wird aufgerufen bei jedem Event
m_aEventHandlerName = pPar->Get( 1 )->GetString();
}
@@ -381,22 +381,22 @@ void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/,
// Link
-void CommunicationWrapper::LStopCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, BOOL /*bWrite*/ )
+void CommunicationWrapper::LStopCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
{ // StopCommunication Die Kommunikation wird abgebrochen
m_pLink->StopCommunication();
}
-void CommunicationWrapper::LGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ )
+void CommunicationWrapper::LGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
{ // String GetMyName Der eigene Name
pVar->PutString( UniString( m_pLink->GetMyName( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) );
}
-void CommunicationWrapper::LGetHostName( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ )
+void CommunicationWrapper::LGetHostName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
{ // String GetHostName Der Name des Anderen
pVar->PutString( UniString( m_pLink->GetCommunicationPartner( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) );
}
-void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, BOOL /*bWrite*/ )
+void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, sal_Bool /*bWrite*/ )
{ // Send(String ) String an den Partner schicken
SvStream *pSendStream = m_pLink->GetBestCommunicationStream();
String aSendString = pPar->Get( 1 )->GetString();
@@ -405,12 +405,12 @@ void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, BOOL /*
delete pSendStream;
}
-void CommunicationWrapper::LGetString( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ )
+void CommunicationWrapper::LGetString( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ )
{ // String GetString Ergebnis des letzten Empfangs
SvStream *pReceiveStream = m_pLink->GetServiceData();
if ( pReceiveStream )
{
- ULONG nLength = pReceiveStream->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nLength = pReceiveStream->Seek( STREAM_SEEK_TO_END );
pReceiveStream->Seek( STREAM_SEEK_TO_BEGIN );
char *pBuffer = new char[nLength];
pReceiveStream->Read( pBuffer, nLength );
diff --git a/automation/source/testtool/comm_bas.hxx b/automation/source/testtool/comm_bas.hxx
index 0754e0e23667..16c874164227 100644
--- a/automation/source/testtool/comm_bas.hxx
+++ b/automation/source/testtool/comm_bas.hxx
@@ -36,7 +36,7 @@
class CommunicationManagerClientViaSocket;
class CommunicationLink;
-class CommunicationWrapper : public SbxObject // Einer für Manager und Links
+class CommunicationWrapper : public SbxObject // Einer f�r Manager und Links
{
// Definition eines Tabelleneintrags. Dies wird hier gemacht,
// da dadurch die Methoden und Properties als private deklariert
@@ -45,7 +45,7 @@ class CommunicationWrapper : public SbxObject // Einer für Manager und Links
public:
#endif
typedef void( CommunicationWrapper::*pMeth )
- ( SbxVariable* pThis, SbxArray* pArgs, BOOL bWrite );
+ ( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite );
#if defined ( ICC )
private:
#endif
@@ -62,31 +62,31 @@ private:
// Methoden
// Manager
- void MStartCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void MStopAllCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void MIsCommunicationRunning( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void MGetMyName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void MSetCommunicationEventHandler( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
+ 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 );
+ void MGetMyName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void MSetCommunicationEventHandler( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
// Link
- void LStopCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void LGetMyName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void LGetHostName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void LSend( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void LGetString( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
+ 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
CommunicationManagerClientViaSocket *m_pManager;
CommunicationLink *m_pLink;
- BOOL m_bIsManager; // Ist es kein Manager, so ist es ein Link
+ sal_Bool m_bIsManager; // Ist es kein Manager, so ist es ein Link
- // Kram für Manager
+ // Kram f�r Manager
DECL_LINK( Open, CommunicationLink* );
DECL_LINK( Close, CommunicationLink* );
DECL_LINK( Data, CommunicationLink* );
void Events( String aType, CommunicationLink* pLink );
- BOOL m_bCatchOpen;
+ sal_Bool m_bCatchOpen;
CommunicationLink *m_pNewLink;
String m_aEventHandlerName;
diff --git a/automation/source/testtool/cretstrm.cxx b/automation/source/testtool/cretstrm.cxx
index 0f9781c73970..b0247efb4ee3 100644
--- a/automation/source/testtool/cretstrm.cxx
+++ b/automation/source/testtool/cretstrm.cxx
@@ -51,7 +51,7 @@ CRetStream::~CRetStream()
void CRetStream::Read ( String &aString )
{
comm_UniChar* pStr;
- USHORT nLenInChars;
+ sal_uInt16 nLenInChars;
CmdBaseStream::Read( pStr, nLenInChars );
aString = String( pStr, nLenInChars );
diff --git a/automation/source/testtool/cretstrm.hxx b/automation/source/testtool/cretstrm.hxx
index f7cbe3309865..0315c53828b7 100644
--- a/automation/source/testtool/cretstrm.hxx
+++ b/automation/source/testtool/cretstrm.hxx
@@ -36,7 +36,7 @@
class CRetStream : public CmdBaseStream
{
SvStream *pSammel;
- USHORT nId;
+ sal_uInt16 nId;
public:
CRetStream( SvStream *pIn );
@@ -45,7 +45,7 @@ public:
using CmdBaseStream::Read;
void Read ( comm_USHORT &nNr ){CmdBaseStream::Read ( nNr );}
void Read ( comm_ULONG &nNr ){CmdBaseStream::Read ( nNr );}
- virtual void Read ( SmartId* &pId ){CmdBaseStream::Read ( pId );}
+ virtual void Read ( rtl::OString* &pId ){CmdBaseStream::Read ( pId );}
void Read ( comm_BOOL &bBool ){CmdBaseStream::Read ( bBool );}
void Read( String &aString );
void Read( SbxValue &aValue );
diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx
index beb8f4c4d0d7..d10469e0496a 100644
--- a/automation/source/testtool/httprequest.cxx
+++ b/automation/source/testtool/httprequest.cxx
@@ -56,7 +56,7 @@ HttpRequest::~HttpRequest()
pStream = NULL;
}
-void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, USHORT nPort )
+void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort )
{
nStatus = HTTP_REQUEST_SET;
Init();
@@ -65,7 +65,7 @@ void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, USHORT nPort )
nRequestPort = nPort;
}
-void HttpRequest::SetProxy( ByteString aHost, USHORT nPort )
+void HttpRequest::SetProxy( ByteString aHost, sal_uInt16 nPort )
{
nStatus = HTTP_REQUEST_SET;
Init();
@@ -73,7 +73,7 @@ void HttpRequest::SetProxy( ByteString aHost, USHORT nPort )
nProxyPort = nPort;
}
-BOOL HttpRequest::Execute()
+sal_Bool HttpRequest::Execute()
{
nStatus = HTTP_REQUEST_PENDING;
Init();
@@ -103,7 +103,7 @@ BOOL HttpRequest::Execute()
{
delete pOutSocket;
nStatus = HTTP_REQUEST_ERROR;
- return FALSE;
+ return sal_False;
}
@@ -140,9 +140,9 @@ BOOL HttpRequest::Execute()
#define BUFFRE_SIZE 0x10000 // 64K Buffer
char* pBuffer = new char[ BUFFRE_SIZE ];
- BOOL bWasError = ( nStatus != HTTP_REQUEST_PENDING );
+ sal_Bool bWasError = ( nStatus != HTTP_REQUEST_PENDING );
- ULONG nDataRead;
+ sal_uLong nDataRead;
pStream = new SvMemoryStream( 0x10000, 0x10000 );
while ( !bWasError )
{
@@ -158,16 +158,16 @@ BOOL HttpRequest::Execute()
pStream->Seek( 0 );
ByteString aLine;
- BOOL bInsideHeader = TRUE;
+ sal_Bool bInsideHeader = sal_True;
while ( bInsideHeader )
{
pStream->ReadLine( aLine );
if ( !aLine.Len() )
- bInsideHeader = FALSE;
+ bInsideHeader = sal_False;
else
{
if ( IsItem( "HTTP/", aLine ) )
- nResultId = (USHORT)aLine.GetToken( 1, ' ' ).ToInt32();
+ nResultId = (sal_uInt16)aLine.GetToken( 1, ' ' ).ToInt32();
if ( IsItem( "Content-Type:", aLine ) )
{
aContentType = aLine.Copy( 13 );
@@ -181,12 +181,12 @@ BOOL HttpRequest::Execute()
if ( nStatus == HTTP_REQUEST_PENDING )
{
nStatus = HTTP_REQUEST_DONE;
- return TRUE;
+ return sal_True;
}
else
{
nStatus = HTTP_REQUEST_ERROR;
- return FALSE;
+ return sal_False;
}
}
/*
@@ -207,7 +207,7 @@ void HttpRequest::SendString( osl::StreamSocket* pSocket , ByteString aText )
pSocket->write( aText.GetBuffer(), aText.Len() );
}
-BOOL HttpRequest::IsItem( ByteString aItem, ByteString aLine )
+sal_Bool HttpRequest::IsItem( ByteString aItem, ByteString aLine )
{
return aItem.Match( aLine ) == STRING_MATCH;
}
@@ -231,7 +231,7 @@ SvMemoryStream* HttpRequest::GetBody()
return pStream;
}
-USHORT HttpRequest::GetStatus()
+sal_uInt16 HttpRequest::GetStatus()
{
return nStatus;
}
diff --git a/automation/source/testtool/httprequest.hxx b/automation/source/testtool/httprequest.hxx
index d7ec34fe7b85..9947286a6a6f 100644
--- a/automation/source/testtool/httprequest.hxx
+++ b/automation/source/testtool/httprequest.hxx
@@ -48,38 +48,38 @@ class HttpRequest
{
ByteString aRequestPath;
ByteString aRequestHost;
- USHORT nRequestPort;
+ sal_uInt16 nRequestPort;
ByteString aProxyHost;
- USHORT nProxyPort;
+ sal_uInt16 nProxyPort;
- USHORT nStatus;
+ sal_uInt16 nStatus;
osl::ConnectorSocket *pOutSocket;
ByteString aHeader;
- USHORT nResultId;
+ sal_uInt16 nResultId;
ByteString aContentType;
SvMemoryStream* pStream;
void SendString( osl::StreamSocket* pSocket, ByteString aText );
- BOOL IsItem( ByteString aItem, ByteString aLine );
+ sal_Bool IsItem( ByteString aItem, ByteString aLine );
void Init();
public:
HttpRequest();
~HttpRequest();
- void SetRequest( ByteString aHost, ByteString aPath, USHORT nPort );
- void SetProxy( ByteString aHost, USHORT nPort );
+ void SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort );
+ void SetProxy( ByteString aHost, sal_uInt16 nPort );
- BOOL Execute();
+ sal_Bool Execute();
void Abort();
ByteString GetHeader() const { return aHeader; }
SvMemoryStream* GetBody();
ByteString GetContentType() const { return aContentType; }
- USHORT GetResultId() const { return nResultId; }
+ sal_uInt16 GetResultId() const { return nResultId; }
- USHORT GetStatus();
+ sal_uInt16 GetStatus();
};
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index d061dcdf2e0b..85ac8e2f7455 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -117,7 +117,7 @@ CErrors *TestToolObj::pFehlerListe = NULL; // Hier werden die Fehler des Te
DBG_NAME( ControlItem )
DBG_NAME( ControlDef )
-ControlItem::ControlItem( const sal_Char *Name, SmartId aUIdP )
+ControlItem::ControlItem( const sal_Char *Name, rtl::OString aUIdP )
{
DBG_CTOR(ControlItem,0);
InitData();
@@ -125,7 +125,7 @@ DBG_CTOR(ControlItem,0);
pData->aUId = aUIdP;
}
-ControlItem::ControlItem( const String &Name, SmartId aUIdP )
+ControlItem::ControlItem( const String &Name, rtl::OString aUIdP )
{
DBG_CTOR(ControlItem,0);
InitData();
@@ -148,43 +148,48 @@ ControlSon::~ControlSon()
}
}
-ControlItemSon::ControlItemSon(const String &Name, SmartId aUIdP )
+ControlItemSon::ControlItemSon(const String &Name, rtl::OString aUIdP )
: ControlItem( Name, aUIdP )
{}
-BOOL ControlDef::operator < (const ControlItem &rPar)
+sal_Bool ControlDef::operator < (const ControlItem &rPar)
{
return pData->Kurzname.CompareIgnoreCaseToAscii(rPar.pData->Kurzname) == COMPARE_LESS;
}
-BOOL ControlDef::operator == (const ControlItem &rPar)
+sal_Bool ControlDef::operator == (const ControlItem &rPar)
{
return pData->Kurzname.CompareIgnoreCaseToAscii(rPar.pData->Kurzname) == COMPARE_EQUAL;
}
void ControlDef::Write( SvStream &aStream )
{
+ // FIXME: HELPID
+ #if 0
if ( pSons )
aStream.WriteByteString( String('*').Append( pData->Kurzname ), RTL_TEXTENCODING_UTF8 );
else
aStream.WriteByteString( pData->Kurzname, RTL_TEXTENCODING_UTF8 );
- aStream << ((USHORT)pData->aUId.HasNumeric());
+ aStream << ((sal_uInt16)pData->aUId.HasNumeric());
if ( pData->aUId.HasString() )
aStream.WriteByteString( pData->aUId.GetStr(), RTL_TEXTENCODING_UTF8 );
else
- aStream << static_cast<comm_ULONG>(pData->aUId.GetNum()); //GetNum() ULONG != comm_ULONG on 64bit
+ aStream << static_cast<comm_ULONG>(pData->aUId.GetNum()); //GetNum() sal_uLong != comm_ULONG on 64bit
if ( pSons )
- for ( USHORT i = 0 ; pSons->Count() > i ; i++ )
+ for ( sal_uInt16 i = 0 ; pSons->Count() > i ; i++ )
((ControlDef*)(*pSons)[i])->Write(aStream);
+ #else
+ (void)aStream;
+ #endif
}
-ControlDef::ControlDef(const String &Name, SmartId aUIdP )
+ControlDef::ControlDef(const String &Name, rtl::OString aUIdP )
: ControlItemSon( Name, aUIdP)
{
DBG_CTOR(ControlDef,0);
}
-ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, BOOL bWithSons )
+ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, sal_Bool bWithSons )
: ControlItemSon("", pOriginal->pData->aUId)
{
DBG_CTOR(ControlDef,0);
@@ -196,10 +201,10 @@ ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDe
if ( bWithSons && pOriginal->pSons )
{
pSons = new CNames();
- for ( USHORT i = 0; i < pOriginal->pSons->Count() ; i++)
+ for ( sal_uInt16 i = 0; i < pOriginal->pSons->Count() ; i++)
{
ControlDef *pNewDef;
- pNewDef = new ControlDef( aOldName, aNewName, pOriginal->SonGetObject(i) ,TRUE );
+ pNewDef = new ControlDef( aOldName, aNewName, pOriginal->SonGetObject(i) ,sal_True );
if (! SonInsert(pNewDef))
{
OSL_FAIL("Name Doppelt im CopyConstructor. Neuer Name = Controlname!!");
@@ -212,22 +217,22 @@ ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDe
pSons = NULL;
}
-BOOL ControlItemUId::operator < (const ControlItem &rPar)
+sal_Bool ControlItemUId::operator < (const ControlItem &rPar)
{
return pData->aUId < rPar.pData->aUId;
}
-BOOL ControlItemUId::operator == (const ControlItem &rPar)
+sal_Bool ControlItemUId::operator == (const ControlItem &rPar)
{
return pData->aUId == rPar.pData->aUId;
}
SV_IMPL_OP_PTRARR_SORT( CNames, ControlItem* )
-void CRevNames::Insert( String aName, SmartId aUId, ULONG nSeq )
+void CRevNames::Insert( String aName, rtl::OString aUId, sal_uLong nSeq )
{
ControlItem *pRN = new ReverseName(aName,aUId,nSeq);
- USHORT nPos;
+ sal_uInt16 nPos;
if ( Seek_Entry(pRN,&nPos) )
DeleteAndDestroy(nPos);
@@ -239,27 +244,32 @@ void CRevNames::Insert( String aName, SmartId aUId, ULONG nSeq )
}
-String CRevNames::GetName( SmartId aUId )
+String CRevNames::GetName( rtl::OString aUId )
{
ReverseName *pRN = new ReverseName(UniString(),aUId,0);
- USHORT nPos;
- BOOL bSeekOK = Seek_Entry(pRN,&nPos);
+ sal_uInt16 nPos;
+ sal_Bool bSeekOK = Seek_Entry(pRN,&nPos);
delete pRN;
if ( bSeekOK )
return GetObject(nPos)->pData->Kurzname;
else
{
+ // FIXME: HELPID
+ #if 0
if ( aUId.Matches( UID_ACTIVE ) )
return CUniString("Active");
else
return GEN_RES_STR1( S_NAME_NOT_THERE, aUId.GetText() );
+ #else
+ return String();
+ #endif
}
}
-void CRevNames::Invalidate ( ULONG nSeq )
+void CRevNames::Invalidate ( sal_uLong nSeq )
{
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < Count() ;)
{
if (((ReverseName*)GetObject(i))->LastSequence < nSeq)
@@ -282,12 +292,12 @@ SbxTransportMethod::SbxTransportMethod( SbxDataType DT )
TestToolObj::TestToolObj( String aName, String aFilePath ) // Interner Aufruf
: SbxObject( aName )
-, bUseIPC(FALSE)
-, bReturnOK(TRUE)
+, bUseIPC(sal_False)
+, bReturnOK(sal_True)
, nSequence(KEEP_SEQUENCES)
, ProgPath()
-, IsBlock(FALSE)
-, SingleCommandBlock(TRUE)
+, IsBlock(sal_False)
+, SingleCommandBlock(sal_True)
, m_pControls(NULL)
, m_pNameKontext(NULL)
, m_pSIds(NULL)
@@ -304,7 +314,7 @@ TestToolObj::TestToolObj( String aName, String aFilePath ) // Inter
pImpl->ProgParam = String();
pImpl->aFileBase = DirEntry(aFilePath);
pImpl->aHIDDir = DirEntry(aFilePath);
- pImpl->bIsStart = FALSE;
+ pImpl->bIsStart = sal_False;
pImpl->pMyBasic = NULL;
pImpl->aServerTimeout = Time(0,1,00); // 1:00 Minuten fest
@@ -313,12 +323,12 @@ TestToolObj::TestToolObj( String aName, String aFilePath ) // Inter
TestToolObj::TestToolObj( String aName, MyBasic* pBas ) // Aufruf im Testtool
: SbxObject( aName )
-, bUseIPC(TRUE)
-, bReturnOK(TRUE)
+, bUseIPC(sal_True)
+, bReturnOK(sal_True)
, nSequence(KEEP_SEQUENCES)
, ProgPath()
-, IsBlock(FALSE)
-, SingleCommandBlock(TRUE)
+, IsBlock(sal_False)
+, SingleCommandBlock(sal_True)
, m_pControls(NULL)
, m_pNameKontext(NULL)
, m_pSIds(NULL)
@@ -333,7 +343,7 @@ TestToolObj::TestToolObj( String aName, MyBasic* pBas ) // Aufruf
{
pImpl = new ImplTestToolObj;
pImpl->ProgParam = String();
- pImpl->bIsStart = FALSE;
+ pImpl->bIsStart = sal_False;
pImpl->pMyBasic = pBas;
LoadIniFile();
@@ -398,7 +408,7 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
String aST;
GETSET( aST, "ServerTimeout", ByteString::CreateFromInt64(Time(0,0,45).GetTime()) ); // 45 Sekunden Initial
- pImpl->aServerTimeout = Time(ULONG(aST.ToInt64()));
+ pImpl->aServerTimeout = Time(sal_uLong(aST.ToInt64()));
String aSOSE;
aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Misc" );
@@ -478,7 +488,7 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
pMeth->SetUserData( nID ); \
}
-// SetUserData muß irgendwas sein, sonst wird es im Find rausgefiltert!!!
+// SetUserData mu� irgendwas sein, sonst wird es im Find rausgefiltert!!!
#define MAKE_USHORT_CONSTANT(cName, nValue) \
{ \
SbxProperty *pVal = new SbxProperty( CUniString( cName) , SbxINTEGER ); \
@@ -495,9 +505,9 @@ void TestToolObj::InitTestToolObj()
pImpl->nMinRemoteCommandDelay = 0;
pImpl->nMaxRemoteCommandDelay = 0;
- pImpl->bDoRemoteCommandDelay = FALSE;
+ pImpl->bDoRemoteCommandDelay = sal_False;
- pImpl->bLnaguageExtensionLoaded= FALSE;
+ pImpl->bLnaguageExtensionLoaded= sal_False;
pImpl->pTTSfxBroadcaster = NULL;
pImpl->nErrorCount = 0;
@@ -512,8 +522,8 @@ void TestToolObj::InitTestToolObj()
pImpl->nTestCaseLineNr = 0;
- pImpl->bEnableQaErrors = TRUE;
- pImpl->bDebugFindNoErrors = FALSE;
+ pImpl->bEnableQaErrors = sal_True;
+ pImpl->bDebugFindNoErrors = sal_False;
pImpl->pChildEnv = new Environment;
@@ -536,8 +546,8 @@ void TestToolObj::InitTestToolObj()
pWait = pRTLObject->Make( CUniString("Wait"), SbxCLASS_METHOD, SbxNULL );
pWait->SetUserData( ID_Wait );
// change listener here
- pRTLObject->EndListening( pWait->GetBroadcaster(), TRUE );
- StartListening( pWait->GetBroadcaster(), TRUE );
+ pRTLObject->EndListening( pWait->GetBroadcaster(), sal_True );
+ StartListening( pWait->GetBroadcaster(), sal_True );
}
else
{
@@ -615,15 +625,20 @@ void TestToolObj::InitTestToolObj()
// Load the Remote Commands from list
if ( !pRCommands ) // Ist static, wird also nur einmal geladen
ReadFlatArray( arR_Cmds, pRCommands );
- USHORT i;
+ sal_uInt16 i;
for ( i = 0 ; i < pRCommands->Count() ; i++ )
{
SbxTransportMethod *pMeth = new SbxTransportMethod( SbxVARIANT );
pMeth->SetName( pRCommands->GetObject( i )->pData->Kurzname );
pMeth->SetUserData( ID_RemoteCommand );
+ // FIXME: HELPID
+ #if 0
pMeth->nValue = pRCommands->GetObject( i )->pData->aUId.GetNum();
+ #else
+ pMeth->nValue = 0;
+ #endif
Insert( pMeth );
- StartListening( pMeth->GetBroadcaster(), TRUE );
+ StartListening( pMeth->GetBroadcaster(), sal_True );
}
// Konstanten f�r SetControlType
@@ -741,7 +756,7 @@ SfxBroadcaster& TestToolObj::GetTTBroadcaster()
return *pImpl->pTTSfxBroadcaster;
}
-void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, BOOL bIsFlat )
+void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, sal_Bool bIsFlat )
{
/*******************************************************************************
**
@@ -757,9 +772,9 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
SvFileStream Stream;
String aLine,aShortname,aLongname;
- SmartId aUId;
+ rtl::OString aUId;
xub_StrLen nLineNr;
- USHORT nElement;
+ sal_uInt16 nElement;
ControlDef *pNewDef, *pNewDef2;
ControlDef *pFatherDef = NULL;
@@ -772,10 +787,10 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_READING_LONGNAMES)), aFileName );
GetTTBroadcaster().Broadcast( aHint );
}
- ReadFlat( aFileName ,pUIds, TRUE );
+ ReadFlat( aFileName ,pUIds, sal_True );
if ( !pUIds )
return;
- pNewDef = new ControlDef("Active",SmartId(0));
+ pNewDef = new ControlDef("Active",rtl::OString());
const ControlItem *pItem = pNewDef;
if (! pUIds->Insert(pItem))
{
@@ -838,12 +853,12 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
aFirstAllowedExtra.AssignAscii("+*");
aAllowed.AssignAscii("_");
xub_StrLen nIndex = 0;
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
while ( bOK && nIndex < aShortname.Len() )
{
sal_Unicode aChar = aShortname.GetChar( nIndex );
- BOOL bOKThis = FALSE;
+ sal_Bool bOKThis = sal_False;
bOKThis |= ( aAllowed.Search( aChar ) != STRING_NOTFOUND );
if ( !nIndex )
bOKThis |= ( aFirstAllowedExtra.Search( aChar ) != STRING_NOTFOUND );
@@ -860,7 +875,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
continue;
}
- BOOL bUnoName = ( aLongname.Copy( 0, 5 ).EqualsIgnoreCaseAscii( ".uno:" )
+ sal_Bool bUnoName = ( aLongname.Copy( 0, 5 ).EqualsIgnoreCaseAscii( ".uno:" )
|| aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( "http" )
|| aLongname.Copy( 0, 15 ).EqualsIgnoreCaseAscii( "private:factory" )
|| aLongname.Copy( 0, 8 ).EqualsIgnoreCaseAscii( "service:" )
@@ -869,20 +884,20 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
// generic method to mark longnames as symbolic
if ( aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( "sym:" ) )
{
- bUnoName = TRUE;
+ bUnoName = sal_True;
aLongname.Erase( 0, 4 );
}
- BOOL bMozillaName = ( !bIsFlat && aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( ".moz" ) );
+ sal_Bool bMozillaName = ( !bIsFlat && aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( ".moz" ) );
if ( aShortname.GetChar(0) == '+' ) // Kompletten Eintrag kopieren
{
aShortname.Erase(0,1);
- ControlDef WhatName(aLongname,SmartId());
+ ControlDef WhatName(aLongname,rtl::OString());
ControlDef *OldTree;
if (pNames->Seek_Entry(&WhatName,&nElement))
{
OldTree = (ControlDef*)pNames->GetObject(nElement);
- pNewDef = new ControlDef(aLongname,aShortname,OldTree,TRUE);
+ pNewDef = new ControlDef(aLongname,aShortname,OldTree,sal_True);
const ControlItem *pItem = pNewDef;
if (! pNames->Insert(pItem))
@@ -906,11 +921,15 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
else
{
+ // FIXME: HELPID
+ #if 0
if (aShortname.CompareIgnoreCaseToAscii("*Active") == COMPARE_EQUAL)
- aUId = SmartId( UID_ACTIVE );
- else if ( !bUnoName && !bMozillaName )
+ aUId = rtl::OString( UID_ACTIVE );
+ else
+ #endif
+ if ( !bUnoName && !bMozillaName )
{ // Bestimmen der ID aus der Hid.Lst
- ControlDef WhatName(aLongname,SmartId());
+ ControlDef WhatName(aLongname,rtl::OString());
if (pUIds->Seek_Entry(&WhatName,&nElement))
aUId = pUIds->GetObject(nElement)->pData->aUId;
else
@@ -921,14 +940,17 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
}
else
{
+ // FIXME: HELPID
+ #if 0
if ( bUnoName )
- aUId = SmartId( aLongname );
+ aUId = rtl::OString( aLongname );
else if ( bMozillaName )
- aUId = SmartId( aLongname );
+ aUId = rtl::OString( aLongname );
else
{
OSL_FAIL("Unknown URL schema");
}
+ #endif
}
@@ -1007,15 +1029,15 @@ void TestToolObj::AddName(String &aBisher, String &aNeu )
}
-void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName )
-// Wenn bSortByName == FALSE, dann nach UId Sortieren (ControlItemUId statt ControlDef)
+void TestToolObj::ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByName )
+// Wenn bSortByName == sal_False, dann nach UId Sortieren (ControlItemUId statt ControlDef)
{
SvFileStream Stream;
String aLine,aLongname;
- SmartId aUId;
+ rtl::OString aUId;
xub_StrLen nLineNr;
ControlItem *pNewItem;
- USHORT nDoubleCount = 0;
+ sal_uInt16 nDoubleCount = 0;
Stream.Open(Filename, STREAM_STD_READ);
@@ -1053,7 +1075,8 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName )
}
aLongname = aLine.GetToken(0,cMyDelim);
- aUId = SmartId( (ULONG)aLine.GetToken(1,cMyDelim).ToInt64() );
+ // FIXME: HELPID
+ aUId = rtl::OUStringToOString( aLine.GetToken(1,cMyDelim), RTL_TEXTENCODING_UTF8 );
if ( bSortByName )
pNewItem = new ControlDef( aLongname, aUId );
@@ -1070,7 +1093,7 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName )
}
else
{
- USHORT nNr;
+ sal_uInt16 nNr;
pNames->Seek_Entry( pNewItem, &nNr );
AddName( pNames->GetObject(nNr)->pData->Kurzname, pNewItem->pData->Kurzname );
}
@@ -1088,14 +1111,15 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName )
void ReadFlatArray( const ControlDefLoad arWas [], CNames *&pNames )
{
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
if ( !pNames )
pNames = new CNames();
while ( String::CreateFromAscii(arWas[nIndex].Kurzname).Len() > 0 )
{
- SmartId aUId (arWas[nIndex].nUId);
+ // FIXME: HELPID
+ rtl::OString aUId;// (arWas[nIndex].nUId);
const ControlItem *pX = new ControlDef( arWas[nIndex].Kurzname, aUId);
pNames->C40_PTR_INSERT(ControlItem, pX);
nIndex++;
@@ -1106,7 +1130,7 @@ void TestToolObj::WaitForAnswer ()
{
if ( bUseIPC )
{
- BOOL bWasRealWait = !bReturnOK;
+ sal_Bool bWasRealWait = !bReturnOK;
BasicRuntime aRun( NULL );
if ( BasicRuntimeAccess::HasRuntime() )
aRun = BasicRuntimeAccess::GetRuntime();
@@ -1142,7 +1166,7 @@ void TestToolObj::WaitForAnswer ()
if ( pTemp )
{
ReturnResults( pTemp );
- bReturnOK = TRUE;
+ bReturnOK = sal_True;
}
else
{
@@ -1156,7 +1180,7 @@ void TestToolObj::WaitForAnswer ()
if ( !bReturnOK )
{
ADD_ERROR(ERR_EXEC_TIMEOUT,GEN_RES_STR1(S_TIMOUT_WAITING, String::CreateFromInt64(nSequence)));
- bReturnOK = TRUE;
+ bReturnOK = sal_True;
nSequence++;
}
}
@@ -1180,7 +1204,7 @@ IMPL_LINK( TestToolObj, CallDialogHandler, Application*, EMPTYARG )
String aHandlerName(aDialogHandlerName);
aDialogHandlerName.Erase();
- ULONG nRememberSequence = nSequence; // Da sich die Sequence im DialogHandler �ndert
+ sal_uLong nRememberSequence = nSequence; // Da sich die Sequence im DialogHandler �ndert
((StarBASIC*)GetParent())->Call( aHandlerName );
nSequence = nRememberSequence;
// Die Sequenznummern werden dann zwar doppelt vergeben, aber wen k�mmerts.
@@ -1198,7 +1222,7 @@ void TestToolObj::BeginBlock()
DBG_ASSERT(!IsBlock,"BeginBlock innerhalb eines Blockes");
In->Reset(nSequence);
- IsBlock = TRUE;
+ IsBlock = sal_True;
}
@@ -1235,21 +1259,21 @@ void TestToolObj::SendViaSocket()
}
}
- bReturnOK = FALSE;
+ bReturnOK = sal_False;
if ( pCommunicationManager->GetLastNewLink() )
{
if ( !pCommunicationManager->GetLastNewLink()->TransferDataStream( In->GetStream() ) )
{
ADD_ERROR(ERR_SEND_TIMEOUT,GEN_RES_STR1(S_TIMOUT_SENDING, String::CreateFromInt64(nSequence)));
nSequence++;
- bReturnOK = TRUE; // Kein Return zu erwarten
+ bReturnOK = sal_True; // Kein Return zu erwarten
}
}
else
{
ADD_ERROR(ERR_SEND_TIMEOUT,GEN_RES_STR1(S_NO_CONNECTION, String::CreateFromInt64(nSequence)));
nSequence++;
- bReturnOK = TRUE; // Kein Return zu erwarten
+ bReturnOK = sal_True; // Kein Return zu erwarten
}
}
@@ -1264,7 +1288,7 @@ void TestToolObj::EndBlock()
if ( pImpl->bDoRemoteCommandDelay )
{
- ULONG nTimeWait = pImpl->nMinRemoteCommandDelay;
+ sal_uLong nTimeWait = pImpl->nMinRemoteCommandDelay;
if ( pImpl->nMaxRemoteCommandDelay != pImpl->nMinRemoteCommandDelay )
nTimeWait += Time::GetSystemTicks() % ( pImpl->nMaxRemoteCommandDelay - pImpl->nMinRemoteCommandDelay );
Timer aTimer;
@@ -1283,11 +1307,11 @@ void TestToolObj::EndBlock()
SendViaSocket();
else
{
- bReturnOK = FALSE;
+ bReturnOK = sal_False;
if ( aDialogHandlerName.Len() > 0 )
GetpApp()->InsertIdleHdl( LINK( this, TestToolObj, IdleHdl ), 1 );
}
- IsBlock = FALSE;
+ IsBlock = sal_False;
}
else
{
@@ -1296,14 +1320,14 @@ void TestToolObj::EndBlock()
}
-BOOL TestToolObj::Load( String aFileName, SbModule *pMod )
+sal_Bool TestToolObj::Load( String aFileName, SbModule *pMod )
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SvFileStream aStrm( aFileName, STREAM_STD_READ );
if( aStrm.IsOpen() )
{
String aText, aLine;
- BOOL bIsFirstLine = TRUE;
+ sal_Bool bIsFirstLine = sal_True;
rtl_TextEncoding aFileEncoding = RTL_TEXTENCODING_IBM_850;
while( !aStrm.IsEof() && bOk )
{
@@ -1315,10 +1339,10 @@ BOOL TestToolObj::Load( String aFileName, SbModule *pMod )
if ( !bIsFirstLine )
aText += '\n';
aText += aLine;
- bIsFirstLine = FALSE;
+ bIsFirstLine = sal_False;
}
if( aStrm.GetError() != SVSTREAM_OK )
- bOk = FALSE;
+ bOk = sal_False;
}
aText.ConvertLineEnd();
pMod->SetName(CUniString("--").Append(aFileName));
@@ -1332,20 +1356,20 @@ BOOL TestToolObj::Load( String aFileName, SbModule *pMod )
MyBasic::SetCompileModule( pOldModule );
if ( WasPrecompilerError() )
- bOk = FALSE;
+ bOk = sal_False;
}
else
- bOk = FALSE;
+ bOk = sal_False;
return bOk;
}
-BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls )
+sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls )
{
SvFileStream aStream;
String aName,aURL;
- SmartId aUId;
+ rtl::OString aUId;
ControlDef *pNewDef, *pNewDef2;
ControlDef *pFatherDef = NULL;
@@ -1354,7 +1378,7 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr
if (!aStream.IsOpen())
{
ADD_ERROR(ERR_NO_FILE,GEN_RES_STR1(S_CANNOT_OPEN_FILE, Filename));
- return FALSE;
+ return sal_False;
}
if ( !pSIds )
@@ -1367,29 +1391,32 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr
GetTTBroadcaster().Broadcast( aHint );
}
- USHORT nAnz;
+ sal_uInt16 nAnz;
aStream >> nAnz;
CNames *pNames = pSIds; // first read all the slots
- BOOL bIsFlat = TRUE; // Slots do not have children
+ sal_Bool bIsFlat = sal_True; // Slots do not have children
while ( nAnz && !aStream.IsEof() )
{
aStream.ReadByteString( aName, RTL_TEXTENCODING_UTF8 );
- USHORT nType;
+ sal_uInt16 nType;
aStream >> nType;
if ( !nType /* HasNumeric() */)
{
String aStrId;
aStream.ReadByteString( aStrId, RTL_TEXTENCODING_UTF8 );
- aUId = SmartId( aStrId );
+ // FIXME: HELPID
+ #if 0
+ aUId = rtl::OString( aStrId );
+ #endif
}
else
{
comm_ULONG nUId;
aStream >> nUId;
- aUId = SmartId( nUId );
+ aUId = rtl::OString();// nUId;
}
if (aName.GetChar(0) == '*' || bIsFlat ) // Globaler Kurzname (Dialogname oder SId)
@@ -1445,7 +1472,7 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr
{
aStream >> nAnz;
pNames = pControls; // Now read the controls
- bIsFlat = FALSE; // Controls *do* have children
+ bIsFlat = sal_False; // Controls *do* have children
}
@@ -1457,17 +1484,17 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr
}
aStream.Close();
- return TRUE;
+ return sal_True;
}
-BOOL TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls )
+sal_Bool TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls )
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SvFileStream aStrm( String(Filename).AppendAscii(".bin"), STREAM_STD_WRITE );
if( aStrm.IsOpen() )
{
- USHORT i;
+ sal_uInt16 i;
if ( pSIds )
{
aStrm << pSIds->Count();
@@ -1475,11 +1502,11 @@ BOOL TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pContro
{
((ControlDef*)(*pSIds)[i])->Write(aStrm);
if( aStrm.GetError() != SVSTREAM_OK )
- bOk = FALSE;
+ bOk = sal_False;
}
}
else
- aStrm << USHORT( 0 );
+ aStrm << sal_uInt16( 0 );
if ( pControls )
{
@@ -1488,14 +1515,14 @@ BOOL TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pContro
{
((ControlDef*)(*pControls)[i])->Write(aStrm);
if( aStrm.GetError() != SVSTREAM_OK )
- bOk = FALSE;
+ bOk = sal_False;
}
}
else
- aStrm << USHORT( 0 );
+ aStrm << sal_uInt16( 0 );
}
else
- bOk = FALSE;
+ bOk = sal_False;
return bOk;
}
@@ -1511,8 +1538,8 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SbxVariable* pVar = p->GetVar();
SbxArray* rPar = pVar->GetParameters();
- ULONG nHintId = p->GetId();
- ULONG nHintUserData = pVar->GetUserData();
+ sal_uLong nHintId = p->GetId();
+ sal_uLong nHintUserData = pVar->GetUserData();
if( nHintId == SBX_HINT_DATAWANTED )
{
nMyVar = 0;
@@ -1524,23 +1551,23 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
m_pNameKontext = m_pControls;
// So da� nicht immer mal wieder was aus einem alten Kontext dazwischenhaut
- for (USHORT i=0;i<VAR_POOL_SIZE;i++)
+ for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++)
{
pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) );
}
}
else if ( rPar && rPar->Count() == 2 )
{
- USHORT nElement;
+ sal_uInt16 nElement;
SbxVariableRef pArg = rPar->Get( 1 );
String aKontext = pArg->GetString();
- ControlDef WhatName(aKontext,SmartId());
+ ControlDef WhatName(aKontext,rtl::OString());
if (m_pControls && m_pControls->Seek_Entry(&WhatName,&nElement))
{
m_pNameKontext = ((ControlDef*)m_pControls->GetObject(nElement))->GetSons();
// So da� nicht immer mal wieder was aus einem alten Kontext dazwischenhaut
- for (USHORT i=0;i<VAR_POOL_SIZE;i++)
+ for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++)
{
pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) );
}
@@ -1570,10 +1597,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
GetTTBroadcaster().Broadcast( aHint );
}
- pImpl->bIsStart = TRUE;
+ pImpl->bIsStart = sal_True;
BeginBlock();
EndBlock();
- pImpl->bIsStart = FALSE;
+ pImpl->bIsStart = sal_False;
{
TTExecutionStatusHint aHint( TT_EXECUTION_HIDE_ACTION );
GetTTBroadcaster().Broadcast( aHint );
@@ -1652,10 +1679,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
while ( pCommunicationManager->IsCommunicationRunning() )
Application::Reschedule();
- SingleCommandBlock = TRUE;
- IsBlock = FALSE;
+ SingleCommandBlock = sal_True;
+ IsBlock = sal_False;
- for (USHORT i=0;i<VAR_POOL_SIZE;i++)
+ for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++)
{
pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) );
}
@@ -1697,19 +1724,19 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
m_pReverseUIds = NULL;
}
m_pNameKontext = m_pControls;
- pImpl->bLnaguageExtensionLoaded = FALSE;
+ pImpl->bLnaguageExtensionLoaded = sal_False;
SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED );
GetTTBroadcaster().Broadcast( aHint );
pImpl->nMinRemoteCommandDelay = 0;
pImpl->nMaxRemoteCommandDelay = 0;
- pImpl->bDoRemoteCommandDelay = FALSE;
+ pImpl->bDoRemoteCommandDelay = sal_False;
pImpl->aTestCaseName.Erase();
pImpl->aTestCaseFileName.Erase();
pImpl->nTestCaseLineNr = 0;
- pImpl->bEnableQaErrors = TRUE;
- pImpl->bDebugFindNoErrors = FALSE;
+ pImpl->bEnableQaErrors = sal_True;
+ pImpl->bDebugFindNoErrors = sal_False;
pImpl->pChildEnv->clear();
@@ -1734,21 +1761,21 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if ( Ext.CompareIgnoreCaseToAscii("Win") == COMPARE_EQUAL )
{
ReadNames( FilePath.GetFull(),m_pControls,pUIds);
- pImpl->bLnaguageExtensionLoaded = TRUE;
+ pImpl->bLnaguageExtensionLoaded = sal_True;
SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED );
GetTTBroadcaster().Broadcast( aHint );
}
else if ( Ext.CompareIgnoreCaseToAscii("Sid") == COMPARE_EQUAL )
{
ReadNames( FilePath.GetFull(),m_pSIds,pUIds,FLAT);
- pImpl->bLnaguageExtensionLoaded = TRUE;
+ pImpl->bLnaguageExtensionLoaded = sal_True;
SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED );
GetTTBroadcaster().Broadcast( aHint );
}
else if ( Ext.CompareIgnoreCaseToAscii("Bin") == COMPARE_EQUAL )
{
ReadNamesBin( FilePath.GetFull(), m_pSIds, m_pControls );
- pImpl->bLnaguageExtensionLoaded = TRUE;
+ pImpl->bLnaguageExtensionLoaded = sal_True;
SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED );
GetTTBroadcaster().Broadcast( aHint );
}
@@ -1828,7 +1855,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
case ID_CaseLog:
if ( rPar ) // rPar != NULL <=> Es gibt Parameter
{
- USHORT n;
+ sal_uInt16 n;
String aX;
for ( n = 1; n < rPar->Count(); n++ )
{
@@ -1856,16 +1883,16 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if ( IS_ERROR() )
{
BasicRuntime aRun = BasicRuntimeAccess::GetRuntime();
- BOOL bWasNewError = FALSE;
+ sal_Bool bWasNewError = sal_False;
if ( BasicRuntimeAccess::HasStack() )
{
- for ( USHORT i = 0 ; i < BasicRuntimeAccess::GetStackEntryCount() -1 ; i++ )
+ for ( sal_uInt16 i = 0 ; i < BasicRuntimeAccess::GetStackEntryCount() -1 ; i++ )
{
BasicErrorStackEntry aThisEntry = BasicRuntimeAccess::GetStackEntry(i);
if ( !bWasNewError )
{
- bWasNewError = TRUE;
+ bWasNewError = sal_True;
ADD_ERROR_LOG( GET_ERROR()->aText, aThisEntry.GetModuleName(SbxNAME_SHORT_TYPES),
aThisEntry.GetLine(), aThisEntry.GetCol1(), aThisEntry.GetCol2(), aThisEntry.GetSourceRevision() );
}
@@ -1878,7 +1905,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
BasicRuntimeAccess::DeleteStack();
}
- BOOL bIsFirst = TRUE;
+ sal_Bool bIsFirst = sal_True;
while ( aRun.IsValid() )
{
xub_StrLen nErrLn;
@@ -1886,7 +1913,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
xub_StrLen nCol2;
if ( bIsFirst )
{
- bIsFirst = FALSE;
+ bIsFirst = sal_False;
nErrLn = GET_ERROR()->nLine;
nCol1 = GET_ERROR()->nCol1;
nCol2 = GET_ERROR()->nCol2;
@@ -1900,7 +1927,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if ( !bWasNewError )
{
- bWasNewError = TRUE;
+ bWasNewError = sal_True;
ADD_ERROR_LOG( GET_ERROR()->aText, aRun.GetModuleName(SbxNAME_SHORT_TYPES),
nErrLn, nCol1, nCol2, aRun.GetSourceRevision() );
}
@@ -1933,7 +1960,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
case ID_QAErrorLog:
if ( rPar ) // rPar != NULL <=> Es gibt Parameter
{
- USHORT n;
+ sal_uInt16 n;
String aSammel;
for ( n = 1; n < rPar->Count(); n++ )
{
@@ -1946,7 +1973,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
case ID_PrintLog:
if ( rPar ) // rPar != NULL <=> Es gibt Parameter
{
- USHORT n;
+ sal_uInt16 n;
String aSammel;
for ( n = 1; n < rPar->Count(); n++ )
{
@@ -1959,7 +1986,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
case ID_WarnLog:
if ( rPar ) // rPar != NULL <=> Es gibt Parameter
{
- USHORT n;
+ sal_uInt16 n;
String aSammel;
for ( n = 1; n < rPar->Count(); n++ )
{
@@ -2002,15 +2029,16 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
SetError( SbxERR_NOTIMP );
}
if ( !IsError() )
- In->GenCmdCommand ((USHORT)(((SbxTransportMethod*)pVar)->nValue),rPar);
+ In->GenCmdCommand ((sal_uInt16)(((SbxTransportMethod*)pVar)->nValue),rPar);
if ( !IsError() && ((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN )
{
pImpl->pNextReturn = ((SbxTransportMethod*)pVar);
- aNextReturnId = SmartId( ((SbxTransportMethod*)pVar)->nValue );
+ // FIXME: HELPID
+ aNextReturnId = rtl::OString();// ((SbxTransportMethod*)pVar)->nValue );
}
if ( SingleCommandBlock )
EndBlock();
- if ( !IsError() && (USHORT)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN )
+ if ( !IsError() && (sal_uInt16)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN )
{
WaitForAnswer();
}
@@ -2029,8 +2057,8 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if ( SingleCommandBlock )
BeginBlock();
if ( !IsError() )
- In->GenCmdSlot ( (USHORT)((SbxTransportMethod*)pVar)->nValue, rPar );
- pVar->PutInteger( (USHORT)((SbxTransportMethod*)pVar)->nValue );
+ In->GenCmdSlot ( (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar );
+ pVar->PutInteger( (sal_uInt16)((SbxTransportMethod*)pVar)->nValue );
if ( SingleCommandBlock )
EndBlock();
}
@@ -2077,14 +2105,18 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if ( nHintUserData == ID_Control )
{
In->GenCmdControl (pMember->GetULong(),
- (USHORT)((SbxTransportMethod*)pVar)->nValue, rPar);
- aNextReturnId = SmartId( pMember->GetULong() );
+ (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar);
+ // FIXME: HELPID
+ aNextReturnId = rtl::OString();// pMember->GetULong() );
}
else
{
In->GenCmdControl (pMember->GetString(),
- (USHORT)((SbxTransportMethod*)pVar)->nValue, rPar);
- aNextReturnId = SmartId( pMember->GetString() );
+ (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar);
+ // FIXME: HELPID
+ #if 0
+ aNextReturnId = rtl::OString( pMember->GetString() );
+ #endif
}
}
@@ -2095,13 +2127,13 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
else
{
pImpl->pNextReturn = NULL;
- aNextReturnId = SmartId();
+ aNextReturnId = rtl::OString();
}
}
if ( SingleCommandBlock )
EndBlock();
- if ( !IsError() && (USHORT)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN )
+ if ( !IsError() && (sal_uInt16)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN )
{
WaitForAnswer();
}
@@ -2543,7 +2575,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
delete pFehlerListe;
pFehlerListe = new CErrors;
- for (USHORT i=0;i<VAR_POOL_SIZE;i++)
+ for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++)
{
pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) );
}
@@ -2594,7 +2626,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
}
}
-void TestToolObj::DebugFindNoErrors( BOOL bDebugFindNoErrors )
+void TestToolObj::DebugFindNoErrors( sal_Bool bDebugFindNoErrors )
{
pImpl->bDebugFindNoErrors = bDebugFindNoErrors;
}
@@ -2617,8 +2649,8 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
else
{
- USHORT nElement;
- ControlDef *pWhatName = new ControlDef(aStr,SmartId());
+ sal_uInt16 nElement;
+ ControlDef *pWhatName = new ControlDef(aStr,rtl::OString());
/// nach Controls suchen
if (m_pNameKontext && m_pNameKontext->Seek_Entry(pWhatName,&nElement))
@@ -2633,9 +2665,12 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
// Will be set on method-child further down
+ // FIXME: HELPID
+ #if 0
if ( pWhatName->pData->aUId.HasNumeric() )
pImpl->pControlsObj->SetUserData( ID_Control );
else
+ #endif
pImpl->pControlsObj->SetUserData( ID_StringControl );
pShortNames->Insert(pWhatName->pData->Kurzname,pWhatName->pData->aUId,nSequence);
@@ -2648,10 +2683,13 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
pImpl->pControlsObj->SetDfltProperty(pID);
pMember = pID;
}
+ // FIXME: HELPID
+ #if 0
if ( pWhatName->pData->aUId.HasNumeric() )
pMember->PutULong(pWhatName->pData->aUId.GetNum());
else
pMember->PutString(pWhatName->pData->aUId.GetStr());
+ #endif
pMember = pImpl->pControlsObj->Find(CUniString("name"),SbxCLASS_DONTCARE);
if ( pMember != NULL )
@@ -2671,6 +2709,8 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
pWhatName = ( (ControlDef*)m_pSIds->GetObject( nElement ) );
pMyVar->SetName( pWhatName->pData->Kurzname );
+ // FIXME: HELPID
+ #if 0
if ( pWhatName->pData->aUId.HasNumeric() )
{
pMyVar->SetUserData( ID_Dispatch );
@@ -2682,6 +2722,7 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
pMyVar->SetUserData( ID_UNODispatch );
pMyVar->aUnoSlot = pWhatName->pData->aUId.GetStr();
}
+ #endif
return pMyVar;
}
@@ -2689,7 +2730,7 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
if ( aStr.Copy( aStr.Len()-3, 3 ).CompareIgnoreCaseToAscii("_ID") == COMPARE_EQUAL && m_pSIds )
{
delete pWhatName;
- pWhatName = new ControlDef( aStr.Copy( 0, aStr.Len()-3 ), SmartId() );
+ pWhatName = new ControlDef( aStr.Copy( 0, aStr.Len()-3 ), rtl::OString() );
if ( m_pSIds->Seek_Entry( pWhatName, &nElement ) )
{ // Nach slots suchen
SbxVariable *pReturn = new SbxVariable;
@@ -2697,10 +2738,13 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
pWhatName = ( (ControlDef*)m_pSIds->GetObject( nElement ) );
pReturn->SetName( pWhatName->pData->Kurzname );
+ // FIXME: HELPID
+ #if 0
if ( pWhatName->pData->aUId.HasNumeric() )
pReturn->PutULong(pWhatName->pData->aUId.GetNum());
else
pReturn->PutString(pWhatName->pData->aUId.GetStr());
+ #endif
return pReturn;
}
}
@@ -2722,18 +2766,18 @@ String TestToolObj::GetRevision( String const &aSourceIn )
return String::CreateFromAscii("No Revision found");
}
-BOOL TestToolObj::CError( ULONG code, const String& rMsg, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 )
+sal_Bool TestToolObj::CError( sal_uLong code, const String& rMsg, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 )
{
- bWasPrecompilerError = TRUE;
+ bWasPrecompilerError = sal_True;
if ( aCErrorHdl.IsSet() )
{
ErrorEntry aErrorEntry( code, rMsg, l, c1, c2 );
- return (BOOL)aCErrorHdl.Call( &aErrorEntry );
+ return (sal_Bool)aCErrorHdl.Call( &aErrorEntry );
}
else
{
ADD_ERROR( code, rMsg )
- return TRUE;
+ return sal_True;
}
}
@@ -2755,15 +2799,15 @@ void TestToolObj::CalcPosition( String const &aSource, xub_StrLen nPos, xub_StrL
#define CATCHRES_LABEL CUniString( "ctchres" )
#define ENDCATCH_LABEL CUniString( "endctch" )
-BOOL IsAlphaChar( sal_Unicode cChar )
+sal_Bool IsAlphaChar( sal_Unicode cChar )
{
return ( cChar >= 'a' && cChar <= 'z' ) ||
( cChar >= 'A' && cChar <= 'Z' );
}
-BOOL IsInsideString( const String& aSource, const xub_StrLen nStart )
+sal_Bool IsInsideString( const String& aSource, const xub_StrLen nStart )
{
- BOOL bInside = FALSE;
+ sal_Bool bInside = sal_False;
xub_StrLen nPos = nStart-1;
while ( nPos && aSource.GetChar(nPos) != _CR && aSource.GetChar(nPos) != _LF )
@@ -2775,7 +2819,7 @@ BOOL IsInsideString( const String& aSource, const xub_StrLen nStart )
return bInside;
}
-BOOL IsValidHit( const String& aSource, const xub_StrLen nStart, const xub_StrLen nEnd )
+sal_Bool IsValidHit( const String& aSource, const xub_StrLen nStart, const xub_StrLen nEnd )
{
return !IsAlphaChar( aSource.GetChar(nStart-1) ) && !IsAlphaChar( aSource.GetChar(nEnd+1))
&& !IsInsideString( aSource, nStart );
@@ -2796,7 +2840,7 @@ xub_StrLen TestToolObj::ImplSearch( const String &aSource, const xub_StrLen nSta
}
}
-xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, USHORT &nLabelCount )
+xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, sal_uInt16 &nLabelCount )
{
xub_StrLen nTry,nCatch,nEndcatch;
if( (nTry = ImplSearch( aSource, nStart, nEnd, CUniString("try"), nStart )) == STRING_NOTFOUND )
@@ -2896,7 +2940,7 @@ xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_
void TestToolObj::PreCompileDispatchParts( String &aSource, String aStart, String aEnd, String aFinalLable )
{
- USHORT nLabelCount = 0;
+ sal_uInt16 nLabelCount = 0;
xub_StrLen nPartPos = 0;
while ( !WasPrecompilerError() && (nPartPos = ImplSearch( aSource, nPartPos, aSource.Len(), aStart )) != STRING_NOTFOUND )
@@ -2910,7 +2954,7 @@ void TestToolObj::PreCompileDispatchParts( String &aSource, String aStart, Strin
}
-BOOL TestToolObj::WasPrecompilerError()
+sal_Bool TestToolObj::WasPrecompilerError()
{
return bWasPrecompilerError;
}
@@ -2918,13 +2962,13 @@ 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(), TRUE );
+ StartListening( ((StarBASIC*)GetParent())->GetBroadcaster(), sal_True );
xub_StrLen nTestCase;
xub_StrLen nEndCase;
xub_StrLen nStartPos = 0;
String aSource(aSourceIn);
- bWasPrecompilerError = FALSE;
+ 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
@@ -2935,7 +2979,7 @@ HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.")
xub_StrLen nComment;
while ( (nComment = aSource.SearchAscii("'",nStartPos)) != STRING_NOTFOUND )
{
- USHORT nStringEndCount = 0;
+ sal_uInt16 nStringEndCount = 0;
xub_StrLen nIndex = nComment;
while ( nIndex && aSource.GetChar(nIndex) != '\n' )
{
@@ -2986,7 +3030,7 @@ HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.")
if ( aSource.SearchAscii(":",nTestCase) < nTcEnd )
nTcEnd = aSource.SearchAscii(":",nTestCase) -1;
String aSuffix = aSource.Copy(nTestCase+8,nTcEnd-nTestCase-8);
- USHORT nOldLen;
+ sal_uInt16 nOldLen;
do
{
nOldLen = aSuffix.Len();
@@ -3014,7 +3058,7 @@ HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.")
void TestToolObj::AddToListByNr( CNames *&pControls, ControlItemUId *&pNewItem )
{
- USHORT nNr;
+ sal_uInt16 nNr;
if ( pControls->Seek_Entry( pNewItem, &nNr ) )
{
AddName( pControls->GetObject(nNr)->pData->Kurzname, pNewItem->pData->Kurzname );
@@ -3045,7 +3089,7 @@ void TestToolObj::ReadHidLstByNumber()
GetTTBroadcaster().Broadcast( aHint );
}
- ReadFlat( aName, m_pReverseUIds, FALSE );
+ ReadFlat( aName, m_pReverseUIds, sal_False );
{
TTExecutionStatusHint aHint( TT_EXECUTION_HIDE_ACTION );
@@ -3054,14 +3098,14 @@ void TestToolObj::ReadHidLstByNumber()
}
}
-void TestToolObj::SortControlsByNumber( BOOL bIncludeActive )
+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;
m_pReverseControlsSon = new CNames;
- USHORT nWin,nCont;
+ sal_uInt16 nWin,nCont;
const String aSl('/');
for ( nWin = 0 ; nWin < m_pControls->Count() ; nWin++ )
{
@@ -3090,8 +3134,9 @@ void TestToolObj::SortControlsByNumber( BOOL bIncludeActive )
}
if ( !bIncludeActive )
{
- ControlItem *pZeroItem = new ControlItemUId( UniString(), SmartId(0) );
- USHORT nNr;
+ // FIXME: HELPID
+ ControlItem *pZeroItem = new ControlItemUId( UniString(), rtl::OString() );
+ sal_uInt16 nNr;
if ( m_pReverseControls->Seek_Entry( pZeroItem, &nNr ) )
{
m_pReverseControls->DeleteAndDestroy( nNr );
@@ -3103,12 +3148,12 @@ void TestToolObj::SortControlsByNumber( BOOL bIncludeActive )
}
-BOOL TestToolObj::ReturnResults( SvStream *pIn )
+sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
{
- USHORT nId;
- ULONG nClearSequence = 0;
- BOOL bSequenceOK = TRUE;
+ sal_uInt16 nId;
+ sal_uLong nClearSequence = 0;
+ sal_Bool bSequenceOK = sal_True;
CNames *pReverseControlsKontext = NULL;
CRetStream *pRetStream = new CRetStream(pIn);
@@ -3120,27 +3165,33 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{
case SIReturn:
{
- USHORT nRet,nParams;
- SmartId aUId;
+ sal_uInt16 nRet,nParams;
+ rtl::OString aUId;
pRetStream->Read(nRet);
if ( pRetStream->GetNextType() == BinString )
{
String aUStrId; // UniqueStringID Used for Mozilla Integration
pRetStream->Read( aUStrId );
- aUId = SmartId( aUStrId );
+ // FIXME: HELPID
+ #if 0
+ aUId = rtl::OString( aUStrId );
+ #endif
}
else
{
comm_ULONG nUId;
pRetStream->Read( nUId ); // bei Sequence einfach die Sequence
- aUId = SmartId( nUId );
+ // FIXME: HELPID
+ #if 0
+ aUId = rtl::OString( nUId );
+ #endif
}
pRetStream->Read(nParams);
- USHORT nNr1 = 0;
+ sal_uInt16 nNr1 = 0;
comm_ULONG nLNr1 = 0;
String aString1;
- BOOL bBool1 = FALSE;
+ sal_Bool bBool1 = sal_False;
SbxValueRef xValue1 = new SbxValue;
if( nParams & PARAM_USHORT_1 )
@@ -3162,24 +3213,27 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{
case RET_Sequence:
{
- ULONG nUId = aUId.GetNum();
+ // FIXME: HELPID
+ #if 0
+ sal_uLong nUId = aUId.GetNum();
if ( nSequence != nUId )
{
- bSequenceOK = FALSE;
+ bSequenceOK = sal_False;
ADD_ERROR(SbxERR_BAD_ACTION, GEN_RES_STR2(S_RETURN_SEQUENCE_MISSMATCH, String::CreateFromInt64(nUId), String::CreateFromInt64(nSequence)) );
}
else
{
nClearSequence = nUId;
}
+ #endif
}
break;
case RET_Value:
if ( pImpl->pNextReturn )
{
- if ( aNextReturnId.Matches( aUId ) )
+ if ( aNextReturnId.equals( aUId ) )
{
- if( nParams & PARAM_ULONG_1 )
+ if( nParams & PARAM_ULONG_1 ) // FIXME this is to allow negative numbers, hoping that no large numbers are interpreted wrong. should have new PARAM_LONG_1 instead
{
if ( nLNr1 > 0x7fffffff )
pImpl->pNextReturn->PutLong( long(nLNr1 - 0xffffffff) -1 );
@@ -3189,7 +3243,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if( nParams & PARAM_USHORT_1 ) pImpl->pNextReturn->PutUShort( nNr1 );
if( nParams & PARAM_STR_1 ) pImpl->pNextReturn->PutString( aString1 );
if( nParams & PARAM_BOOL_1 ) pImpl->pNextReturn->PutBool( bBool1 );
- if( nParams & PARAM_SBXVALUE_1 )
+ if( nParams & PARAM_SBXVALUE_1 ) // FIXME: allow generic datatype
{
SbxValues aValues( SbxDATE );
xValue1->Get( aValues );
@@ -3219,7 +3273,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if ( !m_pReverseSlots && m_pSIds )
{
m_pReverseSlots = new CNames;
- USHORT nWin;
+ sal_uInt16 nWin;
const String aSl('/');
for ( nWin = 0 ; nWin < m_pSIds->Count() ; nWin++ )
{
@@ -3229,8 +3283,11 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
}
WinInfoRec *pWinInfo = new WinInfoRec;
+ // FIXME: HELPID
+ #if 0
pWinInfo->aUId = aUId.GetText();
- pWinInfo->nRType = (USHORT)nLNr1; // just ULONG for Transport, data is always USHORT
+ #endif
+ pWinInfo->nRType = (sal_uInt16)nLNr1; // just sal_uLong for Transport, data is always USHORT
pWinInfo->aRName = aString1;
pWinInfo->bIsReset = bBool1;
pWinInfo->aKurzname.Erase();
@@ -3239,7 +3296,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
// eventuell den Kontext feststellen. Passiert nur beim ersten Eintrag nach reset
if ( !pReverseControlsKontext && m_pReverseControlsSon )
{
- USHORT nNr;
+ sal_uInt16 nNr;
ControlItem *pNewItem = new ControlItemUId( String(), aUId );
if ( m_pReverseControlsSon->Seek_Entry(pNewItem,&nNr) )
{
@@ -3261,7 +3318,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
// Kurzname feststellen
if ( pReverseControlsKontext )
{
- USHORT nNr;
+ sal_uInt16 nNr;
ControlItem *pNewItem = new ControlItemUId( String(), aUId );
if ( pReverseControlsKontext->Seek_Entry(pNewItem,&nNr) )
{
@@ -3273,7 +3330,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
// Slotname feststellen
if ( m_pReverseSlots )
{
- USHORT nNr;
+ sal_uInt16 nNr;
ControlItem *pNewItem = new ControlItemUId( String(), aUId );
if ( m_pReverseSlots->Seek_Entry(pNewItem,&nNr) )
pWinInfo->aSlotname = m_pReverseSlots->GetObject(nNr)->pData->Kurzname;
@@ -3281,6 +3338,8 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
}
// Langname feststellen
+ // FIXME: HELPID
+ #if 0
if ( aUId.HasString() )
{ // use the String ID since there is no LongName in hid.lst
pWinInfo->aLangname = aUId.GetStr();
@@ -3289,13 +3348,14 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{
if ( m_pReverseUIds )
{
- USHORT nNr;
+ sal_uInt16 nNr;
ControlItem *pNewItem = new ControlItemUId( String(), aUId );
if ( m_pReverseUIds->Seek_Entry(pNewItem,&nNr) )
pWinInfo->aLangname = m_pReverseUIds->GetObject(nNr)->pData->Kurzname;
delete pNewItem;
}
}
+ #endif
aWinInfoHdl.Call( pWinInfo );
@@ -3304,7 +3364,9 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
break;
case RET_ProfileInfo:
{
- ULONG nUId = aUId.GetNum();
+ // FIXME: HELPID
+ #if 0
+ sal_uLong nUId = aUId.GetNum();
if ( nParams & PARAM_STR_1 )
{
DirEntry FilePath = pImpl->aLogFileBase + DirEntry(DirEntry(aLogFileName).GetBase().AppendAscii(".prf"));
@@ -3323,8 +3385,8 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{
case S_ProfileReset: // nLNr1 = Anzahl Borders
{
- pImpl->nNumBorders = (USHORT)nLNr1; // Borders are 0 to 4
- USHORT i;
+ pImpl->nNumBorders = (sal_uInt16)nLNr1; // Borders are 0 to 4
+ sal_uInt16 i;
for ( i=0 ; i<4 ; i++ )
pImpl->naValBorders[i] = 0;
@@ -3346,7 +3408,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
}
case S_ProfileTime: // nLNr1 = remote Zeit des Befehls
{
- USHORT i;
+ sal_uInt16 i;
for ( i=0 ; i<pImpl->nNumBorders &&
pImpl->naValBorders[i] <= nLNr1 ; i++ ) {};
@@ -3381,7 +3443,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if( aStrm.IsOpen() )
{
String aProfile;
- USHORT i;
+ sal_uInt16 i;
aProfile += String().Expand(15);
for ( i=0 ; i<pImpl->nNumBorders ; i++ )
@@ -3432,11 +3494,14 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
break;
}
}
+ #endif
}
break;
case RET_DirectLoging:
{
- ULONG nUId = aUId.GetNum();
+ // FIXME: HELPID
+ #if 0
+ sal_uLong nUId = aUId.GetNum();
switch ( nUId )
{
case S_AssertError:
@@ -3452,19 +3517,20 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
default:
;
}
+ #endif
}
break;
case RET_MacroRecorder:
{
- SortControlsByNumber( TRUE );
+ SortControlsByNumber( sal_True );
String aCommand,aControls,aControl,aULongNames,aULongName;
- BOOL bWriteNewKontext = FALSE;
+ sal_Bool bWriteNewKontext = sal_False;
aControls.Erase();
// Kurzname feststellen
if ( m_pReverseControls )
{
- USHORT nNr;
+ sal_uInt16 nNr;
ControlItem *pNewItem = new ControlItemUId( String(), aUId );
if ( m_pReverseControls->Seek_Entry(pNewItem,&nNr) )
aControls = m_pReverseControls->GetObject(nNr)->pData->Kurzname;
@@ -3481,8 +3547,9 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{
if ( m_pReverseControls )
{
- USHORT nNr;
- ControlItem *pNewItem = new ControlItemUId( String(), SmartId( nLNr1 ) );
+ sal_uInt16 nNr;
+ // FIXME: HELPID
+ ControlItem *pNewItem = new ControlItemUId( String(), rtl::OString( /*nLNr1*/ ) );
if ( m_pReverseControls->Seek_Entry(pNewItem,&nNr) )
aULongNames = m_pReverseControls->GetObject(nNr)->pData->Kurzname;
delete pNewItem;
@@ -3494,8 +3561,8 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
}
// now determin the best common kontext
- USHORT i,j;
- BOOL bFoundUlongName = FALSE, bFoundControl = FALSE;
+ sal_uInt16 i,j;
+ sal_Bool bFoundUlongName = sal_False, bFoundControl = sal_False;
// check for current kontext
for ( i = 0 ; !bFoundUlongName && i < aULongNames.GetTokenCount('/') ; i++ )
bFoundUlongName = aLastRecordedKontext.Equals( aULongNames.GetToken(i,'/').GetToken( 0,':') );
@@ -3510,7 +3577,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
}
else
{ // see if we can find common kontext
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
String aCurrentKontext;
for ( i = 0 ; !bFound && i < aULongNames.GetTokenCount('/') ; i++ )
@@ -3521,19 +3588,19 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{
if ( aCurrentKontext.Equals( aControls.GetToken(j,'/').GetToken( 0,':') ) )
{
- bFound = TRUE;
+ bFound = sal_True;
aULongName = aULongNames.GetToken(i,'/').GetToken( 1,':');
aControl = aControls.GetToken(j,'/').GetToken( 1,':');
aLastRecordedKontext = aCurrentKontext;
- bWriteNewKontext = TRUE;
+ bWriteNewKontext = sal_True;
}
}
}
if ( !bFound )
{
// check if both contain toplevel
- bFoundUlongName = FALSE;
- bFoundControl = FALSE;
+ bFoundUlongName = sal_False;
+ bFoundControl = sal_False;
for ( i = 0 ; !bFoundUlongName && i < aULongNames.GetTokenCount('/') ; i++ )
bFoundUlongName = aULongNames.GetToken(i,'/').GetToken( 0,':').Equals( aULongNames.GetToken(i,'/').GetToken( 1,':') );
@@ -3547,7 +3614,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if ( aLastRecordedKontext.Len() )
{
aLastRecordedKontext.Erase();
- bWriteNewKontext = TRUE;
+ bWriteNewKontext = sal_True;
}
}
else
@@ -3565,8 +3632,8 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
}
else
{ // we only have a Control
- USHORT i;
- BOOL bFoundControl = FALSE;
+ sal_uInt16 i;
+ sal_Bool bFoundControl = sal_False;
// check for current kontext
for ( i = 0 ; !bFoundControl && i < aControls.GetTokenCount('/') ; i++ )
bFoundControl = aLastRecordedKontext.Equals( aControls.GetToken(i,'/').GetToken( 0,':') );
@@ -3575,7 +3642,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
else
{
aLastRecordedKontext = aControls.GetToken(0,'/').GetToken( 0,':');
- bWriteNewKontext = TRUE;
+ bWriteNewKontext = sal_True;
aControl = aControls.GetToken(0,'/').GetToken( 1,':');
}
@@ -3602,35 +3669,35 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
aCommand += '.';
aCommand += aMethod;
- BOOL bWasParam = FALSE;
+ sal_Bool bWasParam = sal_False;
if( nParams & PARAM_STR_1 )
{
- bWasParam = TRUE;
+ bWasParam = sal_True;
aCommand.AppendAscii( " \"" );
if ( nNr1 & M_KEY_STRING )
{
- USHORT nModify = 0;
- BOOL bIsProsa = FALSE;
+ sal_uInt16 nModify = 0;
+ sal_Bool bIsProsa = sal_False;
xub_StrLen i;
for ( i = 0; i < aString1.Len(); i++ )
{
- if ( ((USHORT)aString1.GetChar(i)) == 1 ) // we have a spechial char
+ if ( ((sal_uInt16)aString1.GetChar(i)) == 1 ) // we have a spechial char
{
i++;
if ( !bIsProsa )
{
aCommand.AppendAscii( "<" );
- bIsProsa = TRUE;
+ bIsProsa = sal_True;
}
else
aCommand.AppendAscii( " " );
- USHORT nKeyCode = (USHORT)aString1.GetChar(i) & KEY_CODE;
- USHORT nNewModify = (USHORT)aString1.GetChar(i) & KEY_MODTYPE;
+ sal_uInt16 nKeyCode = (sal_uInt16)aString1.GetChar(i) & KEY_CODE;
+ sal_uInt16 nNewModify = (sal_uInt16)aString1.GetChar(i) & KEY_MODTYPE;
if ( nNewModify != nModify )
{ // generate modifiers
- USHORT nChanged = ( nNewModify ^ nModify );
+ sal_uInt16 nChanged = ( nNewModify ^ nModify );
if ( nChanged & KEY_SHIFT )
{
aCommand += GetKeyName( KEY_SHIFT );
@@ -3655,7 +3722,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if ( bIsProsa )
{
aCommand.AppendAscii( ">" );
- bIsProsa = FALSE;
+ bIsProsa = sal_False;
}
aCommand += aString1.GetChar(i);
nModify = 0;
@@ -3664,7 +3731,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if ( bIsProsa )
{
aCommand.AppendAscii( ">" );
- bIsProsa = FALSE;
+ bIsProsa = sal_False;
}
}
else
@@ -3679,7 +3746,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
aCommand.AppendAscii( ", " );
else
aCommand.AppendAscii( " " );
- bWasParam = TRUE;
+ bWasParam = sal_True;
if ( nNr1 & M_RET_NUM_CONTROL )
{
aCommand.Append( aULongName );
@@ -3695,7 +3762,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
aCommand.AppendAscii( ", " );
else
aCommand.AppendAscii( " " );
- bWasParam = TRUE;
+ bWasParam = sal_True;
if ( bBool1 )
aCommand.AppendAscii( "true" );
else
@@ -3717,18 +3784,24 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
case SIReturnError:
{
String aString;
- SmartId aUId;
+ rtl::OString aUId;
if ( pRetStream->GetNextType() == BinString )
{
String aUStrId; // UniqueStringID Used for Mozilla Integration
pRetStream->Read( aUStrId );
- aUId = SmartId( aUStrId );
+ // FIXME: HELPID
+ #if 0
+ aUId = rtl::OString( aUStrId );
+ #endif
}
else
{
comm_ULONG nUId;
pRetStream->Read( nUId ); // bei Sequence einfach die Sequence
- aUId = SmartId( nUId );
+ // FIXME: HELPID
+ #if 0
+ aUId = rtl::OString( nUId );
+ #endif
}
pRetStream->Read( aString );
ReplaceNumbers (aString);
@@ -3762,35 +3835,47 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
pShortNames->Invalidate( nClearSequence - KEEP_SEQUENCES );
}
- bReturnOK = TRUE;
+ bReturnOK = sal_True;
- return TRUE;
+ return sal_True;
} // RetService::Request()
-String TestToolObj::GetMethodName( ULONG nMethodId )
+String TestToolObj::GetMethodName( sal_uLong nMethodId )
{
- USHORT nElement;
+ sal_uInt16 nElement;
if ( !Controls::pClasses ) // Ist static, wird also nur einmal geladen
ReadFlatArray( Controls::arClasses, Controls::pClasses );
if ( Controls::pClasses )
{
+ // FIXME: HELPID
+ #if 0
for ( nElement = 0 ; nElement < Controls::pClasses->Count() ; nElement++ )
if ( Controls::pClasses->GetObject(nElement)->pData->aUId.Matches( nMethodId ) )
return Controls::pClasses->GetObject(nElement)->pData->Kurzname;
+ #else
+ (void)nElement;
+ (void)nMethodId;
+ #endif
}
return String();
}
-String TestToolObj::GetKeyName( USHORT nKeyCode )
+String TestToolObj::GetKeyName( sal_uInt16 nKeyCode )
{
- USHORT nElement;
+ sal_uInt16 nElement;
if ( !CmdStream::pKeyCodes ) // Ist static, wird also nur einmal geladen
ReadFlatArray( CmdStream::arKeyCodes, CmdStream::pKeyCodes );
if ( CmdStream::pKeyCodes )
{
+ // FIXME: HELPID
+ #if 0
for ( nElement = 0 ; nElement < CmdStream::pKeyCodes->Count() ; nElement++ )
if ( CmdStream::pKeyCodes->GetObject(nElement)->pData->aUId.Matches( nKeyCode ) )
return CmdStream::pKeyCodes->GetObject(nElement)->pData->Kurzname;
+ #else
+ (void)nElement;
+ (void)nKeyCode;
+ #endif
}
return CUniString( "UnknownKeyCode" );
}
@@ -3805,74 +3890,86 @@ static ControlDefLoad const arRes_Type [] =
xub_StrLen nGleich = STRING_NOTFOUND;
xub_StrLen nEnd = STRING_NOTFOUND;
xub_StrLen nStartPos = 0;
- ULONG nNumber;
+ sal_uLong nNumber;
String aType;
String aResult;
- BOOL bFound;
+ sal_Bool bFound;
while ( (nStart = aText.Search(StartKenn,nStartPos)) != STRING_NOTFOUND &&
(nGleich = aText.SearchAscii("=",nStart+StartKenn.Len())) != STRING_NOTFOUND &&
(nEnd = aText.Search(EndKenn,nGleich+1)) != STRING_NOTFOUND)
{
aType = aText.Copy(nStart,nGleich-nStart);
- nNumber = (ULONG)aText.Copy(nGleich+1,nEnd-nGleich-1).ToInt64();
- bFound = FALSE;
+ nNumber = (sal_uLong)aText.Copy(nGleich+1,nEnd-nGleich-1).ToInt64();
+ bFound = sal_False;
if ( aType.CompareTo(UIdKenn) == COMPARE_EQUAL )
{
- aResult = pShortNames->GetName(SmartId(nNumber));
- bFound = TRUE;
+ // FIXME: HELPID
+ aResult = pShortNames->GetName(rtl::OString(/*nNumber*/));
+ bFound = sal_True;
}
if ( aType.CompareTo(MethodKenn ) == COMPARE_EQUAL )
{
- bFound = TRUE;
+ bFound = sal_True;
aResult = GetMethodName( nNumber );
}
if ( aType.CompareTo(RcKenn ) == COMPARE_EQUAL )
{
- bFound = TRUE;
+ bFound = sal_True;
if ( !pRCommands ) // Ist static, wird also nur einmal geladen
ReadFlatArray( arR_Cmds, pRCommands );
- USHORT nElement;
+ sal_uInt16 nElement;
if ( pRCommands )
{
+ // FIXME: HELPID
+ #if 0
for ( nElement = 0 ; nElement < pRCommands->Count() ; nElement++ )
if ( pRCommands->GetObject(nElement)->pData->aUId.Matches( nNumber ) )
{
aResult = pRCommands->GetObject(nElement)->pData->Kurzname;
nElement = pRCommands->Count();
}
+ #else
+ (void)nElement;
+ #endif
}
}
if ( aType.CompareTo(TypeKenn ) == COMPARE_EQUAL )
{
- bFound = TRUE;
+ bFound = sal_True;
if ( !pRTypes ) // Ist static, wird also nur einmal geladen
ReadFlatArray( arRes_Type, pRTypes );
- USHORT nElement;
+ sal_uInt16 nElement;
if ( pRTypes )
{
+ // FIXME: HELPID
+ #if 0
for ( nElement = 0 ; nElement < pRTypes->Count() ; nElement++ )
if ( pRTypes->GetObject(nElement)->pData->aUId.Matches( nNumber ) )
{
aResult = pRTypes->GetObject(nElement)->pData->Kurzname;
nElement = pRTypes->Count();
}
+ #else
+ (void)nElement;
+ #endif
}
}
if ( aType.CompareTo(SlotKenn ) == COMPARE_EQUAL )
{
- aResult = pShortNames->GetName(SmartId(nNumber));
- bFound = TRUE;
+ // FIXME: HELPID
+ aResult = pShortNames->GetName(rtl::OString(/*nNumber*/));
+ bFound = sal_True;
}
if ( aType.CompareTo(TabKenn ) == COMPARE_EQUAL )
{
if ( nNumber > nStart )
- aResult.Fill( (USHORT)nNumber - nStart +1 );
+ aResult.Fill( (sal_uInt16)nNumber - nStart +1 );
else
aResult = CUniString(" ");
- bFound = TRUE;
+ bFound = sal_True;
}
nStartPos = nStart;
@@ -3888,7 +3985,7 @@ static ControlDefLoad const arRes_Type [] =
}
-SbTextType TestToolObj::GetSymbolType( const String &rSymbol, BOOL bWasControl )
+SbTextType TestToolObj::GetSymbolType( const String &rSymbol, sal_Bool bWasControl )
{
if ( rSymbol.CompareToAscii( "try" ) == COMPARE_EQUAL
|| rSymbol.CompareToAscii( "catch" ) == COMPARE_EQUAL
@@ -3900,7 +3997,7 @@ SbTextType TestToolObj::GetSymbolType( const String &rSymbol, BOOL bWasControl )
}
- ControlDef WhatName( rSymbol, SmartId() );
+ ControlDef WhatName( rSymbol, rtl::OString() );
if ( bWasControl )
{
@@ -3918,7 +4015,7 @@ SbTextType TestToolObj::GetSymbolType( const String &rSymbol, BOOL bWasControl )
// Die Controls durchsuchen
if ( m_pControls )
{
- USHORT nWin;
+ sal_uInt16 nWin;
for ( nWin = 0 ; nWin < m_pControls->Count() ; nWin++ )
{
@@ -3966,8 +4063,8 @@ Controls::~Controls()
void Controls::ChangeListener( SbxObject* parent )
{
- EndListening( pMethodVar->GetBroadcaster(), TRUE );
- parent->StartListening( pMethodVar->GetBroadcaster(), TRUE );
+ EndListening( pMethodVar->GetBroadcaster(), sal_True );
+ parent->StartListening( pMethodVar->GetBroadcaster(), sal_True );
}
void Controls::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
@@ -3989,12 +4086,13 @@ SbxVariable* Controls::Find( const String& aStr, SbxClassType aType)
}
- USHORT nElement;
- ControlDef WhatName(aStr,SmartId());
+ sal_uInt16 nElement;
+ ControlDef WhatName(aStr,rtl::OString());
if (pClasses && pClasses->Seek_Entry(&WhatName,&nElement))
{
pMethodVar->SetName(aStr);
- ULONG nUId = pClasses->GetObject(nElement)->pData->aUId.GetNum();
+ // FIXME: HELPID
+ sal_uLong nUId = 0;//pClasses->GetObject(nElement)->pData->aUId.GetNum();
pMethodVar->nValue = nUId;
pMethodVar->SetUserData( GetUserData() );
@@ -4013,7 +4111,7 @@ SbxVariable* Controls::Find( const String& aStr, SbxClassType aType)
}
-String TTFormat::ms2s( ULONG nMilliSeconds )
+String TTFormat::ms2s( sal_uLong nMilliSeconds )
{
if ( nMilliSeconds < 100000 ) // 100 Sekunden
return String::CreateFromInt64( nMilliSeconds );
diff --git a/automation/source/testtool/objtest.hxx b/automation/source/testtool/objtest.hxx
index a7297ad79a32..5c95fea3dd05 100644
--- a/automation/source/testtool/objtest.hxx
+++ b/automation/source/testtool/objtest.hxx
@@ -36,7 +36,6 @@
#include <testtool.hxx>
#include "cmdstrm.hxx"
#include <basic/basicrt.hxx>
-#include <vcl/smartid.hxx>
#include "httprequest.hxx"
#include <map>
@@ -107,7 +106,7 @@ class ControlData
{
public:
String Kurzname;
- SmartId aUId;
+ rtl::OString aUId;
};
DBG_NAMEEX( ControlItem )
@@ -119,34 +118,34 @@ private:
public:
ControlData *pData;
- ControlItem( const char *Name, SmartId aUIdP );
- ControlItem( const String &Name, SmartId aUIdP );
+ ControlItem( const char *Name, rtl::OString aUIdP );
+ ControlItem( const String &Name, rtl::OString aUIdP );
ControlItem( ControlData *pDataP );
virtual ~ControlItem() {
DBG_DTOR(ControlItem,0);
delete pData;
}
- virtual BOOL operator < (const ControlItem &rPar)=0;
- virtual BOOL operator == (const ControlItem &rPar)=0;
+ virtual sal_Bool operator < (const ControlItem &rPar)=0;
+ virtual sal_Bool operator == (const ControlItem &rPar)=0;
};
SV_DECL_PTRARR_SORT_DEL(CNames, ControlItem*, 50, 10)
#define MK_SON_ACCESS( ClassName )\
- BOOL SonInsert( const ClassName *pNewEntry ) { const ControlItem *pItem = pNewEntry; return pSons->Insert( pItem ); }\
- BOOL SonSeek_Entry( const ClassName *pSearchEntry, USHORT *nRes = NULL) { return pSons->Seek_Entry( pSearchEntry, nRes ); }\
- ClassName* SonGetObject( USHORT nNr ) { return (ClassName*)pSons->GetObject( nNr ); }
+ sal_Bool SonInsert( const ClassName *pNewEntry ) { const ControlItem *pItem = pNewEntry; return pSons->Insert( pItem ); }\
+ sal_Bool SonSeek_Entry( const ClassName *pSearchEntry, sal_uInt16 *nRes = NULL) { return pSons->Seek_Entry( pSearchEntry, nRes ); }\
+ ClassName* SonGetObject( sal_uInt16 nNr ) { return (ClassName*)pSons->GetObject( nNr ); }
class ControlSon
{
protected:
- CNames *pSons; // um sicherzustelle, daß nur Söhne des richtien Type reinkommen
+ CNames *pSons; // um sicherzustelle, da� nur S�hne des richtien Type reinkommen
public:
ControlSon() : pSons( NULL ) {};
~ControlSon();
- USHORT Son_Count() { return pSons->Count(); }
+ sal_uInt16 Son_Count() { return pSons->Count(); }
void Sons( CNames *pNewSons ) { pSons = pNewSons; }
CNames*& GetSons() { return pSons; }
};
@@ -154,21 +153,21 @@ public:
class ControlItemSon : public ControlItem, public ControlSon
{
public:
- ControlItemSon(const char *Name, SmartId aUIdP )
+ ControlItemSon(const char *Name, rtl::OString aUIdP )
: ControlItem( Name, aUIdP ) {}
- ControlItemSon(const String &Name, SmartId aUIdP );
+ ControlItemSon(const String &Name, rtl::OString aUIdP );
};
class ControlDef : public ControlItemSon
{
public:
- ControlDef(const char *Name, SmartId aUIdP )
+ ControlDef(const char *Name, rtl::OString aUIdP )
: ControlItemSon( Name, aUIdP ) {DBG_CTOR(ControlDef,0);}
- ControlDef(const String &Name, SmartId aUIdP );
- ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, BOOL bWithSons = FALSE );
+ ControlDef(const String &Name, rtl::OString aUIdP );
+ ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, sal_Bool bWithSons = sal_False );
~ControlDef() {DBG_DTOR(ControlDef,0);}
- virtual BOOL operator < (const ControlItem &rPar);
- virtual BOOL operator == (const ControlItem &rPar);
+ virtual sal_Bool operator < (const ControlItem &rPar);
+ virtual sal_Bool operator == (const ControlItem &rPar);
void Write( SvStream &aStream );
MK_SON_ACCESS( ControlDef )
};
@@ -176,33 +175,33 @@ public:
class ControlItemUId : public ControlItem
{
public:
- ControlItemUId(String Name, SmartId aUIdP)
+ ControlItemUId(String Name, rtl::OString aUIdP)
: ControlItem( Name, aUIdP){}
- virtual BOOL operator < (const ControlItem &rPar);
- virtual BOOL operator == (const ControlItem &rPar);
+ virtual sal_Bool operator < (const ControlItem &rPar);
+ virtual sal_Bool operator == (const ControlItem &rPar);
};
class ControlItemUIdSon : public ControlItemUId, public ControlSon
{
public:
- ControlItemUIdSon(String Name, SmartId aUIdP) : ControlItemUId( Name, aUIdP) {}
+ ControlItemUIdSon(String Name, rtl::OString aUIdP) : ControlItemUId( Name, aUIdP) {}
MK_SON_ACCESS( ControlItemUId )
};
class ReverseName : public ControlItemUId
{
public:
- ULONG LastSequence;
+ sal_uLong LastSequence;
- ReverseName(String Name, SmartId aUIdP, ULONG nSeq) : ControlItemUId( Name, aUIdP), LastSequence(nSeq) {}
+ ReverseName(String Name, rtl::OString aUIdP, sal_uLong nSeq) : ControlItemUId( Name, aUIdP), LastSequence(nSeq) {}
};
class CRevNames: public CNames
{
public:
- void Insert( String aName, SmartId aUId, ULONG nSeq );
- String GetName( SmartId aUId );
- void Invalidate ( ULONG nSeq );
+ void Insert( String aName, rtl::OString aUId, sal_uLong nSeq );
+ String GetName( rtl::OString aUId );
+ void Invalidate ( sal_uLong nSeq );
};
@@ -210,7 +209,7 @@ class SbxTransportMethod: public SbxMethod
{
public:
SbxTransportMethod( SbxDataType );
- ULONG nValue;
+ sal_uLong nValue;
String aUnoSlot;
};
SV_DECL_IMPL_REF(SbxTransportMethod);
@@ -235,10 +234,10 @@ typedef std::map< String, String > Environment;
class ImplTestToolObj
{
public:
- String ProgParam; // Parameter der zu Testenden APP; Gesetzt über Start
+ String ProgParam; // Parameter der zu Testenden APP; Gesetzt �ber Start
- DirEntry aFileBase; // Grundpfad für die *.sid und *.win Dateien (Aus Configdatei)
- DirEntry aLogFileBase; // Grundpfad für die *.res Dateien (Aus Configdatei)
+ 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
SbxTransportMethodRef pNextReturn; // Verweis auf die Var, die den Returnwert aufnimmt.
@@ -246,48 +245,48 @@ public:
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]; // Falls in Ausdr�cken mehrere verwendet werden
Time aServerTimeout;
// Profiling Datenfelder
- ULONG LocalStarttime;
- USHORT nNumBorders;
- ULONG naValBorders[4];
- ULONG naNumEntries[5];
- ULONG naRemoteTime[5];
- ULONG naLocalTime[5];
-
- ULONG nMinRemoteCommandDelay;
- ULONG nMaxRemoteCommandDelay;
- BOOL bDoRemoteCommandDelay;
-
- BOOL bLnaguageExtensionLoaded; // Wurde über 'use' was geladen? Für syntax highlighting
+ sal_uLong LocalStarttime;
+ sal_uInt16 nNumBorders;
+ sal_uLong naValBorders[4];
+ sal_uLong naNumEntries[5];
+ sal_uLong naRemoteTime[5];
+ sal_uLong naLocalTime[5];
+
+ sal_uLong nMinRemoteCommandDelay;
+ sal_uLong nMaxRemoteCommandDelay;
+ sal_Bool bDoRemoteCommandDelay;
+
+ sal_Bool bLnaguageExtensionLoaded; // Wurde �ber 'use' was geladen? F�r syntax highlighting
SfxBroadcaster *pTTSfxBroadcaster;
- ULONG nErrorCount;
- ULONG nWarningCount;
- ULONG nQAErrorCount;
- ULONG nIncludeFileWarningCount;
+ sal_uLong nErrorCount;
+ sal_uLong nWarningCount;
+ sal_uLong nQAErrorCount;
+ sal_uLong nIncludeFileWarningCount;
SbxDimArrayRef xErrorList;
SbxDimArrayRef xWarningList;
SbxDimArrayRef xQAErrorList;
SbxDimArrayRef xIncludeFileWarningList;
- BOOL bIsStart; // set tu TRUE while command Start is initiating the communication
+ sal_Bool bIsStart; // set tu sal_True while command Start is initiating the communication
MyBasic* pMyBasic;
String aTestCaseName; // holds name of current TestCase
String aTestCaseFileName; // holds FileName of current TestCase
- USHORT nTestCaseLineNr; // holds Line of current TestCase
+ sal_uInt16 nTestCaseLineNr; // holds Line of current TestCase
- BOOL bEnableQaErrors; // include QA errors in report
- BOOL bDebugFindNoErrors; // suppress generating errors when find of variables is called for variable viewing purposes
+ sal_Bool bEnableQaErrors; // include QA errors in report
+ sal_Bool bDebugFindNoErrors; // suppress generating errors when find of variables is called for variable viewing purposes
- BOOL bStopOnSyntaxError; // catch syntax errors in testcases or not
+ sal_Bool bStopOnSyntaxError; // catch syntax errors in testcases or not
Environment *pChildEnv; // Environment Variables for child Process
@@ -298,7 +297,7 @@ public:
class TTFormat
{
public:
- static String ms2s( ULONG nMilliSeconds );
+ static String ms2s( sal_uLong nMilliSeconds );
};
diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx
index bc0e94f76728..40795641322c 100644
--- a/automation/source/testtool/tcommuni.cxx
+++ b/automation/source/testtool/tcommuni.cxx
@@ -43,7 +43,7 @@
#include <basic/testtool.hxx>
CommunicationManagerClientViaSocketTT::CommunicationManagerClientViaSocketTT()
-: CommunicationManagerClientViaSocket( TRUE )
+: CommunicationManagerClientViaSocket( sal_True )
, aAppPath()
, aAppParams()
, pProcess( NULL )
@@ -51,14 +51,14 @@ CommunicationManagerClientViaSocketTT::CommunicationManagerClientViaSocketTT()
}
-BOOL CommunicationManagerClientViaSocketTT::StartCommunication()
+sal_Bool CommunicationManagerClientViaSocketTT::StartCommunication()
{
- bApplicationStarted = FALSE;
+ bApplicationStarted = sal_False;
return CommunicationManagerClientViaSocket::StartCommunication( ByteString( GetHostConfig(), RTL_TEXTENCODING_UTF8 ), GetTTPortConfig() );
}
-BOOL CommunicationManagerClientViaSocketTT::StartCommunication( String aApp, String aParams, Environment *pChildEnv )
+sal_Bool CommunicationManagerClientViaSocketTT::StartCommunication( String aApp, String aParams, Environment *pChildEnv )
{
aAppPath = aApp;
aAppParams = aParams;
@@ -67,7 +67,7 @@ BOOL CommunicationManagerClientViaSocketTT::StartCommunication( String aApp, Str
}
-BOOL CommunicationManagerClientViaSocketTT::RetryConnect()
+sal_Bool CommunicationManagerClientViaSocketTT::RetryConnect()
{
if ( !bApplicationStarted )
{
@@ -79,8 +79,8 @@ BOOL CommunicationManagerClientViaSocketTT::RetryConnect()
pProcess = new Process();
pProcess->SetImage( aAppPath, aAppParams, &aAppEnv );
- BOOL bSucc = pProcess->Start();
- bApplicationStarted = TRUE;
+ sal_Bool bSucc = pProcess->Start();
+ bApplicationStarted = sal_True;
if ( bSucc )
{
@@ -90,7 +90,7 @@ BOOL CommunicationManagerClientViaSocketTT::RetryConnect()
}
return bSucc;
}
- return FALSE;
+ return sal_False;
}
else
{
@@ -101,18 +101,18 @@ BOOL CommunicationManagerClientViaSocketTT::RetryConnect()
aWait.Start();
while ( aWait.IsActive() )
GetpApp()->Yield();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
}
-BOOL CommunicationManagerClientViaSocketTT::KillApplication()
+sal_Bool CommunicationManagerClientViaSocketTT::KillApplication()
{
if ( pProcess )
return pProcess->Terminate();
- return TRUE;
+ return sal_True;
}
#define GETSET(aVar, KeyName, Dafault) \
@@ -128,7 +128,7 @@ String GetHostConfig()
{
String aHostToTalk;
- for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
+ for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
{
if ( Application::GetCommandLineParam( i ).Copy(0,6).CompareIgnoreCaseToAscii("-host=") == COMPARE_EQUAL
#ifndef UNX
@@ -147,11 +147,11 @@ String GetHostConfig()
}
-ULONG GetTTPortConfig()
+sal_uLong GetTTPortConfig()
{
String aPortToTalk;
- for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
+ for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
{
if ( Application::GetCommandLineParam( i ).Copy(0,6).CompareIgnoreCaseToAscii("-port=") == COMPARE_EQUAL
#ifndef UNX
@@ -160,7 +160,7 @@ ULONG GetTTPortConfig()
)
{
aPortToTalk = Application::GetCommandLineParam( i ).Copy(6);
- return (ULONG)aPortToTalk.ToInt64();
+ return (sal_uLong)aPortToTalk.ToInt64();
}
}
@@ -169,15 +169,15 @@ ULONG GetTTPortConfig()
aConf.SetGroup("Communication");
GETSET( abPortToTalk, "TTPort", ByteString::CreateFromInt32( TESTTOOL_DEFAULT_PORT ) );
- return (ULONG)abPortToTalk.ToInt64();
+ return (sal_uLong)abPortToTalk.ToInt64();
}
-ULONG GetUnoPortConfig()
+sal_uLong GetUnoPortConfig()
{
String aPortToTalk;
- for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
+ for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
{
if ( Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("-unoport=") == COMPARE_EQUAL
#ifndef UNX
@@ -186,7 +186,7 @@ ULONG GetUnoPortConfig()
)
{
aPortToTalk = Application::GetCommandLineParam( i ).Copy(6);
- return (ULONG)aPortToTalk.ToInt64();
+ return (sal_uLong)aPortToTalk.ToInt64();
}
}
@@ -195,7 +195,7 @@ ULONG GetUnoPortConfig()
aConf.SetGroup("Communication");
GETSET( abPortToTalk, "UnoPort", ByteString::CreateFromInt32( UNO_DEFAULT_PORT ) );
- return (ULONG)abPortToTalk.ToInt64();
+ return (sal_uLong)abPortToTalk.ToInt64();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/source/testtool/tcommuni.hxx b/automation/source/testtool/tcommuni.hxx
index 575f79c549fb..6d3f9af6ed5f 100644
--- a/automation/source/testtool/tcommuni.hxx
+++ b/automation/source/testtool/tcommuni.hxx
@@ -41,14 +41,14 @@ public:
CommunicationManagerClientViaSocketTT();
using CommunicationManagerClientViaSocket::StartCommunication;
- virtual BOOL StartCommunication();
- virtual BOOL StartCommunication( String aApp, String aParams, Environment *pChildEnv );
+ virtual sal_Bool StartCommunication();
+ virtual sal_Bool StartCommunication( String aApp, String aParams, Environment *pChildEnv );
- BOOL KillApplication();
+ sal_Bool KillApplication();
protected:
- virtual BOOL RetryConnect();
- BOOL bApplicationStarted;
+ virtual sal_Bool RetryConnect();
+ sal_Bool bApplicationStarted;
Time aFirstRetryCall;
String aAppPath;
String aAppParams;
@@ -58,7 +58,7 @@ protected:
String GetHostConfig();
-ULONG GetTTPortConfig();
-ULONG GetUnoPortConfig();
+sal_uLong GetTTPortConfig();
+sal_uLong GetUnoPortConfig();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/util/manually_added_ids.hid b/automation/util/manually_added_ids.hid
index 7372dc0d9879..7372dc0d9879 100755..100644
--- a/automation/util/manually_added_ids.hid
+++ b/automation/util/manually_added_ids.hid