Kaydet (Commit) e6010b5e authored tarafından Gregor Hartmann's avatar Gregor Hartmann

testtool: fix libsts to work with old testtool

üst 5ac0207c
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* This file is intended to supply the types and defines for Environment independent * This file is intended to supply the types and defines for Environment independent
* building of the packethandler * building of the packethandler
* Only adaption of this file should be necessary. Else it is a bug! * Only adaption of this file should be necessary. Else it is a bug!
* Eather including apropriate files or defining the types when not available in the environment * Ether including apropriate files or defining the types when not available in the environment
* *
************************************************************************/ ************************************************************************/
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include <automation/commtypes.hxx> #include <automation/commtypes.hxx>
#include "icommstream.hxx" #include "icommstream.hxx"
#include "rtl/string.hxx"
class CmdBaseStream class CmdBaseStream
{ {
...@@ -57,8 +56,13 @@ public: ...@@ -57,8 +56,13 @@ public:
void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool ); void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool );
void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ); void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool );
void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr );
void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString );
void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool );
void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr );
// MacroRecorder // MacroRecorder
void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ); 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 );
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_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_BOOL bBool );
......
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
#define _RCONTROL_HXX #define _RCONTROL_HXX
#define UID_ACTIVE 0 #define UID_ACTIVE "UID_ACTIVE"
#define SI_IPCCommandBlock 1 #define SI_IPCCommandBlock 1
#define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal #define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal
#define SI_DirectCommandBlock 2 #define SI_DirectCommandBlock 2
#define SIControl 3 #define SIControl 3 // remove after numeric HelpIDs are completely removed and no legacy testtool is used anymore
#define SISlot 4 #define SISlot 4
#define SIFlow 5 #define SIFlow 5
#define SICommand 6 #define SICommand 6
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#define IDM_FILE 1 #define IDM_FILE 1
#define IDM_FILE_OPEN_TEST 2 #define IDM_FILE_OPEN_TEST 2
#define IDM_FILE_EXIT 3 #define IDM_FILE_EXIT 3
#define IDM_FILE_EXIT_HELP 4 #define IDM_FILE_EXIT_HELP "AUTOMATION_IDM_FILE_EXIT_HELP"
#define IDM_FILE_OPEN_TEST_HELP 1 #define IDM_FILE_OPEN_TEST_HELP "AUTOMATION_IDM_FILE_OPEN_TEST_HELP"
#define IDM_FILE_HELP 3 #define IDM_FILE_HELP "AUTOMATION_IDM_FILE_HELP"
#define GROSSER_TEST_DLG 256 #define GROSSER_TEST_DLG 256
#define IDM_TEST 5 #define IDM_TEST 5
#define IDM_TEST_GROSS 6 #define IDM_TEST_GROSS 6
......
...@@ -54,6 +54,7 @@ ModalDialog GROSSER_TEST_DLG ...@@ -54,6 +54,7 @@ ModalDialog GROSSER_TEST_DLG
}; };
OKButton 1 OKButton 1
{ {
HelpID = "hid1" ;
Pos = MAP_APPFONT ( 132 , 92 ) ; Pos = MAP_APPFONT ( 132 , 92 ) ;
Size = MAP_APPFONT ( 64 , 12 ) ; Size = MAP_APPFONT ( 64 , 12 ) ;
TabStop = TRUE ; TabStop = TRUE ;
...@@ -175,6 +176,7 @@ Menu MENU_CLIENT ...@@ -175,6 +176,7 @@ Menu MENU_CLIENT
MenuItem MenuItem
{ {
Identifier = IDM_FILE ; Identifier = IDM_FILE ;
HelpID = IDM_FILE_HELP ;
Text = "~File" ; Text = "~File" ;
SubMenu = Menu SubMenu = Menu
{ {
...@@ -183,6 +185,7 @@ Menu MENU_CLIENT ...@@ -183,6 +185,7 @@ Menu MENU_CLIENT
MenuItem MenuItem
{ {
Identifier = IDM_FILE_OPEN_TEST ; Identifier = IDM_FILE_OPEN_TEST ;
HelpID = IDM_FILE_OPEN_TEST_HELP ;
Text = "~Open Test Window" ; Text = "~Open Test Window" ;
}; };
MenuItem MenuItem
...@@ -193,6 +196,7 @@ Menu MENU_CLIENT ...@@ -193,6 +196,7 @@ Menu MENU_CLIENT
MenuItem MenuItem
{ {
Identifier = IDM_FILE_EXIT ; Identifier = IDM_FILE_EXIT ;
HelpID = IDM_FILE_EXIT_HELP ;
Text = "~Beenden" ; Text = "~Beenden" ;
AccelKey = KeyCode AccelKey = KeyCode
{ {
......
...@@ -458,7 +458,7 @@ void StatementCommand::HandleSAXParser() ...@@ -458,7 +458,7 @@ void StatementCommand::HandleSAXParser()
{ {
if ( !pSAXParser->Parse( PARSE_ONLY ) ) if ( !pSAXParser->Parse( PARSE_ONLY ) )
ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) ); ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) );
pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetErrors() ); pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetErrors() );
} }
xParserKeepaliveReference.clear(); xParserKeepaliveReference.clear();
...@@ -488,7 +488,7 @@ void StatementCommand::HandleSAXParser() ...@@ -488,7 +488,7 @@ void StatementCommand::HandleSAXParser()
if ( !pSAXParser->Parse( aAction ) ) if ( !pSAXParser->Parse( aAction ) )
ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) ); ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) );
pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetErrors() ); pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetErrors() );
} }
} }
else else
...@@ -497,7 +497,7 @@ void StatementCommand::HandleSAXParser() ...@@ -497,7 +497,7 @@ void StatementCommand::HandleSAXParser()
break; break;
case RC_SAXGetNodeType: case RC_SAXGetNodeType:
{ {
pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() ); pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() );
} }
break; break;
case RC_SAXGetAttributeCount: case RC_SAXGetAttributeCount:
...@@ -512,23 +512,23 @@ void StatementCommand::HandleSAXParser() ...@@ -512,23 +512,23 @@ void StatementCommand::HandleSAXParser()
switch ( nMethodId ) switch ( nMethodId )
{ {
case RC_SAXGetElementName: case RC_SAXGetElementName:
pRet->GenReturn ( RET_Value, aSmartMethodId, pElementNode->GetNodeName() ); pRet->GenReturn ( RET_Value, nMethodId, pElementNode->GetNodeName() );
break; break;
case RC_SAXGetChildCount: case RC_SAXGetChildCount:
pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pElementNode->GetChildCount() ); pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pElementNode->GetChildCount() );
break; break;
case RC_SAXGetAttributeCount: case RC_SAXGetAttributeCount:
if ( xAttributeList.is() ) if ( xAttributeList.is() )
pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)xAttributeList->getLength() ); pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)xAttributeList->getLength() );
else else
pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)0 ); pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)0 );
break; break;
case RC_SAXGetAttributeName: case RC_SAXGetAttributeName:
{ {
if( (nParams & PARAM_USHORT_1) && ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) ) if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
{ {
String aRet( xAttributeList->getNameByIndex( nNr1-1 ) ); String aRet( xAttributeList->getNameByIndex( nNr1-1 ) );
pRet->GenReturn ( RET_Value, aSmartMethodId, aRet ); pRet->GenReturn ( RET_Value, nMethodId, aRet );
} }
else else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
...@@ -537,15 +537,15 @@ void StatementCommand::HandleSAXParser() ...@@ -537,15 +537,15 @@ void StatementCommand::HandleSAXParser()
case RC_SAXGetAttributeValue: case RC_SAXGetAttributeValue:
// Number or String // Number or String
{ {
if( (nParams & PARAM_USHORT_1) && ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) ) if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
{ {
String aRet( xAttributeList->getValueByIndex( nNr1-1 ) ); String aRet( xAttributeList->getValueByIndex( nNr1-1 ) );
pRet->GenReturn ( RET_Value, aSmartMethodId, aRet ); pRet->GenReturn ( RET_Value, nMethodId, aRet );
} }
else if( (nParams & PARAM_STR_1) && xAttributeList.is() ) else if( (nParams & PARAM_STR_1) && xAttributeList.is() )
{ {
String aRet( xAttributeList->getValueByName( aString1 ) ); String aRet( xAttributeList->getValueByName( aString1 ) );
pRet->GenReturn ( RET_Value, aSmartMethodId, aRet ); pRet->GenReturn ( RET_Value, nMethodId, aRet );
} }
else else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
...@@ -566,7 +566,7 @@ void StatementCommand::HandleSAXParser() ...@@ -566,7 +566,7 @@ void StatementCommand::HandleSAXParser()
{ {
NodeRef xNode=pSAXParser->GetCurrentNode(); NodeRef xNode=pSAXParser->GetCurrentNode();
CharacterNode* aCharacterNode = (CharacterNode*)(&xNode); CharacterNode* aCharacterNode = (CharacterNode*)(&xNode);
pRet->GenReturn ( RET_Value, aSmartMethodId, aCharacterNode->GetCharacters() ); pRet->GenReturn ( RET_Value, nMethodId, aCharacterNode->GetCharacters() );
} }
else else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
...@@ -584,15 +584,15 @@ void StatementCommand::HandleSAXParser() ...@@ -584,15 +584,15 @@ void StatementCommand::HandleSAXParser()
if ( nNr1 == 0 ) if ( nNr1 == 0 )
{ {
if ( bCheckOnly ) if ( bCheckOnly )
pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetCurrentNode()->GetParent().Is() ); pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetCurrentNode()->GetParent().Is() );
else if ( pSAXParser->GetCurrentNode()->GetParent().Is() ) else if ( pSAXParser->GetCurrentNode()->GetParent().Is() )
pSAXParser->SetCurrentNode( pSAXParser->GetCurrentNode()->GetParent() ); pSAXParser->SetCurrentNode( pSAXParser->GetCurrentNode()->GetParent() );
} }
else if ( !pElementNode ) else if ( !pElementNode )
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
else if ( bCheckOnly ) else if ( bCheckOnly )
pRet->GenReturn ( RET_Value, aSmartMethodId, ValueOK( aSmartMethodId, String(), nNr1, pElementNode->GetChildCount() ) ); pRet->GenReturn ( RET_Value, nMethodId, ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) );
else if ( ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) ) else if ( ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) )
pSAXParser->SetCurrentNode( pElementNode->GetChild( nNr1-1 ) ); pSAXParser->SetCurrentNode( pElementNode->GetChild( nNr1-1 ) );
} }
else if( (nParams & PARAM_STR_1) ) else if( (nParams & PARAM_STR_1) )
...@@ -600,7 +600,7 @@ void StatementCommand::HandleSAXParser() ...@@ -600,7 +600,7 @@ void StatementCommand::HandleSAXParser()
if ( aString1.EqualsAscii( "/" ) ) if ( aString1.EqualsAscii( "/" ) )
{ {
if ( bCheckOnly ) if ( bCheckOnly )
pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)TRUE ); pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)TRUE );
else else
pSAXParser->SetCurrentNode( pSAXParser->GetRootNode() ); pSAXParser->SetCurrentNode( pSAXParser->GetRootNode() );
} }
...@@ -609,7 +609,7 @@ void StatementCommand::HandleSAXParser() ...@@ -609,7 +609,7 @@ void StatementCommand::HandleSAXParser()
ULONG nTimestamp = (ULONG)aString1.GetToken( 1, ':' ).ToInt64(); ULONG nTimestamp = (ULONG)aString1.GetToken( 1, ':' ).ToInt64();
ULONG nPointer = (ULONG)aString1.GetToken( 2, ':' ).ToInt64(); ULONG nPointer = (ULONG)aString1.GetToken( 2, ':' ).ToInt64();
if ( bCheckOnly ) if ( bCheckOnly )
pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) ); pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) );
else else
if ( pSAXParser->GetTimestamp() == nTimestamp ) if ( pSAXParser->GetTimestamp() == nTimestamp )
{ {
...@@ -652,7 +652,7 @@ void StatementCommand::HandleSAXParser() ...@@ -652,7 +652,7 @@ void StatementCommand::HandleSAXParser()
xNew.Clear(); xNew.Clear();
} }
if ( bCheckOnly ) if ( bCheckOnly )
pRet->GenReturn ( RET_Value, aSmartMethodId, xNew.Is() ); pRet->GenReturn ( RET_Value, nMethodId, xNew.Is() );
else else
if ( xNew.Is() ) if ( xNew.Is() )
pSAXParser->SetCurrentNode( xNew ); pSAXParser->SetCurrentNode( xNew );
...@@ -661,7 +661,7 @@ void StatementCommand::HandleSAXParser() ...@@ -661,7 +661,7 @@ void StatementCommand::HandleSAXParser()
} }
else else
if ( bCheckOnly ) if ( bCheckOnly )
pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)FALSE ); pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)FALSE );
else else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
} }
...@@ -679,7 +679,7 @@ void StatementCommand::HandleSAXParser() ...@@ -679,7 +679,7 @@ void StatementCommand::HandleSAXParser()
NodeRef xNode=pSAXParser->GetCurrentNode(); NodeRef xNode=pSAXParser->GetCurrentNode();
Node* pNode = (Node*)(&xNode); Node* pNode = (Node*)(&xNode);
aPath.Append( String::CreateFromInt64( (ULONG)pNode ) ); aPath.Append( String::CreateFromInt64( (ULONG)pNode ) );
pRet->GenReturn ( RET_Value, aSmartMethodId, aPath ); pRet->GenReturn ( RET_Value, nMethodId, aPath );
} }
break; break;
......
...@@ -102,6 +102,43 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG ...@@ -102,6 +102,43 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG
Write(bBool); Write(bBool);
} }
void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
Write(nMethod);
Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter
Write(nNr);
}
void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
Write(nMethod);
Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter
Write(pString);
}
void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
Write(nMethod);
Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(bBool);
}
void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr )
{
Write(comm_USHORT(SIReturn));
Write(nRet);
Write(nMethod);
Write(comm_USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter
Write(nNr);
}
// MacroRecorder // MacroRecorder
void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ) void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod )
{ {
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove // MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_automation.hxx" #include "precompiled_automation.hxx"
#include <tools/stream.hxx> #include <tools/stream.hxx>
#include <basic/ttstrhlp.hxx>
#include "retstrm.hxx" #include "retstrm.hxx"
#include "rcontrol.hxx" #include "rcontrol.hxx"
...@@ -57,20 +58,12 @@ void RetStream::GenReturn ( USHORT nRet, rtl::OString aUId, String aString ) ...@@ -57,20 +58,12 @@ void RetStream::GenReturn ( USHORT nRet, rtl::OString aUId, String aString )
CmdBaseStream::GenReturn ( nRet, &aUId, &aString ); CmdBaseStream::GenReturn ( nRet, &aUId, &aString );
} }
void RetStream::GenReturn ( USHORT nRet, rtl::OString aUId, SbxValue &aValue )
{
Write(USHORT(SIReturn));
Write(nRet);
Write(&aUId);
Write(USHORT(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter
Write(aValue);
}
void RetStream::GenReturn ( USHORT nRet, rtl::OString aUId, comm_ULONG nNr, String aString, BOOL bBool ) void RetStream::GenReturn ( USHORT nRet, rtl::OString aUId, comm_ULONG nNr, String aString, BOOL bBool )
{ {
CmdBaseStream::GenReturn ( nRet, &aUId, nNr, &aString, bBool ); CmdBaseStream::GenReturn ( nRet, &aUId, nNr, &aString, bBool );
} }
// MacroRecorder
void RetStream::GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ) void RetStream::GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString )
{ {
CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString ); CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString );
...@@ -82,6 +75,23 @@ void RetStream::GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, ...@@ -82,6 +75,23 @@ void RetStream::GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod,
} }
void RetStream::GenReturn ( USHORT nRet, USHORT nMethod, SbxValue &aValue )
{
Write(USHORT(SIReturn));
Write(nRet);
Write((ULONG)nMethod); //HELPID BACKWARD (no ULONG needed)
Write(USHORT(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter
Write(aValue);
}
void RetStream::GenReturn( USHORT nRet, USHORT nMethod, String aString )
{
CmdBaseStream::GenReturn ( nRet, nMethod, &aString );
}
void RetStream::Write( String *pString ) void RetStream::Write( String *pString )
{ {
CmdBaseStream::Write( pString->GetBuffer(), pString->Len() ); CmdBaseStream::Write( pString->GetBuffer(), pString->Len() );
...@@ -95,19 +105,9 @@ void RetStream::Write( SbxValue &aValue ) ...@@ -95,19 +105,9 @@ void RetStream::Write( SbxValue &aValue )
void RetStream::Write( rtl::OString* pId ) void RetStream::Write( rtl::OString* pId )
{ {
// FIXME: HELPID //HELPID BACKWARD (should use ByteString or OString)
#if 0 String aTmp( Id2Str( *pId ) );
DBG_ASSERT( !pId->HasString() || !pId->HasNumeric(), "rtl::OString contains Number and String. using String only." ); Write( &aTmp );
if ( pId->HasString() )
{
String aTmp( pId->GetStr() );
Write( &aTmp );
}
else
Write( static_cast<comm_ULONG>(pId->GetNum()) ); ////GetNum() ULONG != comm_ULONG on 64bit
#else
(void)pId;
#endif
} }
......
...@@ -48,15 +48,24 @@ public: ...@@ -48,15 +48,24 @@ public:
void GenReturn( comm_USHORT nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );} void GenReturn( comm_USHORT nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );}
void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );} void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );}
void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );} void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );}
// needed for RemoteCommand and Profiling
void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nMethod, nNr );}
void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, nMethod, bBool );}
// MacroRecorder // MacroRecorder
void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} 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_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_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );}
// new // new
void GenReturn( USHORT nRet, rtl::OString aUId, String aString ); void GenReturn( USHORT nRet, rtl::OString aUId, String aString );
void GenReturn( USHORT nRet, rtl::OString aUId, SbxValue &aValue );
void GenReturn( USHORT nRet, rtl::OString aUId, comm_ULONG nNr, String aString, BOOL bBool ); void GenReturn( USHORT nRet, rtl::OString aUId, comm_ULONG nNr, String aString, BOOL bBool );
void GenReturn( USHORT nRet, USHORT nMethod, SbxValue &aValue );
// and Profiling
void GenReturn( USHORT nRet, USHORT nMethod, String aString );
// MacroRecorder // MacroRecorder
void GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ); void GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString );
void GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, BOOL bBool ); void GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, BOOL bBool );
......
...@@ -857,6 +857,9 @@ ImplRemoteControl::ImplRemoteControl() ...@@ -857,6 +857,9 @@ ImplRemoteControl::ImplRemoteControl()
m_pDbgWin = new EditWindow( NULL, CUniString("Debug Window"), WB_VSCROLL ); m_pDbgWin = new EditWindow( NULL, CUniString("Debug Window"), WB_VSCROLL );
m_pDbgWin->bQuiet = TRUE; m_pDbgWin->bQuiet = TRUE;
m_pDbgWin->Hide(); m_pDbgWin->Hide();
m_pDbgWin->bQuiet = FALSE;
m_pDbgWin->Show();
StatementList::m_pDbgWin = m_pDbgWin; StatementList::m_pDbgWin = m_pDbgWin;
} }
#endif #endif
...@@ -869,6 +872,7 @@ ImplRemoteControl::ImplRemoteControl() ...@@ -869,6 +872,7 @@ ImplRemoteControl::ImplRemoteControl()
#else #else
pServiceMgr = new RemoteControlCommunicationManager(); pServiceMgr = new RemoteControlCommunicationManager();
#endif #endif
fprintf(stderr, "%s\n", "Start RemoteControlCommunicationManager");
pServiceMgr->SetDataReceivedHdl( LINK( this, ImplRemoteControl, QueCommandsEvent ) ); pServiceMgr->SetDataReceivedHdl( LINK( this, ImplRemoteControl, QueCommandsEvent ) );
pServiceMgr->StartCommunication(); pServiceMgr->StartCommunication();
...@@ -882,6 +886,7 @@ ImplRemoteControl::ImplRemoteControl() ...@@ -882,6 +886,7 @@ ImplRemoteControl::ImplRemoteControl()
} }
if ( RemoteControlCommunicationManager::nComm ) if ( RemoteControlCommunicationManager::nComm )
new ExtraIdle( this ); // Setzt die Bearbeitung wieder auf new ExtraIdle( this ); // Setzt die Bearbeitung wieder auf
fprintf(stderr, "%s\n", "end of ImplRemoteControl::ImplRemoteControl()");
} }
ImplRemoteControl::~ImplRemoteControl() ImplRemoteControl::~ImplRemoteControl()
...@@ -951,6 +956,7 @@ static ::osl::Mutex aMutex; ...@@ -951,6 +956,7 @@ static ::osl::Mutex aMutex;
static RemoteControl* pRemoteControl = 0; static RemoteControl* pRemoteControl = 0;
extern "C" void CreateRemoteControl() extern "C" void CreateRemoteControl()
{ {
fprintf(stderr, "%s\n", "CreateRemoteControl");
if ( !pRemoteControl ) if ( !pRemoteControl )
{ {
::osl::MutexGuard aGuard( aMutex ); ::osl::MutexGuard aGuard( aMutex );
......
...@@ -84,9 +84,9 @@ rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString(); ...@@ -84,9 +84,9 @@ rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString();
rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString(); rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString();
USHORT StatementList::nUseBindings = 0; USHORT StatementList::nUseBindings = 0;
rtl::OString StatementList::aSubMenuId1 = rtl::OString(); // Untermens bei PopupMenus USHORT StatementList::aSubMenuId1 = 0; // Untermens bei PopupMenus
rtl::OString StatementList::aSubMenuId2 = rtl::OString(); // erstmal 2-Stufig USHORT StatementList::aSubMenuId2 = 0; // erstmal 2-Stufig
rtl::OString StatementList::aSubMenuId3 = rtl::OString(); // and now even 3 levels #i31512# USHORT StatementList::aSubMenuId3 = 0; // and now even 3 levels #i31512#
SystemWindow *StatementList::pMenuWindow = NULL; SystemWindow *StatementList::pMenuWindow = NULL;
TTProperties *StatementList::pTTProperties = NULL; TTProperties *StatementList::pTTProperties = NULL;
...@@ -131,7 +131,7 @@ TTSettings* GetTTSettings() ...@@ -131,7 +131,7 @@ TTSettings* GetTTSettings()
// FIXME: HELPID // FIXME: HELPID
#define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "4321" ) && pWin->GetUniqueId().equals( "1234" )) #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( ULONG nResId ) { return ResString( nResId ); } UniString GEN_RES_STR0( ULONG nResId ) { return ResString( nResId ); }
...@@ -156,7 +156,7 @@ void StatementList::InitProfile() ...@@ -156,7 +156,7 @@ void StatementList::InitProfile()
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
if ( pCurrentProfileStatement != NULL && pCurrentProfileStatement != this ) if ( pCurrentProfileStatement != NULL && pCurrentProfileStatement != this )
pRet->GenReturn( RET_ProfileInfo, rtl::OString(), CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") ); pRet->GenReturn( RET_ProfileInfo, 0, CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") );
#endif #endif
pCurrentProfileStatement = this; pCurrentProfileStatement = this;
} }
...@@ -172,19 +172,19 @@ void StatementList::SendProfile( String aText ) ...@@ -172,19 +172,19 @@ void StatementList::SendProfile( String aText )
pProfiler->EndProfileInterval(); pProfiler->EndProfileInterval();
if ( pProfiler->IsProfilingPerCommand() ) if ( pProfiler->IsProfilingPerCommand() )
pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetProfileLine( aText ) ); pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileLine( aText ) );
if ( pProfiler->IsPartitioning() ) if ( pProfiler->IsPartitioning() )
// FIXME: HELPID // FIXME: HELPID
pRet->GenReturn( RET_ProfileInfo, rtl::OString( /*S_ProfileTime*/ ), static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() ULONG != comm_ULONG on 64bit pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() ULONG != comm_ULONG on 64bit
} }
if ( pProfiler->IsAutoProfiling() ) if ( pProfiler->IsAutoProfiling() )
pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetAutoProfiling() ); pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
if ( pCurrentProfileStatement == NULL ) if ( pCurrentProfileStatement == NULL )
pRet->GenReturn( RET_ProfileInfo, rtl::OString(), CUniString("SendProfile ohne InitProfile\n") ); pRet->GenReturn( RET_ProfileInfo, 0, CUniString("SendProfile ohne InitProfile\n") );
#endif #endif
pCurrentProfileStatement = NULL; pCurrentProfileStatement = NULL;
} }
...@@ -392,9 +392,7 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May ...@@ -392,9 +392,7 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May
BOOL SearchUID::IsWinOK( Window *pWin ) BOOL SearchUID::IsWinOK( Window *pWin )
{ {
// FIXME: HELPID if ( aUId.equals( pWin->GetUniqueOrHelpId() ) )
#if 0
if ( aUId.Matches( pWin->GetUniqueOrHelpId() ) )
{ {
if ( ( pWin->IsEnabled() || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pWin->IsVisible() ) if ( ( pWin->IsEnabled() || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pWin->IsVisible() )
return TRUE; return TRUE;
...@@ -411,7 +409,7 @@ BOOL SearchUID::IsWinOK( Window *pWin ) ...@@ -411,7 +409,7 @@ BOOL SearchUID::IsWinOK( Window *pWin )
USHORT i; USHORT i;
for ( i = 0; i < pTB->GetItemCount() ; i++ ) for ( i = 0; i < pTB->GetItemCount() ; i++ )
{ {
if ( aUId.Matches( pTB->GetItemCommand(pTB->GetItemId( i )) ) || aUId.Matches( pTB->GetHelpId(pTB->GetItemId( i )) ) ) if ( aUId.equals( Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ) ) || aUId.equals( pTB->GetHelpId(pTB->GetItemId( i )) ) )
{ // ID matches. { // ID matches.
Window *pItemWin; Window *pItemWin;
pItemWin = pTB->GetItemWindow( pTB->GetItemId( i ) ); pItemWin = pTB->GetItemWindow( pTB->GetItemId( i ) );
...@@ -456,9 +454,6 @@ BOOL SearchUID::IsWinOK( Window *pWin ) ...@@ -456,9 +454,6 @@ BOOL SearchUID::IsWinOK( Window *pWin )
return FALSE; return FALSE;
} }
else else
#else
(void)pWin;
#endif
return FALSE; return FALSE;
} }
...@@ -981,8 +976,7 @@ String StatementList::ClientTree(Window *pBase, int Indent) ...@@ -981,8 +976,7 @@ String StatementList::ClientTree(Window *pBase, int Indent)
WRITE(sIndent); WRITE(sIndent);
WRITEc("UId : "); WRITEc("UId : ");
// FIXME: HELPID WRITE(Id2Str(pBase->GetUniqueOrHelpId()));
WRITE(String(rtl::OStringToOUString(pBase->GetUniqueOrHelpId(), RTL_TEXTENCODING_UTF8)));
WRITEc(":0x"); WRITEc(":0x");
WRITE( WRITE(
String::CreateFromInt64( String::CreateFromInt64(
...@@ -1039,7 +1033,7 @@ BOOL StatementList::CheckWindowWait() ...@@ -1039,7 +1033,7 @@ BOOL StatementList::CheckWindowWait()
if ( WinPtrValid(pWindowWaitPointer) && IS_WINP_CLOSING(pWindowWaitPointer) ) if ( WinPtrValid(pWindowWaitPointer) && IS_WINP_CLOSING(pWindowWaitPointer) )
{ {
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( aWindowWaitUId.GetText().AppendAscii(" Still Open. RType=") ); m_pDbgWin->AddText( Id2Str(aWindowWaitUId).AppendAscii(" Still Open. RType=") );
m_pDbgWin->AddText( String::CreateFromInt32( pWindowWaitPointer->GetType() ).AppendAscii("\n") ); m_pDbgWin->AddText( String::CreateFromInt32( pWindowWaitPointer->GetType() ).AppendAscii("\n") );
#endif #endif
...@@ -1049,7 +1043,6 @@ BOOL StatementList::CheckWindowWait() ...@@ -1049,7 +1043,6 @@ BOOL StatementList::CheckWindowWait()
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Close timed out. Going on!! " ); m_pDbgWin->AddText( "Close timed out. Going on!! " );
#endif #endif
// FIXME: HELPID
pWindowWaitPointer->SetHelpId(aWindowWaitOldHelpId); pWindowWaitPointer->SetHelpId(aWindowWaitOldHelpId);
pWindowWaitPointer->SetUniqueId(aWindowWaitOldUniqueId); pWindowWaitPointer->SetUniqueId(aWindowWaitOldUniqueId);
...@@ -1090,9 +1083,7 @@ void StatementList::ReportError(String aMessage, ULONG nWhatever) ...@@ -1090,9 +1083,7 @@ void StatementList::ReportError(String aMessage, ULONG nWhatever)
void StatementList::DirectLog( ULONG nType, String aMessage ) void StatementList::DirectLog( ULONG nType, String aMessage )
{ {
if ( pRet ) if ( pRet )
// FIXME: HELPID pRet->GenReturn( RET_DirectLoging, nType, aMessage );
pRet->GenReturn( RET_DirectLoging, rtl::OString(/*nType*/), aMessage );
(void) nType;
} }
......
...@@ -293,9 +293,9 @@ public: ...@@ -293,9 +293,9 @@ public:
static BOOL bDying; static BOOL bDying;
static BOOL bExecuting; // Gesetzt, wenn ein Befehl rescheduled ohne einen neuen Befehl zu erlauben static BOOL bExecuting; // Gesetzt, wenn ein Befehl rescheduled ohne einen neuen Befehl zu erlauben
BOOL bWasExecuting; // Wurde bei einem MaybeResetSafeReschedule resettet, so wird der Zustand danach wiederhergestellt BOOL bWasExecuting; // Wurde bei einem MaybeResetSafeReschedule resettet, so wird der Zustand danach wiederhergestellt
static rtl::OString aSubMenuId1; // Untermens bei PopupMenus static USHORT aSubMenuId1; // Untermens bei PopupMenus
static rtl::OString aSubMenuId2; // erstmal 2-Stufig static USHORT aSubMenuId2; // erstmal 2-Stufig
static rtl::OString aSubMenuId3; // and now even 3 levels #i31512# static USHORT aSubMenuId3; // and now even 3 levels #i31512#
static SystemWindow *pMenuWindow; // when using MenuBar as base for MenuCommands static SystemWindow *pMenuWindow; // when using MenuBar as base for MenuCommands
static TTProperties *pTTProperties; // Hier stehen die SlotIDs aus dem SFX drin static TTProperties *pTTProperties; // Hier stehen die SlotIDs aus dem SFX drin
...@@ -349,7 +349,6 @@ class StatementCommand : public StatementList // Befehl ausf ...@@ -349,7 +349,6 @@ class StatementCommand : public StatementList // Befehl ausf
friend class ImplRemoteControl; friend class ImplRemoteControl;
protected: protected:
USHORT nMethodId; USHORT nMethodId;
rtl::OString aSmartMethodId;
USHORT nParams; USHORT nParams;
comm_USHORT nNr1,nNr2,nNr3,nNr4; comm_USHORT nNr1,nNr2,nNr3,nNr4;
comm_ULONG nLNr1; comm_ULONG nLNr1;
......
...@@ -3469,11 +3469,9 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) ...@@ -3469,11 +3469,9 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
// ULONG nHintUserData = pImpl->pNextReturn->GetParent()->GetUserData(); // ULONG nHintUserData = pImpl->pNextReturn->GetParent()->GetUserData();
// pImpl->pNextReturn->GetParent()->SetUserData(0); // pImpl->pNextReturn->GetParent()->SetUserData(0);
// if ( nUId == pImpl->pNextReturn->GetParent()->GetULong() ) // if ( nUId == pImpl->pNextReturn->GetParent()->GetULong() )
// FIXME: HELPID if ( aNextReturnId.equals( aUId ) )
#if 0
if ( aNextReturnId.Matches( aUId ) )
{ {
if( nParams & PARAM_ULONG_1 ) if( nParams & PARAM_ULONG_1 ) // FIXME this is to allow negative numbers, hoping that no large numbers are interpreted wrong. should have new PARAM_LONG_1 instead
{ {
if ( nLNr1 > 0x7fffffff ) if ( nLNr1 > 0x7fffffff )
pImpl->pNextReturn->PutLong( long(nLNr1 - 0xffffffff) -1 ); pImpl->pNextReturn->PutLong( long(nLNr1 - 0xffffffff) -1 );
...@@ -3483,7 +3481,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) ...@@ -3483,7 +3481,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if( nParams & PARAM_USHORT_1 ) pImpl->pNextReturn->PutUShort( nNr1 ); if( nParams & PARAM_USHORT_1 ) pImpl->pNextReturn->PutUShort( nNr1 );
if( nParams & PARAM_STR_1 ) pImpl->pNextReturn->PutString( aString1 ); if( nParams & PARAM_STR_1 ) pImpl->pNextReturn->PutString( aString1 );
if( nParams & PARAM_BOOL_1 ) pImpl->pNextReturn->PutBool( bBool1 ); if( nParams & PARAM_BOOL_1 ) pImpl->pNextReturn->PutBool( bBool1 );
if( nParams & PARAM_SBXVALUE_1 ) if( nParams & PARAM_SBXVALUE_1 ) // FIXME: allow generic datatype
{ {
SbxValues aValues( SbxDATE ); SbxValues aValues( SbxDATE );
xValue1->Get( aValues ); xValue1->Get( aValues );
...@@ -3494,7 +3492,6 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) ...@@ -3494,7 +3492,6 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{ {
ADD_ERROR(SbxERR_BAD_ACTION, GEN_RES_STR0(S_RETURNED_VALUE_ID_MISSMATCH) ) ADD_ERROR(SbxERR_BAD_ACTION, GEN_RES_STR0(S_RETURNED_VALUE_ID_MISSMATCH) )
} }
#endif
// pImpl->pNextReturn->GetParent()->SetUserData(nHintUserData); // pImpl->pNextReturn->GetParent()->SetUserData(nHintUserData);
pImpl->pNextReturn = NULL; pImpl->pNextReturn = NULL;
} }
......
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment