summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
authorGregor Hartmann <gh <Gregor Hartmann<gh@openoffice.org>2010-08-27 14:05:36 +0200
committerGregor Hartmann <gh <Gregor Hartmann<gh@openoffice.org>2010-08-27 14:05:36 +0200
commite6010b5e704d62471fada5ea63c5d240507e8a3a (patch)
tree4804546455e73529592cc038149c5411de0f3f3e /automation
parent5ac0207cea354c8fff76c783bc90faa471868718 (diff)
testtool: fix libsts to work with old testtool
Diffstat (limited to 'automation')
-rw-r--r--automation/inc/automation/commtypes.hxx2
-rw-r--r--automation/source/inc/cmdbasestream.hxx8
-rw-r--r--automation/source/inc/rcontrol.hxx4
-rw-r--r--automation/source/miniapp/servres.hrc6
-rw-r--r--automation/source/miniapp/servres.src4
-rw-r--r--automation/source/server/XMLParser.cxx42
-rw-r--r--automation/source/server/cmdbasestream.cxx37
-rw-r--r--automation/source/server/recorder.cxx79
-rw-r--r--automation/source/server/retstrm.cxx44
-rw-r--r--automation/source/server/retstrm.hxx13
-rw-r--r--automation/source/server/server.cxx6
-rw-r--r--automation/source/server/sta_list.cxx37
-rw-r--r--automation/source/server/statemnt.cxx524
-rw-r--r--automation/source/server/statemnt.hxx7
-rw-r--r--automation/source/testtool/objtest.cxx9
-rw-r--r--[-rwxr-xr-x]automation/util/manually_added_ids.hid0
16 files changed, 335 insertions, 487 deletions
diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx
index a5a5437f0343..72a362e5e052 100644
--- a/automation/inc/automation/commtypes.hxx
+++ b/automation/inc/automation/commtypes.hxx
@@ -31,7 +31,7 @@
* This file is intended to supply the types and defines for Environment independent
* building of the packethandler
* 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
*
************************************************************************/
diff --git a/automation/source/inc/cmdbasestream.hxx b/automation/source/inc/cmdbasestream.hxx
index e192b66ed8b6..408492cd8ac9 100644
--- a/automation/source/inc/cmdbasestream.hxx
+++ b/automation/source/inc/cmdbasestream.hxx
@@ -38,7 +38,6 @@
#include <automation/commtypes.hxx>
#include "icommstream.hxx"
-#include "rtl/string.hxx"
class CmdBaseStream
{
@@ -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_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
- 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, comm_BOOL bBool );
void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool );
diff --git a/automation/source/inc/rcontrol.hxx b/automation/source/inc/rcontrol.hxx
index 7313603096b4..cf13fdadd469 100644
--- a/automation/source/inc/rcontrol.hxx
+++ b/automation/source/inc/rcontrol.hxx
@@ -37,13 +37,13 @@
#define _RCONTROL_HXX
-#define UID_ACTIVE 0
+#define UID_ACTIVE "UID_ACTIVE"
#define SI_IPCCommandBlock 1
#define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal
#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 SIFlow 5
#define SICommand 6
diff --git a/automation/source/miniapp/servres.hrc b/automation/source/miniapp/servres.hrc
index 2f95a34a60b6..6efd2ce57460 100644
--- a/automation/source/miniapp/servres.hrc
+++ b/automation/source/miniapp/servres.hrc
@@ -29,9 +29,9 @@
#define IDM_FILE 1
#define IDM_FILE_OPEN_TEST 2
#define IDM_FILE_EXIT 3
-#define IDM_FILE_EXIT_HELP 4
-#define IDM_FILE_OPEN_TEST_HELP 1
-#define IDM_FILE_HELP 3
+#define IDM_FILE_EXIT_HELP "AUTOMATION_IDM_FILE_EXIT_HELP"
+#define IDM_FILE_OPEN_TEST_HELP "AUTOMATION_IDM_FILE_OPEN_TEST_HELP"
+#define IDM_FILE_HELP "AUTOMATION_IDM_FILE_HELP"
#define GROSSER_TEST_DLG 256
#define IDM_TEST 5
#define IDM_TEST_GROSS 6
diff --git a/automation/source/miniapp/servres.src b/automation/source/miniapp/servres.src
index 8ba7d4923973..c1af1caa775a 100644
--- a/automation/source/miniapp/servres.src
+++ b/automation/source/miniapp/servres.src
@@ -54,6 +54,7 @@ ModalDialog GROSSER_TEST_DLG
};
OKButton 1
{
+ HelpID = "hid1" ;
Pos = MAP_APPFONT ( 132 , 92 ) ;
Size = MAP_APPFONT ( 64 , 12 ) ;
TabStop = TRUE ;
@@ -175,6 +176,7 @@ Menu MENU_CLIENT
MenuItem
{
Identifier = IDM_FILE ;
+ HelpID = IDM_FILE_HELP ;
Text = "~File" ;
SubMenu = Menu
{
@@ -183,6 +185,7 @@ Menu MENU_CLIENT
MenuItem
{
Identifier = IDM_FILE_OPEN_TEST ;
+ HelpID = IDM_FILE_OPEN_TEST_HELP ;
Text = "~Open Test Window" ;
};
MenuItem
@@ -193,6 +196,7 @@ Menu MENU_CLIENT
MenuItem
{
Identifier = IDM_FILE_EXIT ;
+ HelpID = IDM_FILE_EXIT_HELP ;
Text = "~Beenden" ;
AccelKey = KeyCode
{
diff --git a/automation/source/server/XMLParser.cxx b/automation/source/server/XMLParser.cxx
index 6e6c3dc859a7..e07f1654ecd5 100644
--- a/automation/source/server/XMLParser.cxx
+++ b/automation/source/server/XMLParser.cxx
@@ -458,7 +458,7 @@ void StatementCommand::HandleSAXParser()
{
if ( !pSAXParser->Parse( PARSE_ONLY ) )
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();
@@ -488,7 +488,7 @@ void StatementCommand::HandleSAXParser()
if ( !pSAXParser->Parse( aAction ) )
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
@@ -497,7 +497,7 @@ void StatementCommand::HandleSAXParser()
break;
case RC_SAXGetNodeType:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() );
}
break;
case RC_SAXGetAttributeCount:
@@ -512,23 +512,23 @@ void StatementCommand::HandleSAXParser()
switch ( nMethodId )
{
case RC_SAXGetElementName:
- pRet->GenReturn ( RET_Value, aSmartMethodId, pElementNode->GetNodeName() );
+ pRet->GenReturn ( RET_Value, nMethodId, pElementNode->GetNodeName() );
break;
case RC_SAXGetChildCount:
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pElementNode->GetChildCount() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pElementNode->GetChildCount() );
break;
case RC_SAXGetAttributeCount:
if ( xAttributeList.is() )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)xAttributeList->getLength() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)xAttributeList->getLength() );
else
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)0 );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)0 );
break;
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 ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aRet );
+ pRet->GenReturn ( RET_Value, nMethodId, aRet );
}
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
@@ -537,15 +537,15 @@ void StatementCommand::HandleSAXParser()
case RC_SAXGetAttributeValue:
// 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 ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aRet );
+ pRet->GenReturn ( RET_Value, nMethodId, aRet );
}
else if( (nParams & PARAM_STR_1) && xAttributeList.is() )
{
String aRet( xAttributeList->getValueByName( aString1 ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aRet );
+ pRet->GenReturn ( RET_Value, nMethodId, aRet );
}
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
@@ -566,7 +566,7 @@ void StatementCommand::HandleSAXParser()
{
NodeRef xNode=pSAXParser->GetCurrentNode();
CharacterNode* aCharacterNode = (CharacterNode*)(&xNode);
- pRet->GenReturn ( RET_Value, aSmartMethodId, aCharacterNode->GetCharacters() );
+ pRet->GenReturn ( RET_Value, nMethodId, aCharacterNode->GetCharacters() );
}
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
@@ -584,15 +584,15 @@ void StatementCommand::HandleSAXParser()
if ( nNr1 == 0 )
{
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() )
pSAXParser->SetCurrentNode( pSAXParser->GetCurrentNode()->GetParent() );
}
else if ( !pElementNode )
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
else if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, ValueOK( aSmartMethodId, String(), nNr1, pElementNode->GetChildCount() ) );
- else if ( ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) )
+ pRet->GenReturn ( RET_Value, nMethodId, ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) );
+ else if ( ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) )
pSAXParser->SetCurrentNode( pElementNode->GetChild( nNr1-1 ) );
}
else if( (nParams & PARAM_STR_1) )
@@ -600,7 +600,7 @@ void StatementCommand::HandleSAXParser()
if ( aString1.EqualsAscii( "/" ) )
{
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)TRUE );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)TRUE );
else
pSAXParser->SetCurrentNode( pSAXParser->GetRootNode() );
}
@@ -609,7 +609,7 @@ void StatementCommand::HandleSAXParser()
ULONG nTimestamp = (ULONG)aString1.GetToken( 1, ':' ).ToInt64();
ULONG nPointer = (ULONG)aString1.GetToken( 2, ':' ).ToInt64();
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) );
else
if ( pSAXParser->GetTimestamp() == nTimestamp )
{
@@ -652,7 +652,7 @@ void StatementCommand::HandleSAXParser()
xNew.Clear();
}
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, xNew.Is() );
+ pRet->GenReturn ( RET_Value, nMethodId, xNew.Is() );
else
if ( xNew.Is() )
pSAXParser->SetCurrentNode( xNew );
@@ -661,7 +661,7 @@ void StatementCommand::HandleSAXParser()
}
else
if ( bCheckOnly )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)FALSE );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)FALSE );
else
ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) );
}
@@ -679,7 +679,7 @@ void StatementCommand::HandleSAXParser()
NodeRef xNode=pSAXParser->GetCurrentNode();
Node* pNode = (Node*)(&xNode);
aPath.Append( String::CreateFromInt64( (ULONG)pNode ) );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aPath );
+ pRet->GenReturn ( RET_Value, nMethodId, aPath );
}
break;
diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx
index bd9f429b9e75..827ea93a4796 100644
--- a/automation/source/server/cmdbasestream.cxx
+++ b/automation/source/server/cmdbasestream.cxx
@@ -102,6 +102,43 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG
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
void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod )
{
diff --git a/automation/source/server/recorder.cxx b/automation/source/server/recorder.cxx
index 06446952f318..ac0b9db9aaf8 100644
--- a/automation/source/server/recorder.cxx
+++ b/automation/source/server/recorder.cxx
@@ -107,20 +107,17 @@ IMPL_LINK( MacroRecorder, HookRefreshHdl, void*, EMPTYARG )
void MacroRecorder::LogVCL( rtl::OString aParentID, USHORT nVCLWindowType, rtl::OString aID, String aMethod, USHORT nParam )
{
- // FIXME: HELPID
- ::comphelper::UiEventsLogger::logVcl( rtl::OStringToOUString( aParentID, RTL_TEXTENCODING_UTF8 ), nVCLWindowType, rtl::OStringToOUString( aID, RTL_TEXTENCODING_UTF8 ), aMethod, nParam );
+ ::comphelper::UiEventsLogger::logVcl( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod, nParam );
}
void MacroRecorder::LogVCL( rtl::OString aParentID, USHORT nVCLWindowType, rtl::OString aID, String aMethod )
{
- // FIXME: HELPID
- ::comphelper::UiEventsLogger::logVcl( rtl::OStringToOUString( aParentID, RTL_TEXTENCODING_UTF8 ), nVCLWindowType, rtl::OStringToOUString( aID, RTL_TEXTENCODING_UTF8 ), aMethod );
+ ::comphelper::UiEventsLogger::logVcl( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod );
}
Window* MacroRecorder::GetParentWithID( Window* pThis )
{
Window *pOverlap = pThis->GetWindow( WINDOW_OVERLAP );
- // FIXME: HELPID
while ( pOverlap != pThis && !pThis->GetUniqueOrHelpId().getLength() && pThis->GET_REAL_PARENT() )
pThis = pThis->GET_REAL_PARENT();
return pThis;
@@ -128,7 +125,6 @@ Window* MacroRecorder::GetParentWithID( Window* pThis )
rtl::OString MacroRecorder::GetParentID( Window* pThis )
{
- // FIXME: HELPID
if ( pThis->GetParent() )
return pThis->GetParent()->GetUniqueOrHelpId();
else
@@ -197,15 +193,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case VCLEVENT_WINDOW_ACTIVATE:
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
- StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pWin->GetUniqueOrHelpId().GetNum()) ); //GetNum() ULONG != comm_ULONG on 64bit
- #endif
+ StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), Id2Str( pWin->GetUniqueOrHelpId() ) );
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("SetPage") );
}
break;
@@ -221,15 +213,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Check );
- #endif
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Check") );
}
}
@@ -255,15 +243,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), nMethod );
- #endif
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod );
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
}
}
@@ -293,15 +277,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case VCLEVENT_LISTBOX_SELECT:
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) );
- #endif
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Select"), ((ListBox*)pWin)->GetSelectEntryPos() );
}
break;
@@ -332,16 +312,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
Sound::Beep();
else
{
- // FIXME: HELPID
- #if 0
StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, (comm_ULONG) nPos+1 );
- #endif
bSendData = TRUE;
}
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Select"), nPos );
}
}
@@ -358,7 +334,6 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case VCLEVENT_BUTTON_CLICK:
Window* pParent = pWin->GetParent();
BOOL bDone = FALSE;
- // FIXME: HELPID
if ( pParent->IsDialog() && !pWin->GetUniqueOrHelpId().getLength() )
{
switch ( pParent->GetType() )
@@ -398,22 +373,17 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
if ( nMethod != M_Click )
- StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString( 0 ), nMethod );
+ StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod );
else
- StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString( 0 ), nMethod, (comm_ULONG)nCurrentButtonId );
- #endif
+ StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod, (comm_ULONG)nCurrentButtonId );
bSendData = TRUE;
}
if ( m_bLog )
{
if ( nMethod != M_Click )
- // FIXME: HELPID
LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
else
- // FIXME: HELPID
LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod, nCurrentButtonId );
bDone = TRUE;
}
@@ -433,15 +403,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
- StatementList::pRet->GenReturn( RET_MacroRecorder, pParent->GetSmartUniqueOrHelpId(), nMethod );
- #endif
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pParent->GetUniqueOrHelpId(), nMethod );
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
bDone = TRUE;
}
@@ -451,20 +417,15 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- // FIXME: HELPID
if ( !bSendData && pWin->GetUniqueOrHelpId().getLength() )
{
- // FIXME: HELPID
- #if 0
- StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Click );
- #endif
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click );
bSendData = TRUE;
}
}
if ( m_bLog )
{
if ( !bDone )
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Click") );
}
}
@@ -519,15 +480,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
}
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod );
- #endif
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod );
}
}
@@ -545,15 +502,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case VCLEVENT_BUTTON_CLICK:
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click );
- #endif
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Click") );
}
break;
@@ -587,15 +540,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
// compare to 1 for floating ToolBoxes
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
- if ( !pWin->GetUniqueOrHelpId().getLength() || pWin->GetUniqueOrHelpId().Matches( 1 ) )
+ if ( !pWin->GetUniqueOrHelpId().getLength() /* || pWin->GetUniqueOrHelpId().Matches( 1 ) */ )
// generate direct Button access
- StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) );
+ StatementList::pRet->GenReturn( RET_MacroRecorder, Str2Id( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) );
else
// access via Toolbox
- StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pTB->GetHelpId( pTB->GetCurItemId() )) ); // GetHelpId() ULONG != comm_ULONG on 64bit
- #endif
+ StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), Id2Str( pTB->GetHelpId( pTB->GetCurItemId() ) ) );
bSendData = TRUE;
}
/* not needed if ( m_bLog )
@@ -624,7 +574,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
// }
// if ( m_bLog )
// {
-// LogVCL( pActionParent->GetSmartUniqueOrHelpId(), pWin->GetType(), rtl::OString( pActionParent->GetHelpId( pActionParent->GetCurItemId() ) ), CUniString("TearOff") );
+// LogVCL( pActionParent->GetSmartUniqueOrHelpId(), pWin->GetType(), pActionParent->GetHelpId( pActionParent->GetCurItemId() ), CUniString("TearOff") );
// }
// }
// pActionParent = NULL;
@@ -726,7 +676,6 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
Window *pIdWin = GetParentWithID( pWin );
if ( pIdWin != pWin )
bKeyFollowFocus = TRUE;
- // FIXME: HELPID
aKeyUniqueID = pIdWin->GetUniqueOrHelpId();
if ( m_bLog )
{
@@ -1075,15 +1024,11 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
{
if ( m_bRecord )
{
- // FIXME: HELPID
- #if 0
StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), M_SetText, aEditModifyString );
- #endif
bSendData = TRUE;
}
if ( m_bLog )
{
- // FIXME: HELPID
LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Modify") );
}
pEditModify = NULL;
diff --git a/automation/source/server/retstrm.cxx b/automation/source/server/retstrm.cxx
index 43776af565e5..d1cd5d2327f1 100644
--- a/automation/source/server/retstrm.cxx
+++ b/automation/source/server/retstrm.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_automation.hxx"
#include <tools/stream.hxx>
+#include <basic/ttstrhlp.hxx>
#include "retstrm.hxx"
#include "rcontrol.hxx"
@@ -57,20 +58,12 @@ void RetStream::GenReturn ( USHORT nRet, rtl::OString aUId, String 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 )
{
CmdBaseStream::GenReturn ( nRet, &aUId, nNr, &aString, bBool );
}
+// MacroRecorder
void RetStream::GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString )
{
CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString );
@@ -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 )
{
CmdBaseStream::Write( pString->GetBuffer(), pString->Len() );
@@ -95,19 +105,9 @@ void RetStream::Write( SbxValue &aValue )
void RetStream::Write( rtl::OString* pId )
{
- // FIXME: HELPID
- #if 0
- DBG_ASSERT( !pId->HasString() || !pId->HasNumeric(), "rtl::OString contains Number and String. using String only." );
- 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
+ //HELPID BACKWARD (should use ByteString or OString)
+ String aTmp( Id2Str( *pId ) );
+ Write( &aTmp );
}
diff --git a/automation/source/server/retstrm.hxx b/automation/source/server/retstrm.hxx
index 0a340ee41a4a..0771664e0158 100644
--- a/automation/source/server/retstrm.hxx
+++ b/automation/source/server/retstrm.hxx
@@ -48,15 +48,24 @@ public:
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_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
- 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_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );}
// new
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, USHORT nMethod, SbxValue &aValue );
+// and Profiling
+ void GenReturn( USHORT nRet, USHORT nMethod, String aString );
+
// 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, BOOL bBool );
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index 5a27e2b3b71b..069f9253f10f 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -857,6 +857,9 @@ ImplRemoteControl::ImplRemoteControl()
m_pDbgWin = new EditWindow( NULL, CUniString("Debug Window"), WB_VSCROLL );
m_pDbgWin->bQuiet = TRUE;
m_pDbgWin->Hide();
+ m_pDbgWin->bQuiet = FALSE;
+ m_pDbgWin->Show();
+
StatementList::m_pDbgWin = m_pDbgWin;
}
#endif
@@ -869,6 +872,7 @@ ImplRemoteControl::ImplRemoteControl()
#else
pServiceMgr = new RemoteControlCommunicationManager();
#endif
+ fprintf(stderr, "%s\n", "Start RemoteControlCommunicationManager");
pServiceMgr->SetDataReceivedHdl( LINK( this, ImplRemoteControl, QueCommandsEvent ) );
pServiceMgr->StartCommunication();
@@ -882,6 +886,7 @@ ImplRemoteControl::ImplRemoteControl()
}
if ( RemoteControlCommunicationManager::nComm )
new ExtraIdle( this ); // Setzt die Bearbeitung wieder auf
+ fprintf(stderr, "%s\n", "end of ImplRemoteControl::ImplRemoteControl()");
}
ImplRemoteControl::~ImplRemoteControl()
@@ -951,6 +956,7 @@ static ::osl::Mutex aMutex;
static RemoteControl* pRemoteControl = 0;
extern "C" void CreateRemoteControl()
{
+ fprintf(stderr, "%s\n", "CreateRemoteControl");
if ( !pRemoteControl )
{
::osl::MutexGuard aGuard( aMutex );
diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx
index 9d7fb5597068..c491e66885cc 100644
--- a/automation/source/server/sta_list.cxx
+++ b/automation/source/server/sta_list.cxx
@@ -84,9 +84,9 @@ rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString();
rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString();
USHORT StatementList::nUseBindings = 0;
-rtl::OString StatementList::aSubMenuId1 = rtl::OString(); // Untermens bei PopupMenus
-rtl::OString StatementList::aSubMenuId2 = rtl::OString(); // erstmal 2-Stufig
-rtl::OString StatementList::aSubMenuId3 = rtl::OString(); // and now even 3 levels #i31512#
+USHORT StatementList::aSubMenuId1 = 0; // Untermens bei PopupMenus
+USHORT StatementList::aSubMenuId2 = 0; // erstmal 2-Stufig
+USHORT StatementList::aSubMenuId3 = 0; // and now even 3 levels #i31512#
SystemWindow *StatementList::pMenuWindow = NULL;
TTProperties *StatementList::pTTProperties = NULL;
@@ -131,7 +131,7 @@ TTSettings* GetTTSettings()
// 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 ); }
@@ -156,7 +156,7 @@ void StatementList::InitProfile()
#if OSL_DEBUG_LEVEL > 1
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
pCurrentProfileStatement = this;
}
@@ -172,19 +172,19 @@ void StatementList::SendProfile( String aText )
pProfiler->EndProfileInterval();
if ( pProfiler->IsProfilingPerCommand() )
- pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetProfileLine( aText ) );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileLine( aText ) );
if ( pProfiler->IsPartitioning() )
// 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() )
- pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetAutoProfiling() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
#if OSL_DEBUG_LEVEL > 1
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
pCurrentProfileStatement = NULL;
}
@@ -392,9 +392,7 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May
BOOL SearchUID::IsWinOK( Window *pWin )
{
- // FIXME: HELPID
- #if 0
- if ( aUId.Matches( pWin->GetUniqueOrHelpId() ) )
+ if ( aUId.equals( pWin->GetUniqueOrHelpId() ) )
{
if ( ( pWin->IsEnabled() || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pWin->IsVisible() )
return TRUE;
@@ -411,7 +409,7 @@ BOOL SearchUID::IsWinOK( Window *pWin )
USHORT 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.
Window *pItemWin;
pItemWin = pTB->GetItemWindow( pTB->GetItemId( i ) );
@@ -456,9 +454,6 @@ BOOL SearchUID::IsWinOK( Window *pWin )
return FALSE;
}
else
- #else
- (void)pWin;
- #endif
return FALSE;
}
@@ -981,8 +976,7 @@ String StatementList::ClientTree(Window *pBase, int Indent)
WRITE(sIndent);
WRITEc("UId : ");
- // FIXME: HELPID
- WRITE(String(rtl::OStringToOUString(pBase->GetUniqueOrHelpId(), RTL_TEXTENCODING_UTF8)));
+ WRITE(Id2Str(pBase->GetUniqueOrHelpId()));
WRITEc(":0x");
WRITE(
String::CreateFromInt64(
@@ -1039,7 +1033,7 @@ BOOL StatementList::CheckWindowWait()
if ( WinPtrValid(pWindowWaitPointer) && IS_WINP_CLOSING(pWindowWaitPointer) )
{
#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") );
#endif
@@ -1049,7 +1043,6 @@ BOOL StatementList::CheckWindowWait()
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Close timed out. Going on!! " );
#endif
- // FIXME: HELPID
pWindowWaitPointer->SetHelpId(aWindowWaitOldHelpId);
pWindowWaitPointer->SetUniqueId(aWindowWaitOldUniqueId);
@@ -1090,9 +1083,7 @@ void StatementList::ReportError(String aMessage, ULONG nWhatever)
void StatementList::DirectLog( ULONG nType, String aMessage )
{
if ( pRet )
- // FIXME: HELPID
- pRet->GenReturn( RET_DirectLoging, rtl::OString(/*nType*/), aMessage );
- (void) nType;
+ pRet->GenReturn( RET_DirectLoging, nType, aMessage );
}
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 56f1871791fd..a7320b6948e0 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -155,14 +155,13 @@ pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = N
#define RESET_APPLICATION_TO_BACKING_WINDOW
-// FIXME: HELPID
#define SET_WINP_CLOSING(pWin) \
pWindowWaitPointer = pWin; \
aWindowWaitUId = pControl->GetUniqueOrHelpId(); \
aWindowWaitOldHelpId = pWin->GetHelpId(); \
aWindowWaitOldUniqueId = pWin->GetUniqueId(); \
- pWin->SetHelpId( rtl::OString("4321") ); \
- pWin->SetUniqueId( rtl::OString("1234") );
+ pWin->SetHelpId( rtl::OString("TT_Win_is_closing_HID") ); \
+ pWin->SetUniqueId( rtl::OString("TT_Win_is_closing_UID") );
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -303,39 +302,9 @@ BOOL StatementFlow::Execute()
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// neue Hilfsfunktion, die stetig erweitert werden muss
-static short ImpGetRType( Window *pWin, rtl::OString aUId )
+static short ImpGetRType( Window *pWin )
{
- // FIXME: HELPID
- #if 0
- ULONG nUId = aUId.GetNum(); // GetNum() is always zero if no num is defined
- // GGGg gggg::gggg gggg::ggLL LLLl::llll llll
- DBG_ASSERT( pWin, "missing Parameter" );
- short nRT;
- if( (nUId & 0xE0000000) == 0 ) // keine auto ID
- nRT = C_NoType;
- else {
-// if( (nUId & 0x1F) == 0 ) // globale Resource
- if( (nUId & 0x1FF) == 0 ) // globale Resource GH: soweit ich das verstanden habe 1FF
- nRT = (short)(C_TabPage - 1 + (nUId >> 29));
- else
- nRT = (short)((nUId & 0x00003E00) >> 9);
- if ( nRT == C_TabPage ) // wegen TabDialog.UId = TabPage.UId
- nRT = C_NoType;
- else
- {
-#ifndef DBG_UTIL
- return nRT;
-#endif
- }
- }
- #else
- short nRT = 0;
- (void)aUId;
- #endif
-
-#ifdef DBG_UTIL
- short n = nRT;
-#endif
+ short nRT = C_NoType;
WindowType eRT = pWin->GetType();
switch( eRT ) {
case WINDOW_WINDOW: nRT = C_Window ; break;
@@ -401,15 +370,6 @@ static short ImpGetRType( Window *pWin, rtl::OString aUId )
case WINDOW_DIALOG: nRT = C_Dialog; break;
}
-#ifdef DBG_UTIL
- // Die Werte n sind bei den WindowTypen nicht mehr vergeben, werden aber in der AutoID noch verwendet
- // Sie werden jetzt durch den Typ nRT implementiert.
- DBG_ASSERT( n == C_NoType || n == nRT
- || ( n == C_ImageButton && nRT == C_PushButton )
- || ( n == C_TriStateBox && nRT == C_CheckBox )
- || ( n == C_ImageRadioButton && nRT == C_RadioButton )
- , "error in algorithm" );
-#endif
return nRT;
}
@@ -598,9 +558,9 @@ BOOL StatementSlot::Execute()
if ( !bMenuClosed )
{
pPopup->EndExecute(0);
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
bMenuClosed = TRUE;
#if OSL_DEBUG_LEVEL > 1
@@ -722,12 +682,12 @@ BOOL StatementSlot::Execute()
{
case TT_PR_ERR_NODISPATCHER:
{
- ReportError( rtl::OString(nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED_NO_DISPATCHER ) );
+ ReportError( rtl::OString::valueOf((sal_Int32)nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED_NO_DISPATCHER ) );
}
break;
case TT_PR_ERR_NOEXECUTE:
{
- ReportError(rtl::OString(nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED ) );
+ ReportError( rtl::OString::valueOf((sal_Int32)nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED ) );
}
break;
}
@@ -766,7 +726,6 @@ StatementUnoSlot::StatementUnoSlot(SCmdStream *pIn)
StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId, USHORT Params, USHORT Nr1 )
: nMethodId( MethodId )
-, aSmartMethodId()
, nParams(Params)
, nNr1(Nr1)
, nNr2(0)
@@ -779,12 +738,11 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId,
, bBool2(FALSE)
{
QueStatement( pAfterThis );
- aSmartMethodId = rtl::OString( nMethodId );
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Directly adding Conmmand:" );
m_pDbgWin->AddText( " Methode: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( " Params:" );
if( nParams & PARAM_USHORT_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );}
if( nParams & PARAM_USHORT_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );}
@@ -802,7 +760,6 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId,
StatementCommand::StatementCommand( SCmdStream *pCmdIn )
: nMethodId(0)
-, aSmartMethodId()
, nParams(0)
, nNr1(0)
, nNr2(0)
@@ -816,7 +773,6 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
{
QueStatement( NULL );
pCmdIn->Read( nMethodId );
- aSmartMethodId = rtl::OString( nMethodId );
pCmdIn->Read( nParams );
if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nNr1 );
@@ -832,7 +788,7 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Reading Conmmand:" );
m_pDbgWin->AddText( " Methode: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( " Params:" );
if( nParams & PARAM_USHORT_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );}
if( nParams & PARAM_USHORT_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );}
@@ -950,11 +906,8 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
break;
default:
- // FIXME: HELPID
- #if 0
- if ( pBase->GetSmartUniqueOrHelpId().Equals( rtl::OString() ) && !( nConf & DH_MODE_ALLWIN ) )
+ if ( ( pBase->GetUniqueOrHelpId().getLength() == 0 ) && !( nConf & DH_MODE_ALLWIN ) )
bSkip = TRUE;
- #endif
break;
}
@@ -985,16 +938,9 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
aTypeSuffix.AppendAscii( "/Unknown", 8 );
}
- // FIXME: HELPID
rtl::OString aId = pBase->GetUniqueOrHelpId();
- #if 0
- if ( aId.HasString() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( aId.GetStr() ), (comm_ULONG)pBase->GetType(),
- TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE );
- if ( !aId.HasString() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( aId.GetNum() ), (comm_ULONG)pBase->GetType(),
- TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE );
- #endif
+ pRet->GenReturn ( RET_WinInfo, aId, (comm_ULONG)pBase->GetType(),
+ TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE );
if ( pBase->GetType() == WINDOW_TOOLBOX ) // Buttons und Controls auf Toolboxen.
@@ -1015,32 +961,26 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
pItemWin = pTB->GetItemWindow( pTB->GetItemId( i ) );
if ( pTB->GetItemType( i ) == TOOLBOXITEM_BUTTON && ( !pItemWin || !pItemWin->IsVisible() ) )
{
- // FIXME: HELPID
- #if 0
if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BUTTON,
+ pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)WINDOW_BUTTON,
TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE );
if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BUTTON,
+ pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BUTTON,
TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE );
- #endif
}
else
{
if ( pItemWin )
{
- // FIXME: HELPID
- #if 0
if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)pItemWin->GetType(),
+ pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)pItemWin->GetType(),
TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE );
if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)pItemWin->GetType(),
+ pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)pItemWin->GetType(),
TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE );
USHORT ii;
for( ii = 0 ; ii < pItemWin->GetChildCount(); ii++ )
WriteControlData( pItemWin->GetChild(ii), nConf, FALSE );
- #endif
}
else
{
@@ -1067,15 +1007,12 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
default:
DBG_ERROR1( "Unknown TOOLBOXITEM %i", pTB->GetItemType( i ) );
}
- // FIXME: HELPID
- #if 0
if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE,
+ pRet->GenReturn ( RET_WinInfo, Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE,
aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE );
if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE,
+ pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BASE,
aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE );
- #endif
}
}
}
@@ -1099,38 +1036,35 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
aName = String();
if ( aName.Len() == 0 )
aName = pBD->GetPushButton( pBD->GetButtonId(i) )->GetText();
- String aID;
+ ByteString aID;
switch ( pBD->GetButtonId(i) )
{
case BUTTONID_OK:
- aID.AssignAscii("Ok");
+ aID.Assign("Ok");
break;
case BUTTONID_CANCEL:
- aID.AssignAscii("Cancel");
+ aID.Assign("Cancel");
break;
case BUTTONID_YES:
- aID.AssignAscii("Yes");
+ aID.Assign("Yes");
break;
case BUTTONID_NO:
- aID.AssignAscii("No");
+ aID.Assign("No");
break;
case BUTTONID_RETRY:
- aID.AssignAscii("Retry");
+ aID.Assign("Retry");
break;
case BUTTONID_HELP:
- aID.AssignAscii("Help");
+ aID.Assign("Help");
break;
default:
- aID = UniString::CreateFromInt32( pBD->GetButtonId(i) );
+ aID = ByteString::CreateFromInt32( pBD->GetButtonId(i) );
break;
}
- // FIXME: HELPID
- #if 0
- pRet->GenReturn ( RET_WinInfo, rtl::OString( aID ), (comm_ULONG)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So da der Text angezeigt wird!
+ pRet->GenReturn ( RET_WinInfo, aID, (comm_ULONG)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So da der Text angezeigt wird!
TypeString(pBD->GetPushButton( pBD->GetButtonId(i) )->GetType()).AppendAscii(": ").Append(aName)
- .AppendAscii(" ButtonId = ").Append(aID), FALSE );
- #endif
+ .AppendAscii(" ButtonId = ").AppendAscii( aID.GetBuffer() ), FALSE );
}
return; // ButtonDialog ist hier schon komplett abgehandelt.
@@ -1176,15 +1110,12 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
default:
DBG_ERROR1( "Unknown MENUITEM %i", pMenu->GetItemType( i ) );
}
- // FIXME: HELPID
- #if 0
if ( pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( pMenu->GetItemCommand(nID) ), (comm_ULONG)0,
+ pRet->GenReturn ( RET_WinInfo, Str2Id( pMenu->GetItemCommand(nID) ), (comm_ULONG)0,
aMenuItemType.AppendAscii(": ").Append(aName), FALSE );
if ( !pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) )
- pRet->GenReturn ( RET_WinInfo, rtl::OString( nID ), (comm_ULONG)0,
+ pRet->GenReturn ( RET_WinInfo, rtl::OString::valueOf( (sal_Int32)nID ), (comm_ULONG)0,
aMenuItemType.AppendAscii(": ").Append(aName), FALSE );
- #endif
}
}
@@ -1600,15 +1531,12 @@ BOOL StatementCommand::DisplayHID()
if ( GetTTSettings()->Act )
{
SET_WIN(GetTTSettings()->Act);
- // FIXME: HELPID
- #if 0
- GetTTSettings()->pDisplayHidWin->SetDisplayText(GetTTSettings()->Act->GetSmartUniqueOrHelpId().GetText().AppendAscii(" WinType: ")
+ GetTTSettings()->pDisplayHidWin->SetDisplayText( Id2Str(GetTTSettings()->Act->GetUniqueOrHelpId()).AppendAscii(" WinType: ")
.Append(UniString::CreateFromInt64(GetTTSettings()->Act->GetType())).AppendAscii(" ").Append(GetTTSettings()->Act->GetText()));
- if ( GetTTSettings()->Act && !GetTTSettings()->Act->GetSmartUniqueId().Equals( GetTTSettings()->Act->GetSmartHelpId() ) )
- GetTTSettings()->pDisplayHidWin->SetText(UniString( TTProperties::GetSvtResId( TT_ALTERNATE_CAPTION ) ).Append(GetTTSettings()->Act->GetSmartHelpId().GetText()));
+ if ( GetTTSettings()->Act && !GetTTSettings()->Act->GetUniqueId().equals( GetTTSettings()->Act->GetHelpId() ) )
+ GetTTSettings()->pDisplayHidWin->SetText(UniString( TTProperties::GetSvtResId( TT_ALTERNATE_CAPTION ) ).AppendAscii(GetTTSettings()->Act->GetHelpId().getStr()));
else
GetTTSettings()->pDisplayHidWin->SetText( GetTTSettings()->aOriginalCaption );
- #endif
}
else
GetTTSettings()->pDisplayHidWin->SetDisplayText(CUniString("Kein Window/Control gefunden"));
@@ -1616,13 +1544,11 @@ BOOL StatementCommand::DisplayHID()
else if ( GetTTSettings()->Act )
{
// SET_WIN(GetTTSettings()->Act);
- if ( GetTTSettings()->pDisplayHidWin->IsDisplayTextModified() && GetTTSettings()->pDisplayHidWin->GetDisplayText().Len() > 0 )
+ // allow setting a HelpID manually (just enter the ID in the displayHID Window and terminate it by |
+ if ( GetTTSettings()->pDisplayHidWin->IsDisplayTextModified() && GetTTSettings()->pDisplayHidWin->GetDisplayText().GetTokenCount( '|' ) > 1 )
{
- // FIXME: HELPID
- #if 0
- GetTTSettings()->Act->SetSmartUniqueId( rtl::OString( GetTTSettings()->pDisplayHidWin->GetDisplayText().ToInt32() ) );
+ GetTTSettings()->Act->SetUniqueId( Str2Id( GetTTSettings()->pDisplayHidWin->GetDisplayText().GetToken( '|' ) ) );
GetTTSettings()->pDisplayHidWin->ClearDisplayTextModified();
- #endif
}
}
/* if ( Application::GetLastInputInterval() > 5000 ) // 5 Sekunden lang nix geschehen
@@ -2157,16 +2083,16 @@ void TranslateWin::EnableTranslation()
void StatementCommand::Translate()
{
// Es wurde eine initale UniqueId mitgegeben. Dann nur die dopelten Shortcuts liefern
- if( (nParams & PARAM_ULONG_1) && nLNr1 )
+ if( (nParams & PARAM_STR_1) && nLNr1 )
{
String aDouble;
- Window *pWin = SearchTree( rtl::OString( nLNr1 ) ,FALSE );
+ Window *pWin = SearchTree( Str2Id( aString1 ) ,FALSE );
if ( pWin )
{
pWin = pWin->GetWindow( WINDOW_OVERLAP );
aDouble = TranslateWin::MarkShortcutErrors( pWin, TRUE );
}
- pRet->GenReturn ( RET_Value, aSmartMethodId, aDouble );
+ pRet->GenReturn ( RET_Value, nMethodId, aDouble );
return;
}
@@ -2199,7 +2125,6 @@ void StatementCommand::Translate()
{
Window* pNew = pTranslationWindow->GetWindow( WINDOW_CLIENT );
// Bei Dockingwindoes das kanze Geraffel von Docking Floating berspringen
- // FIXME: HELPID
while ( IsDialog( pNew ) && !pNew->GetUniqueOrHelpId().getLength() && pNew->GetChildCount() == 1 )
pNew = pNew->GetChild( 0 );
pTranslationWindow = pNew;
@@ -2207,8 +2132,7 @@ void StatementCommand::Translate()
aTranslation = CUniString("0;");
- // FIXME: HELPID
- aTranslation += String(rtl::OStringToOUString( pTranslationWindow->GetUniqueOrHelpId(), RTL_TEXTENCODING_UTF8 ));
+ aTranslation += Id2Str( pTranslationWindow->GetUniqueOrHelpId() );
aTranslation += ';';
aTranslation += TypeString( pTranslationWindow->GetType() );
@@ -2222,8 +2146,7 @@ void StatementCommand::Translate()
if ( pParentDialog )
{
- // FIXME: HELPID
- aTranslation += String(rtl::OStringToOUString(pParentDialog->GetUniqueOrHelpId(), RTL_TEXTENCODING_UTF8));
+ aTranslation += Id2Str(pParentDialog->GetUniqueOrHelpId());
aTranslation += ';';
aTranslation += TypeString( pParentDialog->GetType() );
}
@@ -2252,13 +2175,13 @@ void StatementCommand::Translate()
// alle TABSs quoten ()
aTranslation.SearchAndReplaceAll( CUniString("\t"), CUniString("\\t") );
- pRet->GenReturn ( RET_Value, aSmartMethodId, aTranslation );
+ pRet->GenReturn ( RET_Value, nMethodId, aTranslation );
GetTTSettings()->pTranslateWin->EnableTranslation();
GetTTSettings()->bToTop = TRUE;
}
else
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
+ pRet->GenReturn ( RET_Value, nMethodId, String() );
GetTTSettings()->pTranslateWin->EnableTranslation();
ErrorBox err( GetTTSettings()->pTranslateWin, TTProperties::GetSvtResId( TT_NO_CONTROL ));
err.Execute();
@@ -2268,7 +2191,7 @@ void StatementCommand::Translate()
}
else if ( GetTTSettings()->pTranslateWin->IsNextDialog() )
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, CUniString("1") );
+ pRet->GenReturn ( RET_Value, nMethodId, CUniString("1") );
GetTTSettings()->pTranslateWin->ResetNextDialog();
GetTTSettings()->pTranslateWin->LoseFocus();
GetTTSettings()->bToTop = TRUE;
@@ -2276,7 +2199,7 @@ void StatementCommand::Translate()
else
{
GetTTSettings()->pTranslateWin->EnableTranslation();
- pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
+ pRet->GenReturn ( RET_Value, nMethodId, String() );
}
}
@@ -2364,7 +2287,7 @@ BOOL StatementCommand::Execute()
{
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Skipping Command: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
#endif
@@ -2376,7 +2299,7 @@ BOOL StatementCommand::Execute()
InitProfile();
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Executing Command: " );
- m_pDbgWin->AddText( aSmartMethodId.GetText() );
+ m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
#endif
@@ -2384,11 +2307,10 @@ BOOL StatementCommand::Execute()
-// FIXME: HELPID
#if OSL_DEBUG_LEVEL > 1
#define REPORT_WIN_CLOSED(pControl, aInfo) \
_REPORT_WIN_CLOSED(pControl, aInfo) \
- m_pDbgWin->AddText( aInfo.AppendAscii(" \"").Append( pControl->GetText() ).AppendAscii("\" geschlossen, RType = ").Append( TypeString(pControl->GetType()) ).AppendAscii(", UId = ").Append( rtl::OStringToOUString( pControl->GetUniqueOrHelpId(), RTL_TEXTENCODING_UTF8) ) );
+ m_pDbgWin->AddText( aInfo.AppendAscii(" \"").Append( pControl->GetText() ).AppendAscii("\" geschlossen, RType = ").Append( TypeString(pControl->GetType()) ).AppendAscii(", UId = ").Append( UIdString( pControl->GetUniqueOrHelpId() ) ) );
#else
#define REPORT_WIN_CLOSED(pControl, aInfo) _REPORT_WIN_CLOSED(pControl, aInfo)
#endif
@@ -2396,7 +2318,6 @@ BOOL StatementCommand::Execute()
#define REPORT_WIN_CLOSEDc(pControl, aInfo ) \
REPORT_WIN_CLOSED(pControl, CUniString(aInfo) )
-// FIXME: HELPID
#define _REPORT_WIN_CLOSED(pControl, aInfo) \
if ( aString1.Len() ) \
aString1 += '\n'; \
@@ -2406,7 +2327,7 @@ BOOL StatementCommand::Execute()
aString1.AppendAscii("\" geschlossen, RType = ");\
aString1 += TypeString(pControl->GetType()); \
aString1.AppendAscii(", UId = "); \
- aString1 += String(rtl::OStringToOUString(pControl->GetUniqueOrHelpId(), RTL_TEXTENCODING_UTF8));
+ aString1 += UIdString(pControl->GetUniqueOrHelpId());
switch ( nMethodId )
@@ -2439,9 +2360,9 @@ BOOL StatementCommand::Execute()
bCatchGPF = TRUE;
bUsePostEvents = TRUE;
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
if ( !nRetryCount )
@@ -2462,14 +2383,12 @@ BOOL StatementCommand::Execute()
&& pControl->GetType() != WINDOW_BORDERWINDOW
&& nRetryCount-- )
{
- // FIXME: HELPID
- short nRT = ImpGetRType( pControl, pControl->GetUniqueOrHelpId() );
+ short nRT = ImpGetRType( pControl );
if ( nRT == C_TabControl && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG )
{ // Bei Tabcontrol den zugehrigen Tabdialog nehmen
pControl = pControl->GET_REAL_PARENT();
- // FIXME: HELPID
- nRT = ImpGetRType( pControl, pControl->GetUniqueOrHelpId() );
+ nRT = ImpGetRType( pControl );
}
switch( nRT )
@@ -2637,7 +2556,7 @@ BOOL StatementCommand::Execute()
if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit
return FALSE;
else
- pRet->GenReturn ( RET_Value, aSmartMethodId, aString1);
+ pRet->GenReturn ( RET_Value, nMethodId, aString1);
}
break;
case RC_WaitSlot:
@@ -2651,12 +2570,12 @@ BOOL StatementCommand::Execute()
}
if ( !bIsSlotInExecute )
- pRet->GenReturn ( RET_Value, aSmartMethodId, comm_USHORT(CONST_WSFinished) );
+ pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSFinished) );
else
{
if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit
return FALSE;
- pRet->GenReturn ( RET_Value, aSmartMethodId, comm_USHORT(CONST_WSTimeout) );
+ pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSTimeout) );
}
}
break;
@@ -2708,21 +2627,21 @@ BOOL StatementCommand::Execute()
ReportError( GEN_RES_STR0( S_NO_ACTIVE_WINDOW ) );
// if ( Application::GetAppWindow() )
// bWait = Application::GetAppWindow()->IsWait();
- pRet->GenReturn ( RET_Value, aSmartMethodId, bWait );
+ pRet->GenReturn ( RET_Value, nMethodId, bWait );
break;
}
case RC_GetClipboard:
{
::rtl::OUString aTemp;
::svt::OStringTransfer::PasteString( aTemp, GetFirstDocFrame() );
- pRet->GenReturn ( RET_Value, aSmartMethodId, String( aTemp ) );
+ pRet->GenReturn ( RET_Value, nMethodId, String( aTemp ) );
}
break;
case RC_SetClipboard:
::svt::OStringTransfer::CopyString(aString1,GetFirstDocFrame());
break;
case RC_WinTree:
- pRet->GenReturn ( RET_Value, aSmartMethodId, Tree( NULL, 0));
+ pRet->GenReturn ( RET_Value, nMethodId, Tree( NULL, 0));
break;
#if OSL_DEBUG_LEVEL > 1
case RC_NoDebug:
@@ -2747,10 +2666,7 @@ BOOL StatementCommand::Execute()
ReportError( GEN_RES_STR0( S_NO_DIALOG_IN_GETACTIVE ) );
else
{
- // FIXME: HELPID
- #if 0
- pRet->GenReturn( RET_Value, aSmartMethodId, static_cast<comm_ULONG>(pWin->GetUniqueOrHelpId().GetNum())); //GetNum() ULONG != comm_ULONG on 64bit
- #endif
+ pRet->GenReturn( RET_Value, nMethodId, Id2Str(pWin->GetUniqueOrHelpId()) );
}
}
break;
@@ -2784,7 +2700,7 @@ BOOL StatementCommand::Execute()
pProfiler->StartAutoProfiling( nNr1 );
// Der Header ist abhngig vom Modus
- pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetProfileHeader() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() );
}
else if ( nParams & PARAM_USHORT_1 )
{ // Partitioning initialisieren: Profile true [,nNr][,nNr][,nNr][,nNr]
@@ -2797,32 +2713,32 @@ BOOL StatementCommand::Execute()
// Hier werden die Parameter ans Testtool zurck bertragen.
// Das ist zwar etwas eigenartig, aber ansonsten msste man im Testtool
// die einfache Struktur der Remotebefehle aufbrechen.
- pRet->GenReturn( RET_ProfileInfo, rtl::OString( S_ProfileReset ), nAnzahl );
+ pRet->GenReturn( RET_ProfileInfo, S_ProfileReset, nAnzahl );
// Und die einzelnen Grenzen
- if ( nParams & PARAM_USHORT_1 ) { pRet->GenReturn( RET_ProfileInfo, rtl::OString( S_ProfileBorder1 ), (comm_ULONG)nNr1 ); };
- if ( nParams & PARAM_USHORT_2 ) { pRet->GenReturn( RET_ProfileInfo, rtl::OString( S_ProfileBorder2 ), (comm_ULONG)nNr2 ); };
- if ( nParams & PARAM_USHORT_3 ) { pRet->GenReturn( RET_ProfileInfo, rtl::OString( S_ProfileBorder3 ), (comm_ULONG)nNr3 ); };
- if ( nParams & PARAM_USHORT_4 ) { pRet->GenReturn( RET_ProfileInfo, rtl::OString( S_ProfileBorder4 ), (comm_ULONG)nNr4 ); };
+ if ( nParams & PARAM_USHORT_1 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder1, (comm_ULONG)nNr1 ); };
+ if ( nParams & PARAM_USHORT_2 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder2, (comm_ULONG)nNr2 ); };
+ if ( nParams & PARAM_USHORT_3 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder3, (comm_ULONG)nNr3 ); };
+ if ( nParams & PARAM_USHORT_4 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder4, (comm_ULONG)nNr4 ); };
pProfiler->StartPartitioning();
}
else if( nParams == PARAM_STR_1 ) // Genau ein String!
{ // Nur einen String ins Profiling aufnehmen
aString1 += '\n';
- pRet->GenReturn( RET_ProfileInfo, rtl::OString(), aString1 );
+ pRet->GenReturn( RET_ProfileInfo, 0, aString1 );
}
else
{ // Normales Profiling je Kommando: profile
if ( pProfiler->IsAutoProfiling() )
{
- pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetAutoProfiling() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
pProfiler->StopAutoProfiling();
}
pProfiler->StartProfilingPerCommand();
// Der Header ist abhngig vom Modus
- pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetProfileHeader() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() );
}
}
else // Profiling wieder ausschalten: Profile false
@@ -2833,13 +2749,13 @@ BOOL StatementCommand::Execute()
if ( pProfiler->IsAutoProfiling() )
{
- pRet->GenReturn( RET_ProfileInfo, rtl::OString(), pProfiler->GetAutoProfiling() );
+ pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() );
pProfiler->StopAutoProfiling();
}
if ( pProfiler->IsPartitioning() )
{
- pRet->GenReturn( RET_ProfileInfo, rtl::OString( S_ProfileDump ), (comm_ULONG)0 );
+ pRet->GenReturn( RET_ProfileInfo, S_ProfileDump, (comm_ULONG)0 );
pProfiler->StopPartitioning();
}
@@ -2937,13 +2853,13 @@ BOOL StatementCommand::Execute()
{
case RC_MenuGetItemCount:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)nItemCount );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)nItemCount );
}
break;
case RC_MenuGetItemId:
{
- if ( ValueOK(aSmartMethodId, RcString( nMethodId ),nNr1,nItemCount) )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pMenu->GetItemId(nPhysicalIndex-1) );
+ if ( ValueOK( rtl::OString(), RcString( nMethodId ),nNr1,nItemCount) )
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pMenu->GetItemId(nPhysicalIndex-1) );
}
break;
case RC_MenuGetItemPos:
@@ -2965,53 +2881,50 @@ BOOL StatementCommand::Execute()
}
}
}
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)(nLogicalPos+1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)(nLogicalPos+1) );
}
break;
case RC_MenuIsSeperator:
{
- if ( ValueOK(aSmartMethodId, RcString( nMethodId ),nNr1,nItemCount) )
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)(pMenu->GetItemType(nPhysicalIndex-1) == MENUITEM_SEPARATOR) );
+ if ( ValueOK( rtl::OString(), RcString( nMethodId ),nNr1,nItemCount) )
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)(pMenu->GetItemType(nPhysicalIndex-1) == MENUITEM_SEPARATOR) );
}
break;
case RC_MenuIsItemChecked:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)pMenu->IsItemChecked(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)pMenu->IsItemChecked(nNr1) );
}
break;
case RC_MenuIsItemEnabled:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)pMenu->IsItemEnabled(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)pMenu->IsItemEnabled(nNr1) );
}
break;
case RC_MenuGetItemText:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (String)pMenu->GetItemText(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (String)pMenu->GetItemText(nNr1) );
}
break;
case RC_MenuGetItemCommand:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (String)pMenu->GetItemCommand(nNr1) );
+ pRet->GenReturn ( RET_Value, nMethodId, (String)pMenu->GetItemCommand(nNr1) );
}
break;
case RC_MenuHasSubMenu:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (BOOL)(pMenu->GetPopupMenu(nNr1) != NULL) );
+ pRet->GenReturn ( RET_Value, nMethodId, (BOOL)(pMenu->GetPopupMenu(nNr1) != NULL) );
}
break;
case RC_MenuSelect:
{
if ( pMenu->GetPopupMenu(nNr1) )
{
- // FIXME: HELPID
- #if 0
- if ( !aSubMenuId1.GetNum() )
- aSubMenuId1 = rtl::OString(nNr1);
- else if ( !aSubMenuId2.GetNum() )
- aSubMenuId2 = rtl::OString(nNr1);
- else if ( !aSubMenuId3.GetNum() )
- aSubMenuId3 = rtl::OString(nNr1);
- #endif
+ if ( !aSubMenuId1 )
+ aSubMenuId1 = nNr1;
+ else if ( !aSubMenuId2 )
+ aSubMenuId2 = nNr1;
+ else if ( !aSubMenuId3 )
+ aSubMenuId3 = nNr1;
if ( pPopup )
pPopup->SelectEntry(nNr1);
@@ -3023,17 +2936,17 @@ BOOL StatementCommand::Execute()
if ( pPopup )
{
pPopup->EndExecute(nNr1);
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
else
{
pMenuBar->SelectEntry(nNr1);
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
}
@@ -3200,7 +3113,7 @@ BOOL StatementCommand::Execute()
}
if ( !nErrorcode )
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, aPath );
+ pRet->GenReturn ( RET_Value, nMethodId, aPath );
}
@@ -3232,9 +3145,9 @@ BOOL StatementCommand::Execute()
if ( !aFS.IsKind( FSYS_KIND_WILD ) && !aFS.IsKind( FSYS_KIND_DIR ) && aEntry.Exists() )
{ // Sonderbehandlung fr genau einen Eintrag
if ( !aFS.IsKind( FSYS_KIND_DIR ) && ( aDirEntryKind == FSYS_KIND_DIR ) )
- pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
+ pRet->GenReturn ( RET_Value, nMethodId, String() );
else
- pRet->GenReturn ( RET_Value, aSmartMethodId, (String)(aEntry.GetName()) );
+ pRet->GenReturn ( RET_Value, nMethodId, (String)(aEntry.GetName()) );
break;
}
@@ -3249,12 +3162,12 @@ BOOL StatementCommand::Execute()
if ( !pDir )
pDir = new Dir;
- if ( !nErrorcode && ValueOK( aSmartMethodId, GEN_RES_STR0( S_NO_MORE_FILES ), nDirPos+1, pDir->Count()+1 ) )
+ if ( !nErrorcode && ValueOK( nMethodId, GEN_RES_STR0( S_NO_MORE_FILES ), nDirPos+1, pDir->Count()+1 ) )
{
if ( nDirPos == pDir->Count() )
- pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
+ pRet->GenReturn ( RET_Value, nMethodId, String() );
else
- pRet->GenReturn ( RET_Value, aSmartMethodId, (String)((*pDir)[ nDirPos ].GetName()) );
+ pRet->GenReturn ( RET_Value, nMethodId, (String)((*pDir)[ nDirPos ].GetName()) );
nDirPos++;
}*/
}
@@ -3266,7 +3179,7 @@ BOOL StatementCommand::Execute()
if ( FSYS_ERR_OK == nErrorcode )
{
FileStat aFS( aFile );
- pRet->GenReturn ( RET_Value, aSmartMethodId, static_cast<comm_ULONG>(aFS.GetSize()) ); //GetSize() ULONG != comm_ULONG on 64bit
+ pRet->GenReturn ( RET_Value, nMethodId, static_cast<comm_ULONG>(aFS.GetSize()) ); //GetSize() ULONG != comm_ULONG on 64bit
nErrorcode = aFS.GetError();
}
}
@@ -3293,7 +3206,7 @@ BOOL StatementCommand::Execute()
SbxValueRef xValue = new SbxValue( SbxDATE );
xValue->PutDate( fSerial );
- pRet->GenReturn ( RET_Value, aSmartMethodId, *xValue );
+ pRet->GenReturn ( RET_Value, nMethodId, *xValue );
}
}
break;
@@ -3409,7 +3322,7 @@ BOOL StatementCommand::Execute()
aPointer = Pointer( POINTER_NULL );
}
}
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)aPointer.GetStyle() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)aPointer.GetStyle() );
}
break;
case RC_UnpackStorage:
@@ -3478,7 +3391,7 @@ BOOL StatementCommand::Execute()
break;
case RC_ExistsSysDialog:
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)xPicker.is() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)xPicker.is() );
}
break;
default:
@@ -3519,14 +3432,14 @@ BOOL StatementCommand::Execute()
break;
case RC_GetDocumentCount :
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_USHORT)GetDocWinCount() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_USHORT)GetDocWinCount() );
}
break;
case RC_ActivateDocument :
{
if( nParams & PARAM_USHORT_1 )
{
- if ( ValueOK(aSmartMethodId, RcString( nMethodId ), nNr1, GetDocWinCount() ) )
+ if ( ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, GetDocWinCount() ) )
{
Window* pWin = GetDocWin( nNr1-1 );
if ( pWin )
@@ -3542,7 +3455,7 @@ BOOL StatementCommand::Execute()
break;
case RC_GetSystemLanguage :
{
- pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_USHORT)Application::GetSettings().GetLanguage() );
+ pRet->GenReturn ( RET_Value, nMethodId, (comm_USHORT)Application::GetSettings().GetLanguage() );
}
break;
case RC_CatchGPF :
@@ -3561,7 +3474,7 @@ BOOL StatementCommand::Execute()
#else
bIsProduct = TRUE;
#endif
- pRet->GenReturn ( RET_Value, aSmartMethodId, (BOOL)bIsProduct );
+ pRet->GenReturn ( RET_Value, nMethodId, (BOOL)bIsProduct );
}
break;
case RC_UsePostEvents :
@@ -3640,18 +3553,22 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
, bBool2(FALSE)
{
QueStatement( NULL );
+ //HELPID BACKWARD (SIControl is no longer needed)
if ( nControlIdType == SIControl )
{
comm_ULONG nId;
pCmdIn->Read( nId );
aUId = rtl::OString( nId );
+ if ( nId == 0 )
+ aUId = UID_ACTIVE;
+ else
+ ReportError( aUId, GEN_RES_STR1c( S_INTERNAL_ERROR, "using numeric HelpID from old Testtool" ) );
}
else if ( nControlIdType == SIStringControl )
{
String aId;
pCmdIn->Read( aId );
- // FIXME: HELPID
- aUId = rtl::OUStringToOString( aId, RTL_TEXTENCODING_UTF8 );
+ aUId = Str2Id( aId );
}
else
{
@@ -3673,7 +3590,7 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Reading Control: UId: " );
- m_pDbgWin->AddText( aUId.GetText() );
+ m_pDbgWin->AddText( Id2Str( aUId ) );
m_pDbgWin->AddText( " Methode: " );
m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( " Params:" );
@@ -3760,14 +3677,11 @@ static Window*ImpGetButton( Window *pBase, WinBits nMask, WinBits nWinBits )
BOOL StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeichnung )
{
- // FIXME: HELPID
- #if 0
if ( pControl && ( ( ( IsAccessable(pControl) || (nMethodId & M_WITH_RETURN) ) &&
pControl->IsVisible() ) ||
- aUId.Matches( UID_ACTIVE ) ) )
+ aUId.equals( UID_ACTIVE ) ) )
return TRUE;
else
- #endif
{
UniString aBezeichnung( cBezeichnung, RTL_TEXTENCODING_ASCII_US );
if ( aBezeichnung.Len() > 0 )
@@ -3822,29 +3736,23 @@ USHORT StatementList::GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar,
if ( !pMenu )
return 1;
- // FIXME: HELPID
- #if 0
- if ( aSubMenuId1.GetNum() )
+ if ( aSubMenuId1 )
{
- pPopup = pMenu->GetPopupMenu(
- sal::static_int_cast< USHORT >(aSubMenuId1.GetNum()));
+ pPopup = pMenu->GetPopupMenu( aSubMenuId1 );
pMenu = pPopup;
}
- if ( pMenu && aSubMenuId2.GetNum() )
+ if ( pMenu && aSubMenuId2 )
{
- pPopup = pMenu->GetPopupMenu(
- sal::static_int_cast< USHORT >(aSubMenuId2.GetNum()));
+ pPopup = pMenu->GetPopupMenu( aSubMenuId2 );
pMenu = pPopup;
}
- if ( pMenu && aSubMenuId3.GetNum() )
+ if ( pMenu && aSubMenuId3 )
{
- pPopup = pMenu->GetPopupMenu(
- sal::static_int_cast< USHORT >(aSubMenuId3.GetNum()));
+ pPopup = pMenu->GetPopupMenu( aSubMenuId3 );
pMenu = pPopup;
}
- #endif
return 0;
}
@@ -4085,10 +3993,7 @@ BOOL StatementControl::HandleVisibleControls( Window *pControl )
default:
return FALSE;
}
- // FIXME: HELPID
- #if 0
SendProfile( UIdString( aUId ).Append('.').Append( MethodString( nMethodId ) ) );
- #endif
return TRUE;
}
return FALSE;
@@ -4373,9 +4278,9 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
break;
case M_OpenContextMenu:
{
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
Point aPos;
ToolBox* pTB = (ToolBox*)pControl;
@@ -4409,9 +4314,9 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
break;
case M_UseMenu:
{
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
while ( pControl && !( ( pControl->GetType() == WINDOW_SYSWINDOW || pControl->GetType() == WINDOW_WORKWINDOW ) && ControlOK( pControl, "" ) ) )
@@ -4502,10 +4407,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
default:
ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
}
- // FIXME: HELPID
- #if 0
SendProfile( UIdString( aUId ).Append('.').Append( MethodString( nMethodId ) ) );
- #endif
}
break;
case M_StatusGetText:
@@ -4640,7 +4542,7 @@ BOOL StatementControl::Execute()
{
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Skipping Window: " );
- m_pDbgWin->AddText( aUId.GetText() );
+ m_pDbgWin->AddText( Id2Str( aUId ) );
m_pDbgWin->AddText( " Method: " );
m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
@@ -4653,19 +4555,16 @@ BOOL StatementControl::Execute()
InitProfile();
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Executing Window: " );
- m_pDbgWin->AddText( aUId.GetText() );
+ m_pDbgWin->AddText( Id2Str( aUId ) );
m_pDbgWin->AddText( " Method: " );
m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) );
m_pDbgWin->AddText( "\n" );
#endif
- // FIXME: HELPID
- #if 0
- if ( aUId.Matches( UID_ACTIVE ) )
+ if ( aUId.equals( UID_ACTIVE ) )
pControl = GetAnyActive();
else
- #endif
{
BOOL bSearchButtonOnToolbox = (nParams == PARAM_NONE) && ((M_Click == nMethodId) || (M_TearOff == nMethodId) || (M_IsEnabled == nMethodId) || (M_OpenMenu == nMethodId));
bSearchButtonOnToolbox |= (nParams == PARAM_USHORT_1) && (M_GetState == nMethodId);
@@ -4684,9 +4583,7 @@ BOOL StatementControl::Execute()
if ( pControl && pControl->GetType() == WINDOW_TOOLBOX )
{
- // FIXME: HELPID
- #if 0
- if ( !aUId.Matches( pControl->GetSmartUniqueOrHelpId() ) )
+ if ( !aUId.equals( pControl->GetUniqueOrHelpId() ) )
{ // Also wenn wir irgendwas auf einer Toolbox gefunden haben
switch ( nMethodId )
{
@@ -4702,7 +4599,6 @@ BOOL StatementControl::Execute()
pControl = NULL;
}
}
- #endif
}
@@ -4746,7 +4642,7 @@ BOOL StatementControl::Execute()
if( pControl ) // Das Fenster Existiert irgendwo, kann aber auch hidden sein!
{
- nRT = ImpGetRType( pControl, aUId ); // If not Numeric pControl is used
+ nRT = ImpGetRType( pControl );
#if OSL_DEBUG_LEVEL > 1
m_pDbgWin->AddText( "Type is: " );
m_pDbgWin->AddText( String::CreateFromInt32( nRT ) );
@@ -4889,47 +4785,44 @@ BOOL StatementControl::Execute()
}
break;
case M_GetPage:
- // FIXME: HELPID
- #if 0
- pRet->GenReturn ( RET_Value, aUId, ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetSmartUniqueOrHelpId().GetText());
- #endif
+ pRet->GenReturn ( RET_Value, aUId, Id2Str( ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetUniqueOrHelpId() ) );
break;
case M_SetPage :
{ // Wegen lokaler Variablen
- // FIXME: HELPID
- #if 0
TabControl *pTControl = ((TabControl*)pControl);
USHORT nActive = pTControl->GetCurPageId();
USHORT i,anz;
rtl::OString aID;
rtl::OString aWantedID;
+ //HELPID BACKWARD (No numbers please (remove PARAM_ULONG_1 part)
if ( (nParams & PARAM_ULONG_1) )
{
- aWantedID = rtl::OString( nLNr1 );
+ //aWantedID = rtl::OString( nLNr1 );
+ ReportError( aUId, GEN_RES_STR1c( S_INTERNAL_ERROR, "using numeric HelpID from old Testtool" ) );
}
else if ( (nParams & PARAM_STR_1) )
{
- aWantedID = rtl::OString( aString1 );
+ aWantedID = Str2Id( aString1 );
}
else
ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
i = pTControl->GetPagePos( pTControl->GetCurPageId() );
- for ( anz=0 ; anz < pTControl->GetPageCount() && !aID.Matches( aWantedID ) ; anz++ )
+ for ( anz=0 ; anz < pTControl->GetPageCount() && !aID.equals( aWantedID ) ; anz++ )
{
pTControl->SelectTabPage( pTControl->GetPageId(i) );
/*if (pTControl->GetCurPageId())
pTControl->DeactivatePage();
pTControl->SetCurPageId( pTControl->GetPageId(i) );
pTControl->ActivatePage();*/
- aID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetSmartUniqueOrHelpId();
+ aID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetUniqueOrHelpId();
i++;
if ( i >= pTControl->GetPageCount() )
i = 0;
if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) ) // 3 Mal aufrufen
break;
}
- if ( !aID.Matches( aWantedID ) )
+ if ( !aID.equals( aWantedID ) )
{
pTControl->SelectTabPage( nActive );
/*if (pTControl->GetCurPageId())
@@ -4938,7 +4831,6 @@ BOOL StatementControl::Execute()
pTControl->ActivatePage();*/
ReportError( aWantedID, GEN_RES_STR1( S_TABPAGE_NOT_FOUND, MethodString( nMethodId ) ) );
}
- #endif
}
break;
default:
@@ -5366,9 +5258,9 @@ BOOL StatementControl::Execute()
ImplMouseButtonUp ( pControl, aMEvnt, FORCE_DIRECT_CALL );
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
break;
@@ -5377,46 +5269,32 @@ BOOL StatementControl::Execute()
break;
}
break;
-#if 0
case C_ToolBox:
{
ToolBox *pTB = ((ToolBox*)pControl);
- // FIXME: HELPID
- #if 0
- if ( !aUId.Matches( pTB->GetUniqueOrHelpId() ) ) // Also Button auf der ToolBox gefunden
+ if ( !aUId.equals( pTB->GetUniqueOrHelpId() ) ) // So we found a Button on the ToolBox
{
if ( (nParams == PARAM_NONE) || (nParams == PARAM_USHORT_1) )
{ // Wir flschen einen Parameter
- if ( aUId.HasNumeric() )
- {
- nParams |= PARAM_ULONG_1;
- nLNr1 = USHORT( aUId.GetNum() );
- DBG_ASSERT( nLNr1 <= 0xFFFF, "ID on ToolBox > 0xFFFF" );
- }
- else
- {
- nParams |= PARAM_STR_1;
- aString1 = aUId.GetStr();
- }
+ nParams |= PARAM_STR_1;
+ aString1 = Id2Str( aUId );
}
else
ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
}
- #endif
-// FIXME: HELPID
#define FIND_ITEM\
USHORT nItemPos = 0;\
BOOL bItemFound = FALSE;\
{\
rtl::OString aButtonId;\
if( nParams & PARAM_STR_1 )\
- aButtonId = rtlOUStringToOString( aString1, RTL_TEXTENCODING_UTF8 );\
- if( nParams & PARAM_ULONG_1 )\
- aButtonId = SmartId( nLNr1 );\
- for ( nItemPos = 0; nItemPos < pTB->GetItemCount() && !aButtonId.Matches(pTB->GetItemCommand(pTB->GetItemId(nItemPos))) &&\
- !aButtonId.Matches(pTB->GetHelpId(pTB->GetItemId(nItemPos))) ; nItemPos++ ) {}\
- bItemFound = aButtonId.Matches(pTB->GetItemCommand(pTB->GetItemId(nItemPos))) || aButtonId.Matches(pTB->GetHelpId(pTB->GetItemId(nItemPos)));\
+ aButtonId = Str2Id( aString1 );\
+ else\
+ ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );\
+ for ( nItemPos = 0; nItemPos < pTB->GetItemCount() && !aButtonId.equals(Str2Id( pTB->GetItemCommand(pTB->GetItemId(nItemPos)) )) &&\
+ !aButtonId.equals(pTB->GetHelpId(pTB->GetItemId(nItemPos))) ; nItemPos++ ) {}\
+ bItemFound = aButtonId.equals(Str2Id( pTB->GetItemCommand(pTB->GetItemId(nItemPos)) )) || aButtonId.equals(pTB->GetHelpId(pTB->GetItemId(nItemPos)));\
if ( !bItemFound )\
ReportError( aUId, GEN_RES_STR1( S_HELPID_ON_TOOLBOX_NOT_FOUND, MethodString( nMethodId ) ) );\
else\
@@ -5458,7 +5336,8 @@ BOOL StatementControl::Execute()
}\
}\
}\
- }\
+ }
+
switch( nMethodId )
{
case M_AnimateMouse :
@@ -5477,9 +5356,9 @@ BOOL StatementControl::Execute()
MouseEvent aMEvnt(aRect.Center(),1,MOUSE_SIMPLECLICK,MOUSE_LEFT);
ImplMouseButtonDown( pTB, aMEvnt );*/
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
new StatementCommand( this, RC_MenuSelect, PARAM_USHORT_1, pTB->GetItemId(nItemPos) + TOOLBOX_MENUITEM_START );
@@ -5542,9 +5421,9 @@ BOOL StatementControl::Execute()
ImplMouseButtonUp( pTB, aMEvnt);
// Das Fenster ist offen.
- aSubMenuId1 = rtl::OString();
- aSubMenuId2 = rtl::OString();
- aSubMenuId3 = rtl::OString();
+ aSubMenuId1 = 0;
+ aSubMenuId2 = 0;
+ aSubMenuId3 = 0;
pMenuWindow = NULL;
}
}
@@ -5563,27 +5442,26 @@ BOOL StatementControl::Execute()
FIND_ITEM;
if ( bItemFound ) // FIND_ITEM Erfolgreich
{
- switch (nNr1)
- {
- case 0:
- // FIXME: HELPID
- #if 0
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetHelpId(pTB->GetItemId(nItemPos)));
- #endif
- break;
- case 1:
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemType(nItemPos));
- break;
- case 2:
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemState(pTB->GetItemId(nItemPos)));
- break;
- case 3:
- pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemId(nItemPos));
- break;
- default:
- pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0));
- break;
- }
+ if ( ValueOK( aUId, CUniString("GetState"), nNr1, 4 ) )
+ switch (nNr1)
+ {
+ case 0:
+ pRet->GenReturn ( RET_Value, aUId, Id2Str( pTB->GetHelpId(pTB->GetItemId(nItemPos)) ) );
+ break;
+ case 1:
+ pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemType(nItemPos));
+ break;
+ case 2:
+ pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemState(pTB->GetItemId(nItemPos)));
+ break;
+ case 3:
+ pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemId(nItemPos));
+ break;
+ default:
+ ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
+ pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0));
+ break;
+ }
}
}
break;
@@ -5899,7 +5777,6 @@ BOOL StatementControl::Execute()
break;
}
break;
-#endif
case C_Control:
{
USHORT nRealControlType = 0;
@@ -6459,10 +6336,7 @@ protected:
break;
case M_Close:
//aWindowWaitUId = aUId;
- // FIXME: HELPID
- #if 0
- DBG_ASSERT( aUId.Matches( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
- #endif
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((DockingWindow*)pControl)->Close();
break;
@@ -6538,10 +6412,7 @@ protected:
break;
}
case M_Close:
- // FIXME_ HELPID
- #if 0
- DBG_ASSERT( aUId.Matches( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
- #endif
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((FloatingWindow*)pControl)->Close();
break;
@@ -6564,10 +6435,7 @@ protected:
AnimateMouse( pControl, MitteOben);
break;
case M_Close:
- // FIXME: HELPID
- #if 0
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
- #endif
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((SystemWindow*)pControl)->Close();
break;
@@ -6576,10 +6444,7 @@ protected:
Window *pChild = GetWinByRT( pControl, WINDOW_OKBUTTON );
if( ControlOK( pChild, "OK Button" ) )
{
- // FIXME: HELPID
- #if 0
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
- #endif
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((Button*)pChild)->Click();
}
@@ -6590,10 +6455,7 @@ protected:
Window *pChild = GetWinByRT( pControl, WINDOW_CANCELBUTTON );
if( ControlOK( pChild, "Cancel Button" ) )
{
- // FIXME: HELPID
- #if 0
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
- #endif
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((Button*)pChild)->Click();
}
@@ -6630,10 +6492,7 @@ protected:
AnimateMouse( pControl, MitteOben);
break;
case M_Close:
- // FIXME: HELPID
- #if 0
- DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
- #endif
+ DBG_ASSERT( aUId.equals( pControl->GetUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
SET_WINP_CLOSING(pControl);
((WorkWindow*)pControl)->Close();
break;
@@ -6858,10 +6717,7 @@ protected:
#endif
if ( bStatementDone )
{
- // FIXME: HELPID
- #if 0
SendProfile( UIdString( aUId ).Append('.').Append( MethodString( nMethodId ) ) );
- #endif
delete this;
}
else
diff --git a/automation/source/server/statemnt.hxx b/automation/source/server/statemnt.hxx
index 2014e6d3a4fe..ada6c60a6b35 100644
--- a/automation/source/server/statemnt.hxx
+++ b/automation/source/server/statemnt.hxx
@@ -293,9 +293,9 @@ public:
static BOOL bDying;
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
- static rtl::OString aSubMenuId1; // Untermens bei PopupMenus
- static rtl::OString aSubMenuId2; // erstmal 2-Stufig
- static rtl::OString aSubMenuId3; // and now even 3 levels #i31512#
+ static USHORT aSubMenuId1; // Untermens bei PopupMenus
+ static USHORT aSubMenuId2; // erstmal 2-Stufig
+ static USHORT aSubMenuId3; // and now even 3 levels #i31512#
static SystemWindow *pMenuWindow; // when using MenuBar as base for MenuCommands
static TTProperties *pTTProperties; // Hier stehen die SlotIDs aus dem SFX drin
@@ -349,7 +349,6 @@ class StatementCommand : public StatementList // Befehl ausfhren (wintree, re
friend class ImplRemoteControl;
protected:
USHORT nMethodId;
- rtl::OString aSmartMethodId;
USHORT nParams;
comm_USHORT nNr1,nNr2,nNr3,nNr4;
comm_ULONG nLNr1;
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index efb2294a5549..4f0f5084ad37 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -3469,11 +3469,9 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
// ULONG nHintUserData = pImpl->pNextReturn->GetParent()->GetUserData();
// pImpl->pNextReturn->GetParent()->SetUserData(0);
// if ( nUId == pImpl->pNextReturn->GetParent()->GetULong() )
- // FIXME: HELPID
- #if 0
- if ( aNextReturnId.Matches( aUId ) )
+ if ( aNextReturnId.equals( 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 )
pImpl->pNextReturn->PutLong( long(nLNr1 - 0xffffffff) -1 );
@@ -3483,7 +3481,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
if( nParams & PARAM_USHORT_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 )
+ if( nParams & PARAM_SBXVALUE_1 ) // FIXME: allow generic datatype
{
SbxValues aValues( SbxDATE );
xValue1->Get( aValues );
@@ -3494,7 +3492,6 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
{
ADD_ERROR(SbxERR_BAD_ACTION, GEN_RES_STR0(S_RETURNED_VALUE_ID_MISSMATCH) )
}
- #endif
// pImpl->pNextReturn->GetParent()->SetUserData(nHintUserData);
pImpl->pNextReturn = NULL;
}
diff --git a/automation/util/manually_added_ids.hid b/automation/util/manually_added_ids.hid
index 7372dc0d9879..7372dc0d9879 100755..100644
--- a/automation/util/manually_added_ids.hid
+++ b/automation/util/manually_added_ids.hid