diff options
Diffstat (limited to 'automation')
73 files changed, 641 insertions, 1881 deletions
diff --git a/automation/inc/automation/automation.hxx b/automation/inc/automation/automation.hxx index 38babd58849e..aaf54e24d564 100644 --- a/automation/inc/automation/automation.hxx +++ b/automation/inc/automation/automation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,5 @@ extern "C" #endif #endif // AUTOMATION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/inc/automation/commdefines.hxx b/automation/inc/automation/commdefines.hxx index 98ebf308c3a7..15e38a8ff897 100644 --- a/automation/inc/automation/commdefines.hxx +++ b/automation/inc/automation/commdefines.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,3 +147,4 @@ typedef comm_USHORT CommunicationOption; #define CH_SetApplication ((HandshakeType)0x0106) /// Set Description of Client +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx index 2e035ba91bfa..adfe4561b132 100644 --- a/automation/inc/automation/commtypes.hxx +++ b/automation/inc/automation/commtypes.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,5 @@ class String; #define comm_String String #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index 1590bb9f58fb..2c8ac15b6bd8 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,8 +30,8 @@ #define _COMMUNI_HXX #include <svl/svarray.hxx> -#include <vos/thread.hxx> -#include <vos/mutex.hxx> +#include <osl/thread.hxx> +#include <osl/mutex.hxx> #include <vcl/timer.hxx> #include <automation/simplecm.hxx> @@ -46,7 +47,7 @@ class MultiCommunicationManager : public CommunicationManager public: MultiCommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~MultiCommunicationManager(); - virtual sal_Bool StopCommunication(); // Hält alle CommunicationLinks an + virtual sal_Bool StopCommunication(); virtual sal_Bool IsLinkValid( CommunicationLink* pCL ); virtual sal_uInt16 GetCommunicationLinkCount(); virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr ); @@ -59,7 +60,7 @@ 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 ); sal_Bool bGracefullShutdown; }; @@ -76,10 +77,10 @@ public: CommunicationManagerClient( sal_Bool bUseMultiChannel = sal_False ); }; -class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public vos::OThread +class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public osl::Thread { public: - CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ); + CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket ); virtual ~CommunicationLinkViaSocket(); virtual sal_Bool IsCommunicationError(); @@ -101,8 +102,8 @@ protected: virtual sal_Bool ShutdownCommunication(); sal_uLong nConnectionClosedEventId; sal_uLong nDataReceivedEventId; - vos::OMutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist - vos::OMutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist + 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* ); @@ -133,7 +134,7 @@ private: void AddConnection( CommunicationLink *pNewConnection ); }; -class CommunicationManagerServerAcceptThread: public vos::OThread +class CommunicationManagerServerAcceptThread: public osl::Thread { public: CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, sal_uLong nPort, sal_uInt16 nMaxCon = CM_UNLIMITED_CONNECTIONS ); @@ -145,11 +146,11 @@ protected: private: CommunicationManagerServerViaSocket* pMyServer; - vos::OAcceptorSocket *pAcceptorSocket; + osl::AcceptorSocket* pAcceptorSocket; sal_uLong nPortToListen; sal_uInt16 nMaxConnections; sal_uLong nAddConnectionEventId; - vos::OMutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist + 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(); } @@ -174,7 +175,9 @@ private: ByteString aHostToTalk; sal_uLong nPortToTalk; protected: - virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); } + virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); } }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index 657357431f9f..dd522cb3beeb 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,13 +31,13 @@ #include <tools/link.hxx> #include <tools/string.hxx> #include <tools/stream.hxx> -#include <vos/socket.hxx> +#include <osl/socket.hxx> #include <tools/debug.hxx> #include <tools/datetime.hxx> #include <automation/commdefines.hxx> -// CM steht für CommunicationManager +// CM steht f�r CommunicationManager #define CM_UNLIMITED_CONNECTIONS 0xffff typedef sal_uInt16 CM_NameType; @@ -98,15 +99,6 @@ typedef sal_uInt16 CM_InfoType; class CommunicationLink; -/*#undef PRV_SV_DECL_REF_LOCK -#define PRV_SV_DECL_REF_LOCK(ClassName, Ref) \ -protected: \ - ClassName * pObj; \ -public: \ -PRV_SV_DECL_REF_SIGNATURE(ClassName, Ref) \ - inline ClassName##Ref( void * pObjP ){ClassName##Ref ((ClassName *) pObjP);} \ -*/ - SV_DECL_REF( CommunicationLink ) class InfoString : public ByteString @@ -132,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; } @@ -162,19 +154,19 @@ public: sal_Bool TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); // Liefert die ID, die vom Sender angegeben wurde. - // Dadurch lassen sich virtuelle Kommunikationen über einen physikalischen Link realisiren. - // Da die Kommunikation zu älteren Versionen kompatibel bleiben muß, muß der Empfänger raten, - // die neue oder die alte verwendet wird, da sich der Kopf eines Auftrages dann ändert. + // 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. + /// 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 + /// Syncrones Empfangen der Daten. Nur f�r Kommandozeile, sonst leer implementiert virtual sal_Bool ReceiveDataStream(){ return sal_False; } /// Statistics @@ -198,7 +190,7 @@ protected: sal_uInt16 nServiceProtocol; sal_uInt16 nServiceHeaderType; - /// Verhindert das vorzeitige Auslösen des nächsten Callbacks. + /// Verhindert das vorzeitige Ausl�sen des n�chsten Callbacks. void StartCallback(){ bIsInsideCallback = sal_True; } sal_Bool bIsInsideCallback; @@ -237,14 +229,14 @@ public: virtual sal_Bool StartCommunication()=0; virtual sal_Bool StartCommunication( String aApp, String aParams ); virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ); - virtual sal_Bool StopCommunication()=0; // Hält alle CommunicationLinks an + virtual sal_Bool StopCommunication()=0; // 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 sal_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 sal_uInt16 GetCommunicationLinkCount()=0; virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr )=0; @@ -274,7 +266,7 @@ 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 ); } @@ -282,7 +274,7 @@ protected: 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; @@ -300,7 +292,7 @@ class SingleCommunicationManager : public CommunicationManager public: SingleCommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~SingleCommunicationManager(); - virtual sal_Bool StopCommunication(); // Hält alle CommunicationLinks an + 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 ); @@ -310,7 +302,7 @@ protected: 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 @@ -337,19 +329,19 @@ private: ByteString aMyName; TCPIO* pTCPIO; - vos::OStreamSocket *pStreamSocket; + osl::StreamSocket* pStreamSocket; protected: - SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ); + SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket ); virtual ~SimpleCommunicationLinkViaSocket(); - vos::OStreamSocket* GetStreamSocket() { return pStreamSocket; } - void SetStreamSocket( vos::OStreamSocket* pSocket ); + osl::StreamSocket* GetStreamSocket() { return pStreamSocket; } + void SetStreamSocket( osl::StreamSocket* pSocket ); SvStream *pReceiveStream; sal_Bool DoReceiveDataStream(); /// Recieve DataPacket from Socket virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL); - void SetFinalRecieveTimeout(); + bool IsReceiveReady(); sal_Bool bIsRequestShutdownPending; virtual void WaitForShutdown()=0; void SetNewPacketAsCurrent(); @@ -358,7 +350,7 @@ protected: class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket { public: - SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket ); + SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ); ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks(); virtual sal_Bool ReceiveDataStream(); protected: @@ -371,7 +363,7 @@ class CommonSocketFunctions public: sal_Bool DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ); protected: - virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS )=0; + virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0; }; class SingleCommunicationManagerClientViaSocket : public SingleCommunicationManager, public ICommunicationManagerClient, CommonSocketFunctions @@ -387,7 +379,9 @@ private: ByteString aHostToTalk; sal_uLong nPortToTalk; protected: - virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } + virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/inc/pch/precompiled_automation.cxx b/automation/inc/pch/precompiled_automation.cxx index 9ceb299f199c..e07b325283d8 100644 --- a/automation/inc/pch/precompiled_automation.cxx +++ b/automation/inc/pch/precompiled_automation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,3 +28,4 @@ #include "precompiled_automation.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/inc/pch/precompiled_automation.hxx b/automation/inc/pch/precompiled_automation.hxx index ac38a7ce5cc8..05a8e8250f74 100644 --- a/automation/inc/pch/precompiled_automation.hxx +++ b/automation/inc/pch/precompiled_automation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,3 +31,4 @@ #ifdef PRECOMPILED_HEADERS #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/packimages/makefile.mk b/automation/packimages/makefile.mk index 928155039773..30595417149f 100644 --- a/automation/packimages/makefile.mk +++ b/automation/packimages/makefile.mk @@ -53,11 +53,10 @@ ALLTAR : \ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))$/images_tt.zip .PHONY: @echo ------------------------------ @echo Making: $@ - $(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/stt*.ilst $(MISC) - $(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/svt*.ilst $(MISC) - $(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/fps*.ilst $(MISC) - $(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/vcl*.ilst $(MISC) - $(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/sb*.ilst $(MISC) - -$(MKDIR) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN)) - $(PERL) $(SOLARENV)$/bin$/packimages.pl -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -l $(MISC) -o $@ - + $(COMMAND_ECHO)$(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/stt*.ilst $(MISC) + $(COMMAND_ECHO)$(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/svt*.ilst $(MISC) + $(COMMAND_ECHO)$(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/fps*.ilst $(MISC) + $(COMMAND_ECHO)$(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/vcl*.ilst $(MISC) + $(COMMAND_ECHO)$(COPY) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(SOLARRESDIR))$/img$/sb*.ilst $(MISC) + @-$(MKDIR) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN)) >& $(NULLDEV) + $(COMMAND_ECHO)$(PERL) $(SOLARENV)$/bin$/packimages.pl -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -l $(MISC) -o $@ diff --git a/automation/source/app/testbasi.cxx b/automation/source/app/testbasi.cxx index c2efb51589a4..87ecf3e72045 100644 --- a/automation/source/app/testbasi.cxx +++ b/automation/source/app/testbasi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,29 +30,13 @@ #include "precompiled_automation.hxx" #include <basic/sbx.hxx> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include <basic/testtool.hxx> #include "testbasi.hxx" -//#include "app.hxx" -//#include "basic.hrc" -//#include "appbased.hxx" #define P_FEHLERLISTE TestToolObj::pFehlerListe -//#include "status.hxx" -//#include "basic.hrc" - -//#include "object.hxx" - #include <testapp.hxx> #include <testtool.hxx> -#ifndef _SB_INTERN_HXX -//#include "sbintern.hxx" -#endif - -//#include "comm_bas.hxx" -//#include "processw.hxx" TYPEINIT1(TTBasic,MyBasic) @@ -159,3 +144,5 @@ void TTBasic::DebugFindNoErrors( sal_Bool bDebugFindNoErrors ) { ((TestToolObj*)pTestObject)->DebugFindNoErrors( bDebugFindNoErrors ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/app/testbasi.hxx b/automation/source/app/testbasi.hxx index e649dab0950b..2d8cbb5dca39 100644 --- a/automation/source/app/testbasi.hxx +++ b/automation/source/app/testbasi.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,5 @@ public: SV_DECL_IMPL_REF(TTBasic) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 36f79bb4fa55..95086c1e8c2a 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,7 @@ #endif #include <tools/debug.hxx> #include <vcl/svapp.hxx> -#include <vos/socket.hxx> +#include <osl/socket.hxx> #include <tools/stream.hxx> #include <vcl/timer.hxx> #include <tools/fsys.hxx> @@ -55,7 +56,7 @@ _SV_IMPL_SORTAR_ALG( nm,AE )\ if( nL ) {\ DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \ - DBG_ERROR("Das Element der Liste wurde nicht gelöscht"); \ + OSL_FAIL("Das Element der Liste wurde nicht gel�scht"); \ SvPtrarr::Remove( nP, nL ); \ } \ } \ @@ -66,9 +67,9 @@ _SV_SEEK_PTR( nm, AE ) SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* ); -vos::OMutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest +osl::Mutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest -CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ) +CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket ) : SimpleCommunicationLinkViaSocket( pMan, pSocket ) , nConnectionClosedEventId( 0 ) , nDataReceivedEventId( 0 ) @@ -77,7 +78,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM { SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl )); if ( !pMPostUserEvent ) - pMPostUserEvent = new vos::OMutex; + pMPostUserEvent = new osl::Mutex; // this is necassary to prevent the running thread from sending the close event // before the open event has been sent. StartCallback(); @@ -92,25 +93,25 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() while ( nConnectionClosedEventId || nDataReceivedEventId ) GetpApp()->Yield(); { - vos::OGuard aGuard( aMConnectionClosed ); + osl::MutexGuard aGuard( aMConnectionClosed ); if ( nConnectionClosedEventId ) { 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 ); } } { - vos::OGuard aGuard( aMDataReceived ); + osl::MutexGuard aGuard( aMDataReceived ); if ( nDataReceivedEventId ) { 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 ); } } @@ -128,11 +129,11 @@ sal_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(); - vos::OStreamSocket *pTempSocket = GetStreamSocket(); + osl::StreamSocket* pTempSocket = GetStreamSocket(); SetStreamSocket( NULL ); delete pTempSocket; @@ -205,23 +206,23 @@ void CommunicationLinkViaSocket::run() TimeValue sNochEins = {0, 1000000}; while ( schedule() && bIsInsideCallback ) // solange der letzte Callback nicht beendet ist - sleep( sNochEins ); + wait( sNochEins ); SetNewPacketAsCurrent(); StartCallback(); { - vos::OGuard aGuard( aMDataReceived ); - vos::OGuard aGuard2( *pMPostUserEvent ); + osl::MutexGuard aGuard( aMDataReceived ); + osl::MutexGuard aGuard2( *pMPostUserEvent ); mlPutDataReceived.Call(this); } } TimeValue sNochEins = {0, 1000000}; while ( schedule() && bIsInsideCallback ) // solange der letzte Callback nicht beendet ist - sleep( sNochEins ); + wait( sNochEins ); StartCallback(); { - vos::OGuard aGuard( aMConnectionClosed ); - vos::OGuard aGuard2( *pMPostUserEvent ); + osl::MutexGuard aGuard( aMConnectionClosed ); + osl::MutexGuard aGuard2( *pMPostUserEvent ); nConnectionClosedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, ConnectionClosed ) ); } } @@ -238,8 +239,8 @@ sal_Bool CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG ) { { - vos::OGuard aGuard( aMConnectionClosed ); - nConnectionClosedEventId = 0; // Achtung!! alles andere muß oben gemacht werden. + osl::MutexGuard aGuard( aMConnectionClosed ); + nConnectionClosedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden. } ShutdownCommunication(); return CommunicationLink::ConnectionClosed( ); @@ -249,8 +250,8 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG ) long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG ) { { - vos::OGuard aGuard( aMDataReceived ); - nDataReceivedEventId = 0; // Achtung!! alles andere muß oben gemacht werden. + osl::MutexGuard aGuard( aMDataReceived ); + nDataReceivedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden. } return CommunicationLink::DataReceived( ); } @@ -296,8 +297,8 @@ 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 + // Alles weghauen, was nicht rechtzeitig auf die B�ume gekommen ist + // Was bei StopCommunication �brig geblieben ist, da es sich asynchron austragen wollte sal_uInt16 i = ActiveLinks->Count(); while ( i-- ) { @@ -309,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-- ) @@ -325,13 +326,13 @@ 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. + // 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--; } @@ -358,7 +359,7 @@ CommunicationLinkRef MultiCommunicationManager::GetCommunicationLink( sal_uInt16 void MultiCommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) { - CommunicationLinkRef rHold(pCL); // Hält den Zeiger bis zum Ende des calls + CommunicationLinkRef rHold(pCL); // H�lt den Zeiger bis zum Ende des calls ActiveLinks->C40_PTR_INSERT(CommunicationLink, pCL); rHold->AddRef(); @@ -367,7 +368,7 @@ 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 ); @@ -453,7 +454,7 @@ CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread( , xmNewConnection( NULL ) { if ( !pMPostUserEvent ) - pMPostUserEvent = new vos::OMutex; + pMPostUserEvent = new osl::Mutex; create(); } @@ -477,20 +478,20 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread( pAcceptorSocket = NULL; } #else - DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread Übersprungen!!!! (wegen Solaris BUG)\n"); + DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread �bersprungen!!!! (wegen Solaris BUG)\n"); #endif { - vos::OGuard aGuard( aMAddConnection ); + osl::MutexGuard aGuard( aMAddConnection ); if ( nAddConnectionEventId ) { 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 } } } @@ -500,11 +501,11 @@ void CommunicationManagerServerAcceptThread::run() if ( !nPortToListen ) return; - pAcceptorSocket = new vos::OAcceptorSocket(); - vos::OInetSocketAddr Addr; + pAcceptorSocket = new osl::AcceptorSocket(); + osl::SocketAddr Addr; Addr.setPort( nPortToListen ); - pAcceptorSocket->setReuseAddr( 1 ); - if ( !pAcceptorSocket->bind( Addr ) ) + pAcceptorSocket->setOption( osl_Socket_OptionReuseAddr, 1 ); + if ( !pAcceptorSocket->bind( Addr ) ) { return; } @@ -514,41 +515,42 @@ void CommunicationManagerServerAcceptThread::run() } - vos::OStreamSocket *pStreamSocket = NULL; + osl::StreamSocket* pStreamSocket = NULL; while ( schedule() ) { - pStreamSocket = new vos::OStreamSocket; + pStreamSocket = new osl::StreamSocket; switch ( pAcceptorSocket->acceptConnection( *pStreamSocket ) ) { - case vos::ISocketTypes::TResult_Ok: + case osl_Socket_Ok: { - pStreamSocket->setTcpNoDelay( 1 ); + pStreamSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 ); TimeValue sNochEins = {0, 100}; while ( schedule() && xmNewConnection.Is() ) // Solange die letzte Connection nicht abgeholt wurde warten wir - sleep( sNochEins ); + wait( sNochEins ); xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket ); xmNewConnection->StartCallback(); { - vos::OGuard aGuard( aMAddConnection ); - vos::OGuard aGuard2( *pMPostUserEvent ); + osl::MutexGuard aGuard( aMAddConnection ); + osl::MutexGuard aGuard2( *pMPostUserEvent ); nAddConnectionEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationManagerServerAcceptThread, AddConnection ) ); } } break; - case vos::ISocketTypes::TResult_TimedOut: + case osl_Socket_TimedOut: delete pStreamSocket; pStreamSocket = NULL; break; - case vos::ISocketTypes::TResult_Error: + case osl_Socket_Error: delete pStreamSocket; pStreamSocket = NULL; break; - case vos::ISocketTypes::TResult_Interrupted: - case vos::ISocketTypes::TResult_InProgress: - break; // -Wall not handled... + case osl_Socket_Interrupted: + case osl_Socket_InProgress: + default: + break; } } } @@ -557,7 +559,7 @@ void CommunicationManagerServerAcceptThread::run() IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYARG ) { { - vos::OGuard aGuard( aMAddConnection ); + osl::MutexGuard aGuard( aMAddConnection ); nAddConnectionEventId = 0; } pMyServer->AddConnection( xmNewConnection ); @@ -594,3 +596,4 @@ CommunicationManagerClientViaSocket::~CommunicationManagerClientViaSocket() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/communi/makefile.mk b/automation/source/communi/makefile.mk index 1d01badab455..b4ca9c67e508 100644 --- a/automation/source/communi/makefile.mk +++ b/automation/source/communi/makefile.mk @@ -36,7 +36,9 @@ TARGET=communi # --- Files -------------------------------------------------------- -SLOFILES= \ +SLOFILES= $(EXCEPTIONSFILES) + +EXCEPTIONSFILES= \ $(SLO)$/communi.obj # --- Targets ------------------------------------------------------ diff --git a/automation/source/inc/cmdbasestream.hxx b/automation/source/inc/cmdbasestream.hxx index 408492cd8ac9..ce3ee45e095f 100644 --- a/automation/source/inc/cmdbasestream.hxx +++ b/automation/source/inc/cmdbasestream.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/inc/icommstream.hxx b/automation/source/inc/icommstream.hxx index efc1315bc9b1..adc9be16063e 100644 --- a/automation/source/inc/icommstream.hxx +++ b/automation/source/inc/icommstream.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/inc/rcontrol.hxx b/automation/source/inc/rcontrol.hxx index cf13fdadd469..13102892da08 100644 --- a/automation/source/inc/rcontrol.hxx +++ b/automation/source/inc/rcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,10 +37,8 @@ #ifndef _RCONTROL_HXX #define _RCONTROL_HXX - #define UID_ACTIVE "UID_ACTIVE" - #define SI_IPCCommandBlock 1 #define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal #define SI_DirectCommandBlock 2 @@ -61,7 +60,6 @@ #define BinBool 13 #define BinSbxValue 15 - // Classes // !!!Diese Defines duerfen niemals geaendert werden!!! #define C_NoType -1 @@ -116,7 +114,6 @@ #define C_Window 47 - #define C_PatternBox 60 #define C_ToolBox 61 #define C_ValueSet 62 @@ -129,9 +126,6 @@ #define C_Dialog 68 - - - #define M_WITH_RETURN 0x0200 // Die Variable wird zum Aufnehmen des Wertes gespeichert #define M_KEY_STRING 0x0400 // Key Befehle werden umgewandelt i.e. "<return><up>" #define M_SOFFICE 0x0800 // Command valid for Star/Open Office @@ -172,8 +166,6 @@ #define M_Dock 47 #define M_Undock 48 - - #define M_TypeKeys ( M_KEY_STRING | 50 ) #define M_MouseDown 51 #define M_MouseUp 52 @@ -206,7 +198,6 @@ #define M_Pin 82 #define M_UseMenu 83 // Use the menu of the next possible parent of given Window - #define M_OpenMenu 84 // MenuButtons and Menus in ToolBoxes #define M_Restore 85 // Window Control together with M_Maximize and M_Minimize @@ -216,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 ) @@ -259,7 +250,6 @@ #define M_StatusGetItemCount ( M_WITH_RETURN | 34 ) #define M_StatusGetItemId ( M_WITH_RETURN | 35 ) -// #define M_GetMouseStyle ( M_WITH_RETURN | 36 ) // support for Messagebox with checkbox @@ -272,11 +262,9 @@ // Dieser befehl wird nur intern im Controller (sts library) verwendet. Sie tauchen nicht im Testtool auf! #define _M_IsEnabled ( M_WITH_RETURN | 50 ) - #define M_GetFixedTextCount ( M_WITH_RETURN | 51 ) #define M_GetFixedText ( M_WITH_RETURN | 52 ) - #define M_IsMin ( M_WITH_RETURN | 53 ) #define M_IsRestore ( M_WITH_RETURN | 54 ) @@ -292,7 +280,6 @@ //#define M_SOFFICE 0x0800 // Command valid for Star/Open Office //#define M_MOZILLA 0x1000 // Command valid for Mozilla - // RemoteCommands #define RC_AppAbort ( M_SOFFICE | M_MOZILLA | 1 ) #define RC_SetClipboard ( M_SOFFICE | M_MOZILLA | 2 ) @@ -315,29 +302,20 @@ #define RC_CaptureAssertions (M_SOFFICE | M_MOZILLA | 17 ) #define RC_Assert ( M_SOFFICE | M_MOZILLA | 18 ) - #define RC_MenuOpen ( M_SOFFICE | M_MOZILLA | 19 ) - #define RC_TypeKeysDelay ( M_SOFFICE | M_MOZILLA | 20 ) - #define RC_ShowBar ( M_MOZILLA | 21 ) - #define RC_LoadURL ( M_MOZILLA | 22 ) - #define RC_CloseSysDialog ( M_SOFFICE | 23 ) - #define RC_SAXRelease ( M_SOFFICE | 24 ) - #define RC_RecordMacro ( M_SOFFICE | 25 ) - #define RC_ActivateDocument ( M_SOFFICE | 26 ) - #define RC_CatchGPF ( M_SOFFICE | 27 ) #define _RC_LAST_NO_RETURN 27 #if ( _RC_LAST_NO_RETURN >= M_WITH_RETURN ) -#error "Bereich überschritten" +#error "Bereich �berschritten" #endif // Befehle mit Returnwert @@ -396,23 +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 @@ -421,14 +397,12 @@ #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 #define S_QAError 223 - - // Constants which are available in VCLTestTool scripts // Different types of controls recognized via RTTI @@ -439,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 @@ -481,9 +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 @@ -494,3 +467,5 @@ #define ERR_NO_FILE 106 // Datei nicht gefunden #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/inc/sttresid.hxx b/automation/source/inc/sttresid.hxx index 4bfa73cdc2c9..3ccfe483a8f4 100644 --- a/automation/source/inc/sttresid.hxx +++ b/automation/source/inc/sttresid.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,3 +41,5 @@ class SttResId : public ResId #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/inc/svcommstream.hxx b/automation/source/inc/svcommstream.hxx index 545f8adc7887..0cf289147f04 100644 --- a/automation/source/inc/svcommstream.hxx +++ b/automation/source/inc/svcommstream.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,3 +55,5 @@ public: comm_BOOL IsEof() const; comm_ULONG SeekRel( long nPos ); }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/inc/testapp.hxx b/automation/source/inc/testapp.hxx index bf4d35626102..c5d04c1fee62 100644 --- a/automation/source/inc/testapp.hxx +++ b/automation/source/inc/testapp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -192,3 +193,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/inc/testtool.hxx b/automation/source/inc/testtool.hxx index 9454f57f05f7..30543fcedeb5 100644 --- a/automation/source/inc/testtool.hxx +++ b/automation/source/inc/testtool.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ protected: }; #endif // SVTOOLS_TESTTOOL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/editwin.cxx b/automation/source/miniapp/editwin.cxx index 67476c09bf6a..395c9deb350a 100644 --- a/automation/source/miniapp/editwin.cxx +++ b/automation/source/miniapp/editwin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include "editwin.hxx" #include <tools/stream.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif sal_Bool GHEditWindow::Close() @@ -125,3 +124,4 @@ sal_Bool EditFileWindow::Close() return GHEditWindow::Close(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/editwin.hxx b/automation/source/miniapp/editwin.hxx index 9547695fcc9d..ed10acec2646 100644 --- a/automation/source/miniapp/editwin.hxx +++ b/automation/source/miniapp/editwin.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ #ifndef _editwin #define _editwin -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include <vcl/floatwin.hxx> #include <svtools/svmedit.hxx> @@ -68,3 +67,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/makefile.mk b/automation/source/miniapp/makefile.mk index 14a6d1ff0e1d..10c16d8ab7f6 100644 --- a/automation/source/miniapp/makefile.mk +++ b/automation/source/miniapp/makefile.mk @@ -37,12 +37,12 @@ TARGET=miniapp # --- Allgemein ------------------------------------------------------------ OBJFILES = \ - $(OBJ)$/testapp.obj \ - $(OBJ)$/editwin.obj \ - $(OBJ)$/servres.obj + $(EXCEPTIONSFILES) EXCEPTIONSFILES= \ + $(OBJ)$/editwin.obj \ + $(OBJ)$/servres.obj \ $(OBJ)$/testapp.obj SRS1NAME=$(TARGET) diff --git a/automation/source/miniapp/servres.cxx b/automation/source/miniapp/servres.cxx index f01d5d8c79b1..1bd795fd4041 100644 --- a/automation/source/miniapp/servres.cxx +++ b/automation/source/miniapp/servres.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,4 @@ MenuMENU_CLIENT::MenuMENU_CLIENT( const ResId & rResId, sal_Bool ) // No subresources, automatic free resource } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/servres.hxx b/automation/source/miniapp/servres.hxx index 9262b50d946a..72584163c7cd 100644 --- a/automation/source/miniapp/servres.hxx +++ b/automation/source/miniapp/servres.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,33 +26,15 @@ * ************************************************************************/ #include <svtools/svmedit.hxx> -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif -#ifndef _BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif -#ifndef _FIELD_HXX //autogen #include <vcl/field.hxx> -#endif -#ifndef _EDIT_HXX //autogen #include <vcl/edit.hxx> -#endif -#ifndef _GROUP_HXX //autogen #include <vcl/group.hxx> -#endif -#ifndef _COMBOBOX_HXX //autogen #include <vcl/combobox.hxx> -#endif -#ifndef _FIXED_HXX //autogen #include <vcl/fixed.hxx> -#endif -#ifndef _MENU_HXX //autogen #include <vcl/menu.hxx> -#endif -#ifndef _LSTBOX_HXX //autogen #include <vcl/lstbox.hxx> -#endif class ModalDialogGROSSER_TEST_DLG : public ModalDialog { @@ -79,3 +62,4 @@ public: MenuMENU_CLIENT( const ResId & rResId, sal_Bool bFreeRes = sal_True ); }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/servuid.hxx b/automation/source/miniapp/servuid.hxx index c1ba920f3667..019479cc65a3 100644 --- a/automation/source/miniapp/servuid.hxx +++ b/automation/source/miniapp/servuid.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,3 +36,5 @@ #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 6711ffe8b333..2209ef23b4cc 100644 --- a/automation/source/miniapp/testapp.cxx +++ b/automation/source/miniapp/testapp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include "precompiled_automation.hxx" #include <svtools/filedlg.hxx> #include <stdio.h> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <tools/debug.hxx> #include <svtools/testtool.hxx> #include <svtools/ttprops.hxx> @@ -53,12 +52,13 @@ using namespace comphelper; using namespace cppu; -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::registry; using namespace com::sun::star::ucb; +using ::rtl::OUString; + static ResMgr* pAppMgr = NULL; MainWindow::MainWindow(MyApp *pAppl) @@ -106,10 +106,7 @@ sal_Bool MainWindow::Close() void MainWindow::FileExit() { -/* WriteSTBProfile();*/ - -// if (pApp->CloseAll()) - pApp->Quit(); + pApp->Quit(); } @@ -153,26 +150,6 @@ void MainWindow::SysDlg() break; } -/* - -#define WB_OK ((WinBits)0x0010) -#define WB_OK_CANCEL ((WinBits)0x0020) -#define WB_YES_NO ((WinBits)0x0040) -#define WB_YES_NO_CANCEL ((WinBits)0x0080) -#define WB_RETRY_CANCEL ((WinBits)0x0100) - -#define WB_DEF_OK ((WinBits)0x0200) -#define WB_DEF_CANCEL ((WinBits)0x0400) -#define WB_DEF_RETRY ((WinBits)0x0800) -#define WB_DEF_YES ((WinBits)0x1000) -#define WB_DEF_NO ((WinBits)0x2000) - -#define RET_OK TRUE -#define RET_CANCEL FALSE -#define RET_YES 2 -#define RET_NO 3 -#define RET_RETRY 4 -*/ } MyApp aApp; @@ -190,19 +167,6 @@ void MyApp::Property( ApplicationProperty& rProp ) pTTProperties->nPropertyVersion = TT_PROPERTIES_VERSION; switch ( pTTProperties->nActualPR ) { -/* case TT_PR_SLOTS: - { - pTTProperties->nSidOpenUrl = SID_OPENURL; - pTTProperties->nSidFileName = SID_FILE_NAME; - pTTProperties->nSidNewDocDirect = SID_NEWDOCDIRECT; - pTTProperties->nSidCopy = SID_COPY; - pTTProperties->nSidPaste = SID_PASTE; - pTTProperties->nSidSourceView = SID_SOURCEVIEW; - pTTProperties->nSidSelectAll = SID_SELECTALL; - pTTProperties->nSidReferer = SID_REFERER; - pTTProperties->nActualPR = 0; - } - break;*/ case TT_PR_DISPATCHER: { PlugInDispatcher* pDispatcher = GetDispatcher(); @@ -220,16 +184,6 @@ void MyApp::Property( ApplicationProperty& rProp ) } } break; -/* case TT_PR_IMG: - { - SvDataMemberObjectRef aDataObject = new SvDataMemberObject(); - SvData* pDataBmp = new SvData( FORMAT_BITMAP ); - pDataBmp->SetData( pTTProperties->mpBmp ); - aDataObject->Append( pDataBmp ); - aDataObject->CopyClipboard(); - pTTProperties->nActualPR = 0; - } - break;*/ default: { pTTProperties->nPropertyVersion = 0; @@ -242,8 +196,8 @@ void MyApp::Property( ApplicationProperty& rProp ) 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 */ + (void) ppArgs; // avoid warning about unused parameter + (void) nMode; // avoid warning about unused parameter switch (nSID) { @@ -312,13 +266,13 @@ Reference< XContentProviderManager > InitializeUCB( void ) ucbhelper::ContentBroker::get()->getContentProviderManagerInterface(); Reference< XContentProvider > xFileProvider - ( xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ) ), UNO_QUERY ); - xUcb->registerContentProvider( xFileProvider, OUString::createFromAscii( "file" ), sal_True ); + ( xSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.FileContentProvider" )) ), UNO_QUERY ); + xUcb->registerContentProvider( xFileProvider, OUString( RTL_CONSTASCII_USTRINGPARAM( "file" )), sal_True ); return xUcb; } -void MyApp::Main() +int MyApp::Main() { Reference< XContentProviderManager > xUcb = InitializeUCB(); LanguageType aRequestedLanguage; @@ -347,5 +301,7 @@ void MyApp::Main() RemoteControl aRC; Execute(); + return EXIT_SUCCESS; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx index a3c33ed359d3..65bfe777d0d1 100644 --- a/automation/source/miniapp/testapp.hxx +++ b/automation/source/miniapp/testapp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,33 +29,15 @@ #define _TESTAPP_HXX #include <vcl/svapp.hxx> -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif -#ifndef _BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif -#ifndef _FIELD_HXX //autogen #include <vcl/field.hxx> -#endif -#ifndef _EDIT_HXX //autogen #include <vcl/edit.hxx> -#endif -#ifndef _GROUP_HXX //autogen #include <vcl/group.hxx> -#endif -#ifndef _COMBOBOX_HXX //autogen #include <vcl/combobox.hxx> -#endif -#ifndef _FIXED_HXX //autogen #include <vcl/fixed.hxx> -#endif -#ifndef _MENU_HXX //autogen #include <vcl/menu.hxx> -#endif -#ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> -#endif #include <svl/poolitem.hxx> @@ -109,7 +92,7 @@ class MyApp : public Application public: MyApp(); - void Main(); + int Main(); virtual void Property( ApplicationProperty& ); virtual PlugInDispatcher* GetDispatcher(); @@ -123,3 +106,4 @@ extern MyApp aApp; #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/mozillaserver/makefile.mk b/automation/source/mozillaserver/makefile.mk index fee12e3e6649..fcd7e1cc6c49 100644 --- a/automation/source/mozillaserver/makefile.mk +++ b/automation/source/mozillaserver/makefile.mk @@ -43,8 +43,6 @@ LIBTARGET=NO PACKAGE := com$/sun$/star$/testtool TARGET := com_sun_star_testtool - -#RDB=$(SOLARBINDIR)$/applicat.rdb RDB=$(BIN)$/mozillatesttool.rdb @@ -61,8 +59,6 @@ GENJAVACLASSFILES = \ TYPES={$(subst,.class, $(subst,$/,. $(subst,$(CLASSDIR)$/,-T $(GENJAVACLASSFILES))))} GENJAVAFILES = {$(subst,.class,.java $(subst,$/class, $(GENJAVACLASSFILES)))} -#JAVAFILES= $(GENJAVAFILES) - UNOUCRDEP=$(RDB) @@ -94,34 +90,6 @@ UNOTYPES= \ com.sun.star.testtool.ResultType \ com.sun.star.testtool.XMozillaTesttoolServer - - -#SLOFILES= \ -# $(SLO)$/iserverproxy.obj \ -# $(SLO)$/broadcastclient.obj \ -# $(SLO)$/genericinformation.obj \ -# $(SLO)$/informationclient.obj - -# ---- test ---- - -#LIB1TARGET=$(SLB)$/iserverproxy.lib -#LIB1OBJFILES=$(SLOFILES) - -#SHL1TARGET=iserverproxy -#SHL1STDLIBS= \ -# $(VOSLIB) $(OSLLIB) $(RTLLIB) $(TOOLSLIB) \ -# $(CPPULIB) \ -# $(CPPUHELPERLIB) \ -# $(UNOLIB) \ -# $(SVTOOLLIB) \ -# $(SALLIB) \ -# $(BOOTSTRP) - -#SHL1LIBS= $(LIB1TARGET) $(LB)$/ico.lib -#SHL1DEF= $(MISC)$/$(SHL1TARGET).def -#DEF1NAME= $(SHL1TARGET) -#DEF1EXPORTFILE= exports.dxp - # --- Targets ------------------------------------------------------ .INCLUDE : target.mk diff --git a/automation/source/server/XMLParser.cxx b/automation/source/server/XMLParser.cxx index a2aab7ab1e94..ef73d2ef2e9b 100644 --- a/automation/source/server/XMLParser.cxx +++ b/automation/source/server/XMLParser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,14 +34,11 @@ #include "retstrm.hxx" #include <basic/svtmsg.hrc> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include <com/sun/star/xml/sax/XParser.hpp> #include <com/sun/star/xml/sax/SAXException.hpp> #include <com/sun/star/io/XInputStream.hpp> -#include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/util/XCloneable.hpp> #include <comphelper/processfactory.hxx> #include <cppuhelper/implbase2.hxx> @@ -51,7 +49,8 @@ using namespace com::sun::star::xml::sax; using namespace com::sun::star::io; using namespace com::sun::star::uno; using namespace com::sun::star::util; -using namespace rtl; + +using ::rtl::OUString; class SVInputStream : public cppu::WeakImplHelper1< XInputStream > { @@ -179,7 +178,7 @@ ElementNode::ElementNode( const String& aName, Reference < XAttributeList > xAtt xAttributeList = Reference < XAttributeList > ( xAttributeCloner->createClone() , UNO_QUERY ); else { - DBG_ERROR("Unable to clone AttributeList"); + OSL_FAIL("Unable to clone AttributeList"); } } }; @@ -623,11 +622,11 @@ void StatementCommand::HandleSAXParser() } else if ( pElementNode ) { - sal_uInt16 nNthOccurance; + sal_uInt16 nNthOccurrence; if( (nParams & PARAM_USHORT_1) ) - nNthOccurance = nNr1; + nNthOccurrence = nNr1; else - nNthOccurance = 1; + nNthOccurrence = 1; sal_uInt16 i; NodeRef xNew; @@ -639,10 +638,10 @@ void StatementCommand::HandleSAXParser() ElementNode* pNewElement = (ElementNode*)(&xNew); if ( aString1.Equals( pNewElement->GetNodeName() ) ) { - if ( nNthOccurance > 1 ) + if ( nNthOccurrence > 1 ) { xNew.Clear(); - nNthOccurance--; + nNthOccurrence--; } } else @@ -693,3 +692,4 @@ void StatementCommand::HandleSAXParser() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx index b17bf66c0597..dcb01a44ce5a 100644 --- a/automation/source/server/cmdbasestream.cxx +++ b/automation/source/server/cmdbasestream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,6 +37,7 @@ * ************************************************************************/ #include <osl/endian.h> +#include <osl/diagnose.h> #include "cmdbasestream.hxx" #include "rcontrol.hxx" @@ -329,22 +331,23 @@ void CmdBaseStream::Write( comm_BOOL bBool ) void CmdBaseStream::Read ( comm_String* &pString ) { (void) pString; /* avoid warning about unused parameter */ - DBG_ERROR("Read ( comm_String* &pString ) Not Implemented"); + OSL_FAIL("Read ( comm_String* &pString ) Not Implemented"); } void CmdBaseStream::Read ( rtl::OString* &pId ) { (void) pId; /* avoid warning about unused parameter */ - DBG_ERROR("Read ( rtl::OString* &pId ) Not Implemented"); + OSL_FAIL("Read ( rtl::OString* &pId ) Not Implemented"); } void CmdBaseStream::Write( comm_String *pString ) { (void) pString; /* avoid warning about unused parameter */ - DBG_ERROR("Write( comm_String *pString ) Not Implemented"); + OSL_FAIL("Write( comm_String *pString ) Not Implemented"); } void CmdBaseStream::Write( rtl::OString* pId ) { (void) pId; /* avoid warning about unused parameter */ - DBG_ERROR("Write( rtl::OString* 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 b1897152a337..8056eebd6c02 100644 --- a/automation/source/server/editwin.cxx +++ b/automation/source/server/editwin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -162,3 +163,4 @@ void EditWindow::AddText( const String &rNew ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/editwin.hxx b/automation/source/server/editwin.hxx index d02e96276507..9b6d8b925f04 100644 --- a/automation/source/server/editwin.hxx +++ b/automation/source/server/editwin.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,13 +30,9 @@ #if OSL_DEBUG_LEVEL > 1 -#ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> -#endif -#ifndef _EDIT_HXX //autogen #include <svtools/svmedit.hxx> -#endif class ImpWorkWindow; @@ -72,3 +69,4 @@ public: #endif #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/makefile.mk b/automation/source/server/makefile.mk index bced075be72a..a6e1ec711b4c 100644 --- a/automation/source/server/makefile.mk +++ b/automation/source/server/makefile.mk @@ -36,17 +36,12 @@ TARGET=server # --- Files -------------------------------------------------------- SLOFILES = \ - $(SLO)$/XMLParser.obj \ - $(SLO)$/recorder.obj \ - $(SLO)$/svcommstream.obj \ + $(EXCEPTIONSFILES) \ $(SLO)$/cmdbasestream.obj \ - $(SLO)$/scmdstrm.obj \ - $(SLO)$/statemnt.obj \ - $(SLO)$/sta_list.obj \ $(SLO)$/editwin.obj \ - $(SLO)$/server.obj \ $(SLO)$/retstrm.obj \ - $(SLO)$/profiler.obj + $(SLO)$/scmdstrm.obj \ + $(SLO)$/svcommstream.obj OBJFILES = \ @@ -54,9 +49,12 @@ OBJFILES = \ $(OBJ)$/svcommstream.obj EXCEPTIONSFILES = \ - $(SLO)$/statemnt.obj \ + $(SLO)$/XMLParser.obj \ + $(SLO)$/profiler.obj \ + $(SLO)$/recorder.obj \ $(SLO)$/server.obj \ - $(SLO)$/XMLParser.obj + $(SLO)$/sta_list.obj \ + $(SLO)$/statemnt.obj NOOPTFILES = $(SLO)$/statemnt.obj diff --git a/automation/source/server/prof_nul.cxx b/automation/source/server/prof_nul.cxx index 314b2d0c41e5..46e1e3789d7b 100644 --- a/automation/source/server/prof_nul.cxx +++ b/automation/source/server/prof_nul.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,3 +95,4 @@ String TTProfiler::GetSysdepProfileLine( SysdepProfileSnapshot *, SysdepProfileS +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/prof_usl.cxx b/automation/source/server/prof_usl.cxx index cccf196b795b..b7ca8037b0e1 100644 --- a/automation/source/server/prof_usl.cxx +++ b/automation/source/server/prof_usl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,4 @@ String TTProfiler::GetSysdepProfileLine( SysdepProfileSnapshot *pStart, SysdepPr +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/profiler.cxx b/automation/source/server/profiler.cxx index 8bd4e76401fe..c11ddce1014a 100644 --- a/automation/source/server/profiler.cxx +++ b/automation/source/server/profiler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <tools/string.hxx> #include <unotools/localedatawrapper.hxx> #include <vcl/svapp.hxx> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include "profiler.hxx" @@ -253,7 +252,7 @@ String TTProfiler::Dec( sal_uLong nNr ) return aRet; } -String TTProfiler::Pad( const String aS, xub_StrLen nLen ) +String TTProfiler::Pad( const String &aS, xub_StrLen nLen ) { if ( nLen > aS.Len() ) return UniString().Fill( nLen - aS.Len() ).Append( aS ); @@ -262,3 +261,4 @@ String TTProfiler::Pad( const String aS, xub_StrLen nLen ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/profiler.hxx b/automation/source/server/profiler.hxx index 3903ac5fee42..8bcb058bd4af 100644 --- a/automation/source/server/profiler.hxx +++ b/automation/source/server/profiler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,7 +42,7 @@ struct SysdepProfileSnapshot; -struct SysdepStaticData; // Nicht wirklich statisch, sondern statisch über mehrere Snapshots +struct SysdepStaticData; // Nicht wirklich statisch, sondern statisch �ber mehrere Snapshots struct ProfileSnapshot { @@ -58,7 +59,7 @@ public: TTProfiler(); ~TTProfiler(); - String GetProfileHeader(); // Titelzeile für Logdatei + String GetProfileHeader(); // Titelzeile f�r Logdatei void StartProfileInterval( sal_Bool bReadAnyway = sal_False ); // Zustand merken void EndProfileInterval(); // Informationszeile zusammenbauen String GetProfileLine( String &aPrefix ); @@ -97,7 +98,7 @@ private: sal_Bool bIsPartitioning; -// Für das Automatische Profiling in festen Intervallen +// F�r das Automatische Profiling in festen Intervallen ProfileSnapshot *pAutoStart; ProfileSnapshot *pAutoEnd; @@ -111,9 +112,9 @@ private: // 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 + 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. */ @@ -125,7 +126,7 @@ private: SysdepProfileSnapshot *NewSysdepSnapshotData(); void DeleteSysdepSnapshotData( SysdepProfileSnapshot *pSysdepProfileSnapshot ); - // Titelzeile für Logdatei + // Titelzeile f�r Logdatei String GetSysdepProfileHeader(); // Zustand merken @@ -135,3 +136,4 @@ private: String GetSysdepProfileLine( SysdepProfileSnapshot *pStart, SysdepProfileSnapshot *pStop ); }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/recorder.cxx b/automation/source/server/recorder.cxx index 4546ba966a1d..ef6f90b88b57 100644 --- a/automation/source/server/recorder.cxx +++ b/automation/source/server/recorder.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -175,10 +176,6 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) #endif bSendData = sal_True; } - if ( m_bLog ) - { -// HACK Too many KeyEvents generated LogVCL( rtl::OString(), 0, aKeyUniqueID, CUniString("TypeKeys"), aKeyString.Len() ); - } // cleanup aKeyString.Erase(); pKeyWin = NULL; @@ -239,7 +236,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case STATE_NOCHECK: nMethod = M_UnCheck; aMethod = CUniString("UnCheck"); break; case STATE_DONTKNOW: nMethod = M_TriState; aMethod = CUniString("TriState"); break; default: nMethod = M_Check; - DBG_ERROR( "Unknown state in TriStateBox::GetState()" ); + OSL_FAIL( "Unknown state in TriStateBox::GetState()" ); } if ( m_bRecord ) { @@ -273,7 +270,6 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case WINDOW_LISTBOX: switch( nEventID ) { -// case VCLEVENT_LISTBOX_DOUBLECLICK: case VCLEVENT_LISTBOX_SELECT: if ( m_bRecord ) { @@ -399,7 +395,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case WINDOW_CANCELBUTTON: nMethod = M_Cancel; aMethod = CUniString("Cancel"); break; case WINDOW_HELPBUTTON: nMethod = M_Help; aMethod = CUniString("Help"); break; default: nMethod = M_Default;aMethod = CUniString("Unknown Button"); - DBG_ERROR( "Unknown Button" ); + OSL_FAIL( "Unknown Button" ); } if ( m_bRecord ) { @@ -430,26 +426,6 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) } } break; -/* case C_MoreButton: - switch( nEventID ) - { - case M_IsOpen : - pRet->GenReturn ( RET_Value, nUId, ((MoreButton*)pControl)->GetState()); - break; - case M_Click : - ((MoreButton*)pControl)->Click(); - break; - case M_Open : - ((MoreButton*)pControl)->SetState(sal_True); - break; - case M_Close : - ((MoreButton*)pControl)->SetState(sal_False); - break; - default: - ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "MoreButton" ) ); - break; - } - break;*/ case WINDOW_SPINFIELD: case WINDOW_PATTERNFIELD: case WINDOW_NUMERICFIELD: @@ -476,7 +452,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_SPINFIELD_FIRST: nMethod = M_ToMin; aMethod = CUniString("ToMin"); break; case VCLEVENT_SPINFIELD_LAST: nMethod = M_ToMax; aMethod = CUniString("ToMax"); break; default: nMethod = M_ToMin; aMethod = CUniString("Unknown"); - DBG_ERROR( "Unknown EventID in Spinfield" ); + OSL_FAIL( "Unknown EventID in Spinfield" ); } if ( m_bRecord ) { @@ -510,22 +486,6 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Click") ); } break; -/* Keyevent or Timeout - case M_Open : - { - MouseEvent aMEvnt; - Point aPt( pControl->GetSizePixel().Width() / 2, pControl->GetSizePixel().Height() / 2 ); - aMEvnt = MouseEvent( aPt,1,MOUSE_SIMPLECLICK,MOUSE_LEFT ); - ImplMouseButtonDown( pControl, aMEvnt ); - - sal_uLong nStart = Time::GetSystemTicks(); - sal_uLong nDelay = pControl->GetSettings().GetMouseSettings().GetActionDelay(); - while ( ( Time::GetSystemTicks() - nStart ) < nDelay + 100 ) - SafeReschedule(); - - ImplMouseButtonUp ( pControl, aMEvnt ); - } - break;*/ } break; case WINDOW_TOOLBOX: @@ -548,118 +508,17 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), Id2Str( pTB->GetHelpId( pTB->GetCurItemId() ) ) ); bSendData = sal_True; } -/* not needed if ( m_bLog ) - { - }*/ } break; case VCLEVENT_TOOLBOX_CLICK: /// ATTENTION this is called during initialisation of toolbox. whoever 'invented' this pActionParent = pTB; break; -// case VCLEVENT_WINDOW_SHOW: // not usable ATM. see above -// if ( pActionParent ) -// { // a new toolbox opens up, might be a tearoff -// if ( pActionParent != pWin ) -// { // it IS a tearoff not an undock -// // compare to 1 for floating ToolBoxes -// if ( m_bRecord ) -// { -// if ( !pWin->GetSmartUniqueOrHelpId().HasAny() || pWin->GetSmartUniqueOrHelpId().Matches( 1 ) ) -// // generate direct Button access -// StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString( pActionParent->GetHelpId( pActionParent->GetCurItemId() ) ), (comm_USHORT)(M_TearOff) ); -// else -// // access via Toolbox -// StatementList::pRet->GenReturn( RET_MacroRecorder, pActionParent->GetSmartUniqueOrHelpId(), (comm_USHORT)(M_TearOff|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pActionParent->GetHelpId( pActionParent->GetCurItemId() )) ); // GetHelpId() sal_uLong != comm_ULONG on 64bit -// bSendData = sal_True; -// } -// if ( m_bLog ) -// { -// LogVCL( pActionParent->GetSmartUniqueOrHelpId(), pWin->GetType(), pActionParent->GetHelpId( pActionParent->GetCurItemId() ), CUniString("TearOff") ); -// } -// } -// pActionParent = NULL; -// } -// break; case VCLEVENT_TOOLBOX_DEACTIVATE: pActionParent = NULL; break; } } break; -/* ToolBox *pTB = ((ToolBox*)pControl); - if ( pTB->GetUniqueOrHelpId() != nUId ) // Also Button auf der ToolBox gefunden - { - if ( nParams == PARAM_NONE ) - { // Wir fälschen einen Parameter - nParams = PARAM_USHORT_1; - nNr1 = nUId; - } - else - ReportError( nUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) ); - } - -#define FIND_HELP\ -{\ - if( nParams == PARAM_USHORT_1 )\ - nLNr1 = nNr1;\ - for ( nNr1 = 0; nNr1 < pTB->GetItemCount() && nLNr1 != pTB->GetHelpId(pTB->GetItemId(nNr1)) ; nNr1++ ) {}\ - bBool1 = nLNr1 == pTB->GetHelpId(pTB->GetItemId(nNr1));\ - if ( !bBool1 )\ - ReportError( nUId, GEN_RES_STR1( S_HELPID_ON_TOOLBOX_NOT_FOUND, MethodString( nMethodId ) ) );\ - else\ - {\ - if ( !pTB->IsItemEnabled( pTB->GetItemId(nNr1) ) && nMethodId != _M_IsEnabled )\ - {\ - ReportError( nUId, GEN_RES_STR1( S_BUTTON_DISABLED_ON_TOOLBOX, MethodString( nMethodId ) ) );\ - bBool1 = sal_False;\ - }\ - else if ( !pTB->IsItemVisible( pTB->GetItemId(nNr1) ) )\ - {\ - ReportError( nUId, GEN_RES_STR1( S_BUTTON_HIDDEN_ON_TOOLBOX, MethodString( nMethodId ) ) );\ - bBool1 = sal_False;\ - }\ - else\ - {\ - if ( pTB->GetItemRect(pTB->GetItemId(nNr1)).IsEmpty() )\ - {\ - sal_uInt16 nLine = pTB->GetCurLine();\ - do\ - {\ - pTB->ShowLine( sal_False );\ - for ( int i = 1 ; i < 30 ; i++ )\ - SafeReschedule();\ - }\ - while ( pTB->GetCurLine() != nLine && pTB->GetItemRect(pTB->GetItemId(nNr1)).IsEmpty() );\ - pTB->Invalidate( pTB->GetScrollRect() );\ - }\ - if ( pTB->GetItemRect(pTB->GetItemId(nNr1)).IsEmpty() )\ - {\ - ReportError( nUId, GEN_RES_STR1( S_CANNOT_MAKE_BUTTON_VISIBLE_IN_TOOLBOX, MethodString( nMethodId ) ) );\ - bBool1 = sal_False;\ - }\ - }\ - }\ -}\ - - switch( nEventID ) - { - case M_SetNextToolBox : - if ( (nParams & PARAM_STR_1) ) - pTB->SetNextToolBox( aString1 ); - else - pTB->SetNextToolBox( pTB->GetNextToolBox() ); - pTB->NextToolBox(); - break; - case M_GetNextToolBox : - pRet->GenReturn ( RET_Value, nUId, (String)pTB->GetNextToolBox()); - break; - default: - ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "ToolBox" ) ); - break; - } - } - break; -*/ case WINDOW_CONTROL: case WINDOW_WINDOW: switch( nEventID ) @@ -677,11 +536,6 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( pIdWin != pWin ) bKeyFollowFocus = sal_True; aKeyUniqueID = pIdWin->GetUniqueOrHelpId(); - if ( m_bLog ) - { -// HACK Too many KeyEvents generated if ( aKeyString.Len() == 0 ) -// HACK Too many KeyEvents generated LogVCL( rtl::OString(), 0, aKeyUniqueID, CUniString("TypeKeysStart") ); - } if ( ( !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) && (( aKeyCode.GetGroup() == KEYGROUP_NUM) || ( aKeyCode.GetGroup() == KEYGROUP_ALPHA) || @@ -721,302 +575,22 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) } break; - case WINDOW_DOCKINGWINDOW: -// switch( nEventID ) + case WINDOW_DOCKINGWINDOW: { // case 1 .. 0xffff: DBG_TRACE3( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin ); // sal_Bool bx = ((DockingWindow*)pWin)->IsFloatingMode(); // break; -/* case M_Dock : - if ( ((DockingWindow*)pControl)->IsFloatingMode() ) - ((DockingWindow*)pControl)->SetFloatingMode(sal_False); - else - ReportError( nUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) ); - break; - case M_Undock : - if ( !((DockingWindow*)pControl)->IsFloatingMode() ) - ((DockingWindow*)pControl)->SetFloatingMode(sal_True); - else - ReportError( nUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) ); - break; - case M_IsDocked : - pRet->GenReturn ( RET_Value, nUId, (comm_BOOL) !((DockingWindow*)pControl)->IsFloatingMode()); - break; - case M_Close: - //nWindowWaitUId = nUId; - DBG_ASSERT( nUId == pControl->GetUniqueOrHelpId(), "nUID != UniqueOrHelpId"); - SET_WINP_CLOSING(pControl); - ((DockingWindow*)pControl)->Close(); - break; - case M_Size: - case M_Move: - case M_IsMax : - case M_Minimize : - case M_Maximize : - if ( ((DockingWindow*)pControl)->IsFloatingMode() ) - { - pControl = ((DockingWindow*)pControl)->GetFloatingWindow(); - goto FloatWin; - } - else - ReportError( nUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_DOCKING_MODE, MethodString( nMethodId ) ) ); - break; - case M_Help: // Alles was unten weiterbehandelt werden soll - goto MoreDialog; - - default: - ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "DockingWindow" ) ); - break;*/ } break; - - - - - - case WINDOW_FLOATINGWINDOW: { DBG_TRACE3( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin ); // FloatingWindow *pFW = ((FloatingWindow*)pWin); -/* switch( nEventID ) - { - -// M_OpenMenu an einem ToolboxButton - case VCLEVENT_WINDOW_SHOW: - if ( pActionParent ) - { // a new FloatingWindow opens up, so we assume an OpenMenu - // compare to 1 for floating ToolBoxes - if ( ( pActionParent->GetUniqueOrHelpId() == 0 || pActionParent->GetUniqueOrHelpId() == 1 ) ) - // generate direct Button access - StatementList::pRet->GenReturn( RET_MacroRecorder, pActionParent->GetHelpId( pActionParent->GetCurItemId() ), (comm_USHORT)(M_OpenMenu) ); - else - // access via Toolbox - StatementList::pRet->GenReturn( RET_MacroRecorder, pActionParent->GetUniqueOrHelpId(), (comm_USHORT)(M_OpenMenu|M_RET_NUM_CONTROL), pActionParent->GetHelpId( pActionParent->GetCurItemId() ) ); - bSendData = sal_True; - } - break; - - } - */ } - break; -/* - case M_AnimateMouse : - AnimateMouse( pControl, MitteOben); - break; - case M_IsMax : - pRet->GenReturn ( RET_Value, nUId, (comm_BOOL)!((FloatingWindow*)pControl)->IsRollUp()); - break; - case M_Minimize : - ((FloatingWindow*)pControl)->RollUp(); - break; - case M_Maximize : - ((FloatingWindow*)pControl)->RollDown(); - break; - case M_Size: - { - if ( pControl->GetStyle() & WB_SIZEABLE ) - { - pControl->SetSizePixel(Size(nNr1,nNr2)); - pControl->Resize(); - } - else - ReportError( nUId, GEN_RES_STR1( S_SIZE_NOT_CHANGEABLE, MethodString( nMethodId ) ) ); - break; - } - case M_Close: - DBG_ASSERT( nUId == pControl->GetUniqueOrHelpId(), "nUID != UniqueOrHelpId"); - SET_WINP_CLOSING(pControl); - ((FloatingWindow*)pControl)->Close(); - break; - case M_Help: // Alles was unten weiterbehandelt werden soll - case M_Move: - goto MoreDialog; - default: - ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "FloatingWin" ) ); - break; - } - break;*/ - - - - - - - - -/* - case C_ModelessDlg: - case C_Dlg: - case C_TabDlg: - MoreDialog: - switch( nEventID ) - { - - // (Rect GetRect) - - case M_AnimateMouse : - AnimateMouse( pControl, MitteOben); - break; - case M_Close: - DBG_ASSERT( nUId == pControl->GetUniqueOrHelpId(), "nUID != UniqueOrHelpId"); - SET_WINP_CLOSING(pControl); - ((SystemWindow*)pControl)->Close(); - break; - case M_Move: - { - pControl->SetPosPixel(Point(nNr1,nNr2)); - break; - } - default: - ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "Dialog" ) ); - break; - } - break;*/ - - - - - - - - - - - - - -/* - case C_WorkWin: - switch( nEventID ) - { - case M_Close: - DBG_ASSERT( nUId == pControl->GetUniqueOrHelpId(), "nUID != UniqueOrHelpId"); - SET_WINP_CLOSING(pControl); - ((WorkWindow*)pControl)->Close(); - break; - case M_Size: - case M_Move: - goto FloatWin; - break; - case M_Help: // Alles was unten weiterbehandelt werden soll - goto MoreDialog; - default: - ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "WorkWindow" ) ); - break; } break; - */ - - -/* case C_TabPage: - switch( nEventID ) - { - } - break;*/ - - - - - - - - - - - - - -/* - case C_MessBox: - case C_InfoBox: - case C_WarningBox: - case C_ErrorBox: - case C_QueryBox: - { - sal_Bool bDone = sal_True; - MessBox* pMB = (MessBox*)pControl; - switch( nEventID ) - { - case M_GetCheckBoxText: - pRet->GenReturn ( RET_Value, nUId, pMB->GetCheckBoxText() ); - break; - case M_IsChecked : - pRet->GenReturn ( RET_Value, nUId, comm_BOOL( pMB->GetCheckBoxState() == STATE_CHECK) ); - break; - case M_GetState : - pRet->GenReturn ( RET_Value, nUId, comm_ULONG( pMB->GetCheckBoxState() )); - break; - case M_Check : - pMB->SetCheckBoxState( STATE_CHECK ); - break; - case M_UnCheck : - pMB->SetCheckBoxState( STATE_NOCHECK ); - break; - case M_GetText : - pRet->GenReturn ( RET_Value, nUId, pMB->GetMessText()); - break; - - default: - bDone = sal_False; - break; - } - if ( bDone ) - break; // break the case here else continue at C_ButtonDialog - } - case C_ButtonDialog: - { - ButtonDialog* pBD = (ButtonDialog*)pControl; -#if OSL_DEBUG_LEVEL > 1 - m_pDbgWin->AddText( "Working MessBox: " ); - if (pControl->IsVisible()) - m_pDbgWin->AddText("*(Visible)\n"); - else - m_pDbgWin->AddText("*(nicht Visible)\n"); -#endif - switch( nEventID ) - { - case M_GetText : - pRet->GenReturn ( RET_Value, nUId, pControl->GetText()); - break; - case M_Click: - if ( nParams & PARAM_USHORT_1 ) - { - if ( pBD->GetPushButton( nNr1 ) ) - { - if ( nNr1 != BUTTONID_HELP ) - { - SET_WINP_CLOSING(pControl); - } - pBD->GetPushButton( nNr1 )->Click(); - } - else - ReportError( nUId, GEN_RES_STR2( S_NO_DEFAULT_BUTTON, UniString::CreateFromInt32( nNr1 ), MethodString( nMethodId ) ) ); - } - else - ReportError( nUId, GEN_RES_STR1( S_BUTTONID_REQUIRED, MethodString( nMethodId ) ) ); - break; - case M_GetButtonCount : - pRet->GenReturn ( RET_Value, nUId, comm_ULONG(pBD->GetButtonCount())); - break; - case M_GetButtonId : - if ( ValueOK(nUId, MethodString( nMethodId ),nNr1,pBD->GetButtonCount()) ) - pRet->GenReturn ( RET_Value, nUId, comm_ULONG(pBD->GetButtonId(nNr1-1))); - break; - default: - ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "MessageBox" ) ); - break; - } - break; - - - */ - - } - switch( nEventID ) { case VCLEVENT_CONTROL_LOSEFOCUS: @@ -1038,13 +612,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) } pLastWin = pWin; - } // if - else if ( pEvent->ISA( VclMenuEvent ) ) - { -// VclMenuEvent* pMenuEvent = ( VclMenuEvent* ) pEvent; - } - if ( bSendData ) new StatementFlow( NULL, F_EndCommandBlock ); // Kommando zum Senden erzeugen und in que eintragen @@ -1093,3 +661,4 @@ sal_Bool MacroRecorder::HasMacroRecorder() return pMacroRecorder != NULL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/recorder.hxx b/automation/source/server/recorder.hxx index cb59f02b76cc..cde7b91e31c5 100644 --- a/automation/source/server/recorder.hxx +++ b/automation/source/server/recorder.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -81,3 +82,4 @@ public: 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 7fb3c6dd8949..abe79215ddec 100644 --- a/automation/source/server/retstrm.cxx +++ b/automation/source/server/retstrm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,4 @@ void RetStream::Reset () // SetCommStream( pCommStream ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/retstrm.hxx b/automation/source/server/retstrm.hxx index e8220a5848e4..d21650898933 100644 --- a/automation/source/server/retstrm.hxx +++ b/automation/source/server/retstrm.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,6 @@ public: ~RetStream(); using CmdBaseStream::GenError; -// new void GenError( rtl::OString aUId, String aString ); using CmdBaseStream::GenReturn; @@ -53,7 +53,6 @@ public: 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 );} -// new 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 ); @@ -74,7 +73,6 @@ public: void Write( comm_USHORT nNr ){CmdBaseStream::Write( nNr );} void Write( comm_ULONG nNr ){CmdBaseStream::Write( nNr );} void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );} -// new void Write( SbxValue &aValue ); // Complex Datatypes to be handled system dependent @@ -85,3 +83,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/scmdstrm.cxx b/automation/source/server/scmdstrm.cxx index de9eb9c38015..7a95e19f9414 100644 --- a/automation/source/server/scmdstrm.cxx +++ b/automation/source/server/scmdstrm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -213,3 +214,4 @@ void SCmdStream::Read ( ::com::sun::star::beans::PropertyValue &rItem ) #endif } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/scmdstrm.hxx b/automation/source/server/scmdstrm.hxx index 0e71b2723801..e2725b6f0070 100644 --- a/automation/source/server/scmdstrm.hxx +++ b/automation/source/server/scmdstrm.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,9 +49,7 @@ public: using CmdBaseStream::Read; void Read ( comm_USHORT &nNr ){CmdBaseStream::Read ( nNr );} void Read ( comm_ULONG &nNr ){CmdBaseStream::Read ( nNr );} -// void Read ( comm_UniChar* &aString, comm_USHORT &nLenInChars ){CmdBaseStream::Read ( aString, nLenInChars );} void Read ( comm_BOOL &bBool ){CmdBaseStream::Read ( bBool );} -// new void Read ( String &aString ); void Read ( SfxPoolItem *&pItem ); void Read ( ::com::sun::star::beans::PropertyValue &rItem ); @@ -59,3 +58,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx index 7c7c8282e3ba..4f233afe8068 100644 --- a/automation/source/server/server.cxx +++ b/automation/source/server/server.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,15 +41,12 @@ #include <vcl/wrkwin.hxx> #include <osl/diagnose.h> #include <osl/mutex.hxx> +#include <osl/socket.hxx> -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif #include <tools/stream.hxx> #include <tools/config.hxx> -#include <vos/socket.hxx> - #if 1 #include <svtools/ttprops.hxx> #include <basic/ttstrhlp.hxx> @@ -59,9 +57,6 @@ #include <vcl/bitmap.hxx> // Hat keinen Includeschutz #include <svtools/svtdata.hxx> -//#ifndef _DTRANS_HXX //autogen -//#include <so2/dtrans.hxx> -//#endif #endif // 1 #include <rtl/textenc.h> #include <rtl/uri.h> @@ -113,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 } } @@ -154,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(); @@ -230,7 +225,7 @@ sal_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; @@ -282,7 +277,7 @@ void ExtraIdle::Timeout() return; } - // Müssen wir selbst idlen? + // M�ssen wir selbst idlen? #if OSL_DEBUG_LEVEL > 1 sal_uLong nLastInputInterval = Application::GetLastInputInterval(); sal_Bool bIsInModalMode = Application::IsInModalMode(); @@ -291,7 +286,7 @@ void ExtraIdle::Timeout() 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 ) { @@ -319,7 +314,7 @@ 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: { @@ -347,7 +342,6 @@ void ExtraIdle::Timeout() { #if OSL_DEBUG_LEVEL > 1 -//#define TT_NO_DECRYPT #define TT_CODE #else #define TT_CODE @@ -490,11 +484,7 @@ void ExtraIdle::Timeout() "1EIGpcw0WfiaOul1s19ZIECoLBx-#S"; -//#if OSL_DEBUG_LEVEL > 1 -// SvFileStream aStream( "d:\\gh_writeback.jpg" , STREAM_STD_READWRITE | STREAM_TRUNC ); -//#else SvMemoryStream aStream; -//#endif xub_StrLen c; xub_StrLen cRest = 0; @@ -534,43 +524,6 @@ void ExtraIdle::Timeout() ::svt::OStringTransfer::CopyString( CUniString("\nSorry! no bitmap"), StatementList::GetFirstDocFrame() ); } -/*********************************************************************** -// sal_uInt16 nBC = pBmp->GetBitCount(); -// pBmp->Scale( 0.02, 0.02 ); -// nBC = pBmp->GetBitCount(); -// SvMemoryStream aStream; - SvFileStream aStream( "d:\gh_small50.jpg", STREAM_STD_READ ); - - aStream.Seek( 0 ); - xub_StrLen c; - String aOut; - String aDreierGruppe; - xub_StrLen cRest=0; - aStream >> c; - while ( !aStream.IsEof() ) - { - cRest <<= 2; // Im ersten Durchgang egal, da immer 0 - cRest |= ( c & 0x03 ); - c >>= 2; - aDreierGruppe += aTr.GetChar( c ); - - if ( aDreierGruppe.Len() == 3 ) - { - aOut += aTr.GetChar( cRest ); - aOut += aDreierGruppe; - cRest = 0; - aDreierGruppe = ""; - } - aStream >> c; - } - if ( aDreierGruppe.Len() ) - { - aOut += cRest; - aOut += aDreierGruppe; - } - ::svt::OStringTransfer::CopyString( aOut ); -**********************************************************************************/ - new StatementSlot( StatementList::pTTProperties->nSidPaste ); return; } @@ -610,7 +563,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) if ( StatementList::MaybeResetSafeReschedule() ) { - StatementList::bExecuting = sal_False; // Wird nacher im SafeReschedule wieder zurückgesetzt + StatementList::bExecuting = sal_False; // Wird nacher im SafeReschedule wieder zur�ckgesetzt #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "SafeReschedule has been reset\n" ); #endif @@ -637,12 +590,12 @@ 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 = sal_True; #ifdef TIMERIDLE @@ -651,9 +604,6 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) #endif StatementList *pC = StatementList::pFirst; -// MessBox MB( pMainWin, WB_DEF_OK|WB_OK, "Pause ...", "... und Weiter" ); -// MB.Execute(); - if ( !StatementList::bCatchGPF ) { if (!pC->CheckWindowWait() || !pC->Execute()) @@ -661,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 @@ -673,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( ... ) @@ -687,10 +637,10 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) pDlg->SetOutputSizePixel(Size(150,0)); pDlg->SetText( String ( TTProperties::GetSvtResId( TT_GPF ) ) ); pDlg->Show(); - DBG_ERROR("GPF"); + OSL_FAIL("GPF"); pC->ReportError( GEN_RES_STR0( S_GPF_ABORT ) ); StatementList::bDying = sal_True; - while ( StatementList::pFirst ) // Kommandos werden übersprungen + while ( StatementList::pFirst ) // Kommandos werden �bersprungen StatementList::NormalReschedule(); delete pDlg; } @@ -702,23 +652,10 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) } } -/* #i46293# remove reschedules - for (int xx = 1;xx < 20;xx++) - StatementList::NormalReschedule(); -*/ m_bInsideExecutionLoop = sal_False; } - StatementList::aWindowWaitUId = rtl::OString(); // Warten rücksetzen, da handler sowieso verlassen wird - -/* if( StatementList::pFirst && !StatementList::bReadingCommands ) - // Abfrage nötig, da andere CommandHdl aktiv sein können oder - // neue Commands gelesen werden können - { - delete StatementList::pFirst; // Löscht die gesamte Liste !! - StatementList::pFirst = NULL; - StatementList::pCurrent = NULL; // Nur zur Sicherheit, sollte hier sowieso NULL sein - }*/ + StatementList::aWindowWaitUId = rtl::OString(); // Warten r�cksetzen, da handler sowieso verlassen wird #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Leaving CommandHdl\n" ); @@ -736,7 +673,6 @@ IMPL_LINK( ImplRemoteControl, QueCommandsEvent, CommunicationLink*, pCL ) sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) { -// return sal_True; sal_uInt16 nId; if( !m_bIdleInserted ) @@ -764,7 +700,7 @@ sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) if( nServiceId != SI_IPCCommandBlock && nServiceId != SI_DirectCommandBlock ) { - DBG_ERROR1( "Ungültiger Request :%i", (int)nServiceId ); + DBG_ERROR1( "Ung�ltiger Request :%i", (int)nServiceId ); return sal_False; } @@ -777,28 +713,28 @@ sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) { case SICommand: { - new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angehängt + new StatementCommand( pCmdStream ); // 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: @@ -808,7 +744,7 @@ sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) if( !pIn->IsEof() ) pCmdStream->Read( nId ); else { - DBG_ERROR( "truncated input stream" ); + OSL_FAIL( "truncated input stream" ); } } @@ -822,18 +758,14 @@ sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) #endif if ( !m_bInsideExecutionLoop ) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Posting Event for CommandHdl.\n" ); #endif GetpApp()->PostUserEvent( LINK( this, ImplRemoteControl, CommandHdl ) ); } -#ifdef DEBUG - else - m_bInsideExecutionLoop = sal_True; -#endif return sal_True; -} // sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) +} SvStream* ImplRemoteControl::GetReturnStream() @@ -900,16 +832,16 @@ ImplRemoteControl::~ImplRemoteControl() #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 ) @@ -979,3 +911,4 @@ extern "C" void DestroyEventLogger() 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 abca26fc2a5f..7b4850474ad3 100644 --- a/automation/source/server/server.hxx +++ b/automation/source/server/server.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,17 +28,6 @@ #ifndef _SERVER_HXX #define _SERVER_HXX -/*#include <vos/thread.hxx> -#ifndef _STD_NO_NAMESPACE -namespace vos -{ -#endif - class OAcceptorSocket; -#ifndef _STD_NO_NAMESPACE -} -#endif -*/ - #include "editwin.hxx" #include <automation/communi.hxx> @@ -79,3 +69,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx index 3164c5729466..e8be99121ce6 100644 --- a/automation/source/server/sta_list.cxx +++ b/automation/source/server/sta_list.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,14 +31,10 @@ #include <tools/time.hxx> #include <vcl/splitwin.hxx> #include <vcl/wrkwin.hxx> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include "statemnt.hxx" -#ifndef _RETSRTM_HXX #include "retstrm.hxx" -#endif #include "rcontrol.hxx" #if OSL_DEBUG_LEVEL > 1 @@ -84,13 +81,13 @@ rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString(); rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString(); sal_uInt16 StatementList::nUseBindings = 0; -sal_uInt16 StatementList::aSubMenuId1 = 0; // Untermenüs bei PopupMenus +sal_uInt16 StatementList::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; -sal_uInt16 StatementList::nMinTypeKeysDelay = 0; // Verzögerung der einzelnen Anschläge für TypeKeys +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; @@ -133,18 +130,12 @@ TTSettings* GetTTSettings() // FIXME: HELPID #define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "TT_Win_is_closing_HID" ) && pWin->GetUniqueId().equals( "TT_Win_is_closing_UID" )) -/* -UniString GEN_RES_STR0( sal_uLong nResId ) { return ResString( nResId ); } -UniString GEN_RES_STR1( sal_uLong nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } -UniString GEN_RES_STR2( sal_uLong nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } -UniString GEN_RES_STR3( sal_uLong nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );} -*/ StatementList::StatementList() : nRetryCount(MAX_RETRIES) , bStatementInQue(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() @@ -192,7 +183,7 @@ 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; @@ -210,7 +201,7 @@ void StatementList::QueStatement(StatementList *pAfterThis) pFirst = this; } } - else // am Ende einfügen + else // am Ende einf�gen { pNext = NULL; if( !pFirst ) @@ -306,8 +297,6 @@ Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, sal_Bool Ma while ( pPParent->GET_REAL_PARENT() ) pPParent = pPParent->GET_REAL_PARENT(); -// if ( !IsFirstDocFrame( pPParent ) ) -// { // get overlap window. Will be dialog else document itself pBase = pBase->GetWindow( WINDOW_OVERLAP ); @@ -326,16 +315,11 @@ Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, sal_Bool Ma if ( pControl ) return pControl; -// } } } pBase = Application::GetFirstTopLevelWindow(); - // Skip FirstDocFrame -// if ( bSearchFocusFirst && IsFirstDocFrame( pBase ) ) -// pBase = Application::GetNextTopLevelWindow( pBase ); - while ( pBase ) { pControl = SearchAllWin( pBase, aSearch ); @@ -343,9 +327,6 @@ Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, sal_Bool Ma return pControl; pBase = Application::GetNextTopLevelWindow( pBase ); - // Skip FirstDocFrame -// if ( bSearchFocusFirst && IsFirstDocFrame( pBase ) ) -// pBase = Application::GetNextTopLevelWindow( pBase ); } return NULL; } @@ -356,9 +337,6 @@ Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, sal_Bool Ma if ( pResult ) return pResult; -// if ( pBase->GetType() != WINDOW_BORDERWINDOW ) -// return NULL; - if ( !aSearch.HasSearchFlag( SEARCH_NOOVERLAP ) ) { if ( pBase->GetWindow( WINDOW_FIRSTOVERLAP ) ) @@ -558,8 +536,6 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) return pBaseMenu; sal_uInt16 i; -// while ( pBaseMenu ) -// { i = 0; while ( i < pBaseMenu->GetItemCount() ) { @@ -577,7 +553,6 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) else i++; } -// } } else { @@ -623,7 +598,6 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) sal_Bool SearchActive::IsWinOK( Window *pWin ) { -// return pWin->IsVisible() && ( (nRT == WINDOW_ANYTYPE && IsDialog(pWin) ) || pWin->GetType() == nRT ) && (nRT == WINDOW_FILEDIALOG || nRT == WINDOW_PATHDIALOG || nRT == WINDOW_PRINTDIALOG || nRT == WINDOW_PRINTERSETUPDIALOG || nRT == WINDOW_COLORDIALOG || ((SystemWindow*)pWin)->IsActive()); // only matches ResID due to problems with UNIX Window Managers return pWin->IsVisible() && ( (nRT == WINDOW_ANYTYPE && IsDialog(pWin) ) || pWin->GetType() == nRT ); } @@ -1152,10 +1126,6 @@ void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect ) } else { - // DragManager* pDragManager = DragManager::GetDragManager(); - // if ( pDragManager ) - // pDragManager->MouseMove( aMEvnt, pWin ); - // else if ( pWin->IsTracking() ) { TrackingEvent aTEvt( aMEvnt ); @@ -1196,13 +1166,9 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect } else { - // DragManager* pDragManager = DragManager::GetDragManager(); - // if ( pDragManager ) - // pDragManager->ButtonUp( aMEvnt, pWin ); - // else 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 ); @@ -1226,3 +1192,4 @@ void ImplCommand( Window* pWin, CommandEvent &aCmdEvnt ) CALL_EVENT_WITH_NOTIFY( EVENT_COMMAND, aCmdEvnt, pWin, Command ) }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 8b7a57bb4a47..7036ee8b1051 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,39 +36,19 @@ #include <comphelper/uieventslogger.hxx> #include <tools/wintypes.hxx> -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif -#ifndef _BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/menubtn.hxx> #include <svtools/svtreebx.hxx> #include <svtools/brwbox.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif -#ifndef _DOCKWIN_HXX //autogen #include <vcl/dockwin.hxx> -#endif -#ifndef _FLOATWIN_HXX //autogen #include <vcl/floatwin.hxx> -#endif -#ifndef _LSTBOX_HXX //autogen #include <vcl/lstbox.hxx> -#endif -#ifndef _COMBOBOX_HXX //autogen #include <vcl/combobox.hxx> -#endif -#ifndef _MOREBTN_HXX //autogen #include <vcl/morebtn.hxx> -#endif -#ifndef _FIELD_HXX //autogen #include <vcl/field.hxx> -#endif -#ifndef _TOOLBOX_HXX //autogen #include <vcl/toolbox.hxx> -#endif #include <vcl/tabctrl.hxx> #include <vcl/tabpage.hxx> #include <vcl/menu.hxx> @@ -93,12 +74,9 @@ #include <tools/fsys.hxx> #include <svl/stritem.hxx> #include <svtools/ttprops.hxx> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include <basic/dispdefs.hxx> #include <basic/sbuno.hxx> -#include <vos/socket.hxx> #include <svl/pickerhistory.hxx> #include <com/sun/star/util/XCancellable.hpp> @@ -107,13 +85,12 @@ #include "statemnt.hxx" #include "scmdstrm.hxx" -#ifndef _RETSRTM_HXX #include "retstrm.hxx" -#endif #if OSL_DEBUG_LEVEL > 1 -#include "editwin.hxx" +# include "editwin.hxx" #endif + #include "rcontrol.hxx" #include <automation/communi.hxx> #include "testtool.hxx" @@ -130,10 +107,8 @@ using namespace com::sun::star::frame; using namespace com::sun::star::uno; -//using namespace com::sun::star::util; geht wegen Color nicht using namespace com::sun::star::beans; using namespace svt; -//using namespace svt::table; #ifndef SBX_VALUE_DECL_DEFINED @@ -163,7 +138,6 @@ pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = N pWin->SetHelpId( rtl::OString("TT_Win_is_closing_HID") ); \ pWin->SetUniqueId( rtl::OString("TT_Win_is_closing_UID") ); -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= StatementFlow::StatementFlow( StatementList *pAfterThis, sal_uInt16 nArtP ) : nArt(nArtP) @@ -190,10 +164,10 @@ StatementFlow::StatementFlow( sal_uLong nServiceId, SCmdStream *pCmdIn, ImplRemo pCmdIn->Read( nArt ); pCmdIn->Read( nParams ); - if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nSNr1 ); - if( nParams & PARAM_ULONG_1 ) pCmdIn->Read( nLNr1 ); - if( nParams & PARAM_STR_1 ) pCmdIn->Read( aString1 ); - if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 ); // sollte nie auftreten!! + if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nSNr1 ); + if( nParams & PARAM_ULONG_1 ) pCmdIn->Read( nLNr1 ); + if( nParams & PARAM_STR_1 ) pCmdIn->Read( aString1 ); + if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 );// Should NEVER happen #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Reading FlowControl: " ); @@ -214,19 +188,19 @@ void StatementFlow::SendViaSocket() #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "SendViaSocket called recursively. Aborted!!!\n" ); #endif - DBG_ERROR("SendViaSocket called recursively. Aborted!!!"); + OSL_FAIL("SendViaSocket called recursively. Aborted!!!"); return; } 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 { // Macht nix. Wenn das Basic nicht mehr da ist, ist sowiso alles egal - DBG_ERROR("Cannot send results to TestTool"); + OSL_FAIL("Cannot send results to TestTool"); } pRet->Reset(); @@ -289,9 +263,8 @@ sal_Bool StatementFlow::Execute() #endif break; -// case RET_: default: - DBG_ERROR( "Unknown Flowcontrol" ); + OSL_FAIL( "Unknown Flowcontrol" ); break; } @@ -299,7 +272,6 @@ sal_Bool StatementFlow::Execute() return sal_True; } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // neue Hilfsfunktion, die stetig erweitert werden muss static short ImpGetRType( Window *pWin ) @@ -349,19 +321,10 @@ static short ImpGetRType( Window *pWin ) case WINDOW_WARNINGBOX: nRT = C_WarningBox; break; case WINDOW_ERRORBOX: nRT = C_ErrorBox; break; case WINDOW_QUERYBOX: nRT = C_QueryBox; break; -#if 0 //ifndef VCL - case WINDOW_FILEDIALOG: nRT = C_FileDlg; break; - case WINDOW_PATHDIALOG: nRT = C_PathDlg; break; - case WINDOW_PRINTDIALOG: nRT = C_PrintDlg; break; - case WINDOW_PRINTERSETUPDIALOG: nRT = C_PrinterSetupDlg;break; - case WINDOW_COLORDIALOG: nRT = C_ColorDlg; break; -#endif case WINDOW_TABDIALOG: nRT = C_TabDlg; break; -// case WINDOW_TABDIALOG: nRT = C_SingleTabDlg; break; case WINDOW_PATTERNBOX: nRT = C_PatternBox; break; case WINDOW_TOOLBOX: nRT = C_ToolBox; break; -// Gibts nicht case WINDOW_VALUESET: nRT = C_ValueSet; break; case WINDOW_CONTROL: nRT = C_Control; break; case WINDOW_OKBUTTON: nRT = C_OkButton; break; case WINDOW_CANCELBUTTON: nRT = C_CancelButton; break; @@ -373,7 +336,6 @@ static short ImpGetRType( Window *pWin ) return nRT; } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= StatementSlot::StatementSlot( SCmdStream *pCmdIn ) : pItemArr(NULL) @@ -470,13 +432,13 @@ void StatementSlot::AddReferer() nAnzahl++; aArgs.realloc(nAnzahl); pArg = aArgs.getArray(); - pArg[nAnzahl-1].Name = rtl::OUString::createFromAscii("Referer"); - pArg[nAnzahl-1].Value <<= ::rtl::OUString::createFromAscii("private:user"); + pArg[nAnzahl-1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Referer" )); + pArg[nAnzahl-1].Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:user" )); nAnzahl++; aArgs.realloc(nAnzahl); pArg = aArgs.getArray(); - pArg[nAnzahl-1].Name = rtl::OUString::createFromAscii("SynchronMode"); + pArg[nAnzahl-1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SynchronMode" )); pArg[nAnzahl-1].Value <<= sal_Bool( sal_True ); } @@ -494,16 +456,6 @@ public: sal_Bool bDisposed; sal_Bool bEnabled; }; -/* -struct FeatureStateEvent : public ::com::sun::star::lang::EventObject - ::com::sun::star::util::URL FeatureURL; - ::rtl::OUString FeatureDescriptor; - sal_Bool IsEnabled; - sal_Bool Requery; - ::com::sun::star::uno::Any State; - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > Source; -*/ SlotStatusListener::SlotStatusListener() : bDisposed( sal_False ) @@ -513,11 +465,7 @@ SlotStatusListener::SlotStatusListener() // XStatusListener void SAL_CALL SlotStatusListener::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { -// DBG_ERROR1("FeatureURL: %s", ByteString( String( Event.FeatureURL.Complete ), RTL_TEXTENCODING_UTF8 ).GetBuffer() ); -// DBG_ERROR1("FeatureDescriptor: %s", ByteString( String( Event.FeatureDescriptor ), RTL_TEXTENCODING_UTF8 ).GetBuffer() ); bEnabled = Event.IsEnabled; -// DBG_ASSERT( Event.IsEnabled, "Not enabled" ); -// DBG_ASSERT( !Event.Requery, "Requery" ); } // XEventListener @@ -696,9 +644,9 @@ sal_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 ) ); @@ -706,7 +654,6 @@ sal_Bool StatementSlot::Execute() return sal_True; } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= StatementUnoSlot::StatementUnoSlot(SCmdStream *pIn) { @@ -722,7 +669,6 @@ StatementUnoSlot::StatementUnoSlot(SCmdStream *pIn) } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= StatementCommand::StatementCommand( StatementList *pAfterThis, sal_uInt16 MethodId, sal_uInt16 Params, sal_uInt16 Nr1 ) : nMethodId( MethodId ) @@ -808,7 +754,7 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) m_pDbgWin->AddText( "*Deleting all Commands:\n" ); #endif bReadingCommands = sal_False; - while ( StatementList::pFirst != this ) // Alles Löschen außer mich selbst + while ( StatementList::pFirst != this ) // Alles L�schen au�er mich selbst { StatementList *pDeQue = StatementList::pFirst; pDeQue->Advance(); @@ -838,7 +784,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo pBase = pBase->GetParent(); } - { // Klammerung, so daß der String nicht während der Rekursion bestehen bleibt + { // Klammerung, so da� der String nicht w�hrend der Rekursion bestehen bleibt String aName; sal_Bool bSkip = sal_False; @@ -950,8 +896,6 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo for ( i = 0; i < pTB->GetItemCount() ; i++ ) { aName = String(); -// if ( aName.Len() == 0 ) -// aName = pTB->GetQuickHelpText(); if ( aName.Len() == 0 ) aName = pTB->GetHelpText( pTB->GetItemId( i ) ); if ( aName.Len() == 0 ) @@ -1062,7 +1006,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo break; } - pRet->GenReturn ( RET_WinInfo, 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 = ").AppendAscii( aID.GetBuffer() ), sal_False ); } @@ -1164,8 +1108,7 @@ void SysWinContainer::Resize() { Size aSize( GetOutputSizePixel() ); Resizing( aSize ); -// aSize = pClientWin->GetSizePixel(); -// aSize = pClientWin->CalcWindowSizePixel(); + if ( aSize != GetSizePixel() ) { SetOutputSizePixel( aSize ); @@ -1246,7 +1189,6 @@ public: void ConfigSent() { bConfigChanged = sal_False; } sal_Bool IsSendData() { return GetItemState( TT_SEND_DATA ) == STATE_CHECK; } -// sal_Bool IsAllWin() { return GetItemState( TT_ALLWIN ) == STATE_CHECK; } sal_Bool IsDraging() { return bIsDraging; } @@ -1310,8 +1252,6 @@ void DisplayHidWin::EnableButtons( sal_uLong nConf ) void DisplayHidWin::Tracking( const TrackingEvent& rTEvt ) { -// if ( nLastItemID == TT_SHOW && GetItemState( TT_SHOW ) == STATE_NOCHECK && ( rTEvt.IsTrackingEnded() || rTEvt.IsTrackingCanceled() ) ) -// SetDraging( sal_False ); if ( nLastItemID == TT_SHOW && GetItemState( TT_SHOW ) == STATE_NOCHECK ) EndTracking( ENDTRACK_CANCEL ); ToolBox::Tracking( rTEvt); @@ -1430,7 +1370,7 @@ sal_Bool StatementCommand::DisplayHID() 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; @@ -1511,7 +1451,6 @@ sal_Bool StatementCommand::DisplayHID() GetTTSettings()->Old = GetTTSettings()->Act; -// GetTTSettings()->Act = GetMouseWin(); GetTTSettings()->Act = GetTTSettings()->pDisplayHidWin->LastMouseMoveWin(); if ( !StatementList::WinPtrValid ( GetTTSettings()->Old ) ) @@ -1543,7 +1482,6 @@ sal_Bool StatementCommand::DisplayHID() } else if ( GetTTSettings()->Act ) { -// SET_WIN(GetTTSettings()->Act); // 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 ) { @@ -1551,20 +1489,16 @@ sal_Bool StatementCommand::DisplayHID() GetTTSettings()->pDisplayHidWin->ClearDisplayTextModified(); } } -/* if ( Application::GetLastInputInterval() > 5000 ) // 5 Sekunden lang nix geschehen - { - GetTTSettings()->pDisplayHidWin->ToTop( TOTOP_NOGRABFOCUS ); - } -*/ - if ( GetTTSettings()->pDisplayHidWin->IsSendData() /*&& bBool2*/ && GetTTSettings()->Act ) + + 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 } } - } //if ( GetTTSettings()->pDisplayHidWin->IsDraging() ) + } else { if ( GetTTSettings()->Act ) @@ -1575,17 +1509,11 @@ sal_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 ); } -// { // Ersten und 2. austauschen. -// pFirst = pNext; -// pNext = pNext->pNext; -// pFirst->pNext = this; -// } - } else { @@ -1609,9 +1537,6 @@ private: Timer InplaceTimer; -// virtual void MouseButtonUp( const MouseEvent& rMEvt ); -// virtual void MouseMove( const MouseEvent& rMEvt ); - PushButton PushButtonTT_PB_NEXT; GroupBox GroupBoxTT_GB_TRANSLATION; Edit EditTT_E_NEW; @@ -1737,7 +1662,6 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG ) { if ( bSelecting ) { -// ReleaseMouse(); bSelecting = sal_False; } else @@ -1745,7 +1669,6 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG ) if ( TestChangedDataSaved() ) { PushButtonTT_PB_RESTORE.Disable(); -// CaptureMouse(); bSelecting = sal_True; } } @@ -1763,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 @@ -1852,14 +1775,8 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) } else if ( Act ) { - // SET_WIN(Act); } - /* if ( Application::GetLastInputInterval() > 5000 ) // 5 Sekunden lang nix geschehen - { - ToTop(); - } - */ - } //if ( bSelecting ) + } else { if ( Act ) @@ -1893,7 +1810,6 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) EditTT_E_COMMENT.Enable(); PushButtonTT_PB_ACCEPT.Enable(); } - // ReleaseMouse(); bSelecting = sal_False; } } @@ -2109,7 +2025,6 @@ void StatementCommand::Translate() GetTTSettings()->bToTop = sal_False; } -// GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->Enable( sal_True, sal_True ); GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( sal_True, sal_True ); if ( GetTTSettings()->pTranslateWin->IsTranslationAvailable() ) @@ -2124,7 +2039,7 @@ void StatementCommand::Translate() if ( pTranslationWindow->GetType() == WINDOW_BORDERWINDOW && pTranslationWindow->GetWindow( WINDOW_CLIENT ) ) { Window* pNew = pTranslationWindow->GetWindow( WINDOW_CLIENT ); - // Bei Dockingwindoes das kanze Geraffel von Docking Floating überspringen + // Bei Dockingwindoes das kanze Geraffel von Docking Floating �berspringen while ( IsDialog( pNew ) && !pNew->GetUniqueOrHelpId().getLength() && pNew->GetChildCount() == 1 ) pNew = pNew->GetChild( 0 ); pTranslationWindow = pNew; @@ -2204,8 +2119,8 @@ void StatementCommand::Translate() } Window* StatementCommand::GetNextOverlap( Window* pBase ) -{ // Findet irgendwelche Overlap-Fenster, die schließbar aussehen - // Eventuell muß noch die Auswahl verfeinert werden. +{ // 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 ); @@ -2238,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; @@ -2254,14 +2169,13 @@ Window* StatementCommand::GetNextRecoverWin() { Window* pTB = pControl->GetChild( 0 ); if ( pControl->GetChildCount() == 1 && pTB->GetType() == WINDOW_TOOLBOX ) -// return pTB; ; // do not act on floating toolboxes #i38796 else return pControl; } // 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; @@ -2355,7 +2269,7 @@ sal_Bool StatementCommand::Execute() 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 = sal_True; bUsePostEvents = sal_True; @@ -2386,7 +2300,7 @@ sal_Bool StatementCommand::Execute() short nRT = ImpGetRType( pControl ); if ( nRT == C_TabControl && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - { // Bei Tabcontrol den zugehörigen Tabdialog nehmen + { // Bei Tabcontrol den zugeh�rigen Tabdialog nehmen pControl = pControl->GET_REAL_PARENT(); nRT = ImpGetRType( pControl ); } @@ -2441,7 +2355,7 @@ sal_Bool StatementCommand::Execute() } nNr1++; break; - case 2: // BUG 48239 + case 2: case 1: if ( pBD->GetPushButton( BUTTONID_NO ) ) { @@ -2466,7 +2380,7 @@ sal_Bool StatementCommand::Execute() break; } default: - DBG_ERROR( "Unknown Windowtype" ); + OSL_FAIL( "Unknown Windowtype" ); REPORT_WIN_CLOSEDc(pControl, "Unknown Windowtype"); ReportError( GEN_RES_STR0( S_RESETAPPLICATION_FAILED_UNKNOWN ), pControl->GetType() ); #if OSL_DEBUG_LEVEL > 1 @@ -2486,9 +2400,9 @@ sal_Bool StatementCommand::Execute() SET_WINP_CLOSING(pControl); ((DockingWindow*)pControl)->Close(); - // Eigentlich nur bei TaskWindows! Hoffen wir mal, daß keine anderen DockingWindows dazwischen hauen. + // 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 + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en nLNr1 = (sal_uLong)pControl; return sal_False; @@ -2500,48 +2414,45 @@ sal_Bool StatementCommand::Execute() || (pControl->GetType() == WINDOW_WORKWINDOW) || (pControl->GetType() == WINDOW_BORDERWINDOW) ) ) { - // if ( pControl->GetStyle() & WB_CLOSEABLE ) - { #ifdef RESET_APPLICATION_TO_BACKING_WINDOW - // Special handling for last Document; do not close the Frame, only the Document - if ( GetDocWinCount() == 1 && IsDocFrame( pControl ) ) + // Special handling for last Document; do not close the Frame, only the Document + if ( GetDocWinCount() == 1 && IsDocFrame( pControl ) ) + { + if ( IsDocWin( pControl ) ) { - if ( IsDocWin( pControl ) ) + if ( GetDocFrameMenuBar( pControl ) ) { - if ( GetDocFrameMenuBar( pControl ) ) + MenuBar* pMenu = GetDocFrameMenuBar( pControl ); + if ( pMenu->HasCloser() ) { - MenuBar* pMenu = GetDocFrameMenuBar( pControl ); - if ( pMenu->HasCloser() ) - { - REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType())); - SET_WINP_CLOSING(pControl); + REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType())); + SET_WINP_CLOSING(pControl); - pMenu->GetCloserHdl().Call( pMenu ); + pMenu->GetCloserHdl().Call( pMenu ); - // nur bei TaskWindows! - if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen - nLNr1 = (sal_uLong)pControl; + // nur bei TaskWindows! + if ( (Window*)nLNr1 != pControl ) + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1 = (sal_uLong)pControl; - return sal_False; - } + return sal_False; } } } - else + } + else #endif // def RESET_APPLICATION_TO_BACKING_WINDOW - { - REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType())); - SET_WINP_CLOSING(pControl); - ((SystemWindow*)pControl)->Close(); + { + REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType())); + SET_WINP_CLOSING(pControl); + ((SystemWindow*)pControl)->Close(); - // Eigentlich nur bei TaskWindows! - if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen - nLNr1 = (sal_uLong)pControl; + // Eigentlich nur bei TaskWindows! + if ( (Window*)nLNr1 != pControl ) + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1 = (sal_uLong)pControl; - return sal_False; - } + return FALSE; } } } @@ -2592,11 +2503,11 @@ sal_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() ); @@ -2625,8 +2536,6 @@ sal_Bool StatementCommand::Execute() { sal_Bool bWait = sal_False; ReportError( GEN_RES_STR0( S_NO_ACTIVE_WINDOW ) ); -// if ( Application::GetAppWindow() ) -// bWait = Application::GetAppWindow()->IsWait(); pRet->GenReturn ( RET_Value, nMethodId, bWait ); break; } @@ -2679,10 +2588,10 @@ sal_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 ) @@ -2699,7 +2608,7 @@ sal_Bool StatementCommand::Execute() } pProfiler->StartAutoProfiling( nNr1 ); - // Der Header ist abhängig vom Modus + // Der Header ist abh�ngig vom Modus pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() ); } else if ( nParams & PARAM_USHORT_1 ) @@ -2710,8 +2619,8 @@ sal_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, S_ProfileReset, nAnzahl ); @@ -2737,7 +2646,7 @@ sal_Bool StatementCommand::Execute() } pProfiler->StartProfilingPerCommand(); - // Der Header ist abhängig vom Modus + // Der Header ist abh�ngig vom Modus pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() ); } } @@ -2998,8 +2907,6 @@ sal_Bool StatementCommand::Execute() nErrorcode = aDir.GetError(); if ( !nErrorcode && !aDir.MakeDir() ) nErrorcode = FSYS_ERR_UNKNOWN; -// Workaround für Bug 60693 -// nErrorcode = aDir.GetError(); } break; case RC_FileCopy: @@ -3076,7 +2983,7 @@ sal_Bool StatementCommand::Execute() break; } DirEntry aNextEntry=(*(pDir))[nDirPos++]; - aPath = aNextEntry.GetName(); //Full(); + aPath = aNextEntry.GetName(); break; } } @@ -3085,60 +2992,6 @@ sal_Bool StatementCommand::Execute() pRet->GenReturn ( RET_Value, nMethodId, aPath ); } - - -/* keep old Implementation for now - // neues Verzeichnis einlesen - if ( (nParams & PARAM_STR_1) ) - { - if ( pDir ) - { - delete pDir; - pDir = NULL; - } - DirEntryKind aDirEntryKind = FSYS_KIND_FILE | FSYS_KIND_DIR; - if ( (nParams & PARAM_USHORT_1) && nNr1 ) - { - if ( nNr1 & 16 ) - aDirEntryKind = FSYS_KIND_DIR; - else - ReportError( GEN_RES_STR0( S_SELECTION_BY_ATTRIBUTE_ONLY_DIRECTORIES ) ); - } - - DirEntry aEntry( aString1 ); - nErrorcode = aEntry.GetError(); - if ( !nErrorcode ) - { - nDirPos = 0; - FileStat aFS( aEntry ); - if ( !aFS.IsKind( FSYS_KIND_WILD ) && !aFS.IsKind( FSYS_KIND_DIR ) && aEntry.Exists() ) - { // Sonderbehandlung für genau einen Eintrag - if ( !aFS.IsKind( FSYS_KIND_DIR ) && ( aDirEntryKind == FSYS_KIND_DIR ) ) - pRet->GenReturn ( RET_Value, nMethodId, String() ); - else - pRet->GenReturn ( RET_Value, nMethodId, (String)(aEntry.GetName()) ); - - break; - } - else - { - pDir = new Dir( aEntry, aDirEntryKind ); - nErrorcode = pDir->GetError(); - } - } - } - - if ( !pDir ) - pDir = new Dir; - - if ( !nErrorcode && ValueOK( nMethodId, GEN_RES_STR0( S_NO_MORE_FILES ), nDirPos+1, pDir->Count()+1 ) ) - { - if ( nDirPos == pDir->Count() ) - pRet->GenReturn ( RET_Value, nMethodId, String() ); - else - pRet->GenReturn ( RET_Value, nMethodId, (String)((*pDir)[ nDirPos ].GetName()) ); - nDirPos++; - }*/ } break; case RC_FileLen: @@ -3278,18 +3131,13 @@ sal_Bool StatementCommand::Execute() case RC_GetMouseStyle: { Pointer aPointer; -// if ( DragManager::GetDragManager() ) -// aPointer = DragManager::GetDragManager()->GetDragPointer(); -// else + Window *pActualWin = GetMouseWin(); + if ( pActualWin ) + aPointer = pActualWin->GetPointer(); + else { - Window *pActualWin = GetMouseWin(); - if ( pActualWin ) - aPointer = pActualWin->GetPointer(); - else - { - ReportError( GEN_RES_STR1( S_POINTER_OUTSIDE_APPWIN, RcString( nMethodId ) ) ); - aPointer = Pointer( POINTER_NULL ); - } + ReportError( GEN_RES_STR1( S_POINTER_OUTSIDE_APPWIN, RcString( nMethodId ) ) ); + aPointer = Pointer( POINTER_NULL ); } pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)aPointer.GetStyle() ); } @@ -3507,8 +3355,6 @@ sal_Bool StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBas } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdType ) : StatementList() , nNr1( 0 ) @@ -3541,7 +3387,7 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdTyp } else { - DBG_ERROR( "Wrong ControlType" ); + OSL_FAIL( "Wrong ControlType" ); } pCmdIn->Read( nMethodId ); @@ -3570,8 +3416,6 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdTyp if( nParams & PARAM_ULONG_1 ) {m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );} -/* if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 ); - if( nParams & PARAM_BOOL_2 ) pCmdIn->Read( bBool2 );*/ m_pDbgWin->AddText( "\n" ); #endif } @@ -3610,10 +3454,8 @@ sal_Bool IsDialog(Window *pWin) return sal_True; -// break; default: return sal_False; -// break; } } @@ -3776,7 +3618,7 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin ) aDiff /= nSteps; StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack - // Das verhindert, daß schon der nächste Befehl ausgeführt wird. + // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird. for ( ; nSteps ; nSteps-- ) { @@ -3803,7 +3645,7 @@ sal_Bool StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow ) aTimer.SetTimeout( nTimeWait ); aTimer.Start(); StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack - // Das verhindert, daß schon der nächste Befehl ausgeführt wird. + // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird. while ( aTimer.IsActive() ) { SafeReschedule( sal_True ); @@ -3832,11 +3674,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) break; case M_GetPosX: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung für FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // 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 ); @@ -3851,11 +3693,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) break; case M_GetPosY: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung für FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // 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 ); @@ -3870,11 +3712,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) break; case M_GetSizeX: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung für FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // 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 ); @@ -3882,11 +3724,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) break; case M_GetSizeY: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung für FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // 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 ); @@ -3895,11 +3737,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) case M_SnapShot: { if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung für FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // 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 ); @@ -3970,9 +3812,9 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) { - switch( nMethodId ) // Diese können an jedem Window ausgeführt werden + switch( nMethodId ) // 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: @@ -4135,11 +3977,9 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) Size aS = pControl->GetOutputSizePixel(); Point aPos = Point(aS.Width() * nNr1 / 100,aS.Height() * nNr2 / 100); Window *pActualWin = pControl->FindWindow( aPos ); -// AnimateMouse( pControl, aPos ); if ( pActualWin ) aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) ); -// aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) ); else pActualWin = pControl; @@ -4158,12 +3998,10 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) if ( pActualWin ) aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) ); -// aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) ); else pActualWin = pControl; AnimateMouse( pActualWin, aPos ); -// pActualWin->GrabFocus(); MouseEvent aMEvt( aPos, 1, MOUSE_SIMPLECLICK|MOUSE_SELECT, nButton ); ImplMouseButtonUp( pActualWin, aMEvt ); } @@ -4178,13 +4016,11 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) if ( pActualWin ) { aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) ); -// aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) ); } else pActualWin = pControl; AnimateMouse( pActualWin, aPos ); -// pActualWin->GrabFocus(); MouseEvent aMEvt( aPos, 0, MOUSE_SIMPLEMOVE|MOUSE_DRAGMOVE, nButton ); ImplMouseMove( pActualWin, aMEvt ); } @@ -4199,7 +4035,6 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) if ( pActualWin ) { aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) ); -// aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) ); } else pActualWin = pControl; @@ -4222,7 +4057,7 @@ sal_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(); sal_uLong nTime = Time().GetTime(); @@ -4256,10 +4091,6 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) if ( (pControl->GetType() == WINDOW_TOOLBOX) && pTB->IsMenuEnabled() ) { pTB->ExecuteCustomMenu(); -/* Rectangle aRect = pTB->GetMenubuttonRect(); - AnimateMouse( pControl, aRect.Center() ); - MouseEvent aMEvnt(aRect.Center(),1,MOUSE_SIMPLECLICK,MOUSE_LEFT); - ImplMouseButtonDown( pTB, aMEvnt );*/ } else { @@ -4272,7 +4103,6 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) if ( pActualWin ) { aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) ); - // aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) ); pControl = pActualWin; } } @@ -4338,13 +4168,9 @@ sal_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; -// Rectangle GetAutoHideRect() const; -// Rectangle GetFadeInRect() const; -// Rectangle GetFadeOutRect() const; - switch( nMethodId ) { case M_FadeIn: @@ -4365,7 +4191,6 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) ImplMouseButtonDown( pControl, aMEvnt, FORCE_DIRECT_CALL ); ImplMouseButtonUp ( pControl, aMEvnt, FORCE_DIRECT_CALL ); } -// pSW->AutoHide(); break; case M_IsFadeIn: pRet->GenReturn ( RET_Value, aUId, pSW->IsFadeOutButtonVisible() ); @@ -4582,16 +4407,16 @@ sal_Bool StatementControl::Execute() 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; - if ( /* !IsAccessable(pControl)#87019# */ !pControl || !pControl->IsVisible() ) + if ( !pControl || !pControl->IsVisible() ) pControl = NULL; if ( ((nMethodId == M_Exists) && pControl) || ((nMethodId == M_NotExists) && !pControl) ) - { // Wenn Bedingung erfüllt + { // Wenn Bedingung erf�llt pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_True ); } else @@ -4603,7 +4428,6 @@ sal_Bool StatementControl::Execute() Advance(); delete this; return sal_True; -// break; } @@ -4621,8 +4445,6 @@ sal_Bool StatementControl::Execute() if ( nRT == C_Window && // Search for WorkWindow to satisfy these commands ( nMethodId == M_Close -// || nMethodId == M_Size -// || nMethodId == M_Move || nMethodId == M_IsMax || nMethodId == M_IsMin || nMethodId == M_IsRestore @@ -4661,11 +4483,10 @@ sal_Bool StatementControl::Execute() // TODO: handle GetFocus for all Methods and Windows like this (remove part below) // See for impact of changed focus for HandleVisibleControls() (taking Snapshots might be different, possible exclude those methods) if (( (nRT == C_TreeListBox) && !bBool2 ) - && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gewünscht + && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht && nMethodId != M_MouseDown && nMethodId != M_MouseUp - && nMethodId != M_MouseMove - /*&& nMethodId != M_MouseDoubleClick*/ ) + && nMethodId != M_MouseMove ) { if ( !pControl->HasFocus() ) { @@ -4703,22 +4524,12 @@ sal_Bool StatementControl::Execute() || nRT == C_TreeListBox ) || nMethodId == M_OpenContextMenu ) - && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gewünscht + && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht && nMethodId != M_MouseDown && nMethodId != M_MouseUp - && nMethodId != M_MouseMove - /*&& nMethodId != M_MouseDoubleClick*/ ) + && nMethodId != M_MouseMove ) pControl->GrabFocus(); -/* leads to problems because settext sets the text whereas typekeys adds to the text. - if ( bDoTypeKeysDelay && nMethodId == M_SetText && ( nParams & PARAM_STR_1 ) ) - { // Hier wird das Statement auf ein TypeKeys umgebogen - nMethodId = M_TypeKeys; - nParams = PARAM_BOOL_1 | PARAM_STR_1; - bBool1 = sal_True; - pControl->GrabFocus(); - } -*/ if ( !HandleCommonMethods( pControl ) ) { switch( nRT ) @@ -4780,10 +4591,6 @@ sal_Bool StatementControl::Execute() for ( anz=0 ; anz < pTControl->GetPageCount() && !aID.equals( aWantedID ) ; anz++ ) { pTControl->SelectTabPage( pTControl->GetPageId(i) ); - /*if (pTControl->GetCurPageId()) - pTControl->DeactivatePage(); - pTControl->SetCurPageId( pTControl->GetPageId(i) ); - pTControl->ActivatePage();*/ aID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetUniqueOrHelpId(); i++; if ( i >= pTControl->GetPageCount() ) @@ -4794,10 +4601,6 @@ sal_Bool StatementControl::Execute() if ( !aID.equals( aWantedID ) ) { pTControl->SelectTabPage( nActive ); - /*if (pTControl->GetCurPageId()) - pTControl->DeactivatePage(); - pTControl->SetCurPageId( nActive ); - pTControl->ActivatePage();*/ ReportError( aWantedID, GEN_RES_STR1( S_TABPAGE_NOT_FOUND, MethodString( nMethodId ) ) ); } } @@ -5244,7 +5047,7 @@ sal_Bool StatementControl::Execute() 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 + { // Wir f�lschen einen Parameter nParams |= PARAM_STR_1; aString1 = Id2Str( aUId ); } @@ -5321,9 +5124,6 @@ sal_Bool StatementControl::Execute() if ( aRect.IsEmpty() ) { pTB->ExecuteCustomMenu(); -/* aRect = pTB->GetMenubuttonRect(); - MouseEvent aMEvnt(aRect.Center(),1,MOUSE_SIMPLECLICK,MOUSE_LEFT); - ImplMouseButtonDown( pTB, aMEvnt );*/ aSubMenuId1 = 0; aSubMenuId2 = 0; @@ -5356,7 +5156,7 @@ sal_Bool StatementControl::Execute() Window *pWin = NULL; // Wait for the window to open. StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack - { // Das verhindert, daß schon der nächste Befehl ausgeführt wird. + { // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird. Time aDelay; while ( !pWin && ( (pWin = GetPopupFloatingWin()) == NULL ) && ( Time() - aDelay ).GetSec() < 15 ) SafeReschedule(); @@ -5539,16 +5339,7 @@ sal_Bool StatementControl::Execute() bBool1 = sal_True; if( nParams & PARAM_STR_1 ) { -/* ListBox *pLB = ((ListBox*)pControl); - if ( pLB->GetEntryPos( aString1 ) == LISTBOX_ENTRY_NOTFOUND ) - ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) ); - else - { - pLB->SelectEntry( aString1, bBool1 ); - if ( pLB->IsEntrySelected( aString1 ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL - ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) ); - } -*/ ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) ); + ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) ); } else { @@ -5775,64 +5566,6 @@ sal_Bool StatementControl::Execute() EditBrowseBox* pEBBox = dynamic_cast< EditBrowseBox* >(pControl); switch( nMethodId ) { - - - /* - - - sal_Bool MakeFieldVisible( long nRow, sal_uInt16 nColId, sal_Bool bComplete = sal_False ); - // access to dynamic values of cursor row - String GetColumnTitle( sal_uInt16 nColumnId ) const; - sal_uInt16 GetColumnId( sal_uInt16 nPos ) const; - sal_uInt16 GetColumnPos( sal_uInt16 nColumnId ) const; - // access and movement of cursor - long GetCurRow() const { return nCurRow; } - sal_uInt16 GetCurColumnId() const { return nCurColId; } - sal_Bool GoToRow( long nRow ); - sal_Bool GoToRowAndDoNotModifySelection( long nRow ); - sal_Bool GoToColumnId( sal_uInt16 nColId ); - sal_Bool GoToRowColumnId( long nRow, sal_uInt16 nColId ); - // selections - void SetNoSelection(); - void SelectAll(); - void SelectRow( long nRow, sal_Bool bSelect = sal_True, sal_Bool bExpand = sal_True ); - void SelectColumnPos( sal_uInt16 nCol, sal_Bool bSelect = sal_True ) - { SelectColumnPos( nCol, bSelect, sal_True); } - void SelectColumnId( sal_uInt16 nColId, sal_Bool bSelect = sal_True ) - { SelectColumnPos( GetColumnPos(nColId), bSelect, sal_True); } - long GetSelectRowCount() const; - sal_uInt16 GetSelectColumnCount() const; - sal_Bool IsRowSelected( long nRow ) const; - sal_Bool IsColumnSelected( sal_uInt16 nColumnId ) const; - long FirstSelectedRow( sal_Bool bInverse = sal_False ); - long LastSelectedRow( sal_Bool bInverse = sal_False ); - long PrevSelectedRow(); - long NextSelectedRow(); - const MultiSelection* GetSelection() const - { return bMultiSelection ? uRow.pSel : 0; } - void SetSelection( const MultiSelection &rSelection ); - - virtual String GetCellText(long _nRow, sal_uInt16 _nColId) const; - sal_uInt16 GetColumnCount() const { return ColCount(); } -protected: - virtual long GetRowCount() const; - - - EditBrowseBox - - sal_Bool IsEditing() const {return aController.Is();} - void InvalidateStatusCell(long nRow) {RowModified(nRow, 0);} - void InvalidateHandleColumn(); - - CellControllerRef Controller() const { return aController; } - sal_Int32 GetBrowserFlags() const { return m_nBrowserFlags; } - - virtual void ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus = sal_True); - virtual void DeactivateCell(sal_Bool bUpdate = sal_True); - - - - */ case M_GetSelText : { pRet->GenReturn ( RET_Value, aUId, pEBBox->GetCellText( pEBBox->GetCurrRow(), pEBBox->GetColumnId( pEBBox->GetCurrColumn() ))); @@ -5881,69 +5614,6 @@ protected: } break; - - - /* - case M_GetSelCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((SvLBox*)pControl)->GetSelectionCount())); - break; - case M_GetSelIndex : - if ( ! (nParams & PARAM_USHORT_1) ) - nNr1 = 1; - if ( ValueOK(aUId, CUniString("GetSelIndex"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) ) - { - nNr1--; - COUNT_LBOX( FirstSelected, NextSelected, nNr1); - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( ((SvTreeListBox*)pControl)->GetVisiblePos( pThisEntry )) +1 ); - } - break; - case M_GetSelText : - if ( ! (nParams & PARAM_USHORT_1) ) - nNr1 = 1; - if ( ValueOK(aUId, CUniString("GetSelText"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) ) - { - nNr1--; - COUNT_LBOX( FirstSelected, NextSelected, nNr1); - GetFirstValidTextItem( pThisEntry ); - pRet->GenReturn ( RET_Value, aUId, pItem->GetText() ); - } - break; - case M_GetItemCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((SvLBox*)pControl)->GetVisibleCount()) ); - break; - case M_GetItemText : - if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) ) - { - SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 ); - GetFirstValidTextItem( pEntry ); - pRet->GenReturn ( RET_Value, aUId, pItem->GetText() ); - } - break; - case M_Select : - if ( ! (nParams & PARAM_BOOL_1) ) - bBool1 = sal_True; - if( nParams & PARAM_STR_1 ) - { - / * ListBox *pLB = ((ListBox*)pControl); - if ( pLB->GetEntryPos( aString1 ) == LISTBOX_ENTRY_NOTFOUND ) - ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) ); - else - { - pLB->SelectEntry( aString1, bBool1 ); - if ( pLB->IsEntrySelected( aString1 ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL - ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) ); - } - * / ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) ); - } - else - { - if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) ) - { - SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 ); - ((SvTreeListBox*)pControl)->Select ( pEntry, bBool1 ); - } - } - break;*/ default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "EditBrowseBox" ) ); break; @@ -6090,10 +5760,6 @@ protected: else pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pELB->getSelIndex() +1)); break; -/* xxxcase M_SetNoSelection : - ((ListBox*)pControl)->SetNoSelection(); - ((ListBox*)pControl)->Select(); - break; */ default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "RoadMap" ) ); break; @@ -6126,22 +5792,11 @@ protected: ::svt::table::PTableModel pModel = pTC->GetModel(); Any aCell; pModel->getCellContent( nNr1-1, nNr2-1, aCell ); - /* doesn't work ATM since it gets casted to SbxDATE in VCLTestTool unfortunately - SbxVariableRef xRes = new SbxVariable( SbxVARIANT ); - unoToSbxValue( xRes, aCell ); - pRet->GenReturn ( RET_Value, aUId, *xRes );*/ Type aType = aCell.getValueType(); TypeClass eTypeClass = aType.getTypeClass(); switch( eTypeClass ) { - /*case TypeClass_ENUM: - { - sal_Int32 nEnum = 0; - enum2int( nEnum, aValue ); - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)nEnum ); - } - break;*/ case TypeClass_BOOLEAN: pRet->GenReturn ( RET_Value, aUId, *(sal_Bool*)aCell.getValue() ); break; @@ -6158,9 +5813,6 @@ protected: pRet->GenReturn ( RET_Value, aUId, aContent ); } break; - //case TypeClass_FLOAT: break; - //case TypeClass_DOUBLE: break; - //case TypeClass_OCTET: break; case TypeClass_BYTE: case TypeClass_SHORT: case TypeClass_LONG: @@ -6173,7 +5825,6 @@ protected: pRet->GenReturn ( RET_Value, aUId, val ); } break; - //case TypeClass_UNSIGNED_OCTET:break; case TypeClass_UNSIGNED_SHORT: { comm_USHORT val = 0; @@ -6205,7 +5856,6 @@ protected: if ( pTC->GoToRow( ::svt::table::RowPos( nNr1-1 ) ) ) { Size aSize( pTC->GetSizePixel() ); -// DirectLog( S_QAError, UniString::CreateFromInt32( aSize.Width() ).Append( UniString::CreateFromInt32( aSize.Height() ) ) ); Point aPos( aSize.Width() / 2, aSize.Height() / 2 ); long nStep = aSize.Height() / 4; ::svt::table::RowPos nLastPos; @@ -6242,18 +5892,6 @@ protected: if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRowCount() ) ) pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowIndex( nNr1-1 ) +1 ) ); break; -/* case M_GetSelText : - if ( ! (nParams & PARAM_USHORT_1) ) - nNr1 = 1; - if ( ValueOK(aUId, CUniString("GetSelText"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) ) - { - nNr1--; - COUNT_LBOX( FirstSelected, NextSelected, nNr1); - GetFirstValidTextItem( pThisEntry ); - pRet->GenReturn ( RET_Value, aUId, pItem->GetText() ); - } - break; - */ default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "TableControl" ) ); break; @@ -6306,7 +5944,6 @@ protected: pRet->GenReturn ( RET_Value, aUId, (comm_BOOL) !((DockingWindow*)pControl)->IsFloatingMode()); break; case M_Close: - //aWindowWaitUId = aUId; DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId"); SET_WINP_CLOSING(pControl); ((DockingWindow*)pControl)->Close(); @@ -6325,7 +5962,7 @@ protected: pFloat = pControl->GET_REAL_PARENT(); else { - DBG_ERROR("FloatingMode set but Parent is no FloatingWindow"); + OSL_FAIL("FloatingMode set but Parent is no FloatingWindow"); } } if ( pFloat && pFloat->GetType() == WINDOW_FLOATINGWINDOW ) @@ -6470,7 +6107,6 @@ protected: case M_Size: case M_Move: goto FloatWin; -// break; case M_IsMax : pRet->GenReturn ( RET_Value, aUId, ((WorkWindow*)pControl)->IsMaximized() ); break; @@ -6669,7 +6305,7 @@ protected: break; } default: - DBG_ERROR( "Unknown Objekttype from UId or Method not suported" ); + OSL_FAIL( "Unknown Objekttype from UId or Method not suported" ); ReportError( aUId, GEN_RES_STR2( S_UNKNOWN_TYPE, UniString::CreateFromInt32( nRT ), MethodString(nMethodId) ) ); #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( " Unknown Objekttype from UId or Method not suported" ); @@ -6708,3 +6344,5 @@ protected: #define FINISH_SAME } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/statemnt.hxx b/automation/source/server/statemnt.hxx index 42f8dbf05d1a..d7f63a39cd91 100644 --- a/automation/source/server/statemnt.hxx +++ b/automation/source/server/statemnt.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,12 +31,6 @@ ** Es gibt immer nur eine Statementliste, die verpointert ist. ** jederzeit kann das der Anfang der Kette abgefragt werden. ** -** -** -** -** -** -** ***************************************************************************/ #ifndef _STATEMNT_HXX #define _STATEMNT_HXX @@ -44,9 +39,6 @@ #include <tools/string.hxx> #include <tools/debug.hxx> #include <tools/time.hxx> -#ifndef _SV_DRAG_HXX //autogen -//#include <vcl/drag.hxx> -#endif #include <vcl/menu.hxx> #include <vcl/svapp.hxx> #include <tools/fsys.hxx> @@ -115,10 +107,9 @@ public: }; sal_Bool IsDialog(Window *pWin); // Ist *pWin von SystemWindow abgeleitet (Kann es Active sein) -sal_Bool IsAccessable(Window *pWin); // Ist *pWin Zugreifbar (über IsEnabled und Parents geprüft) +sal_Bool IsAccessable(Window *pWin); // Ist *pWin Zugreifbar (�ber IsEnabled und Parents gepr�ft) -//class SafePointer : CriticalSection class SafePointer { SafePointer *pSelf; @@ -126,8 +117,6 @@ public: SafePointer() { pSelf = this; } virtual ~SafePointer() { DBG_ASSERT(pSelf==this,"Destructor von Nicht existierendem Objekt aufgerufen"); pSelf = NULL; } -// static sal_Bool IsValid( SafePointer *pThis ) { return pThis == pThis->pSelf; } -// virtual operator -> (); { DBG_ASSERT(pMyself == this,"-> von Nicht existierendem Objekt aufgerufen"); } }; @@ -174,12 +163,12 @@ protected: static sal_Bool bIsInReschedule; static sal_uInt16 nModalCount; - static Window *pLastFocusWindow; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen - static sal_Bool bWasDragManager; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen - static sal_Bool bWasPopupMenu; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen + static Window *pLastFocusWindow; // 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 sal_uInt16 nMinTypeKeysDelay; /// Verzögerung der einzelnen Anschläge für TypeKeys + static sal_uInt16 nMinTypeKeysDelay; /// Verz�gerung der einzelnen Anschl�ge f�r TypeKeys static sal_uInt16 nMaxTypeKeysDelay; static sal_Bool bDoTypeKeysDelay; @@ -189,7 +178,7 @@ protected: public: static sal_Bool IsInReschedule() { return bIsInReschedule; } - void SafeReschedule( sal_Bool bYield = sal_False ) // Setzt Flag, so daß nicht schon der nächste Befehl ausgeführt wird + void SafeReschedule( sal_Bool bYield = sal_False ) // Setzt Flag, so da� nicht schon der n�chste Befehl ausgef�hrt wird { nModalCount = Application::GetModalModeCount(); bIsInReschedule = sal_True; @@ -211,13 +200,12 @@ public: nModalCount = 0; } static sal_Bool MaybeResetSafeReschedule() - { // Implementierung muß hier zwar nicht sein, ist aber übersichtlicher so + { // Implementierung mu� hier zwar nicht sein, ist aber �bersichtlicher so if ( !bIsInReschedule ) return sal_False; if ( pLastFocusWindow != GetpApp()->GetFocusWindow() || ( Application::GetModalModeCount() > nModalCount ) -// || ( DragManager::GetDragManager() && !bWasDragManager ) || ( PopupMenu::GetActivePopupMenu() && !bWasPopupMenu ) || ( StarBASIC::IsRunning() && !bBasicWasRunning ) ) { @@ -257,17 +245,15 @@ protected: sal_uInt16 GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu ); public: -// void AddStatement( StatementList *pNewStatement ); - virtual ~StatementList(); void Advance(); virtual sal_Bool Execute() = 0; /*************************************************************************** -** Bestimmt erst den nächsten Befehl, setzt Current -** und führt dann aus. -** Returnwert gibt an, ob Befehl nochmal ausgeführt -** werden soll. Dann muß auch der UserEvent verlassen werden, um der Applikation -** normales Arbeiten zu ermöglichen (Dialog schliessen) +** 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 ***************************************************************************/ @@ -293,7 +279,7 @@ public: 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 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 @@ -344,7 +330,7 @@ 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: @@ -423,8 +409,8 @@ public: static CommunicationLink *pCommLink; static sal_Bool bSending; - static sal_Bool bUseIPC; // Soll zur rückmeldung IPC verwendet werden? - static ImplRemoteControl *pRemoteControl; // Static für 2. Constructor + static sal_Bool bUseIPC; // Soll zur r�ckmeldung IPC verwendet werden? + static ImplRemoteControl *pRemoteControl; // Static f�r 2. Constructor private: void SendViaSocket(); @@ -496,3 +482,5 @@ void ImplCommand( Window* pWin, CommandEvent &aCmdEvnt ); void ImplEventWait( sal_uLong nID ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/svcommstream.cxx b/automation/source/server/svcommstream.cxx index 7ff77b30d242..c689f9137a3f 100644 --- a/automation/source/server/svcommstream.cxx +++ b/automation/source/server/svcommstream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,5 @@ comm_ULONG SvCommStream::Write( const void* pData, comm_ULONG nSize ) { return p comm_BOOL SvCommStream::IsEof() const { return pStream->IsEof(); } comm_ULONG SvCommStream::SeekRel( long nPos ) { return pStream->SeekRel( nPos ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/simplecm/communiio.hxx b/automation/source/simplecm/communiio.hxx index 5431c9d49621..65466a26b271 100644 --- a/automation/source/simplecm/communiio.hxx +++ b/automation/source/simplecm/communiio.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,7 +50,7 @@ public: virtual ~ITransmiter() {} virtual comm_USHORT TransferBytes( const void* pBuffer, comm_UINT32 nLen ) = 0; - comm_ULONG GetLastSent() { return nLastSent; } + comm_ULONG GetLastSent() const { return nLastSent; } }; class IReceiver @@ -61,5 +62,7 @@ public: virtual ~IReceiver() {;} virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) = 0; - comm_ULONG GetLastReceived() { return nLastReceived; } + comm_ULONG GetLastReceived() const { return nLastReceived; } }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/simplecm/packethandler.cxx b/automation/source/simplecm/packethandler.cxx index bafd277ca422..4cd2ad7d3106 100644 --- a/automation/source/simplecm/packethandler.cxx +++ b/automation/source/simplecm/packethandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,6 +41,7 @@ #include <automation/commtypes.hxx> #include <automation/commdefines.hxx> #include "communiio.hxx" +#include <osl/diagnose.h> /** Forces switch to multichannel headers even for old communication Method @@ -97,7 +99,7 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) if ( bWasError ) return sal_False; - if ( 0xFFFFFFFF == nBytes ) // Expliziter Request für dieses Datenpaket auf MultiChannel umzuschalten + if ( 0xFFFFFFFF == nBytes ) // Expliziter Request f�r dieses Datenpaket auf MultiChannel umzuschalten { READ_SOCKET( &nBytes, sizeof(nBytes) ) if ( bWasError ) @@ -112,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 ); @@ -142,7 +144,7 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) break; default: { - DBG_ERROR("Unbekannter Headertyp in der Kommunikation"); + OSL_FAIL("Unbekannter Headertyp in der Kommunikation"); bWasError = sal_True; } @@ -151,7 +153,7 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) if ( bWasError ) return sal_False; - /// Längen anpassen und ggf restheader überlesen. + /// L�ngen anpassen und ggf restheader �berlesen. while ( nHeaderBytes > nHeaderReadSoFar ) { unsigned char nDummy; @@ -209,7 +211,7 @@ comm_BOOL PacketHandler::TransferData( const void* pData, comm_UINT32 nLen, CMPr #ifndef FORCE_MULTI_CHANNEL_HEADERS if ( bMultiChannel ) #endif - nBuffer += 1+2+2+2; // für einen CH_SimpleMultiChannel + nBuffer += 1+2+2+2; // f�r einen CH_SimpleMultiChannel #ifdef FORCE_MULTI_CHANNEL_HEADERS if ( !bMultiChannel ) @@ -236,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 ); @@ -258,10 +260,10 @@ comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void comm_UINT32 nBuffer = 0; -// if ( pMyManager->IsMultiChannel() ) Wir senden immer FFFFFFFF vorweg -> immer MultiChannel (Oder GPF bei älteren) - nBuffer += 1+2+2; // für einen CH_Handshake +// if ( pMyManager->IsMultiChannel() ) 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 ) { @@ -284,7 +286,7 @@ comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void nBuffer += 0 ; // one word extradata for options break; default: - DBG_ERROR("Unknown HandshakeType"); + OSL_FAIL("Unknown HandshakeType"); } if ( pData ) @@ -305,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 ); @@ -332,3 +334,5 @@ comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void return !bWasError; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/simplecm/packethandler.hxx b/automation/source/simplecm/packethandler.hxx index cb62f07343df..8ea04d96f043 100644 --- a/automation/source/simplecm/packethandler.hxx +++ b/automation/source/simplecm/packethandler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,8 +59,8 @@ protected: public: PacketHandler( ITransmiter* pTransmitter_, IReceiver* pReceiver_, comm_BOOL bMC = sal_False ); - comm_UINT16 GetReceiveProtocol() { return nReceiveProtocol; } - comm_UINT16 GetReceiveHeaderType() { return nReceiveHeaderType; } + comm_UINT16 GetReceiveProtocol() const { return nReceiveProtocol; } + comm_UINT16 GetReceiveHeaderType() const { return nReceiveHeaderType; } comm_BOOL ReceiveData( void* &pData, comm_UINT32 &nLen ); /// Recieve DataPacket from Socket virtual comm_BOOL SendHandshake( HandshakeType aHandshakeType, const void* pData = NULL, comm_UINT32 nLen = 0 ); @@ -67,3 +68,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index 74a86f343677..01c37e99e26b 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,6 +33,7 @@ #define ENABLE_BYTESTRING_STREAM_OPERATORS #include <tools/solar.h> #include <automation/simplecm.hxx> +#include <osl/diagnose.h> #include <automation/commdefines.hxx> #include "packethandler.hxx" @@ -44,7 +46,7 @@ void debug_printf( const char *chars ) static BOOL bPrint = (getenv("DEBUG") != NULL); if ( bPrint ) { - printf( chars ); + printf( "%c\n", chars ); fflush( stdout ); } } @@ -136,7 +138,7 @@ void CommunicationLink::SetApplication( const ByteString& aApp ) } -SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ) +SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket ) : CommunicationLink( pMan ) , aCommunicationPartner() , aMyName() @@ -158,7 +160,7 @@ SimpleCommunicationLinkViaSocket::~SimpleCommunicationLinkViaSocket() pStreamSocket = NULL; } -void SimpleCommunicationLinkViaSocket::SetStreamSocket( vos::OStreamSocket* pSocket ) +void SimpleCommunicationLinkViaSocket::SetStreamSocket( osl::StreamSocket* pSocket ) { if ( pTCPIO ) pTCPIO->SetStreamSocket( pSocket ); @@ -179,15 +181,6 @@ sal_Bool SimpleCommunicationLinkViaSocket::StopCommunication() return sal_True; } -void SimpleCommunicationLinkViaSocket::SetFinalRecieveTimeout() -{ - if ( !IsCommunicationError() ) - { - TimeValue aTime = {30, 0}; // 30 seconds - pStreamSocket->setRecvTimeout( &aTime ); - } -} - sal_Bool SimpleCommunicationLinkViaSocket::IsCommunicationError() { return !pStreamSocket; @@ -202,9 +195,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp case CM_DOTTED: { rtl::OUString aDotted; - vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr; + osl::SocketAddr* pPeerAdr = new osl::SocketAddr; pStreamSocket->getPeerAddr( *pPeerAdr ); - ((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted ); + osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData); delete pPeerAdr; return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 ); } @@ -213,8 +206,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp { if ( !aCommunicationPartner.Len() ) { - rtl::OUString aFQDN; - pStreamSocket->getPeerHost( aFQDN ); + rtl::OUString aFQDN( pStreamSocket->getPeerHost()); aCommunicationPartner = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 ); } return aCommunicationPartner; @@ -234,9 +226,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType ) case CM_DOTTED: { rtl::OUString aDotted; - vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr; - pStreamSocket->getLocalAddr( *pPeerAdr ); - ((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted ); + osl::SocketAddr* pPeerAdr = new osl::SocketAddr; + pStreamSocket->getPeerAddr( *pPeerAdr ); + osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData); delete pPeerAdr; return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 ); } @@ -245,8 +237,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType ) { if ( !aMyName.Len() ) { - rtl::OUString aFQDN; - pStreamSocket->getLocalHost( aFQDN ); + rtl::OUString aFQDN(pStreamSocket->getLocalHost()); aMyName = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 ); } return aMyName; @@ -346,13 +337,13 @@ sal_Bool SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandsha case CH_SetApplication: break; default: - DBG_ERROR("Unknown HandshakeType"); + OSL_FAIL("Unknown HandshakeType"); } } return !bWasError; } -SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket ) +SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ) : SimpleCommunicationLinkViaSocket( pMan, pSocket ) { } @@ -363,11 +354,22 @@ SimpleCommunicationLinkViaSocketWithReceiveCallbacks::~SimpleCommunicationLinkVi StopCommunication(); } +bool SimpleCommunicationLinkViaSocket::IsReceiveReady() +{ + if ( !IsCommunicationError() ) + { + TimeValue aTime = {30, 0}; // 30 seconds + return pStreamSocket->isRecvReady( &aTime ); + } + + return false; +} + void SimpleCommunicationLinkViaSocketWithReceiveCallbacks::WaitForShutdown() { CommunicationLinkRef rHold(this); // avoid deleting this link before the end of the method - SetFinalRecieveTimeout(); - while ( pMyManager && !IsCommunicationError() ) + + while( pMyManager && !IsCommunicationError() && IsReceiveReady()) ReceiveDataStream(); } @@ -396,7 +398,7 @@ sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunica if ( GetStreamSocket() ) GetStreamSocket()->close(); - vos::OStreamSocket *pTempSocket = GetStreamSocket(); + osl::StreamSocket* pTempSocket = GetStreamSocket(); SetStreamSocket( NULL ); delete pTempSocket; @@ -436,8 +438,7 @@ sal_Bool CommunicationManager::StartCommunication( ByteString aHost, sal_uLong n ByteString CommunicationManager::GetMyName( CM_NameType ) { - rtl::OUString aHostname; - vos::OSocketAddr::getLocalHostname( aHostname ); + rtl::OUString aHostname( osl::SocketAddr::getLocalHostname()); return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 ); } @@ -479,12 +480,12 @@ 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 ) { - DBG_ERROR( "Datastream is NULL" ); + OSL_FAIL( "Datastream is NULL" ); pCL->FinishCallback(); return; } @@ -629,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 ); @@ -672,23 +673,20 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ) { - vos::OInetSocketAddr Addr; - vos::OConnectorSocket *pConnSocket; + osl::SocketAddr Addr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ), nPort ); + osl::ConnectorSocket *pConnSocket; - Addr.setAddr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ) ); - Addr.setPort( nPort ); TimeValue aTV; aTV.Seconds = 10; // Warte 10 Sekunden aTV.Nanosec = 0; do { - pConnSocket = new vos::OConnectorSocket(); - pConnSocket->setTcpNoDelay( 1 ); - if ( pConnSocket->connect( Addr, &aTV ) == vos::ISocketTypes::TResult_Ok ) + pConnSocket = new osl::ConnectorSocket(); + pConnSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 ); + if ( pConnSocket->connect( Addr, &aTV ) == osl_Socket_Ok ) { - pConnSocket->setTcpNoDelay( 1 ); - + pConnSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 ); pCM->CallConnectionOpened( CreateCommunicationLink( pCM, pConnSocket ) ); return sal_True; } @@ -700,3 +698,4 @@ sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/simplecm/tcpio.cxx b/automation/source/simplecm/tcpio.cxx index 7cd090c6bfb8..e71afb399b84 100644 --- a/automation/source/simplecm/tcpio.cxx +++ b/automation/source/simplecm/tcpio.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ /// implement ITransmiter comm_USHORT TCPIO::TransferBytes( const void* pBuffer, comm_UINT32 nLen ) { - vos::OGuard aGuard( aMSocketWriteAccess ); + osl::MutexGuard aGuard( aMSocketWriteAccess ); if ( !pStreamSocket ) { nLastSent = 0; @@ -49,7 +50,7 @@ comm_USHORT TCPIO::TransferBytes( const void* pBuffer, comm_UINT32 nLen ) /// implement IReceiver comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) { - vos::OGuard aGuard( aMSocketReadAccess ); + osl::MutexGuard aGuard( aMSocketReadAccess ); if ( !pStreamSocket ) { nLastReceived = 0; @@ -63,9 +64,11 @@ comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) // helper -void TCPIO::SetStreamSocket( vos::OStreamSocket *pSocket ) +void TCPIO::SetStreamSocket( osl::StreamSocket* pSocket ) { - vos::OGuard aRGuard( aMSocketReadAccess ); - vos::OGuard aWGuard( aMSocketWriteAccess ); + osl::MutexGuard aRGuard( aMSocketReadAccess ); + osl::MutexGuard aWGuard( aMSocketWriteAccess ); pStreamSocket = pSocket; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/simplecm/tcpio.hxx b/automation/source/simplecm/tcpio.hxx index 5b6a997917e5..07c3edba7a5b 100644 --- a/automation/source/simplecm/tcpio.hxx +++ b/automation/source/simplecm/tcpio.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,22 +29,22 @@ #ifndef TCPIO_HXX #define TCPIO_HXX -#include <vos/socket.hxx> -#include <vos/mutex.hxx> +#include <osl/socket.hxx> +#include <osl/mutex.hxx> #include "communiio.hxx" class TCPIO : public ITransmiter, public IReceiver { private: - vos::OStreamSocket *pStreamSocket; - vos::OMutex aMSocketReadAccess; - vos::OMutex aMSocketWriteAccess; + osl::StreamSocket* pStreamSocket; + osl::Mutex aMSocketReadAccess; + osl::Mutex aMSocketWriteAccess; public: /// - TCPIO( vos::OStreamSocket *pSocket ):pStreamSocket( pSocket ){} + TCPIO( osl::StreamSocket* pSocket ):pStreamSocket( pSocket ){} virtual ~TCPIO(){} @@ -54,8 +55,10 @@ public: virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen ); // helper - void SetStreamSocket( vos::OStreamSocket *pSocket ); + void SetStreamSocket( osl::StreamSocket* pSocket ); }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx index 17621aec9d53..d24fa7f232b0 100644 --- a/automation/source/testtool/cmdstrm.cxx +++ b/automation/source/testtool/cmdstrm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_automation.hxx" -#ifndef _KEYCOD_HXX //autogen #include <vcl/keycod.hxx> -#endif #include <basic/sbx.hxx> #include <tools/stream.hxx> @@ -40,7 +39,7 @@ #include "svcommstream.hxx" #include <basic/testtool.hrc> -ControlDefLoad __READONLY_DATA CmdStream::arKeyCodes [] = +ControlDefLoad const CmdStream::arKeyCodes [] = #include <keycodes.hxx> CNames *CmdStream::pKeyCodes = NULL; @@ -185,8 +184,8 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString ) { case SbxLONG: // alles immer als Short �bertragen case SbxULONG: - case SbxLONG64: - case SbxULONG64: + case SbxSALINT64: + case SbxSALUINT64: case SbxDOUBLE: case SbxINTEGER: case SbxBYTE: @@ -350,8 +349,8 @@ void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar ) break; case SbxLONG: case SbxULONG: - case SbxLONG64: - case SbxULONG64: + case SbxSALINT64: + case SbxSALUINT64: case SbxDOUBLE: if ( !bWriteUnoSlot ) Write( (sal_uInt16)BinULONG ); @@ -469,3 +468,4 @@ void CmdStream::Reset( comm_ULONG nSequence ) GenCmdFlow (F_Sequence,nSequence); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/cmdstrm.hxx b/automation/source/testtool/cmdstrm.hxx index 8cdd695c6ca7..d9c3cec49c73 100644 --- a/automation/source/testtool/cmdstrm.hxx +++ b/automation/source/testtool/cmdstrm.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,7 +60,7 @@ public: SvMemoryStream* GetStream(); static CNames *pKeyCodes; // Namen der Sondertasten MOD1, F1, LEFT ... - static ControlDefLoad __READONLY_DATA arKeyCodes []; + static ControlDefLoad const arKeyCodes []; private: String WandleKeyEventString( String aKeys ); // Nutzt pKeyCodes. <RETURN> <SHIFT LEFT LEFT> @@ -76,3 +77,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/comm_bas.cxx b/automation/source/testtool/comm_bas.cxx index f8dafece2a5b..7c42d225987e 100644 --- a/automation/source/testtool/comm_bas.cxx +++ b/automation/source/testtool/comm_bas.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,14 +33,10 @@ #include <tools/errcode.hxx> #include <basic/sbxobj.hxx> #include <basic/sbx.hxx> -#ifndef __SBX_SBXVARIABLE_HXX //autogen #include <basic/sbxvar.hxx> -#endif #include <vcl/svapp.hxx> #include <automation/communi.hxx> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif // Der CommunicationManager hat folgende Elemente: // 1) Properties: @@ -148,7 +145,6 @@ CommunicationWrapper::CommunicationWrapper( const String& rClass ) : SbxObject( , m_bCatchOpen( sal_False ) , m_pNewLink( NULL ) { -// SetName( CUniString("Manager") ); m_pMethods = &aManagerMethods[0]; m_pManager = new CommunicationManagerClientViaSocket; m_pManager->SetConnectionOpenedHdl( LINK( this, CommunicationWrapper, Open ) ); @@ -440,3 +436,4 @@ SbxObject* CommunicationFactory::CreateObject( const String& rClass ) return NULL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/comm_bas.hxx b/automation/source/testtool/comm_bas.hxx index 2080354334aa..16c874164227 100644 --- a/automation/source/testtool/comm_bas.hxx +++ b/automation/source/testtool/comm_bas.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,25 +30,23 @@ #define _COMM_BAS_HXX #include <basic/sbxfac.hxx> -#ifndef __SBX_SBXVARIABLE_HXX //autogen #include <basic/sbxvar.hxx> -#endif #include <basic/sbxobj.hxx> 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 // werden koennen. -#if defined ( ICC ) || defined ( HPUX ) || defined ( C50 ) || defined ( C52 ) +#if defined ( ICC ) || defined ( C50 ) || defined ( C52 ) public: #endif typedef void( CommunicationWrapper::*pMeth ) ( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite ); -#if defined ( ICC ) || defined ( HPUX ) +#if defined ( ICC ) private: #endif @@ -82,7 +81,7 @@ private: CommunicationLink *m_pLink; 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* ); @@ -118,3 +117,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/cretstrm.cxx b/automation/source/testtool/cretstrm.cxx index 907ce02a4731..b0247efb4ee3 100644 --- a/automation/source/testtool/cretstrm.cxx +++ b/automation/source/testtool/cretstrm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_automation.hxx" -#ifndef _CRetStream_HXX #include "cretstrm.hxx" -#endif #include <tools/debug.hxx> #include "rcontrol.hxx" #include "svcommstream.hxx" @@ -71,3 +70,4 @@ void CRetStream::Read( SbxValue &aValue ) aValue = *PTR_CAST( SbxValue, &xBase ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/cretstrm.hxx b/automation/source/testtool/cretstrm.hxx index 7fe1416c681e..0315c53828b7 100644 --- a/automation/source/testtool/cretstrm.hxx +++ b/automation/source/testtool/cretstrm.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,12 +45,12 @@ public: using CmdBaseStream::Read; void Read ( comm_USHORT &nNr ){CmdBaseStream::Read ( nNr );} void Read ( comm_ULONG &nNr ){CmdBaseStream::Read ( nNr );} -// void Read ( comm_UniChar* &aString, comm_USHORT &nLenInChars ){CmdBaseStream::Read ( aString, nLenInChars );} virtual void Read ( rtl::OString* &pId ){CmdBaseStream::Read ( pId );} void Read ( comm_BOOL &bBool ){CmdBaseStream::Read ( bBool );} -// new void Read( String &aString ); void Read( SbxValue &aValue ); }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx index 691d803998ae..d10469e0496a 100644 --- a/automation/source/testtool/httprequest.cxx +++ b/automation/source/testtool/httprequest.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <stdio.h> #include "httprequest.hxx" -#include <vos/socket.hxx> +#include <osl/socket.hxx> #include <tools/debug.hxx> @@ -78,25 +79,23 @@ sal_Bool HttpRequest::Execute() Init(); // Open channel to standard redir host - vos::OInetSocketAddr aConnectAddr; + osl::SocketAddr aConnectAddr; if ( aProxyHost.Len() ) { - aConnectAddr.setAddr( rtl::OUString( UniString( aProxyHost, RTL_TEXTENCODING_UTF8 ) ) ); - aConnectAddr.setPort( nProxyPort ); + aConnectAddr = osl::SocketAddr( rtl::OUString( UniString( aProxyHost, RTL_TEXTENCODING_UTF8 ) ), nProxyPort ); } else { - aConnectAddr.setAddr( rtl::OUString( UniString( aRequestHost, RTL_TEXTENCODING_UTF8 ) ) ); - aConnectAddr.setPort( nRequestPort ); + aConnectAddr = osl::SocketAddr( rtl::OUString( UniString( aRequestHost, RTL_TEXTENCODING_UTF8 ) ), nRequestPort ); } TimeValue aTV; aTV.Seconds = 10; // Warte 10 Sekunden aTV.Nanosec = 0; - pOutSocket = new vos::OConnectorSocket(); - if ( pOutSocket->connect( aConnectAddr, &aTV ) == vos::ISocketTypes::TResult_Ok ) + pOutSocket = new osl::ConnectorSocket(); + if ( pOutSocket->connect( aConnectAddr, &aTV ) == osl_Socket_Ok ) { // pOutSocket->setTcpNoDelay( 1 ); } @@ -202,7 +201,7 @@ Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0; Linux Connection: close Content-Type: text/xml; charset=ISO-8859-1 */ -void HttpRequest::SendString( vos::OStreamSocket* pSocket , ByteString aText ) +void HttpRequest::SendString( osl::StreamSocket* pSocket , ByteString aText ) { if ( nStatus == HTTP_REQUEST_PENDING ) pSocket->write( aText.GetBuffer(), aText.Len() ); @@ -237,3 +236,4 @@ sal_uInt16 HttpRequest::GetStatus() return nStatus; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/httprequest.hxx b/automation/source/testtool/httprequest.hxx index e9b36a321d82..9947286a6a6f 100644 --- a/automation/source/testtool/httprequest.hxx +++ b/automation/source/testtool/httprequest.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,10 +38,10 @@ #include <tools/string.hxx> #include <tools/stream.hxx> -namespace vos +namespace osl { - class OStreamSocket; - class OConnectorSocket; + class StreamSocket; + class ConnectorSocket; } class HttpRequest @@ -52,14 +53,14 @@ class HttpRequest sal_uInt16 nProxyPort; sal_uInt16 nStatus; - vos::OConnectorSocket *pOutSocket; + osl::ConnectorSocket *pOutSocket; ByteString aHeader; sal_uInt16 nResultId; ByteString aContentType; SvMemoryStream* pStream; - void SendString( vos::OStreamSocket* pSocket, ByteString aText ); + void SendString( osl::StreamSocket* pSocket, ByteString aText ); sal_Bool IsItem( ByteString aItem, ByteString aLine ); void Init(); public: @@ -72,14 +73,16 @@ public: sal_Bool Execute(); void Abort(); - ByteString GetHeader() { return aHeader; } + ByteString GetHeader() const { return aHeader; } SvMemoryStream* GetBody(); - ByteString GetContentType() { return aContentType; } - sal_uInt16 GetResultId() { return nResultId; } + ByteString GetContentType() const { return aContentType; } + sal_uInt16 GetResultId() const { return nResultId; } sal_uInt16 GetStatus(); }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/makefile.mk b/automation/source/testtool/makefile.mk index db8464130c1b..ee885e1429f1 100644 --- a/automation/source/testtool/makefile.mk +++ b/automation/source/testtool/makefile.mk @@ -37,18 +37,16 @@ TARGET=testtool # --- Allgemein ------------------------------------------------------------ OBJFILES = \ - $(OBJ)$/cmdstrm.obj \ + $(EXCEPTIONSFILES) \ $(OBJ)$/cretstrm.obj \ - $(OBJ)$/objtest.obj \ - $(OBJ)$/tcommuni.obj \ - $(OBJ)$/comm_bas.obj \ $(OBJ)$/httprequest.obj \ EXCEPTIONSFILES= \ - $(OBJ)$/tcommuni.obj \ $(OBJ)$/cmdstrm.obj \ - $(OBJ)$/objtest.obj + $(OBJ)$/comm_bas.obj \ + $(OBJ)$/objtest.obj \ + $(OBJ)$/tcommuni.obj HXXFILES = $(INCCOM)$/keycodes.hxx \ $(INCCOM)$/classes.hxx \ diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index 43334a915788..85ac8e2f7455 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,47 +29,29 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_automation.hxx" -/*#include <com/sun/star/devtools/XIServerProxy.hpp> -#include <com/sun/star/devtools/XInformationClient.hpp> -using namespace com::sun::star::devtools; -*/ #ifdef OS2 #define INCL_DOS -//#include <vcl/sysdep.hxx> -#ifndef _SVPM_H #include <svpm.h> #endif -#endif #include "sysdir_win.hxx" #include "registry_win.hxx" #include "sttresid.hxx" #include <osl/file.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif -#ifndef _SOUND_HXX //autogen #include <vcl/sound.hxx> -#endif #include <tools/config.hxx> -#ifndef _APP_HXX //autogen #include <vcl/svapp.hxx> -#endif #include <svtools/stringtransfer.hxx> #include <svl/brdcst.hxx> -//#ifndef _SBXCLASS_HXX //autogen #include <basic/sbx.hxx> -//#endif #include <com/sun/star/uno/Any.hxx> -#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HXX_ #include <com/sun/star/frame/XDesktop.hpp> -#endif #include <comphelper/processfactory.hxx> #include <com/sun/star/bridge/XBridgeFactory.hpp> #include <com/sun/star/connection/XConnector.hpp> #include <com/sun/star/connection/XConnection.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/XNamingService.hpp> #include <cppuhelper/servicefactory.hxx> @@ -78,8 +61,8 @@ using namespace com::sun::star::lang; using namespace com::sun::star::frame; using namespace com::sun::star::bridge; using namespace com::sun::star::connection; -using namespace rtl; +using ::rtl::OUString; #include <svtools/svmedit.hxx> @@ -90,11 +73,8 @@ using namespace rtl; #include <basic/sbuno.hxx> -//#include <basic/basrid.hxx> #include <basic/basicrt.hxx> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include "tcommuni.hxx" #include "comm_bas.hxx" #include <cretstrm.hxx> @@ -124,11 +104,11 @@ static CommunicationFactory aComManFac; #define KEEP_SEQUENCES 100 // Keep Names of last 100 Calls -ControlDefLoad __READONLY_DATA Controls::arClasses [] = +ControlDefLoad const Controls::arClasses [] = #include "classes.hxx" CNames *Controls::pClasses = NULL; -ControlDefLoad __READONLY_DATA TestToolObj::arR_Cmds [] = +ControlDefLoad const TestToolObj::arR_Cmds [] = #include "r_cmds.hxx" CNames *TestToolObj::pRCommands = NULL; CErrors *TestToolObj::pFehlerListe = NULL; // Hier werden die Fehler des Testtools gespeichert @@ -153,34 +133,6 @@ DBG_CTOR(ControlItem,0); pData->aUId = aUIdP; } -/*ControlItem::ControlItem( const String &Name, const String &URL, const URLType aType ) -{ -DBG_CTOR(ControlItem,0); - InitData(); - pData->Kurzname = Name; - pData->aURL = URL; - pData->nUId = aType; -} - -ControlItem::ControlItem( const String &Name, const String &URL, const sal_uLong nUId ) -{ -DBG_CTOR(ControlItem,0); - InitData(); - pData->Kurzname = Name; - pData->aURL = URL; - pData->nUId = nUId; -} - -ControlItem::ControlItem( const char *Name, const String &URL, const sal_uLong nUId ) -{ -DBG_CTOR(ControlItem,0); - InitData(); - pData->Kurzname.AssignAscii( Name ); - pData->aURL = URL; - pData->nUId = nUId; -} */ - - ControlItem::ControlItem( ControlData *pDataP ) { DBG_CTOR(ControlItem,0); @@ -200,20 +152,6 @@ ControlItemSon::ControlItemSon(const String &Name, rtl::OString aUIdP ) : ControlItem( Name, aUIdP ) {} -/*ControlItemSon::ControlItemSon(const String &Name, const String &URL, const URLType aType ) -: ControlItem( Name, URL, aType ) -{} - -ControlItemSon::ControlItemSon(const String &Name, const String &URL, const sal_uLong nUId ) -: ControlItem( Name, URL, nUId ) -{} - -ControlItemSon::ControlItemSon(const char *Name, const String &URL, const sal_uLong nUId ) -: ControlItem( Name, URL, nUId ) -{}*/ - - - sal_Bool ControlDef::operator < (const ControlItem &rPar) { return pData->Kurzname.CompareIgnoreCaseToAscii(rPar.pData->Kurzname) == COMPARE_LESS; @@ -251,12 +189,6 @@ ControlDef::ControlDef(const String &Name, rtl::OString aUIdP ) DBG_CTOR(ControlDef,0); } -/*ControlDef::ControlDef(const String &Name, const String &URL, const URLType aType ) -: ControlItemSon( Name, URL, aType ) -{ - DBG_CTOR(ControlDef,0); -} */ - ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, sal_Bool bWithSons ) : ControlItemSon("", pOriginal->pData->aUId) { @@ -275,7 +207,7 @@ ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDe pNewDef = new ControlDef( aOldName, aNewName, pOriginal->SonGetObject(i) ,sal_True ); if (! SonInsert(pNewDef)) { - DBG_ERROR("Name Doppelt im CopyConstructor. Neuer Name = Controlname!!"); + OSL_FAIL("Name Doppelt im CopyConstructor. Neuer Name = Controlname!!"); delete pNewDef; } } @@ -306,7 +238,7 @@ void CRevNames::Insert( String aName, rtl::OString aUId, sal_uLong nSeq ) if ( !CNames::C40_PTR_INSERT( ControlItem, pRN) ) { - DBG_ERROR("Interner Fehler beim Speichern der Lokalen KurzNamen"); + OSL_FAIL("Interner Fehler beim Speichern der Lokalen KurzNamen"); delete pRN; } @@ -381,7 +313,6 @@ TestToolObj::TestToolObj( String aName, String aFilePath ) // Inter pImpl = new ImplTestToolObj; pImpl->ProgParam = String(); pImpl->aFileBase = DirEntry(aFilePath); -// pImpl->aLogFileBase = DirEntry(); pImpl->aHIDDir = DirEntry(aFilePath); pImpl->bIsStart = sal_False; pImpl->pMyBasic = NULL; @@ -490,28 +421,26 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d String aGP; ByteString abGP; -#ifdef WNT - abGP.Append( "501" ); // WinXP +#if defined WNT && defined INTEL + abGP.Append( "501" ); // Windows on x86 +#elif defined WNT && defined X86_64 + abGP.Append( "502" ); // Windows on x64 #elif defined SOLARIS && defined SPARC abGP.Append( "01" ); // Solaris SPARC -#elif defined SCO - abGP.Append( "02" ); // SCO UNIX #elif defined LINUX && defined INTEL abGP.Append( "03" ); // Linux #elif defined AIX abGP.Append( "04" ); #elif defined SOLARIS && defined INTEL abGP.Append( "05" ); // Solaris x86 -#elif defined HPUX - abGP.Append( "07" ); #elif defined FREEBSD abGP.Append( "08" ); #elif defined MACOSX abGP.Append( "12" ); #elif defined LINUX && defined PPC abGP.Append( "13" ); -#elif defined NETBSD - abGP.Append( "14" ); +#elif defined NETBSD && defined INTEL + abGP.Append( "14" ); // NetBSD/i386 #elif defined LINUX && defined X86_64 abGP.Append( "15" ); // Linux x86-64 #elif defined LINUX && defined SPARC @@ -530,6 +459,16 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d abGP.Append( "22" ); // Linux PA-RISC #elif defined LINUX && defined AXP abGP.Append( "23" ); // Linux ALPHA +#elif defined NETBSD && defined X86_64 + abGP.Append( "24" ); // NetBSD/amd64 +#elif defined OPENBSD && defined X86 + abGP.Append( "25" ); // OpenBSD/i386 +#elif defined OPENBSD && defined X86_64 + abGP.Append( "26" ); // OpenBSD/amd64 +#elif defined DRAGONFLY && defined X86 + abGP.Append( "27" ); // DragonFly/i386 +#elif defined DRAGONFLY && defined X86_64 + abGP.Append( "28" ); // DragonFly/x86-64 #else #error ("unknown platform. please request an ID for your platform on qa/dev") #endif @@ -549,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 ); \ @@ -612,16 +551,12 @@ void TestToolObj::InitTestToolObj() } else { - DBG_ERROR("Testtool: Could not replace Wait method"); + OSL_FAIL("Testtool: Could not replace Wait method"); } MAKE_TT_KEYWORD( "Kontext", SbxCLASS_METHOD, SbxNULL, ID_Kontext ); MAKE_TT_KEYWORD( "GetNextError", SbxCLASS_VARIABLE, SbxVARIANT, ID_GetError ); MAKE_TT_KEYWORD( "Start", SbxCLASS_METHOD, SbxSTRING, ID_Start ); -// pMeth = Make( "Kill", SbxCLASS_METHOD, SbxNULL ); -// pMeth->SetUserData( ID_Kill ); - /* pMeth = Make( "TestReset", SbxCLASS_METHOD, SbxNULL ); - pMeth->SetUserData( ID_Reset );*/ MAKE_TT_KEYWORD( "Use", SbxCLASS_METHOD, SbxNULL, ID_Use ); MAKE_TT_KEYWORD( "StartUse", SbxCLASS_METHOD, SbxNULL, ID_StartUse ); MAKE_TT_KEYWORD( "FinishUse", SbxCLASS_METHOD, SbxNULL, ID_FinishUse ); @@ -748,17 +683,10 @@ void TestToolObj::InitTestToolObj() for ( i=0;i<VAR_POOL_SIZE;i++) { -/* pMyVar = new SbxObject( "Dummy" ); - pMyVar->SetType( SbxVARIANT );*/ - -// pMyVar = new SbxMethod( "Dummy", SbxVARIANT ); - pImpl->pMyVars[i] = new SbxTransportMethod( SbxVARIANT ); pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(String::CreateFromInt32(i) ) ); Insert( pImpl->pMyVars[i] ); -// StartListening( pMyVars[i]->GetBroadcaster(), sal_True ); - } m_pControls = new CNames(); @@ -768,46 +696,9 @@ void TestToolObj::InitTestToolObj() nMyVar = 0; pImpl->pMyBasic->AddFactory( &aComManFac ); - - -// Das ist zum testen des IPC - -/* int sent = 0; - - ModelessDialog *pDlg = new ModelessDialog(NULL); - pDlg->SetOutputSizePixel(Size(100,30)); - - Edit *pMyEd = new Edit(pDlg,WB_CENTER | WB_BORDER); - pMyEd->SetSizePixel(Size(100,30)); - pDlg->Show(); - pMyEd->Show(); - Time aTime; - - String VollePackung; - VollePackung.Fill(32760,'*'); - - BeginBlock(); // zum warm werden - EndBlock(); - ResetError(); - - while ( pDlg->IsVisible() && !IsError() ) - { - BeginBlock(); - In->GenCmdFlow (124,VollePackung); - EndBlock(); - pMyEd->SetText(String("Test Nr. ") + String(++sent)); - while ( aTime.Get100Sec() / 10 == Time().Get100Sec() / 10 ); - aTime = Time(); - } - - delete pMyEd; - delete pDlg; -*/ -// Test ende - - } + TestToolObj::~TestToolObj() { pImpl->pMyBasic->RemoveFactory( &aComManFac ); @@ -1057,7 +948,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s aUId = rtl::OString( aLongname ); else { - DBG_ERROR("Unknown URL schema"); + OSL_FAIL("Unknown URL schema"); } #endif } @@ -1079,7 +970,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s if (!pNewDef->SonInsert( pNewDef2 )) // Dialog in eigenen Namespace eintragen { delete pNewDef2; - DBG_ERROR(" !!!! ACHTUNG !!!! Fehler beim einf�gen in leere Liste!"); + OSL_FAIL(" !!!! ACHTUNG !!!! Fehler beim einf�gen in leere Liste!"); } } @@ -1216,13 +1107,6 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByNa } Stream.Close(); -#ifdef DBG_UTIL -// int i; -// for ( i = 0 ; i < pNames->Count() ; i++ ) -// { -// DBG_ERROR( pNames->GetObject(i)->pData->Kurzname ); -// } -#endif } void ReadFlatArray( const ControlDefLoad arWas [], CNames *&pNames ) @@ -1246,15 +1130,6 @@ void TestToolObj::WaitForAnswer () { if ( bUseIPC ) { - #ifdef DBG_UTILx - sal_uInt16 nSysWinModeMemo = GetpApp()->GetSystemWindowMode(); - GetpApp()->SetSystemWindowMode( 0 ); - ModelessDialog aDlg(NULL); - aDlg.SetOutputSizePixel(Size(200,0)); - aDlg.SetText(CUniString("Waiting for Answer")); - aDlg.Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - GetpApp()->SetSystemWindowMode( nSysWinModeMemo ); - #endif sal_Bool bWasRealWait = !bReturnOK; BasicRuntime aRun( NULL ); if ( BasicRuntimeAccess::HasRuntime() ) @@ -1288,7 +1163,6 @@ void TestToolObj::WaitForAnswer () while ( !bReturnOK && Ende > Time() ) { -// pTemp = PlugInApplication::GetPlugInApp()->GetReturnFromExecute(); if ( pTemp ) { ReturnResults( pTemp ); @@ -1356,7 +1230,7 @@ void TestToolObj::SendViaSocket() { if ( !pCommunicationManager ) { - DBG_ERROR("Kein CommunicationManager vorhanden!!"); + OSL_FAIL("Kein CommunicationManager vorhanden!!"); return; } @@ -1433,7 +1307,6 @@ void TestToolObj::EndBlock() SendViaSocket(); else { -// PlugInApplication::GetPlugInApp()->ExecuteRemoteStatements( In->GetStream() ); bReturnOK = sal_False; if ( aDialogHandlerName.Len() > 0 ) GetpApp()->InsertIdleHdl( LINK( this, TestToolObj, IdleHdl ), 1 ); @@ -1442,7 +1315,7 @@ void TestToolObj::EndBlock() } else { - DBG_ERROR("EndBlock au�erhalb eines Blockes"); + OSL_FAIL("EndBlock au�erhalb eines Blockes"); } } @@ -1560,14 +1433,14 @@ sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pC if (!pNewDef->SonInsert(pNewDef2)) // Dialog in eigenen Namespace eintragen { delete pNewDef2; - DBG_ERROR(" !!!! ACHTUNG !!!! Fehler beim einf�gen in leere Liste!"); + OSL_FAIL(" !!!! ACHTUNG !!!! Fehler beim einf�gen in leere Liste!"); } } const ControlItem *pItem = pNewDef; if (! pNames->Insert(pItem)) { - DBG_ERROR(" !!!! ACHTUNG !!!! Fehler beim einf�gen eines namens!"); + OSL_FAIL(" !!!! ACHTUNG !!!! Fehler beim einf�gen eines namens!"); delete pNewDef; pFatherDef = NULL; } @@ -1580,7 +1453,7 @@ sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pC { if (!pFatherDef) { - DBG_ERROR( "Internal Error: Erster Kurzname mu� mit * beginnen. �berspringe." ); + OSL_FAIL( "Internal Error: Erster Kurzname mu� mit * beginnen. �berspringe." ); } else { @@ -1588,7 +1461,7 @@ sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pC if (! pFatherDef->SonInsert(pNewDef)) { delete pNewDef; - DBG_ERROR(" !!!! ACHTUNG !!!! Fehler beim einf�gen eines namens!"); + OSL_FAIL(" !!!! ACHTUNG !!!! Fehler beim einf�gen eines namens!"); } } } @@ -1779,13 +1652,11 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, WaitForAnswer(); if ( IS_ERROR() ) { -// pVar->PutULong( GET_ERROR()->nError ); pVar->PutString( GET_ERROR()->aText ); POP_ERROR(); } else { -// pVar->PutULong( 0 ); pVar->PutString( String() ); } } @@ -1808,11 +1679,9 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, while ( pCommunicationManager->IsCommunicationRunning() ) Application::Reschedule(); - SingleCommandBlock = sal_True; // Bug 57188 + SingleCommandBlock = sal_True; IsBlock = sal_False; -// pCommunicationManager->StartCommunication(); - for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++) { pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) ); @@ -2146,62 +2015,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, if ( !rPar ) // rPar = NULL <=> Kein Parameter { SetError( SbxERR_NOTIMP ); - break; - -// Das ist total rotten und mu� wohl komplett neu!! - - -/* sal_Bool bWasBlock = IsBlock; - if ( !IsBlock ) // Impliziter call bei Aufruf mit Methode - if ( SingleCommandBlock ) - BeginBlock(); -// if ( !IsError() ) -// In->GenCmdSlot (128,rPar); -// ((Controls*)pVar)->pMethodVar->nValue = 128; - - sal_uLong nOldValue = ((Controls*)pVar)->GetULong(); - // Setzen, so da� beim Return der Wert stimmt - ((Controls*)pVar)->PutULong( 128 ); - pImpl->pNextReturn = ((Controls*)pVar)->pMethodVar; - if ( SingleCommandBlock ) - EndBlock(); - WaitForAnswer(); - if ( bWasBlock ) - if ( SingleCommandBlock ) - BeginBlock(); - ((Controls*)pVar)->PutULong( nOldValue ); - - // R�cksetzen, so da� beim n�chsten Aufruf alles klappt -// ((Controls*)pVar)->SetUserData( 128 ); - - -// ((Controls*)pVar)->SetName("xxx"); - // Setzen und r�cksetzen der ID, so dass der Notify ohne Wirkung bleibt. - ((Controls*)pVar)->pMethodVar->SetUserData(ID_ErrorDummy); - ((Controls*)pVar)->PutULong( ((Controls*)pVar)->pMethodVar->GetULong() ); - ((Controls*)pVar)->pMethodVar->SetUserData(ID_Control); - - pShortNames->Insert( CUniString("xxx"), rtl::OString( ((Controls*)pVar)->pMethodVar->nValue ), nSequence ); - - nOldValue = ((Controls*)pVar)->GetULong(); - - SbxVariable *pMember; - if ( ! (pMember = ((Controls*)pVar)->Find(CUniString("ID"),SbxCLASS_DONTCARE)) ) - { - pMember = new SbxProperty(CUniString("ID"),SbxVARIANT); - ((Controls*)pVar)->Insert(pMember); - } - pMember->PutULong(((Controls*)pVar)->pMethodVar->nValue); - - if ( ! (pMember = ((Controls*)pVar)->Find(CUniString("name"),SbxCLASS_DONTCARE)) ) - { - pMember = NULL; - } - else - pMember->PutString(CUniString("xxx")); - - */ - } else SetError( SbxERR_WRONG_ARGS ); @@ -2233,7 +2046,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, switch ( ((SbxTransportMethod*)pVar)->nValue ) { case RC_WinTree: -// ::svt::OStringTransfer::CopyString(pVar->GetString(), pSomeWindowIDontHave ); break; } @@ -2347,13 +2159,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, try { Reference< XMultiServiceFactory > xSMgr = comphelper::getProcessServiceFactory(); -// is allways there -/* if ( ! xSMgr.is() ) - { - xSMgr = ::cppu::createRegistryServiceFactory(OUString(RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")), sal_True ); - if ( xSMgr.is() ) - comphelper::setProcessServiceFactory( xSMgr ); - }*/ OUString aURL( aString ); Reference< XConnector > xConnector( xSMgr->createInstance( @@ -2366,13 +2171,8 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, OUString(), OUString( RTL_CONSTASCII_USTRINGPARAM("urp") ), xConnection, Reference< XInstanceProvider >() ) ); - // Reference< XInterface > xRet( xBridge->getInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ) ); Reference< XInterface > xRet( xBridge->getInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) ); - // Reference< XNamingService > xNamingService(xRet, UNO_QUERY); - - // Reference< XInterface > smgr = xNamingService->getRegisteredObject( OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager" ) ) ); - smgr_xMultiserviceFactory = Reference< XMultiServiceFactory >(xRet, UNO_QUERY); //MBA fragen!! } @@ -2388,7 +2188,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, if( smgr_xMultiserviceFactory.is() ) { Any aAny; -// aAny <<= xBridge; aAny <<= smgr_xMultiserviceFactory; SbxObjectRef xMySbxObj = GetSbUnoObject( CUniString("RemoteUnoAppFuerTesttool"), aAny ); @@ -2402,15 +2201,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, // Hier wird der Remote UNO Kram gestartet String aString; -// aString += GetHostConfig(); -// aString.AppendAscii( ":" ); -// aString += String::CreateFromInt32( GetUnoPortConfig() ); - Reference< XMultiServiceFactory > xSMgr /* = comphelper::getProcessServiceFactory()*/; -// if ( ! xSMgr.is() ) + Reference< XMultiServiceFactory > xSMgr; { xSMgr = ::cppu::createRegistryServiceFactory(OUString(RTL_CONSTASCII_USTRINGPARAM("g:\\iserverproxy.rdb")), sal_True); -// comphelper::setProcessServiceFactory( xSMgr ); } OUString aURL( aString ); @@ -2427,21 +2221,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, Reference< XInterface > xRet( xBridge->getInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("XIServerProxy")) ) ); -/* Reference< XIServerProxy > xIS( xRet, UNO_QUERY ); - if ( xIS.is() ) - { - String aHost( xIS->getIServerHost() ); - -// Reference < XInformationClient > xIC = xIS->createIServerClient( "XInformationClient" ); - Reference < XInformationClient > xIC = xIS->createInformationClient(); - xIC->getTree(OUString::createFromAscii("r:\\b_server\\config\\stand.lst"), OUString() ); - - - Reference< XTypeProvider > xTP( xRet, UNO_QUERY ); - Sequence < com::sun::star::uno::Type > s = xTP->getTypes(); - } - */ - if( xRet.is() ) { Any aAny; @@ -2464,8 +2243,8 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, { case SbxLONG: // alles immer als Short �bertragen case SbxULONG: - case SbxLONG64: - case SbxULONG64: + case SbxSALINT64: + case SbxSALUINT64: case SbxDOUBLE: case SbxINTEGER: case SbxBYTE: @@ -3122,15 +2901,6 @@ xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_ aSource.SearchAndReplaceAscii( "try", aReplacement, nTry ); nTotalLength += aReplacement.Len(); - -// on error goto endcse -// goto endctchXX -// ctchXX: -// if err = 35 or err = 18 then : resume : endif : -// MaybeAddErr -// on error goto endcse -// resume ctchresXX -// ctchresXX: aReplacement.Erase(); aReplacement.AppendAscii( "on error goto " ); aReplacement += aFinalErrorLabel; @@ -3372,11 +3142,6 @@ void TestToolObj::SortControlsByNumber( sal_Bool bIncludeActive ) m_pReverseControls->DeleteAndDestroy( nNr ); // um VorlagenLaden/UntergeordneteIniDatei/SpeichernDlg/OrdnerDlg/OeffnenDlg/MessageBox/LetzteVersion/GrafikEinfuegenDlg/FarbeDlg/ExportierenDlg/DruckerEinrichten/DruckenDlg/DateiEinfuegenDlg/Active zu verhindern } -/* if ( m_pReverseControlsSon->Seek_Entry( pZeroItem, &nNr ) ) - { - m_pReverseControlsSon->DeleteAndDestroy( nNr ); -// um VorlagenLaden/UntergeordneteIniDatei/SpeichernDlg/OrdnerDlg/OeffnenDlg/MessageBox/LetzteVersion/GrafikEinfuegenDlg/FarbeDlg/ExportierenDlg/DruckerEinrichten/DruckenDlg/DateiEinfuegenDlg/Active zu verhindern - }*/ delete pZeroItem; } } @@ -3466,9 +3231,6 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn ) case RET_Value: if ( pImpl->pNextReturn ) { -// sal_uLong nHintUserData = pImpl->pNextReturn->GetParent()->GetUserData(); -// pImpl->pNextReturn->GetParent()->SetUserData(0); -// if ( nUId == pImpl->pNextReturn->GetParent()->GetULong() ) if ( aNextReturnId.equals( aUId ) ) { 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 @@ -3492,7 +3254,6 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn ) { ADD_ERROR(SbxERR_BAD_ACTION, GEN_RES_STR0(S_RETURNED_VALUE_ID_MISSMATCH) ) } -// pImpl->pNextReturn->GetParent()->SetUserData(nHintUserData); pImpl->pNextReturn = NULL; } else @@ -3561,7 +3322,6 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn ) ControlItem *pNewItem = new ControlItemUId( String(), aUId ); if ( pReverseControlsKontext->Seek_Entry(pNewItem,&nNr) ) { -// rtl::OString aID = pReverseControlsKontext->GetObject(nNr)->pData->aUId; pWinInfo->aKurzname += pReverseControlsKontext->GetObject(nNr)->pData->Kurzname; } delete pNewItem; @@ -3747,8 +3507,6 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn ) case S_AssertError: { ADD_ASSERTION_LOG( aString1 ); -// ADD_ERROR_LOG( aString1, aRun.GetModuleName(SbxNAME_SHORT_TYPES), -// aRun.GetLine(), aRun.GetCol1(), aRun.GetCol2() ); } break; case S_QAError: @@ -4065,7 +3823,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn ) pRetStream->Read( nId ); else { - DBG_ERROR( "truncated input stream" ); + OSL_FAIL( "truncated input stream" ); } } @@ -4124,7 +3882,7 @@ String TestToolObj::GetKeyName( sal_uInt16 nKeyCode ) void TestToolObj::ReplaceNumbers(String &aText) { -static ControlDefLoad __READONLY_DATA arRes_Type [] = +static ControlDefLoad const arRes_Type [] = #include "res_type.hxx" static CNames *pRTypes = NULL; @@ -4296,7 +4054,6 @@ Controls::Controls( String aCName ) pMethodVar = new SbxTransportMethod( SbxVARIANT ); pMethodVar->SetName( CUniString("Dummy") ); Insert( pMethodVar ); -// pMethodVar = Make( CUniString("Dummy"), SbxCLASS_PROPERTY, SbxULONG ); } @@ -4364,3 +4121,4 @@ String TTFormat::ms2s( sal_uLong nMilliSeconds ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/objtest.hxx b/automation/source/testtool/objtest.hxx index c0dfd1c12ac6..5c95fea3dd05 100644 --- a/automation/source/testtool/objtest.hxx +++ b/automation/source/testtool/objtest.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -119,9 +120,6 @@ public: ControlItem( const char *Name, rtl::OString aUIdP ); ControlItem( const String &Name, rtl::OString aUIdP ); -// ControlItem( const String &Name, const String &URL, const URLType aType ); -// ControlItem( const String &Name, const String &URL, const sal_uLong nUId ); -// ControlItem( const char *Name, const String &URL, const sal_uLong nUId ); ControlItem( ControlData *pDataP ); virtual ~ControlItem() { DBG_DTOR(ControlItem,0); @@ -129,7 +127,6 @@ DBG_DTOR(ControlItem,0); } virtual sal_Bool operator < (const ControlItem &rPar)=0; virtual sal_Bool operator == (const ControlItem &rPar)=0; -// void Write( SvStream &aStream ); }; SV_DECL_PTRARR_SORT_DEL(CNames, ControlItem*, 50, 10) @@ -142,12 +139,11 @@ SV_DECL_PTRARR_SORT_DEL(CNames, ControlItem*, 50, 10) class ControlSon { protected: - CNames *pSons; // um sicherzustelle, daß nur Söhne des richtien Type reinkommen + CNames *pSons; // um sicherzustelle, da� nur S�hne des richtien Type reinkommen public: ControlSon() : pSons( NULL ) {}; ~ControlSon(); -// void Write( SvStream &aStream ); sal_uInt16 Son_Count() { return pSons->Count(); } void Sons( CNames *pNewSons ) { pSons = pNewSons; } @@ -160,10 +156,6 @@ public: ControlItemSon(const char *Name, rtl::OString aUIdP ) : ControlItem( Name, aUIdP ) {} ControlItemSon(const String &Name, rtl::OString aUIdP ); -// ControlItemSon(const String &Name, const String &URL, const URLType aType ); -// ControlItemSon(const String &Name, const String &URL, const sal_uLong nUId ); -// ControlItemSon(const char *Name, const String &URL, const sal_uLong nUId ); -// void Write( SvStream &aStream ); }; class ControlDef : public ControlItemSon @@ -172,7 +164,6 @@ public: ControlDef(const char *Name, rtl::OString aUIdP ) : ControlItemSon( Name, aUIdP ) {DBG_CTOR(ControlDef,0);} ControlDef(const String &Name, rtl::OString aUIdP ); -// ControlDef(const String &Name, const String &URL, const URLType aType ); ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, sal_Bool bWithSons = sal_False ); ~ControlDef() {DBG_DTOR(ControlDef,0);} virtual sal_Bool operator < (const ControlItem &rPar); @@ -234,7 +225,7 @@ public: virtual SbxVariable* Find( const String&, SbxClassType ); SbxTransportMethodRef pMethodVar; // zum Transport von Find nach Notify static CNames *pClasses; - static ControlDefLoad __READONLY_DATA arClasses []; + static ControlDefLoad const arClasses []; }; SV_DECL_IMPL_REF(Controls); @@ -243,13 +234,10 @@ typedef std::map< String, String > Environment; class ImplTestToolObj { public: -// ImplTestToolObj() -// ~ImplTestToolObj() + 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. @@ -257,7 +245,7 @@ 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; @@ -274,7 +262,7 @@ public: sal_uLong nMaxRemoteCommandDelay; sal_Bool bDoRemoteCommandDelay; - sal_Bool bLnaguageExtensionLoaded; // Wurde über 'use' was geladen? Für syntax highlighting + sal_Bool bLnaguageExtensionLoaded; // Wurde �ber 'use' was geladen? F�r syntax highlighting SfxBroadcaster *pTTSfxBroadcaster; sal_uLong nErrorCount; @@ -400,3 +388,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/registry_win.cxx b/automation/source/testtool/registry_win.cxx index d0b1c0a0aa1b..b599342b0854 100644 --- a/automation/source/testtool/registry_win.cxx +++ b/automation/source/testtool/registry_win.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,17 +36,16 @@ //////////////////////////////////////////////////////////////////////////// -#include <tools/prewin.h> -#include "winreg.h" -#include <tools/postwin.h> +#include <prewin.h> +#include <postwin.h> // as we define it ourselves further down the line we remove it here #ifdef IS_ERROR // #undef IS_ERROR #endif -//#include <tchar.h> #include "registry_win.hxx" #include <osl/thread.h> +#include <sal/macros.h> String ReadRegistry( String aKey, String aValueName ) @@ -70,8 +70,8 @@ String ReadRegistry( String aKey, String aValueName ) &hRegKey ) == ERROR_SUCCESS ) { LONG lRet; - sal_Unicode PathW[_MAX_PATH]; - DWORD lSize = sizeof(PathW) / sizeof( sal_Unicode ); + sal_Unicode PathW[_MAX_PATH ]; + DWORD lSize = SAL_N_ELEMENTS(PathW); DWORD Type = REG_SZ; lRet = RegQueryValueExW(hRegKey, reinterpret_cast<LPCWSTR>(aValueName.GetBuffer()), NULL, &Type, (LPBYTE)PathW, &lSize); @@ -87,3 +87,4 @@ String ReadRegistry( String aKey, String aValueName ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/registry_win.hxx b/automation/source/testtool/registry_win.hxx index 7099f39a3874..4a9492d80d2b 100644 --- a/automation/source/testtool/registry_win.hxx +++ b/automation/source/testtool/registry_win.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,3 +30,5 @@ #include <tools/string.hxx> String ReadRegistry( String aKey, String aValueName ); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/sysdir_win.cxx b/automation/source/testtool/sysdir_win.cxx index ec87c65cfb4a..370bac572d82 100644 --- a/automation/source/testtool/sysdir_win.cxx +++ b/automation/source/testtool/sysdir_win.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,7 @@ //////////////////////////////////////////////////////////////////////////// -#include <tools/prewin.h> +#include <prewin.h> #ifndef _SHOBJ_H #if defined _MSC_VER #pragma warning(push, 1) @@ -46,7 +47,7 @@ #pragma warning(pop) #endif #endif -#include <tools/postwin.h> +#include <postwin.h> // as we define it ourselves further down the line we remove it here #ifdef IS_ERROR #undef IS_ERROR @@ -103,3 +104,4 @@ String _SHGetSpecialFolder_COMMON_APPDATA() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/sysdir_win.hxx b/automation/source/testtool/sysdir_win.hxx index f406f69572db..c27e3e434e75 100644 --- a/automation/source/testtool/sysdir_win.hxx +++ b/automation/source/testtool/sysdir_win.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,3 +30,5 @@ #include <tools/string.hxx> String _SHGetSpecialFolder_COMMON_APPDATA(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx index f3c338362529..40795641322c 100644 --- a/automation/source/testtool/tcommuni.cxx +++ b/automation/source/testtool/tcommuni.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <tools/debug.hxx> #include <vcl/timer.hxx> -#ifndef _BASIC_TTRESHLP_HXX #include <basic/ttstrhlp.hxx> -#endif #include "rcontrol.hxx" #include "tcommuni.hxx" @@ -198,3 +197,5 @@ sal_uLong GetUnoPortConfig() GETSET( abPortToTalk, "UnoPort", ByteString::CreateFromInt32( UNO_DEFAULT_PORT ) ); 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 c3fec2f7b04d..6d3f9af6ed5f 100644 --- a/automation/source/testtool/tcommuni.hxx +++ b/automation/source/testtool/tcommuni.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,12 +30,7 @@ #include <tools/link.hxx> #include <svl/svarray.hxx> -#include <vos/thread.hxx> - -#ifndef _STRING_LIST -DECLARE_LIST( StringList, String * ) -#define _STRING_LIST -#endif +#include <osl/thread.hxx> #include <basic/process.hxx> class Process; @@ -65,3 +61,4 @@ String GetHostConfig(); sal_uLong GetTTPortConfig(); sal_uLong GetUnoPortConfig(); +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/util/makefile.mk b/automation/util/makefile.mk index 756a3d6a62e4..046f6e043dea 100644 --- a/automation/util/makefile.mk +++ b/automation/util/makefile.mk @@ -55,7 +55,6 @@ SHL1STDLIBS= \ $(SVLLIB) \ $(VCLLIB) \ $(BASICLIB) \ - $(VOSLIB) \ $(SALLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ @@ -86,7 +85,6 @@ SHL2IMPLIB= isimplecm SHL2STDLIBS= \ $(TOOLSLIB) \ - $(VOSLIB) \ $(SALLIB) @@ -109,9 +107,7 @@ SHL3STDLIBS= \ $(TOOLSLIB) \ $(SVLLIB) \ $(VCLLIB) \ - $(VOSLIB) \ $(SALLIB) \ - $(VOSLIB) \ $(SIMPLECMLIB) @@ -153,7 +149,6 @@ APP1STDLIBS+= \ $(SVLLIB) \ $(VCLLIB) \ $(SALLIB) \ - $(VOSLIB) \ $(UCBHELPERLIB) \ $(COMPHELPERLIB) \ $(BASICLIB) \ @@ -162,7 +157,7 @@ APP1STDLIBS+= \ .IF "$(GUI)"=="UNX" APP1STDLIBS+= \ - $(VOSLIB) $(SALLIB) $(BASICLIB) + $(SALLIB) $(BASICLIB) APP1STDLIBS+=$(CPPULIB) .ENDIF .IF "$(GUI)"=="WNT" || "$(COM)"=="GCC" @@ -219,13 +214,8 @@ APP3STDLIBS= \ $(VCLLIB) .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="MACOSX" -APP3STDLIBS+= \ - $(VOSLIB) $(SALLIB) $(LIBSTLPORT) -.ELSE APP3STDLIBS+= \ - $(VOSLIB) $(SALLIB) -.ENDIF + $(SALLIB) .ENDIF # $(AUTOMATIONLIB) is build in SHL1TARGET .IF "$(GUI)"=="UNX" || ("$(COM)"=="GCC" && "$(GUI)"=="WNT") |