diff options
Diffstat (limited to 'automation')
-rw-r--r-- | automation/inc/automation/communi.hxx | 1 | ||||
-rw-r--r-- | automation/inc/automation/simplecm.hxx | 48 | ||||
-rw-r--r-- | automation/source/communi/communi.cxx | 7 | ||||
-rw-r--r-- | automation/source/inc/cmdbasestream.hxx | 9 | ||||
-rw-r--r-- | automation/source/inc/ittresid.hxx (renamed from automation/source/inc/sttresid.hxx) | 10 | ||||
-rw-r--r-- | automation/source/miniapp/editwin.cxx | 5 | ||||
-rw-r--r-- | automation/source/miniapp/editwin.hxx | 1 | ||||
-rw-r--r-- | automation/source/server/cmdbasestream.cxx | 12 | ||||
-rw-r--r-- | automation/source/server/retstrm.hxx | 5 | ||||
-rw-r--r-- | automation/source/server/server.cxx | 6 | ||||
-rw-r--r-- | automation/source/simplecm/simplecm.cxx | 160 | ||||
-rw-r--r-- | automation/source/testtool/cmdstrm.cxx | 24 | ||||
-rw-r--r-- | automation/source/testtool/cmdstrm.hxx | 4 | ||||
-rw-r--r-- | automation/source/testtool/httprequest.cxx | 18 | ||||
-rw-r--r-- | automation/source/testtool/httprequest.hxx | 4 | ||||
-rw-r--r-- | automation/source/testtool/objtest.cxx | 57 | ||||
-rw-r--r-- | automation/source/testtool/tcommuni.cxx | 4 | ||||
-rw-r--r-- | automation/util/makefile.mk | 18 |
18 files changed, 58 insertions, 335 deletions
diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index 2c8ac15b6bd8..68cb3cbeaf21 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -164,7 +164,6 @@ class CommunicationManagerClientViaSocket : public CommunicationManagerClient, C public: using CommunicationManager::StartCommunication; - CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManagerClientViaSocket(); diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index dd522cb3beeb..9a5211b1ad37 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -114,14 +114,12 @@ private: class PacketHandler; class CommunicationManager; -class SingleCommunicationManager; class MultiCommunicationManager; class CommunicationManagerServerAcceptThread; class CommunicationLink : public SvRefBase { protected: friend class CommunicationManager; - friend class SingleCommunicationManager; friend class MultiCommunicationManager; friend class CommunicationManagerServerAcceptThread; // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks @@ -287,24 +285,6 @@ private: sal_Bool bIsMultiChannel; }; -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 IsLinkValid( CommunicationLink* pCL ); - virtual sal_uInt16 GetCommunicationLinkCount(); - virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr ); - -protected: - virtual void CallConnectionOpened( CommunicationLink* pCL ); - virtual void CallConnectionClosed( CommunicationLink* pCL ); - CommunicationLinkRef xActiveLink; - CommunicationLink *pInactiveLink; - virtual void DestroyingLink( CommunicationLink *pCL ); // Link tr�gt sich im Destruktor aus -}; - class ICommunicationManagerClient { friend class CommonSocketFunctions; @@ -341,23 +321,11 @@ protected: SvStream *pReceiveStream; sal_Bool DoReceiveDataStream(); /// Recieve DataPacket from Socket virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL); - bool IsReceiveReady(); sal_Bool bIsRequestShutdownPending; virtual void WaitForShutdown()=0; void SetNewPacketAsCurrent(); }; -class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket -{ -public: - SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ); - ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks(); - virtual sal_Bool ReceiveDataStream(); -protected: - virtual sal_Bool ShutdownCommunication(); /// Really stop the Communication - virtual void WaitForShutdown(); -}; - class CommonSocketFunctions { public: @@ -366,22 +334,6 @@ protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0; }; -class SingleCommunicationManagerClientViaSocket : public SingleCommunicationManager, public ICommunicationManagerClient, CommonSocketFunctions -{ -public: - using CommunicationManager::StartCommunication; - - SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); - SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); - virtual sal_Bool StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );} - virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} -private: - ByteString aHostToTalk; - sal_uLong nPortToTalk; -protected: - 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/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 10aa6f8e9107..db319e206411 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -567,13 +567,6 @@ IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYAR return 1; } -CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel ) -: CommunicationManagerClient( bUseMultiChannel ) -, aHostToTalk( aHost ) -, nPortToTalk( nPort ) -{ -} - CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel ) : CommunicationManagerClient( bUseMultiChannel ) , aHostToTalk( "" ) diff --git a/automation/source/inc/cmdbasestream.hxx b/automation/source/inc/cmdbasestream.hxx index ce3ee45e095f..71666cebafc3 100644 --- a/automation/source/inc/cmdbasestream.hxx +++ b/automation/source/inc/cmdbasestream.hxx @@ -63,11 +63,10 @@ public: void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr ); // MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ); // also used outside MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod ); // also used outside MacroRecorder + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_String *pString ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_String *pString, comm_BOOL bBool ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_UINT32 nNr ); void Read ( comm_USHORT &nNr ); void Read ( comm_ULONG &nNr ); diff --git a/automation/source/inc/sttresid.hxx b/automation/source/inc/ittresid.hxx index 3ccfe483a8f4..1a1e321e3f0f 100644 --- a/automation/source/inc/sttresid.hxx +++ b/automation/source/inc/ittresid.hxx @@ -26,17 +26,17 @@ * ************************************************************************/ -#ifndef _STTRESID_HXX_ -#define _STTRESID_HXX_ +#ifndef _ITTRESID_HXX_ +#define _ITTRESID_HXX_ #include <tools/resmgr.hxx> #include <tools/resid.hxx> -class SttResId : public ResId +class IttResId : public ResId { - static ResMgr* getSttResMgr(); + static ResMgr* getIttResMgr(); public: - SttResId( sal_uInt32 nId ) : ResId( nId, *getSttResMgr() ) {} + IttResId( sal_uInt32 nId ) : ResId( nId, *getIttResMgr() ) {} }; diff --git a/automation/source/miniapp/editwin.cxx b/automation/source/miniapp/editwin.cxx index 395c9deb350a..e0b3ee023dd4 100644 --- a/automation/source/miniapp/editwin.cxx +++ b/automation/source/miniapp/editwin.cxx @@ -59,11 +59,6 @@ GHEditWindow::GHEditWindow(Window * pParent, String aName, WinBits iWstyle) SetText(aName); } -void GHEditWindow::Clear() -{ - aInhalt.SetText(String()); -} - void GHEditWindow::AddText( String aNew, sal_Bool bMoveToEnd) { String aOld = aInhalt.GetText(); diff --git a/automation/source/miniapp/editwin.hxx b/automation/source/miniapp/editwin.hxx index ed10acec2646..3181efaefea3 100644 --- a/automation/source/miniapp/editwin.hxx +++ b/automation/source/miniapp/editwin.hxx @@ -47,7 +47,6 @@ public: GHEditWindow(); GHEditWindow(Window * pParent, String aName = CUniString("Neues Fenster"), WinBits iWstyle = WB_STDWORK); - void Clear(); void AddText( String aNew, sal_Bool bMoveToEnd = sal_True); }; diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx index 3988bcbab154..1144cde41a68 100644 --- a/automation/source/server/cmdbasestream.cxx +++ b/automation/source/server/cmdbasestream.cxx @@ -184,17 +184,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT Write(bBool); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool ) -{ - Write(comm_USHORT(SIReturn)); - Write(nRet); - Write(pUId); - Write(comm_USHORT(PARAM_USHORT_1|PARAM_BOOL_1)); // Typ der folgenden Parameter - Write(nMethod); - Write(bBool); -} - -void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr ) +void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_UINT32 nNr ) { Write(comm_USHORT(SIReturn)); Write(nRet); diff --git a/automation/source/server/retstrm.hxx b/automation/source/server/retstrm.hxx index d21650898933..19ee23f66b62 100644 --- a/automation/source/server/retstrm.hxx +++ b/automation/source/server/retstrm.hxx @@ -49,9 +49,8 @@ public: void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );} // MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );} - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );} + void GenReturn( comm_UINT16 nRet, rtl::OString aUId, comm_UINT16 nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder + void GenReturn( comm_UINT16 nRet, rtl::OString aUId, comm_UINT16 nMethod, comm_UINT32 nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );} void GenReturn( sal_uInt16 nRet, rtl::OString aUId, String aString ); void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool ); diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx index ccf0e7ffb840..44c2c0de423e 100644 --- a/automation/source/server/server.cxx +++ b/automation/source/server/server.cxx @@ -216,17 +216,17 @@ sal_uLong RemoteControlCommunicationManager::GetPort() aConf.WriteKey( aNoTesttoolKey, "something" ); } - nPortIs = aConf.ReadKey("TTPort","0").ToInt32(); + nPortIs = aConf.ReadKey("TTPort","0").toInt32(); // noch pr�fen ob dieses Office getestet werden soll. if ( !bAutomate || aConf.ReadKey( aNoTesttoolKey, "" ) != "" ) nPortIs = 0; - nComm = (sal_uInt16)aConf.ReadKey("Comm","0").ToInt32(); + nComm = (sal_uInt16)aConf.ReadKey("Comm","0").toInt32(); if ( nComm ) aConf.DeleteKey("Comm"); - bQuiet = ( aConf.ReadKey("Quiet","no").CompareIgnoreCaseToAscii("yes") == COMPARE_EQUAL ); + bQuiet = aConf.ReadKey("Quiet","no").equalsIgnoreAsciiCase("yes"); } return nPortIs; } diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index 01c37e99e26b..39f86436a9a3 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -343,72 +343,6 @@ sal_Bool SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandsha return !bWasError; } -SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ) -: SimpleCommunicationLinkViaSocket( pMan, pSocket ) -{ -} - -SimpleCommunicationLinkViaSocketWithReceiveCallbacks::~SimpleCommunicationLinkViaSocketWithReceiveCallbacks() -{ - if ( pMyManager && pMyManager->IsLinkValid( this ) && !bIsRequestShutdownPending ) - 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 - - while( pMyManager && !IsCommunicationError() && IsReceiveReady()) - ReceiveDataStream(); -} - -sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream() -{ - if ( DoReceiveDataStream() ) - { - SetNewPacketAsCurrent(); - StartCallback(); - DataReceived(); - return sal_True; - } - else - { - StartCallback(); - ShutdownCommunication(); - return sal_False; - } -} - -sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication() -{ - if ( GetStreamSocket() ) - GetStreamSocket()->shutdown(); - - if ( GetStreamSocket() ) - GetStreamSocket()->close(); - - osl::StreamSocket* pTempSocket = GetStreamSocket(); - SetStreamSocket( NULL ); - delete pTempSocket; - - ConnectionClosed(); - - return sal_True; -} - - - CommunicationManager::CommunicationManager( sal_Bool bUseMultiChannel ) : nInfoType( CM_NONE ) , bIsCommunicationRunning( sal_False ) @@ -577,100 +511,6 @@ void CommunicationManager::SetApplication( const ByteString& aApp, sal_Bool bRun } } - - -SingleCommunicationManager::SingleCommunicationManager( sal_Bool bUseMultiChannel ) -: CommunicationManager( bUseMultiChannel ) -{ - xActiveLink = NULL; - pInactiveLink = NULL; -} - -SingleCommunicationManager::~SingleCommunicationManager() -{ - StopCommunication(); - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); -} - -sal_Bool SingleCommunicationManager::StopCommunication() -{ - if ( xActiveLink.Is() ) - { - sal_Bool bSuccess = xActiveLink->StopCommunication(); - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); - pInactiveLink = xActiveLink; - xActiveLink.Clear(); - return bSuccess; - } - return sal_True; -} - -sal_Bool SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL ) -{ - return &xActiveLink == pCL; -} - -sal_uInt16 SingleCommunicationManager::GetCommunicationLinkCount() -{ - return IsCommunicationRunning()?1:0; -} - -CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( sal_uInt16 ) -{ - return xActiveLink; -} - -void SingleCommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) -{ - DBG_ASSERT( !xActiveLink.Is(), "Es ist bereits ein CommunicationLink aktiv"); - if ( xActiveLink.Is() ) - { - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); - pInactiveLink = xActiveLink; - xActiveLink->StopCommunication(); // Den alten Link brutal abw�rgen - } - xActiveLink = pCL; - CommunicationManager::CallConnectionOpened( pCL ); -} - -void SingleCommunicationManager::CallConnectionClosed( CommunicationLink* pCL ) -{ - CommunicationManager::CallConnectionClosed( pCL ); - - DBG_ASSERT( pCL == xActiveLink, "SingleCommunicationManager::CallConnectionClosed mit fremdem Link"); - if ( pInactiveLink ) - pInactiveLink->InvalidateManager(); - pInactiveLink = xActiveLink; - xActiveLink.Clear(); - bIsCommunicationRunning = sal_False; -} - -void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL ) -{ - pInactiveLink = NULL; - pCL->InvalidateManager(); -} - - -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel ) -: SingleCommunicationManager( bUseMultiChannel ) -, aHostToTalk( aHost ) -, nPortToTalk( nPort ) -{ -} - - -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel ) -: SingleCommunicationManager( bUseMultiChannel ) -, aHostToTalk() -, nPortToTalk( 0 ) -{ -} - - sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ) { osl::SocketAddr Addr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ), nPort ); diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx index d24fa7f232b0..8153b6505373 100644 --- a/automation/source/testtool/cmdstrm.cxx +++ b/automation/source/testtool/cmdstrm.cxx @@ -35,7 +35,7 @@ #include "cmdstrm.hxx" #include "rcontrol.hxx" #include "objtest.hxx" -#include "sttresid.hxx" +#include "ittresid.hxx" #include "svcommstream.hxx" #include <basic/testtool.hrc> @@ -43,7 +43,7 @@ ControlDefLoad const CmdStream::arKeyCodes [] = #include <keycodes.hxx> CNames *CmdStream::pKeyCodes = NULL; -ResMgr* SttResId::getSttResMgr() +ResMgr* IttResId::getIttResMgr() { static ResMgr* pMgr = NULL; if( ! pMgr ) @@ -153,7 +153,7 @@ String CmdStream::WandleKeyEventString( String aKeys ) Result += '<'; Result += Token; Result += ' '; - Result += String( SttResId( S_INVALID_KEYCODE ) ); + Result += String( IttResId( S_INVALID_KEYCODE ) ); Result += '>'; } } @@ -422,15 +422,7 @@ void CmdStream::GenCmdFlow( sal_uInt16 nArt ) Write(sal_uInt16(PARAM_NONE)); // Typ der folgenden Parameter } -void CmdStream::GenCmdFlow( sal_uInt16 nArt, sal_uInt16 nNr1 ) -{ - Write(sal_uInt16(SIFlow)); - Write(nArt); - Write(sal_uInt16(PARAM_USHORT_1)); // Typ der folgenden Parameter - Write(nNr1); -} - -void CmdStream::GenCmdFlow( sal_uInt16 nArt, comm_ULONG nNr1 ) +void CmdStream::GenCmdFlow( sal_uInt16 nArt, comm_UINT32 nNr1 ) { Write(sal_uInt16(SIFlow)); Write(nArt); @@ -438,14 +430,6 @@ void CmdStream::GenCmdFlow( sal_uInt16 nArt, comm_ULONG nNr1 ) Write(nNr1); } -void CmdStream::GenCmdFlow( sal_uInt16 nArt, String aString1 ) -{ - Write(sal_uInt16(SIFlow)); - Write(nArt); - Write(sal_uInt16(PARAM_STR_1)); // Typ der folgenden Parameter - Write(aString1); -} - void CmdStream::Write( String aString, sal_Bool IsKeyString ) { if ( IsKeyString ) diff --git a/automation/source/testtool/cmdstrm.hxx b/automation/source/testtool/cmdstrm.hxx index d9c3cec49c73..a3997fa480f2 100644 --- a/automation/source/testtool/cmdstrm.hxx +++ b/automation/source/testtool/cmdstrm.hxx @@ -51,9 +51,7 @@ public: void GenCmdFlow( sal_uInt16 nArt ); - void GenCmdFlow( sal_uInt16 nArt, sal_uInt16 nNr1 ); - void GenCmdFlow( sal_uInt16 nArt, comm_ULONG nNr1 ); - void GenCmdFlow( sal_uInt16 nArt, String aString1 ); + void GenCmdFlow( sal_uInt16 nArt, comm_UINT32 nNr1 ); void Reset(comm_ULONG nSequence); diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx index 1fb2f1ee276e..4ec2f6471c2a 100644 --- a/automation/source/testtool/httprequest.cxx +++ b/automation/source/testtool/httprequest.cxx @@ -53,10 +53,7 @@ HttpRequest::HttpRequest() HttpRequest::~HttpRequest() { delete pStream; - pStream = NULL; - delete pOutSocket; - pOutSocket = NULL; } void HttpRequest::SetRequest( rtl::OString aHost, rtl::OString aPath, sal_uInt16 nPort ) @@ -215,24 +212,9 @@ sal_Bool HttpRequest::IsItem( rtl::OString aItem, rtl::OString aLine ) } -void HttpRequest::Abort() -{ - if ( pOutSocket ) - { - nStatus = HTTP_REQUEST_ERROR; - pOutSocket->shutdown(); - pOutSocket->close(); - } -} - SvMemoryStream* HttpRequest::GetBody() { return pStream; } -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 f6240507a99f..a8f333718db5 100644 --- a/automation/source/testtool/httprequest.hxx +++ b/automation/source/testtool/httprequest.hxx @@ -71,16 +71,12 @@ public: void SetProxy( rtl::OString aHost, sal_uInt16 nPort ); sal_Bool Execute(); - void Abort(); rtl::OString GetHeader() const { return aHeader; } SvMemoryStream* GetBody(); rtl::OString GetContentType() const { return aContentType; } sal_uInt16 GetResultId() const { return nResultId; } - - sal_uInt16 GetStatus(); - }; #endif diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index 050458e8980a..75d0a8338752 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -31,7 +31,7 @@ #include "sysdir_win.hxx" #include "registry_win.hxx" -#include "sttresid.hxx" +#include "ittresid.hxx" #include <osl/file.hxx> #include <vcl/msgbox.hxx> #include <vcl/sound.hxx> @@ -362,11 +362,11 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den aVar = UniString( __##aVar##__, RTL_TEXTENCODING_UTF8 );\ } -#define NEWOLD( NewKey, OldKey ) \ - { \ - ByteString aValue; \ - if ( ( (aValue = aConf.ReadKey( OldKey )).Len() ) && !aConf.ReadKey( NewKey ).Len() ) \ - aConf.WriteKey( NewKey, aValue ); \ +#define NEWOLD( NewKey, OldKey ) \ + { \ + rtl::OString aValue; \ + if ( ( (aValue = aConf.ReadKey( OldKey )).getLength() ) && !aConf.ReadKey( NewKey ).getLength() ) \ + aConf.WriteKey( NewKey, aValue ); \ } @@ -381,8 +381,8 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den pImpl->aFileBase = DirEntry(aFB); // remove old keys - if ( aConf.ReadKey("KeyCodes + Classes").Len() != 0 || - aConf.ReadKey("KeyCodes + Classes + Res_Type").Len() != 0 ) + if ( aConf.ReadKey("KeyCodes + Classes").getLength() != 0 || + aConf.ReadKey("KeyCodes + Classes + Res_Type").getLength() != 0 ) { aConf.DeleteKey("KeyCodes + Classes + Res_Type"); aConf.DeleteKey("KeyCodes + Classes"); @@ -445,8 +445,8 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den if (i >= 0) { sPath = sPath.copy(0, i); - ByteString bsPath( sPath.getStr(), sPath.getLength(), - RTL_TEXTENCODING_UTF8 ); + ByteString bsPath( rtl::OUStringToOString(sPath, + RTL_TEXTENCODING_UTF8) ); aConf.SetGroup( "OOoProgramDir" ); String aOPD; @@ -714,31 +714,28 @@ TestToolObj::~TestToolObj() pImpl->pMyVars[i].Clear(); } - if (m_pControls) - delete m_pControls; - if (m_pReverseSlots) - delete m_pReverseSlots; - if (m_pReverseControls) - delete m_pReverseControls; - if (m_pReverseControlsSon) - delete m_pReverseControlsSon; - if (m_pReverseUIds) - delete m_pReverseUIds; - if (m_pSIds) - delete m_pSIds; + delete m_pControls; + delete m_pReverseSlots; + delete m_pReverseControls; + delete m_pReverseControlsSon; + delete m_pReverseUIds; + delete m_pSIds; + if (pFehlerListe) { delete pFehlerListe; pFehlerListe = NULL; // da pFehlerListe static ist!! } + if ( pCommunicationManager ) { pCommunicationManager->StopCommunication(); delete pCommunicationManager; } + delete In; - if ( pImpl->pTTSfxBroadcaster ) - delete pImpl->pTTSfxBroadcaster; + delete pImpl->pTTSfxBroadcaster; + delete pImpl->pHttpRequest; delete pImpl->pChildEnv; pImpl->xErrorList.Clear(); @@ -786,7 +783,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s { String aFileName = (pImpl->aHIDDir + DirEntry(CUniString("hid.lst"))).GetFull(); { - TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_READING_LONGNAMES)), aFileName ); + TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(IttResId(S_READING_LONGNAMES)), aFileName ); GetTTBroadcaster().Broadcast( aHint ); } ReadFlat( aFileName ,pUIds, sal_True ); @@ -813,12 +810,12 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s if ( bIsFlat && !pNames ) { - TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_READING_SLOT_IDS)), Filename ); + TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(IttResId(S_READING_SLOT_IDS)), Filename ); GetTTBroadcaster().Broadcast( aHint ); } else { - TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_READING_CONTROLS)), Filename ); + TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(IttResId(S_READING_CONTROLS)), Filename ); GetTTBroadcaster().Broadcast( aHint ); } @@ -1589,7 +1586,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, aTmpStr += ' '; aTmpStr += pImpl->ProgParam; { - TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_STARTING_APPLICATION)), aTmpStr ); + TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(IttResId(S_STARTING_APPLICATION)), aTmpStr ); GetTTBroadcaster().Broadcast( aHint ); } @@ -1786,7 +1783,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, else if ( Ext.CompareIgnoreCaseToAscii("Inc") == COMPARE_EQUAL ) { { - TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_READING_BASIC_MODULE)), FilePath.GetFull() ); + TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(IttResId(S_READING_BASIC_MODULE)), FilePath.GetFull() ); GetTTBroadcaster().Broadcast( aHint ); } String aFullPathname = FilePath.GetFull(); @@ -3084,7 +3081,7 @@ void TestToolObj::ReadHidLstByNumber() String aName = (pImpl->aHIDDir + DirEntry(CUniString("hid.lst"))).GetFull(); { - TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_READING_LONGNAMES)), aName ); + TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(IttResId(S_READING_LONGNAMES)), aName ); GetTTBroadcaster().Broadcast( aHint ); } diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx index 2fb5092763bc..f7fc729ff76f 100644 --- a/automation/source/testtool/tcommuni.cxx +++ b/automation/source/testtool/tcommuni.cxx @@ -170,7 +170,7 @@ sal_uLong GetTTPortConfig() GETSET( abPortToTalk, "TTPort", rtl::OString::valueOf(static_cast<sal_Int32>(TESTTOOL_DEFAULT_PORT)) ); - return (sal_uLong)abPortToTalk.ToInt64(); + return (sal_uLong)abPortToTalk.ToInt32(); } @@ -197,7 +197,7 @@ sal_uLong GetUnoPortConfig() GETSET( abPortToTalk, "UnoPort", rtl::OString::valueOf(static_cast<sal_Int32>(UNO_DEFAULT_PORT)) ); - return (sal_uLong)abPortToTalk.ToInt64(); + return (sal_uLong)abPortToTalk.ToInt32(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/util/makefile.mk b/automation/util/makefile.mk index 046f6e043dea..fbbe47454717 100644 --- a/automation/util/makefile.mk +++ b/automation/util/makefile.mk @@ -49,18 +49,18 @@ SHL1TARGET= sts$(DLLPOSTFIX) SHL1IMPLIB= ists SHL1STDLIBS= \ - $(TOOLSLIB) \ - $(UNOTOOLSLIB) \ - $(SVTOOLLIB) \ - $(SVLLIB) \ - $(VCLLIB) \ $(BASICLIB) \ - $(SALLIB) \ + $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(COMPHELPERLIB) \ - $(SOTLIB) - + $(SALLIB) \ + $(SOTLIB) \ + $(SVLLIB) \ + $(SVTLIB) \ + $(SVTOOLLIB) \ + $(TOOLSLIB) \ + $(UNOTOOLSLIB) \ + $(VCLLIB) \ .IF "$(GUI)"=="WNT" SHL1STDLIBS+= \ |