2002-11-18 14:54:26 +00:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
*
|
2005-09-07 18:32:22 +00:00
|
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
2005-09-07 18:32:22 +00:00
|
|
|
|
* $RCSfile: objtest.hxx,v $
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
2006-06-19 23:27:23 +00:00
|
|
|
|
* $Revision: 1.14 $
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
2006-06-19 23:27:23 +00:00
|
|
|
|
* last change: $Author: hr $ $Date: 2006-06-20 00:27:23 $
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
2005-09-07 18:32:22 +00:00
|
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
|
|
|
|
*
|
2005-09-07 18:32:22 +00:00
|
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
|
* =============================================
|
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
2005-09-07 18:32:22 +00:00
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
2005-09-07 18:32:22 +00:00
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
2005-09-07 18:32:22 +00:00
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
|
* MA 02111-1307 USA
|
2002-11-18 14:54:26 +00:00
|
|
|
|
*
|
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef _OBJTEST_HXX
|
|
|
|
|
#define _OBJTEST_HXX
|
|
|
|
|
|
|
|
|
|
#ifndef _FSYS_HXX //autogen
|
|
|
|
|
#include <tools/fsys.hxx>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <testapp.hxx>
|
|
|
|
|
#include <testtool.hxx>
|
|
|
|
|
#include "cmdstrm.hxx"
|
|
|
|
|
#ifndef _BASICRT_HXX
|
|
|
|
|
#include <basic/basicrt.hxx>
|
|
|
|
|
#endif
|
2004-07-06 11:08:27 +00:00
|
|
|
|
#ifndef _SMARTID_HXX_
|
2004-09-09 16:24:45 +00:00
|
|
|
|
#include <vcl/smartid.hxx>
|
2004-07-06 11:08:27 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
2004-06-23 11:26:26 +00:00
|
|
|
|
#include <map>
|
|
|
|
|
|
2002-11-18 14:54:26 +00:00
|
|
|
|
// #define ID_BeginBlock 1
|
|
|
|
|
// #define ID_EndBlock 2
|
|
|
|
|
#define ID_Kontext 3
|
|
|
|
|
#define ID_GetError 4
|
|
|
|
|
#define ID_ErrorDummy 5 // Intern zum Behandlen von Fehlenden Controls und Methoden
|
|
|
|
|
#define ID_RecordError 6
|
|
|
|
|
#define ID_Start 7
|
|
|
|
|
//#define ID_Kill 8
|
|
|
|
|
//#define ID_Reset 9
|
|
|
|
|
// #define ID_AppAbort 10
|
|
|
|
|
#define ID_Dispatch 11
|
|
|
|
|
#define ID_UNODispatch 12
|
|
|
|
|
#define ID_Control 13
|
|
|
|
|
#define ID_StartUse 14
|
|
|
|
|
#define ID_Use 15
|
|
|
|
|
#define ID_FinishUse 16
|
|
|
|
|
#define ID_CaseLog 17
|
|
|
|
|
#define ID_ExceptLog 18
|
|
|
|
|
#define ID_PrintLog 19
|
|
|
|
|
#define ID_WarnLog 20
|
|
|
|
|
#define ID_ErrorLog 21
|
2003-03-18 15:03:50 +00:00
|
|
|
|
#define ID_EnableQaErrors 22
|
|
|
|
|
#define ID_QAErrorLog 23
|
|
|
|
|
#define ID_MaybeAddErr 24
|
|
|
|
|
#define ID_ClearError 25
|
|
|
|
|
#define ID_GetNextCloseWindow 26
|
2002-11-18 14:54:26 +00:00
|
|
|
|
#define ID_RemoteCommand 27
|
|
|
|
|
#define ID_SaveIDs 28
|
|
|
|
|
#define ID_AutoExecute 29
|
|
|
|
|
#define ID_Execute 30
|
|
|
|
|
#define ID_DialogHandler 31
|
|
|
|
|
#define ID_GetUnoApp 32
|
|
|
|
|
#define ID_GetIServer 33
|
|
|
|
|
#define ID_RemoteCommandDelay 34
|
|
|
|
|
#define ID_GetApplicationPath 35
|
2004-01-20 15:55:05 +00:00
|
|
|
|
#define ID_GetCommonApplicationPath 36
|
|
|
|
|
#define ID_MakeIniFileName 37
|
2004-06-17 10:41:22 +00:00
|
|
|
|
#define ID_StringControl 38
|
|
|
|
|
#define ID_Wait 39
|
2004-01-20 15:55:05 +00:00
|
|
|
|
#define ID_GetErrorCount 40
|
|
|
|
|
#define ID_GetWarningCount 41
|
2004-08-02 14:49:38 +00:00
|
|
|
|
#define ID_GetQAErrorCount 42
|
|
|
|
|
#define ID_GetUseFileWarningCount 43
|
|
|
|
|
#define ID_GetErrorList 44
|
|
|
|
|
#define ID_GetWarningList 45
|
|
|
|
|
#define ID_GetQAErrorList 46
|
|
|
|
|
#define ID_GetUseFileWarningList 47
|
|
|
|
|
#define ID_GetTestCaseName 48
|
|
|
|
|
#define ID_GetTestCaseFileName 49
|
|
|
|
|
#define ID_GetTestCaseLineNr 50
|
|
|
|
|
#define ID_StopOnSyntaxError 51
|
|
|
|
|
#define ID_SetChildEnv 52
|
|
|
|
|
#define ID_GetChildEnv 53
|
|
|
|
|
#define ID_GetLinkDestination 54
|
|
|
|
|
#define ID_GetRegistryValue 55
|
2004-09-20 11:25:56 +00:00
|
|
|
|
#define ID_KillApp 56
|
|
|
|
|
#define ID_DoNothing 99
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
|
|
|
|
void ReadFlatArray( const ControlDefLoad arWas [], CNames *&pNames );
|
|
|
|
|
|
|
|
|
|
class ControlData
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
String Kurzname;
|
2004-07-06 11:08:27 +00:00
|
|
|
|
SmartId aUId;
|
2002-11-18 14:54:26 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
DBG_NAMEEX( ControlItem )
|
|
|
|
|
DBG_NAMEEX( ControlDef )
|
|
|
|
|
class ControlItem
|
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
void InitData() { pData = new ControlData; }
|
|
|
|
|
public:
|
|
|
|
|
ControlData *pData;
|
|
|
|
|
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ControlItem( const char *Name, SmartId aUIdP );
|
|
|
|
|
ControlItem( const String &Name, SmartId aUIdP );
|
2002-11-18 14:54:26 +00:00
|
|
|
|
// ControlItem( const String &Name, const String &URL, const URLType aType );
|
|
|
|
|
// ControlItem( const String &Name, const String &URL, const ULONG nUId );
|
|
|
|
|
// ControlItem( const char *Name, const String &URL, const ULONG nUId );
|
|
|
|
|
ControlItem( ControlData *pDataP );
|
|
|
|
|
virtual ~ControlItem() {
|
|
|
|
|
DBG_DTOR(ControlItem,0);
|
|
|
|
|
delete pData;
|
|
|
|
|
}
|
|
|
|
|
virtual BOOL operator < (const ControlItem &rPar)=0;
|
|
|
|
|
virtual BOOL operator == (const ControlItem &rPar)=0;
|
|
|
|
|
// void Write( SvStream &aStream );
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SV_DECL_PTRARR_SORT_DEL(CNames, ControlItem*, 50, 10)
|
|
|
|
|
|
|
|
|
|
#define MK_SON_ACCESS( ClassName )\
|
|
|
|
|
BOOL SonInsert( const ClassName *pNewEntry ) { return pSons->C40_PTR_INSERT( ControlItem, (ControlItem*&)pNewEntry ); }\
|
|
|
|
|
BOOL SonSeek_Entry( const ClassName *pSearchEntry, USHORT *nRes = NULL) { return pSons->Seek_Entry( pSearchEntry, nRes ); }\
|
|
|
|
|
ClassName* SonGetObject( USHORT nNr ) { return (ClassName*)pSons->GetObject( nNr ); }
|
|
|
|
|
|
|
|
|
|
class ControlSon
|
|
|
|
|
{
|
|
|
|
|
protected:
|
|
|
|
|
CNames *pSons; // um sicherzustelle, da<64> nur S<>hne des richtien Type reinkommen
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ControlSon() : pSons( NULL ) {};
|
|
|
|
|
~ControlSon();
|
|
|
|
|
// void Write( SvStream &aStream );
|
|
|
|
|
|
|
|
|
|
USHORT Son_Count() { return pSons->Count(); }
|
|
|
|
|
void Sons( CNames *pNewSons ) { pSons = pNewSons; }
|
|
|
|
|
CNames*& GetSons() { return pSons; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class ControlItemSon : public ControlItem, public ControlSon
|
|
|
|
|
{
|
|
|
|
|
public:
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ControlItemSon(const char *Name, SmartId aUIdP )
|
2002-11-18 14:54:26 +00:00
|
|
|
|
: ControlItem( Name, aUIdP ) {}
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ControlItemSon(const String &Name, SmartId aUIdP );
|
2002-11-18 14:54:26 +00:00
|
|
|
|
// ControlItemSon(const String &Name, const String &URL, const URLType aType );
|
|
|
|
|
// ControlItemSon(const String &Name, const String &URL, const ULONG nUId );
|
|
|
|
|
// ControlItemSon(const char *Name, const String &URL, const ULONG nUId );
|
|
|
|
|
// void Write( SvStream &aStream );
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class ControlDef : public ControlItemSon
|
|
|
|
|
{
|
|
|
|
|
public:
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ControlDef(const char *Name, SmartId aUIdP )
|
2002-11-18 14:54:26 +00:00
|
|
|
|
: ControlItemSon( Name, aUIdP ) {DBG_CTOR(ControlDef,0);}
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ControlDef(const String &Name, SmartId aUIdP );
|
2002-11-18 14:54:26 +00:00
|
|
|
|
// ControlDef(const String &Name, const String &URL, const URLType aType );
|
|
|
|
|
ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, BOOL bWithSons = FALSE );
|
|
|
|
|
~ControlDef() {DBG_DTOR(ControlDef,0);}
|
|
|
|
|
virtual BOOL operator < (const ControlItem &rPar);
|
|
|
|
|
virtual BOOL operator == (const ControlItem &rPar);
|
|
|
|
|
void Write( SvStream &aStream );
|
|
|
|
|
MK_SON_ACCESS( ControlDef )
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class ControlItemUId : public ControlItem
|
|
|
|
|
{
|
|
|
|
|
public:
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ControlItemUId(String Name, SmartId aUIdP)
|
2002-11-18 14:54:26 +00:00
|
|
|
|
: ControlItem( Name, aUIdP){}
|
|
|
|
|
virtual BOOL operator < (const ControlItem &rPar);
|
|
|
|
|
virtual BOOL operator == (const ControlItem &rPar);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class ControlItemUIdSon : public ControlItemUId, public ControlSon
|
|
|
|
|
{
|
|
|
|
|
public:
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ControlItemUIdSon(String Name, SmartId aUIdP) : ControlItemUId( Name, aUIdP) {}
|
2002-11-18 14:54:26 +00:00
|
|
|
|
MK_SON_ACCESS( ControlItemUId )
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class ReverseName : public ControlItemUId
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ULONG LastSequence;
|
|
|
|
|
|
2004-07-06 11:08:27 +00:00
|
|
|
|
ReverseName(String Name, SmartId aUIdP, ULONG nSeq) : ControlItemUId( Name, aUIdP), LastSequence(nSeq) {}
|
2002-11-18 14:54:26 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CRevNames: public CNames
|
|
|
|
|
{
|
|
|
|
|
public:
|
2004-07-06 11:08:27 +00:00
|
|
|
|
void Insert( String aName, SmartId aUId, ULONG nSeq );
|
|
|
|
|
String GetName( SmartId aUId );
|
2002-11-18 14:54:26 +00:00
|
|
|
|
void Invalidate ( ULONG nSeq );
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SbxTransportMethod: public SbxMethod
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SbxTransportMethod( SbxDataType );
|
|
|
|
|
ULONG nValue;
|
|
|
|
|
String aUnoSlot;
|
|
|
|
|
};
|
|
|
|
|
SV_DECL_IMPL_REF(SbxTransportMethod);
|
|
|
|
|
|
|
|
|
|
class Controls: public SbxObject
|
|
|
|
|
{
|
|
|
|
|
public:
|
2006-06-19 23:27:23 +00:00
|
|
|
|
Controls( String aCName );
|
2002-11-18 14:54:26 +00:00
|
|
|
|
~Controls();
|
2006-04-19 13:16:11 +00:00
|
|
|
|
void ChangeListener( SbxObject* pParent );
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
|
|
|
|
void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
|
|
|
|
|
virtual SbxVariable* Find( const String&, SbxClassType );
|
|
|
|
|
SbxTransportMethodRef pMethodVar; // zum Transport von Find nach Notify
|
|
|
|
|
static CNames *pClasses;
|
|
|
|
|
static ControlDefLoad __READONLY_DATA arClasses [];
|
|
|
|
|
};
|
|
|
|
|
SV_DECL_IMPL_REF(Controls);
|
|
|
|
|
|
2004-06-23 11:26:26 +00:00
|
|
|
|
typedef std::map< String, String > Environment;
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
|
|
|
|
class ImplTestToolObj
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// ImplTestToolObj()
|
|
|
|
|
// ~ImplTestToolObj()
|
|
|
|
|
|
|
|
|
|
String ProgParam; // Parameter der zu Testenden APP; Gesetzt <20>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 aHIDDir; // Verzeichnis, in dem die hid.lst gesucht wird
|
|
|
|
|
|
|
|
|
|
SbxTransportMethodRef pNextReturn; // Verweis auf die Var, die den Returnwert aufnimmt.
|
|
|
|
|
|
|
|
|
|
ControlsRef pControlsObj; // Jeweiliges Objekt, an dem Methoden aufgerufen weden.
|
|
|
|
|
|
|
|
|
|
#define VAR_POOL_SIZE 8
|
|
|
|
|
SbxTransportMethodRef pMyVars[VAR_POOL_SIZE]; // Falls in Ausdr<64>cken mehrere verwendet werden
|
|
|
|
|
|
|
|
|
|
Time aServerTimeout;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Profiling Datenfelder
|
|
|
|
|
ULONG LocalStarttime;
|
|
|
|
|
USHORT nNumBorders;
|
|
|
|
|
ULONG naValBorders[4];
|
|
|
|
|
ULONG naNumEntries[5];
|
|
|
|
|
ULONG naRemoteTime[5];
|
|
|
|
|
ULONG naLocalTime[5];
|
|
|
|
|
|
|
|
|
|
ULONG nMinRemoteCommandDelay;
|
|
|
|
|
ULONG nMaxRemoteCommandDelay;
|
|
|
|
|
BOOL bDoRemoteCommandDelay;
|
|
|
|
|
|
|
|
|
|
BOOL bLnaguageExtensionLoaded; // Wurde <20>ber 'use' was geladen? F<>r syntax highlighting
|
|
|
|
|
SfxBroadcaster *pTTSfxBroadcaster;
|
|
|
|
|
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ULONG nErrorCount;
|
|
|
|
|
ULONG nWarningCount;
|
2004-08-02 14:49:38 +00:00
|
|
|
|
ULONG nQAErrorCount;
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ULONG nIncludeFileWarningCount;
|
|
|
|
|
|
|
|
|
|
SbxDimArrayRef xErrorList;
|
|
|
|
|
SbxDimArrayRef xWarningList;
|
2004-08-02 14:49:38 +00:00
|
|
|
|
SbxDimArrayRef xQAErrorList;
|
2004-01-19 16:52:48 +00:00
|
|
|
|
SbxDimArrayRef xIncludeFileWarningList;
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
|
|
|
|
BOOL bIsStart; // set tu TRUE while command Start is initiating the communication
|
|
|
|
|
|
|
|
|
|
MyBasic* pMyBasic;
|
|
|
|
|
|
|
|
|
|
String aTestCaseName; // holds name of current TestCase
|
|
|
|
|
String aTestCaseFileName; // holds FileName of current TestCase
|
|
|
|
|
USHORT nTestCaseLineNr; // holds Line of current TestCase
|
2003-03-18 15:03:50 +00:00
|
|
|
|
|
|
|
|
|
BOOL bEnableQaErrors; // include QA errors in report
|
|
|
|
|
BOOL bDebugFindNoErrors; // suppress generating errors when find of variables is called for variable viewing purposes
|
|
|
|
|
|
|
|
|
|
BOOL bStopOnSyntaxError; // catch syntax errors in testcases or not
|
2004-06-17 10:41:22 +00:00
|
|
|
|
|
|
|
|
|
Environment *pChildEnv; // Environment Variables for child Process
|
2002-11-18 14:54:26 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TTFormat
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static String ms2s( ULONG nMilliSeconds );
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2004-01-19 16:52:48 +00:00
|
|
|
|
#define ADD_TO_LOG( aLogTypep, aMsgp, aFilenamep, nLinep, nCol1p, nCol2p, aRevisionp, pLogList )\
|
2002-11-18 14:54:26 +00:00
|
|
|
|
{ \
|
|
|
|
|
TTLogMsg *pLogMsg = new TTLogMsg(); \
|
|
|
|
|
pLogMsg->aDebugData.aMsg = aMsgp; \
|
|
|
|
|
pLogMsg->aLogFileName = (pImpl->aLogFileBase + DirEntry(aLogFileName)).GetFull(); \
|
|
|
|
|
pLogMsg->aDebugData.aFilename = aFilenamep; \
|
|
|
|
|
pLogMsg->aDebugData.nLine = nLinep; \
|
|
|
|
|
pLogMsg->aDebugData.nCol1 = nCol1p; \
|
|
|
|
|
pLogMsg->aDebugData.nCol2 = nCol2p; \
|
|
|
|
|
pLogMsg->aDebugData.aLogType = aLogTypep; \
|
|
|
|
|
aLogHdl.Call( pLogMsg ); \
|
2006-06-19 23:27:23 +00:00
|
|
|
|
void* pDummyForWarningAboutNULL = pLogList; \
|
|
|
|
|
if( pDummyForWarningAboutNULL ) \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
{ \
|
|
|
|
|
SbxDimArray* pLogArray = (SbxDimArray*)pLogList; \
|
2006-06-19 23:27:23 +00:00
|
|
|
|
SbxVariable* pLogLine = new SbxVariable( SbxSTRING ); \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
String aCollect; \
|
|
|
|
|
aCollect.Append( pLogMsg->aDebugData.aFilename ); \
|
|
|
|
|
aCollect.AppendAscii( ";" ); \
|
|
|
|
|
aCollect.Append( String::CreateFromInt32( nLinep ) ); \
|
|
|
|
|
aCollect.AppendAscii( ";" ); \
|
|
|
|
|
aCollect.Append( aRevisionp ); \
|
|
|
|
|
aCollect.AppendAscii( ";" ); \
|
|
|
|
|
aCollect.Append( pLogMsg->aDebugData.aMsg ); \
|
2006-06-19 23:27:23 +00:00
|
|
|
|
pLogLine->PutString( aCollect ); \
|
|
|
|
|
pLogArray->Insert( pLogLine, pLogArray->Count() ); \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
} \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
delete pLogMsg; \
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define ADD_RUN_LOG() \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_TO_LOG(LOG_RUN, String(), String(), 0, 0, 0, String(), NULL) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
2004-01-19 16:52:48 +00:00
|
|
|
|
#define ADD_ERROR_LOG(aMsg, aFilename, nLine, nCol1, nCol2, aRevision) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
{ \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_TO_LOG(LOG_ERROR, aMsg, aFilename, nLine, nCol1, nCol2, aRevision, &pImpl->xErrorList) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
pImpl->nErrorCount++; \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define ADD_CALL_STACK_LOG(aMsg, aFilename, nLine, nCol1, nCol2) \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_TO_LOG(LOG_CALL_STACK, aMsg, aFilename, nLine, nCol1, nCol2, String(), NULL) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
|
|
|
|
|
2004-01-19 16:52:48 +00:00
|
|
|
|
#define ADD_AUTO_LOG(aLogType, aMsg, pLogList) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
{ \
|
|
|
|
|
if ( BasicRuntimeAccess::HasRuntime() ) \
|
|
|
|
|
{ \
|
|
|
|
|
BasicRuntime aRun = BasicRuntimeAccess::GetRuntime(); \
|
|
|
|
|
ADD_TO_LOG(aLogType, aMsg, aRun.GetModuleName(SbxNAME_SHORT_TYPES), \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
aRun.GetLine(), aRun.GetCol1(), aRun.GetCol2(), aRun.GetSourceRevision(), pLogList) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
} \
|
|
|
|
|
else \
|
|
|
|
|
{ \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_TO_LOG(aLogType, aMsg, UniString(), 0, 0, STRING_LEN, String(), pLogList) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
} \
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
|
|
#define ADD_CASE_LOG(aMsg) \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_AUTO_LOG(LOG_TEST_CASE, aMsg, NULL) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
|
|
|
|
#define ADD_MESSAGE_LOG(aMsg) \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_AUTO_LOG(LOG_MESSAGE, aMsg, NULL) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
|
|
|
|
#define ADD_WARNING_LOG(aMsg) \
|
|
|
|
|
{ \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_AUTO_LOG(LOG_WARNING, aMsg, &pImpl->xWarningList) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
pImpl->nWarningCount++; \
|
|
|
|
|
}
|
|
|
|
|
|
2004-01-19 16:52:48 +00:00
|
|
|
|
#define ADD_WARNING_LOG2(aMsg, aFilename, nLine ) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
{ \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_TO_LOG(LOG_WARNING, aMsg, aFilename, nLine, 0, STRING_LEN, String(), &pImpl->xWarningList) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
pImpl->nWarningCount++; \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define ADD_ASSERTION_LOG(aMsg) \
|
2004-01-19 16:52:48 +00:00
|
|
|
|
ADD_AUTO_LOG(LOG_ASSERTION, aMsg, NULL) \
|
2002-11-18 14:54:26 +00:00
|
|
|
|
|
2003-03-18 15:03:50 +00:00
|
|
|
|
#define ADD_QA_ERROR_LOG(aMsg) \
|
|
|
|
|
if ( pImpl->bEnableQaErrors ) \
|
|
|
|
|
{ \
|
2004-08-02 14:49:38 +00:00
|
|
|
|
ADD_AUTO_LOG(LOG_QA_ERROR, aMsg, &pImpl->xQAErrorList) \
|
|
|
|
|
pImpl->nQAErrorCount++; \
|
2003-03-18 15:03:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-11-18 14:54:26 +00:00
|
|
|
|
#endif
|