summaryrefslogtreecommitdiff
path: root/automation/source/testtool
diff options
context:
space:
mode:
Diffstat (limited to 'automation/source/testtool')
-rw-r--r--automation/source/testtool/cmdstrm.cxx46
-rw-r--r--automation/source/testtool/cmdstrm.hxx12
-rw-r--r--automation/source/testtool/comm_bas.hxx2
-rw-r--r--automation/source/testtool/cretstrm.hxx4
-rw-r--r--automation/source/testtool/httprequest.cxx24
-rw-r--r--automation/source/testtool/makefile.mk2
-rw-r--r--automation/source/testtool/objtest.cxx59
7 files changed, 67 insertions, 82 deletions
diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx
index d24fa7f232b0..475f94dbc6df 100644
--- a/automation/source/testtool/cmdstrm.cxx
+++ b/automation/source/testtool/cmdstrm.cxx
@@ -172,7 +172,7 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
{
sal_uInt16 nParams = PARAM_NONE;
sal_uInt16 nNr1=0,nNr2=0,nNr3=0,nNr4=0;
- comm_ULONG nLNr1=0;
+ comm_UINT32 nLNr1=0;
String aString1,aString2;
sal_Bool bBool1=sal_False,bBool2=sal_False;
@@ -193,24 +193,24 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
case SbxINT:
case SbxUINT:
case SbxSINGLE:
- if ( (nParams & PARAM_USHORT_1) == 0 )
+ if ( (nParams & PARAM_UINT16_1) == 0 )
{
- nParams |= PARAM_USHORT_1;
+ nParams |= PARAM_UINT16_1;
nNr1 = rPar->Get( i )->GetUShort();
}
- else if ( (nParams & PARAM_USHORT_2) == 0 )
+ else if ( (nParams & PARAM_UINT16_2) == 0 )
{
- nParams |= PARAM_USHORT_2;
+ nParams |= PARAM_UINT16_2;
nNr2 = rPar->Get( i )->GetUShort();
}
- else if ( (nParams & PARAM_USHORT_3) == 0 )
+ else if ( (nParams & PARAM_UINT16_3) == 0 )
{
- nParams |= PARAM_USHORT_3;
+ nParams |= PARAM_UINT16_3;
nNr3 = rPar->Get( i )->GetUShort();
}
- else if ( (nParams & PARAM_USHORT_4) == 0 )
+ else if ( (nParams & PARAM_UINT16_4) == 0 )
{
- nParams |= PARAM_USHORT_4;
+ nParams |= PARAM_UINT16_4;
nNr4 = rPar->Get( i )->GetUShort();
}
else
@@ -242,11 +242,11 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
}
else if ( pMember->GetType() == SbxULONG )
{
- if ( nParams & PARAM_ULONG_1 )
+ if ( nParams & PARAM_UINT32_1 )
SbxBase::SetError( SbxERR_WRONG_ARGS );
else
{
- nParams |= PARAM_ULONG_1;
+ nParams |= PARAM_UINT32_1;
nLNr1 = pMember->GetULong();
}
}
@@ -297,11 +297,11 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
}
}
Write (nParams);
- if( nParams & PARAM_USHORT_1 ) Write( nNr1 );
- if( nParams & PARAM_USHORT_2 ) Write( nNr2 );
- if( nParams & PARAM_USHORT_3 ) Write( nNr3 );
- if( nParams & PARAM_USHORT_4 ) Write( nNr4 );
- if( nParams & PARAM_ULONG_1 ) Write( nLNr1 );
+ if( nParams & PARAM_UINT16_1 ) Write( nNr1 );
+ if( nParams & PARAM_UINT16_2 ) Write( nNr2 );
+ if( nParams & PARAM_UINT16_3 ) Write( nNr3 );
+ if( nParams & PARAM_UINT16_4 ) Write( nNr4 );
+ if( nParams & PARAM_UINT32_1 ) Write( nLNr1 );
if( nParams & PARAM_STR_1 ) Write( aString1, IsKeyString );
if( nParams & PARAM_STR_2 ) Write( aString2, IsKeyString );
if( nParams & PARAM_BOOL_1 ) Write( bBool1 );
@@ -344,7 +344,7 @@ void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar )
case SbxUINT:
case SbxSINGLE:
if ( !bWriteUnoSlot )
- Write( (sal_uInt16)BinUSHORT );
+ Write( (sal_uInt16)BinUINT16 );
Write(rPar->Get( 2*n )->GetUShort());
break;
case SbxLONG:
@@ -353,7 +353,7 @@ void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar )
case SbxSALUINT64:
case SbxDOUBLE:
if ( !bWriteUnoSlot )
- Write( (sal_uInt16)BinULONG );
+ Write( (sal_uInt16)BinUINT32 );
Write(rPar->Get( 2*n )->GetULong());
break;
case SbxSTRING:
@@ -399,7 +399,7 @@ void CmdStream::GenCmdUNOSlot( const String &aURL )
Write( aURL ); // Die UNO URL eben
}
-void CmdStream::GenCmdControl( comm_ULONG nUId, sal_uInt16 nMethodId, SbxArray* rPar )
+void CmdStream::GenCmdControl( comm_UINT32 nUId, sal_uInt16 nMethodId, SbxArray* rPar )
{
Write(sal_uInt16(SIControl));
Write(nUId);
@@ -426,15 +426,15 @@ 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(sal_uInt16(PARAM_UINT16_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);
- Write(sal_uInt16(PARAM_ULONG_1)); // Typ der folgenden Parameter
+ Write(sal_uInt16(PARAM_UINT32_1)); // Typ der folgenden Parameter
Write(nNr1);
}
@@ -459,7 +459,7 @@ SvMemoryStream* CmdStream::GetStream()
return pSammel;
}
-void CmdStream::Reset( comm_ULONG nSequence )
+void CmdStream::Reset( comm_UINT32 nSequence )
{
delete pCommStream;
delete pSammel;
diff --git a/automation/source/testtool/cmdstrm.hxx b/automation/source/testtool/cmdstrm.hxx
index d9c3cec49c73..0f4e6eff2c39 100644
--- a/automation/source/testtool/cmdstrm.hxx
+++ b/automation/source/testtool/cmdstrm.hxx
@@ -46,16 +46,16 @@ public:
void GenCmdUNOSlot( const String &aURL );
- void GenCmdControl( comm_ULONG nUId, sal_uInt16 nMethodId, SbxArray* rPar );
+ void GenCmdControl( comm_UINT32 nUId, sal_uInt16 nMethodId, SbxArray* rPar );
void GenCmdControl( String aUId, sal_uInt16 nMethodId, SbxArray* rPar );
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, comm_UINT32 nNr1 );
void GenCmdFlow( sal_uInt16 nArt, String aString1 );
- void Reset(comm_ULONG nSequence);
+ void Reset(comm_UINT32 nSequence);
SvMemoryStream* GetStream();
@@ -66,9 +66,9 @@ private:
String WandleKeyEventString( String aKeys ); // Nutzt pKeyCodes. <RETURN> <SHIFT LEFT LEFT>
using CmdBaseStream::Write;
- void Write( comm_USHORT nNr ){CmdBaseStream::Write( nNr );}
- void Write( comm_ULONG nNr ){CmdBaseStream::Write( nNr );}
- void Write( const comm_UniChar* aString, comm_USHORT nLenInChars ){CmdBaseStream::Write( aString, nLenInChars );}
+ void Write( comm_UINT16 nNr ){CmdBaseStream::Write( nNr );}
+ void Write( comm_UINT32 nNr ){CmdBaseStream::Write( nNr );}
+ void Write( const comm_UniChar* aString, comm_UINT16 nLenInChars ){CmdBaseStream::Write( aString, nLenInChars );}
void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );}
// new
void Write( String aString, sal_Bool IsKeyString = sal_False );
diff --git a/automation/source/testtool/comm_bas.hxx b/automation/source/testtool/comm_bas.hxx
index 16c874164227..32da48aed9a2 100644
--- a/automation/source/testtool/comm_bas.hxx
+++ b/automation/source/testtool/comm_bas.hxx
@@ -41,7 +41,7 @@ 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 ( C50 ) || defined ( C52 )
+#if defined ( ICC ) || defined ( C50 )
public:
#endif
typedef void( CommunicationWrapper::*pMeth )
diff --git a/automation/source/testtool/cretstrm.hxx b/automation/source/testtool/cretstrm.hxx
index 0315c53828b7..9f1385dae540 100644
--- a/automation/source/testtool/cretstrm.hxx
+++ b/automation/source/testtool/cretstrm.hxx
@@ -43,8 +43,8 @@ public:
~CRetStream();
using CmdBaseStream::Read;
- void Read ( comm_USHORT &nNr ){CmdBaseStream::Read ( nNr );}
- void Read ( comm_ULONG &nNr ){CmdBaseStream::Read ( nNr );}
+ void Read ( comm_UINT16 &nNr ){CmdBaseStream::Read ( nNr );}
+ void Read ( comm_UINT32 &nNr ){CmdBaseStream::Read ( nNr );}
virtual void Read ( rtl::OString* &pId ){CmdBaseStream::Read ( pId );}
void Read ( comm_BOOL &bBool ){CmdBaseStream::Read ( bBool );}
void Read( String &aString );
diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx
index d10469e0496a..62c4f9650062 100644
--- a/automation/source/testtool/httprequest.cxx
+++ b/automation/source/testtool/httprequest.cxx
@@ -45,15 +45,18 @@ void HttpRequest::Init()
}
HttpRequest::HttpRequest()
-: nStatus( HTTP_INIT )
-, nResultId( 0 )
-, pStream( NULL )
-{}
+ : nStatus(HTTP_INIT), pOutSocket(NULL),
+ nResultId(0), pStream(NULL)
+{
+}
HttpRequest::~HttpRequest()
{
delete pStream;
pStream = NULL;
+
+ delete pOutSocket;
+ pOutSocket = NULL;
}
void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort )
@@ -95,18 +98,14 @@ sal_Bool HttpRequest::Execute()
aTV.Nanosec = 0;
pOutSocket = new osl::ConnectorSocket();
- if ( pOutSocket->connect( aConnectAddr, &aTV ) == osl_Socket_Ok )
- {
-// pOutSocket->setTcpNoDelay( 1 );
- }
- else
+ if ( pOutSocket->connect( aConnectAddr, &aTV ) != osl_Socket_Ok )
{
delete pOutSocket;
+ pOutSocket = NULL;
nStatus = HTTP_REQUEST_ERROR;
return sal_False;
}
-
SendString( pOutSocket, "GET " );
if ( aProxyHost.Len() )
{
@@ -218,14 +217,11 @@ void HttpRequest::Abort()
if ( pOutSocket )
{
nStatus = HTTP_REQUEST_ERROR;
- pOutSocket->shutdown();
+ pOutSocket->shutdown();
pOutSocket->close();
}
}
-
-
-
SvMemoryStream* HttpRequest::GetBody()
{
return pStream;
diff --git a/automation/source/testtool/makefile.mk b/automation/source/testtool/makefile.mk
index ee885e1429f1..d23069e7821d 100644
--- a/automation/source/testtool/makefile.mk
+++ b/automation/source/testtool/makefile.mk
@@ -93,7 +93,7 @@ $(MISC)$/xfilter.pl : filter.pl
.IF "$(GUI)"=="UNX"
INIFILESUFFIX=rc
BRANDPATH=none
-.ELIF "$(GUI)"=="WNT" || "$(GUI)"=="OS2"
+.ELIF "$(GUI)"=="WNT"
INIFILESUFFIX=.ini
BRANDPATH=..
.END
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index 63d8291b2310..f52170392758 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -29,11 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_automation.hxx"
-#ifdef OS2
-#define INCL_DOS
-#include <svpm.h>
-#endif
-
#include "sysdir_win.hxx"
#include "registry_win.hxx"
#include "sttresid.hxx"
@@ -174,7 +169,7 @@ void ControlDef::Write( SvStream &aStream )
if ( pData->aUId.HasString() )
aStream.WriteByteString( pData->aUId.GetStr(), RTL_TEXTENCODING_UTF8 );
else
- aStream << static_cast<comm_ULONG>(pData->aUId.GetNum()); //GetNum() sal_uLong != comm_ULONG on 64bit
+ aStream << static_cast<comm_UINT32>(pData->aUId.GetNum()); //GetNum() sal_uLong != comm_UINT32 on 64bit
if ( pSons )
for ( sal_uInt16 i = 0 ; pSons->Count() > i ; i++ )
((ControlDef*)(*pSons)[i])->Write(aStream);
@@ -445,8 +440,6 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
abGP.Append( "15" ); // Linux x86-64
#elif defined LINUX && defined SPARC
abGP.Append( "16" ); // Linux SPARC
-#elif defined OS2
- abGP.Append( "17" );
#elif defined LINUX && defined MIPS
abGP.Append( "18" ); // Linux MIPS
#elif defined LINUX && defined ARM
@@ -1204,9 +1197,6 @@ void TestToolObj::WaitForAnswer ()
while ( !bReturnOK && aTimer.IsActive() && pCommunicationManager->IsCommunicationRunning()
&& aRun.IsValid() && aRun.IsRun() )
{
- #ifdef OS2
- DosSleep(100);
- #endif
GetpApp()->Yield();
if ( BasicRuntimeAccess::HasRuntime() )
aRun = BasicRuntimeAccess::GetRuntime();
@@ -1358,9 +1348,6 @@ void TestToolObj::EndBlock()
aTimer.Start();
while ( aTimer.IsActive() && pCommunicationManager->IsCommunicationRunning() )
{
- #ifdef OS2
- DosSleep(100);
- #endif
GetpApp()->Yield();
}
}
@@ -1476,7 +1463,7 @@ sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pC
}
else
{
- comm_ULONG nUId;
+ comm_UINT32 nUId;
aStream >> nUId;
aUId = rtl::OString();// nUId;
}
@@ -1676,7 +1663,11 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if ( rPar && rPar->Count() >= 2 ) // Genau ein Parameter
{
SbxVariableRef pArg = rPar->Get( 1 );
- DirEntry FilePath = pImpl->aFileBase + DirEntry(pArg->GetString(),FSYS_STYLE_VFAT);
+ #if defined(WNT)
+ DirEntry FilePath = pImpl->aFileBase + DirEntry(pArg->GetString(),FSYS_STYLE_NTFS);
+ #else
+ DirEntry FilePath = pImpl->aFileBase + DirEntry(pArg->GetString(),FSYS_STYLE_UNX);
+ #endif
WriteNamesBin( FilePath.GetFull(), m_pSIds, m_pControls );
}
else
@@ -1816,7 +1807,11 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if ( rPar && rPar->Count() >= 2 )
{
SbxVariableRef pArg = rPar->Get( 1 );
- DirEntry FilePath(pArg->GetString(),FSYS_STYLE_VFAT);
+ #if defined(WNT)
+ DirEntry FilePath(pArg->GetString(),FSYS_STYLE_NTFS);
+ #else
+ DirEntry FilePath(pArg->GetString(),FSYS_STYLE_UNX);
+ #endif
if ( !FilePath.IsAbs() )
FilePath = pImpl->aFileBase + FilePath;
String Ext = FilePath.GetExtension();
@@ -2360,14 +2355,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
osl::FileBase::getSystemPathFromFileURL( aUrl, aPath );
pVar->PutString( String( aPath ) );
}
-#elif defined OS2
- {
- char* etc = getenv("ETC");
- if (etc)
- pVar->PutString( CUniString( etc ) );
- else
- pVar->PutString( CUniString( "/etc" ) );
- }
#else
#if UNX
pVar->PutString( CUniString( "/etc" ) );
@@ -2815,6 +2802,8 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
{
ADD_ERROR(SbxERR_PROC_UNDEFINED,GEN_RES_STR1(S_UNKNOWN_SLOT_CONTROL, aStr) );
}
+
+ delete pWhatName;
}
return NULL;
}
@@ -3242,7 +3231,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
}
else
{
- comm_ULONG nUId;
+ comm_UINT32 nUId;
pRetStream->Read( nUId ); // bei Sequence einfach die Sequence
// FIXME: HELPID
#if 0
@@ -3252,14 +3241,14 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
pRetStream->Read(nParams);
sal_uInt16 nNr1 = 0;
- comm_ULONG nLNr1 = 0;
+ comm_UINT32 nLNr1 = 0;
String aString1;
sal_Bool bBool1 = sal_False;
SbxValueRef xValue1 = new SbxValue;
- if( nParams & PARAM_USHORT_1 )
+ if( nParams & PARAM_UINT16_1 )
pRetStream->Read( nNr1 );
- if( nParams & PARAM_ULONG_1 )
+ if( nParams & PARAM_UINT32_1 )
pRetStream->Read( nLNr1 );
if( nParams & PARAM_STR_1 )
{
@@ -3296,14 +3285,14 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
{
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
+ if( nParams & PARAM_UINT32_1 ) // FIXME this is to allow negative numbers, hoping that no large numbers are interpreted wrong. should have new PARAM_LONG_1 instead
{
if ( nLNr1 > 0x7fffffff )
pImpl->pNextReturn->PutLong( long(nLNr1 - 0xffffffff) -1 );
else
pImpl->pNextReturn->PutULong( nLNr1 );
}
- if( nParams & PARAM_USHORT_1 ) pImpl->pNextReturn->PutUShort( nNr1 );
+ if( nParams & PARAM_UINT16_1 ) pImpl->pNextReturn->PutUShort( nNr1 );
if( nParams & PARAM_STR_1 ) pImpl->pNextReturn->PutString( aString1 );
if( nParams & PARAM_BOOL_1 ) pImpl->pNextReturn->PutBool( bBool1 );
if( nParams & PARAM_SBXVALUE_1 ) // FIXME: allow generic datatype
@@ -3442,7 +3431,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
aStrm.Close();
}
}
- if ( nParams & PARAM_ULONG_1 )
+ if ( nParams & PARAM_UINT32_1 )
{
switch ( nUId )
{
@@ -3606,7 +3595,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
}
aULongNames.Erase();
- if( (nParams & PARAM_ULONG_1) && (nNr1 & M_RET_NUM_CONTROL) )
+ if( (nParams & PARAM_UINT32_1) && (nNr1 & M_RET_NUM_CONTROL) )
{
if ( m_pReverseControls )
{
@@ -3803,7 +3792,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
}
aCommand.AppendAscii( "\"" );
}
- if( nParams & PARAM_ULONG_1 )
+ if( nParams & PARAM_UINT32_1 )
{
if ( bWasParam )
aCommand.AppendAscii( ", " );
@@ -3859,7 +3848,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
}
else
{
- comm_ULONG nUId;
+ comm_UINT32 nUId;
pRetStream->Read( nUId ); // bei Sequence einfach die Sequence
// FIXME: HELPID
#if 0