diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-07 00:15:13 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-18 02:52:07 +0200 |
commit | 326324dd764385d21754aaa2e7fc196386eb4729 (patch) | |
tree | 68aa1d81870fc376345d35329473100ceeeec2c5 /automation | |
parent | d3318788b34f6c570dff9f3a969ab4182f127b0e (diff) |
ByteString::CreateFromInt32->rtl::OString::valueOf
Diffstat (limited to 'automation')
-rw-r--r-- | automation/source/server/statemnt.cxx | 861 | ||||
-rw-r--r-- | automation/source/testtool/tcommuni.cxx | 12 |
2 files changed, 439 insertions, 434 deletions
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 7acabf1c238f..23641de88d47 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -161,8 +161,8 @@ StatementFlow::StatementFlow( sal_uLong nServiceId, SCmdStream *pCmdIn, ImplRemo pCmdIn->Read( nArt ); pCmdIn->Read( nParams ); - if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nSNr1 ); - if( nParams & PARAM_ULONG_1 ) pCmdIn->Read( nLNr1 ); + if( nParams & PARAM_UINT16_1 ) pCmdIn->Read( nSNr1 ); + if( nParams & PARAM_UINT32_1 ) pCmdIn->Read( nLNr1 ); if( nParams & PARAM_STR_1 ) pCmdIn->Read( aString1 ); if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 );// Should NEVER happen @@ -170,8 +170,8 @@ StatementFlow::StatementFlow( sal_uLong nServiceId, SCmdStream *pCmdIn, ImplRemo m_pDbgWin->AddText( "Reading FlowControl: " ); m_pDbgWin->AddText( String::CreateFromInt32( nArt ) ); m_pDbgWin->AddText( " Params:" ); - if( nParams & PARAM_USHORT_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nSNr1 ) );} - if( nParams & PARAM_ULONG_1 ) {m_pDbgWin->AddText( " l1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} + if( nParams & PARAM_UINT16_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nSNr1 ) );} + if( nParams & PARAM_UINT32_1 ) {m_pDbgWin->AddText( " l1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} if( nParams & PARAM_BOOL_1 ) {m_pDbgWin->AddText( " b2:" );m_pDbgWin->AddText( bBool1 ? "TRUE" : "FALSE" );} m_pDbgWin->AddText( "\n" ); @@ -191,7 +191,7 @@ void StatementFlow::SendViaSocket() bSending = sal_True; if ( pCommLink ) { - if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // tritt ein Fehler auf, so wird sofort gel�scht ... + if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // tritt ein Fehler auf, so wird sofort gel�scht ... pCommLink = NULL; } else @@ -220,15 +220,15 @@ sal_Bool StatementFlow::Execute() if ( !bUseIPC ) { // bBool1 wurde im CTOR auf sal_False initialisiert - if ( !bBool1 ) // also erster Durchlauf + if ( !bBool1 ) // also erster Durchlauf { pRemoteControl->pRetStream = pRet->GetStream(); - bBool1 = sal_True; // wurde im CTOR auf sal_False initialisiert + bBool1 = sal_True; // wurde im CTOR auf sal_False initialisiert nRetryCount = nRetryCount * 4; } - if ( pRemoteControl->pRetStream && (nRetryCount--) ) // also solange nicht abgeholt + if ( pRemoteControl->pRetStream && (nRetryCount--) ) // also solange nicht abgeholt { - return sal_False; // Bitte einmal vom Callstack runter + return sal_False; // Bitte einmal vom Callstack runter } } @@ -241,7 +241,7 @@ sal_Bool StatementFlow::Execute() { case F_EndCommandBlock: if ( !bUseIPC ) - { // wird oben abgehandelt + { // wird oben abgehandelt pRet->Reset(); IsError = sal_False; } @@ -276,59 +276,59 @@ static short ImpGetRType( Window *pWin ) short nRT = C_NoType; WindowType eRT = pWin->GetType(); switch( eRT ) { - case WINDOW_WINDOW: nRT = C_Window ; break; - - case WINDOW_TABCONTROL: nRT = C_TabControl ; break; - case WINDOW_RADIOBUTTON: nRT = C_RadioButton ; break; - case WINDOW_CHECKBOX: nRT = C_CheckBox ; break; - case WINDOW_TRISTATEBOX: nRT = C_TriStateBox ; break; - case WINDOW_EDIT: nRT = C_Edit ; break; - case WINDOW_MULTILINEEDIT: nRT = C_MultiLineEdit ; break; - case WINDOW_MULTILISTBOX: nRT = C_MultiListBox ; break; - case WINDOW_LISTBOX: nRT = C_ListBox ; break; - case WINDOW_COMBOBOX: nRT = C_ComboBox ; break; - case WINDOW_PUSHBUTTON: nRT = C_PushButton ; break; - case WINDOW_SPINFIELD: nRT = C_SpinField ; break; - case WINDOW_PATTERNFIELD: nRT = C_PatternField ; break; - case WINDOW_NUMERICFIELD: nRT = C_NumericField ; break; - case WINDOW_METRICFIELD: nRT = C_MetricField ; break; - case WINDOW_CURRENCYFIELD: nRT = C_CurrencyField ; break; - case WINDOW_DATEFIELD: nRT = C_DateField ; break; - case WINDOW_TIMEFIELD: nRT = C_TimeField ; break; - case WINDOW_IMAGERADIOBUTTON: nRT = C_ImageRadioButton ; break; - case WINDOW_NUMERICBOX: nRT = C_NumericBox ; break; - case WINDOW_METRICBOX: nRT = C_MetricBox ; break; - case WINDOW_CURRENCYBOX: nRT = C_CurrencyBox ; break; - case WINDOW_DATEBOX: nRT = C_DateBox ; break; - case WINDOW_TIMEBOX: nRT = C_TimeBox ; break; - case WINDOW_IMAGEBUTTON: nRT = C_ImageButton ; break; - case WINDOW_MENUBUTTON: nRT = C_MenuButton ; break; - case WINDOW_MOREBUTTON: nRT = C_MoreButton ; break; - - - case WINDOW_TABPAGE: nRT = C_TabPage; break; - case WINDOW_MODALDIALOG: nRT = C_ModalDlg; break; - case WINDOW_FLOATINGWINDOW: nRT = C_FloatWin; break; - case WINDOW_MODELESSDIALOG: nRT = C_ModelessDlg; break; - case WINDOW_WORKWINDOW: nRT = C_WorkWin; break; - case WINDOW_DOCKINGWINDOW: nRT = C_DockingWin; break; - - case WINDOW_MESSBOX: nRT = C_MessBox; break; - case WINDOW_INFOBOX: nRT = C_InfoBox; break; - case WINDOW_WARNINGBOX: nRT = C_WarningBox; break; - case WINDOW_ERRORBOX: nRT = C_ErrorBox; break; - case WINDOW_QUERYBOX: nRT = C_QueryBox; break; - case WINDOW_TABDIALOG: nRT = C_TabDlg; break; - - case WINDOW_PATTERNBOX: nRT = C_PatternBox; break; - case WINDOW_TOOLBOX: nRT = C_ToolBox; break; - case WINDOW_CONTROL: nRT = C_Control; break; - case WINDOW_OKBUTTON: nRT = C_OkButton; break; - case WINDOW_CANCELBUTTON: nRT = C_CancelButton; break; - case WINDOW_BUTTONDIALOG: nRT = C_ButtonDialog; break; - case WINDOW_TREELISTBOX: nRT = C_TreeListBox; break; - - case WINDOW_DIALOG: nRT = C_Dialog; break; + case WINDOW_WINDOW: nRT = C_Window ; break; + + case WINDOW_TABCONTROL: nRT = C_TabControl ; break; + case WINDOW_RADIOBUTTON: nRT = C_RadioButton ; break; + case WINDOW_CHECKBOX: nRT = C_CheckBox ; break; + case WINDOW_TRISTATEBOX: nRT = C_TriStateBox ; break; + case WINDOW_EDIT: nRT = C_Edit ; break; + case WINDOW_MULTILINEEDIT: nRT = C_MultiLineEdit ; break; + case WINDOW_MULTILISTBOX: nRT = C_MultiListBox ; break; + case WINDOW_LISTBOX: nRT = C_ListBox ; break; + case WINDOW_COMBOBOX: nRT = C_ComboBox ; break; + case WINDOW_PUSHBUTTON: nRT = C_PushButton ; break; + case WINDOW_SPINFIELD: nRT = C_SpinField ; break; + case WINDOW_PATTERNFIELD: nRT = C_PatternField ; break; + case WINDOW_NUMERICFIELD: nRT = C_NumericField ; break; + case WINDOW_METRICFIELD: nRT = C_MetricField ; break; + case WINDOW_CURRENCYFIELD: nRT = C_CurrencyField ; break; + case WINDOW_DATEFIELD: nRT = C_DateField ; break; + case WINDOW_TIMEFIELD: nRT = C_TimeField ; break; + case WINDOW_IMAGERADIOBUTTON: nRT = C_ImageRadioButton ; break; + case WINDOW_NUMERICBOX: nRT = C_NumericBox ; break; + case WINDOW_METRICBOX: nRT = C_MetricBox ; break; + case WINDOW_CURRENCYBOX: nRT = C_CurrencyBox ; break; + case WINDOW_DATEBOX: nRT = C_DateBox ; break; + case WINDOW_TIMEBOX: nRT = C_TimeBox ; break; + case WINDOW_IMAGEBUTTON: nRT = C_ImageButton ; break; + case WINDOW_MENUBUTTON: nRT = C_MenuButton ; break; + case WINDOW_MOREBUTTON: nRT = C_MoreButton ; break; + + + case WINDOW_TABPAGE: nRT = C_TabPage; break; + case WINDOW_MODALDIALOG: nRT = C_ModalDlg; break; + case WINDOW_FLOATINGWINDOW: nRT = C_FloatWin; break; + case WINDOW_MODELESSDIALOG: nRT = C_ModelessDlg; break; + case WINDOW_WORKWINDOW: nRT = C_WorkWin; break; + case WINDOW_DOCKINGWINDOW: nRT = C_DockingWin; break; + + case WINDOW_MESSBOX: nRT = C_MessBox; break; + case WINDOW_INFOBOX: nRT = C_InfoBox; break; + case WINDOW_WARNINGBOX: nRT = C_WarningBox; break; + case WINDOW_ERRORBOX: nRT = C_ErrorBox; break; + case WINDOW_QUERYBOX: nRT = C_QueryBox; break; + case WINDOW_TABDIALOG: nRT = C_TabDlg; break; + + case WINDOW_PATTERNBOX: nRT = C_PatternBox; break; + case WINDOW_TOOLBOX: nRT = C_ToolBox; break; + case WINDOW_CONTROL: nRT = C_Control; break; + case WINDOW_OKBUTTON: nRT = C_OkButton; break; + case WINDOW_CANCELBUTTON: nRT = C_CancelButton; break; + case WINDOW_BUTTONDIALOG: nRT = C_ButtonDialog; break; + case WINDOW_TREELISTBOX: nRT = C_TreeListBox; break; + + case WINDOW_DIALOG: nRT = C_Dialog; break; } return nRT; } @@ -349,7 +349,7 @@ StatementSlot::StatementSlot( SCmdStream *pCmdIn ) { switch ( pCmdIn->GetNextType() ) { - case BinUSHORT: // use old calling method + case BinUINT16: // use old calling method { nAnzahl++; pItemArr = new SfxPoolItem*[nAnzahl]; @@ -640,7 +640,7 @@ sal_Bool StatementSlot::Execute() } -/* Neues Verfahren ab 334! +/* Neues Verfahren ab 334! Neue Methode zum einstellen, da� Modale Dialoge immer Asynchron aufgerufen werden und echter Returnwert, ob Slot geklappt hat und Testen ob Slot �berhaupt durch UI aufgerufen werden kann */ @@ -674,12 +674,13 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, sal_uInt16 Method , nNr2(0) , nNr3(0) , nNr4(0) -, nLNr1(0) , aString1() , aString2() , bBool1(sal_False) , bBool2(sal_False) { + nLNr1_and_Pointer.pWindow = 0; + QueStatement( pAfterThis ); #if OSL_DEBUG_LEVEL > 1 @@ -687,13 +688,13 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, sal_uInt16 Method m_pDbgWin->AddText( " Methode: " ); 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 ) );} - if( nParams & PARAM_USHORT_3 ) {m_pDbgWin->AddText( " n3:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );} - if( nParams & PARAM_USHORT_4 ) {m_pDbgWin->AddText( " n4:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );} - if( nParams & PARAM_ULONG_1 ) {m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} - if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} - if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );} + if( nParams & PARAM_UINT16_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );} + if( nParams & PARAM_UINT16_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );} + if( nParams & PARAM_UINT16_3 ) {m_pDbgWin->AddText( " n3:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );} + if( nParams & PARAM_UINT16_4 ) {m_pDbgWin->AddText( " n4:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );} + if( nParams & PARAM_UINT32_1 ) {m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} + if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} + if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );} if( nParams & PARAM_BOOL_1 ) {m_pDbgWin->AddText( " b1:" );m_pDbgWin->AddText( bBool1 ? "TRUE" : "FALSE" );} if( nParams & PARAM_BOOL_2 ) {m_pDbgWin->AddText( " b2:" );m_pDbgWin->AddText( bBool2 ? "TRUE" : "FALSE" );} m_pDbgWin->AddText( "\n" ); @@ -708,38 +709,39 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) , nNr2(0) , nNr3(0) , nNr4(0) -, nLNr1(0) , aString1() , aString2() , bBool1(sal_False) , bBool2(sal_False) { + nLNr1_and_Pointer.pWindow = 0; + QueStatement( NULL ); pCmdIn->Read( nMethodId ); pCmdIn->Read( nParams ); - if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nNr1 ); - if( nParams & PARAM_USHORT_2 ) pCmdIn->Read( nNr2 ); - if( nParams & PARAM_USHORT_3 ) pCmdIn->Read( nNr3 ); - if( nParams & PARAM_USHORT_4 ) pCmdIn->Read( nNr4 ); - if( nParams & PARAM_ULONG_1 ) pCmdIn->Read( nLNr1 ); - if( nParams & PARAM_STR_1 ) pCmdIn->Read( aString1 ); - if( nParams & PARAM_STR_2 ) pCmdIn->Read( aString2 ); - if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 ); - if( nParams & PARAM_BOOL_2 ) pCmdIn->Read( bBool2 ); + if( nParams & PARAM_UINT16_1 ) pCmdIn->Read( nNr1 ); + if( nParams & PARAM_UINT16_2 ) pCmdIn->Read( nNr2 ); + if( nParams & PARAM_UINT16_3 ) pCmdIn->Read( nNr3 ); + if( nParams & PARAM_UINT16_4 ) pCmdIn->Read( nNr4 ); + if( nParams & PARAM_UINT32_1 ) pCmdIn->Read( nLNr1_and_Pointer.nLNr1 ); + if( nParams & PARAM_STR_1 ) pCmdIn->Read( aString1 ); + if( nParams & PARAM_STR_2 ) pCmdIn->Read( aString2 ); + if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 ); + if( nParams & PARAM_BOOL_2 ) pCmdIn->Read( bBool2 ); #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Reading Conmmand:" ); m_pDbgWin->AddText( " Methode: " ); 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 ) );} - if( nParams & PARAM_USHORT_3 ) {m_pDbgWin->AddText( " n3:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );} - if( nParams & PARAM_USHORT_4 ) {m_pDbgWin->AddText( " n4:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );} - if( nParams & PARAM_ULONG_1 ) {m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} - if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} - if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );} + if( nParams & PARAM_UINT16_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );} + if( nParams & PARAM_UINT16_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );} + if( nParams & PARAM_UINT16_3 ) {m_pDbgWin->AddText( " n3:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );} + if( nParams & PARAM_UINT16_4 ) {m_pDbgWin->AddText( " n4:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );} + if( nParams & PARAM_UINT32_1 ) {m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} + if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} + if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );} if( nParams & PARAM_BOOL_1 ) {m_pDbgWin->AddText( " b1:" );m_pDbgWin->AddText( bBool1 ? "TRUE" : "FALSE" );} if( nParams & PARAM_BOOL_2 ) {m_pDbgWin->AddText( " b2:" );m_pDbgWin->AddText( bBool2 ? "TRUE" : "FALSE" );} m_pDbgWin->AddText( "\n" ); @@ -772,7 +774,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo return; if ( bFirst ) - pRet->GenReturn ( RET_WinInfo, rtl::OString(), (comm_ULONG)nConf | DH_MODE_DATA_VALID, UniString(), sal_True ); + pRet->GenReturn ( RET_WinInfo, rtl::OString(), (comm_UINT32)nConf | DH_MODE_DATA_VALID, UniString(), sal_True ); if ( bFirst ) { @@ -781,7 +783,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo pBase = pBase->GetParent(); } - { // Klammerung, so da� der String nicht w�hrend der Rekursion bestehen bleibt + { // Klammerung, so da� der String nicht w�hrend der Rekursion bestehen bleibt String aName; sal_Bool bSkip = sal_False; @@ -882,11 +884,11 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo } rtl::OString aId = pBase->GetUniqueOrHelpId(); - pRet->GenReturn ( RET_WinInfo, aId, (comm_ULONG)pBase->GetType(), + pRet->GenReturn ( RET_WinInfo, aId, (comm_UINT32)pBase->GetType(), TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), sal_False ); - if ( pBase->GetType() == WINDOW_TOOLBOX ) // Buttons und Controls auf Toolboxen. + if ( pBase->GetType() == WINDOW_TOOLBOX ) // Buttons und Controls auf Toolboxen. { ToolBox *pTB = ((ToolBox*)pBase); sal_uInt16 i; @@ -903,10 +905,10 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo if ( pTB->GetItemType( i ) == TOOLBOXITEM_BUTTON && ( !pItemWin || !pItemWin->IsVisible() ) ) { if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)WINDOW_BUTTON, + pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_UINT32)WINDOW_BUTTON, TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BUTTON, + pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_UINT32)WINDOW_BUTTON, TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False ); } else @@ -914,10 +916,10 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo if ( pItemWin ) { if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)pItemWin->GetType(), + pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_UINT32)pItemWin->GetType(), TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)pItemWin->GetType(), + pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_UINT32)pItemWin->GetType(), TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), sal_False ); sal_uInt16 ii; for( ii = 0 ; ii < pItemWin->GetChildCount(); ii++ ) @@ -949,21 +951,21 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo OSL_TRACE( "Unknown TOOLBOXITEM %i", pTB->GetItemType( i ) ); } if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE, + pRet->GenReturn ( RET_WinInfo, Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_UINT32)WINDOW_BASE, aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BASE, + pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_UINT32)WINDOW_BASE, aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False ); } } } } - return; // ToolBox ist hier schon komplett abgehandelt. + return; // ToolBox ist hier schon komplett abgehandelt. } - if ( pBase->GetType() == WINDOW_BUTTONDIALOG // Buttons auf Buttondialogen mit ID + if ( pBase->GetType() == WINDOW_BUTTONDIALOG // Buttons auf Buttondialogen mit ID || pBase->GetType() == WINDOW_MESSBOX || pBase->GetType() == WINDOW_INFOBOX || pBase->GetType() == WINDOW_WARNINGBOX @@ -999,22 +1001,23 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo aID.Assign("Help"); break; default: - aID = ByteString::CreateFromInt32( pBD->GetButtonId(i) ); + aID = rtl::OString::valueOf( + static_cast<sal_Int32>(pBD->GetButtonId(i))); break; } - pRet->GenReturn ( RET_WinInfo, aID, (comm_ULONG)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So da� der Text angezeigt wird! + pRet->GenReturn ( RET_WinInfo, aID, (comm_UINT32)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So da� der Text angezeigt wird! TypeString(pBD->GetPushButton( pBD->GetButtonId(i) )->GetType()).AppendAscii(": ").Append(aName) .AppendAscii(" ButtonId = ").AppendAscii( aID.GetBuffer() ), sal_False ); } - return; // ButtonDialog ist hier schon komplett abgehandelt. + return; // ButtonDialog ist hier schon komplett abgehandelt. } Menu* pMenu = GetMatchingMenu( pBase ); - if ( pMenu ) // Menus + if ( pMenu ) // Menus { sal_uInt16 i; for ( i = 0; i < pMenu->GetItemCount() ; i++ ) @@ -1052,15 +1055,15 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo OSL_TRACE( "Unknown MENUITEM %i", pMenu->GetItemType( i ) ); } if ( pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, Str2Id( pMenu->GetItemCommand(nID) ), (comm_ULONG)0, + pRet->GenReturn ( RET_WinInfo, Str2Id( pMenu->GetItemCommand(nID) ), (comm_UINT32)0, aMenuItemType.AppendAscii(": ").Append(aName), sal_False ); if ( !pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, rtl::OString::valueOf( (sal_Int32)nID ), (comm_ULONG)0, + pRet->GenReturn ( RET_WinInfo, rtl::OString::valueOf( (sal_Int32)nID ), (comm_UINT32)0, aMenuItemType.AppendAscii(": ").Append(aName), sal_False ); } } - return; // Menu ist hier schon komplett abgehandelt. + return; // Menu ist hier schon komplett abgehandelt. } } } @@ -1077,8 +1080,8 @@ private: public: SysWinContainer( ToolBox *pClient ); ~SysWinContainer(); - virtual void Resize(); - virtual void Resizing( Size& rSize ); + virtual void Resize(); + virtual void Resizing( Size& rSize ); }; SysWinContainer::SysWinContainer( ToolBox *pClient ) @@ -1139,9 +1142,9 @@ void SysWinContainer::Resizing( Size& rSize ) class DisplayHidWin : public ToolBox { - Edit *pEdit; - Size aMinEditSize; - sal_uInt16 nLastItemID; + Edit *pEdit; + Size aMinEditSize; + sal_uInt16 nLastItemID; sal_Bool bIsDraging; sal_Bool bIsPermanentDraging; void SetDraging( sal_Bool bNewDraging ); @@ -1169,10 +1172,10 @@ public: DisplayHidWin(); ~DisplayHidWin(); - virtual void Tracking( const TrackingEvent& rTEvt ); - virtual void Click(); - virtual void Select(); - virtual void SetText( const XubString& rStr ); + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void Click(); + virtual void Select(); + virtual void SetText( const XubString& rStr ); void SetDisplayText( const String &aNewText ){ pEdit->SetText(aNewText); } String GetDisplayText() const { return pEdit->GetText(); } @@ -1205,7 +1208,7 @@ DisplayHidWin::DisplayHidWin() SetOutStyle( TOOLBOX_STYLE_HANDPOINTER | TOOLBOX_STYLE_FLAT ); pEdit = new Edit( this, WB_CENTER | WB_BORDER ); aMinEditSize = GetItemRect( TT_OUTPUT ).GetSize(); -/**/ aMinEditSize=Size(20,20); +/**/ aMinEditSize=Size(20,20); aMinEditSize.Width() *= 12; pEdit->SetSizePixel( aMinEditSize ); pEdit->Show(); @@ -1360,32 +1363,32 @@ sal_Bool StatementCommand::DisplayHID() { // Return sal_True -> reexecute command - if ( !bBool2 ) // Wird auf sal_False initialisiert + if ( !bBool2 ) // Wird auf sal_False initialisiert { - bBool2 = sal_True; // Wir sind initialisiert. - GetTTSettings()->pDisplayInstance = this; // Und haben die Macht (Alle anderen beenden sich) + bBool2 = sal_True; // Wir sind initialisiert. + GetTTSettings()->pDisplayInstance = this; // Und haben die Macht (Alle anderen beenden sich) - if ( !(nParams & PARAM_ULONG_1) ) + if ( !(nParams & PARAM_UINT32_1) ) { - if( GetTTSettings()->pDisplayHidWin ) // Nichts ver�ndern - nLNr1 = GetTTSettings()->pDisplayHidWin->GetConfig(); - else // Beim ersten Aufruf wollen wir alles richtig einstellen - nLNr1 = DH_MODE_KURZNAME | DH_MODE_LANGNAME; + if( GetTTSettings()->pDisplayHidWin ) // Nichts ver�ndern + nLNr1_and_Pointer.nLNr1 = GetTTSettings()->pDisplayHidWin->GetConfig(); + else // Beim ersten Aufruf wollen wir alles richtig einstellen + nLNr1_and_Pointer.nLNr1 = DH_MODE_KURZNAME | DH_MODE_LANGNAME; if( ((nParams & PARAM_BOOL_1) && bBool1) ) - nLNr1 |= DH_MODE_SEND_DATA; + nLNr1_and_Pointer.nLNr1 |= DH_MODE_SEND_DATA; else - nLNr1 &= ( ~DH_MODE_SEND_DATA ); + nLNr1_and_Pointer.nLNr1 &= ( ~DH_MODE_SEND_DATA ); } if ( GetTTSettings()->pDisplayHidWin ) - GetTTSettings()->pDisplayHidWin->SetConfig( nLNr1 ); + GetTTSettings()->pDisplayHidWin->SetConfig( nLNr1_and_Pointer.nLNr1 ); } if ( GetTTSettings()->pDisplayInstance && GetTTSettings()->pDisplayInstance != this ) { DBG_WARNING("Mehrere DisplayHID am laufen"); - return sal_False; // Noch eine andere Instanz macht das gleiche! + return sal_False; // Noch eine andere Instanz macht das gleiche! } if ( !GetTTSettings()->pDisplayHidWin ) @@ -1394,8 +1397,8 @@ sal_Bool StatementCommand::DisplayHID() GetTTSettings()->aOriginalCaption = GetTTSettings()->pDisplayHidWin->GetText(); GetTTSettings()->pDisplayHidWin->Show(); if ( bBool1 ) - nLNr1 |= DH_MODE_SEND_DATA; - GetTTSettings()->pDisplayHidWin->SetConfig( nLNr1 ); + nLNr1_and_Pointer.nLNr1 |= DH_MODE_SEND_DATA; + GetTTSettings()->pDisplayHidWin->SetConfig( nLNr1_and_Pointer.nLNr1 ); GetTTSettings()->Old = NULL; GetTTSettings()->Act = NULL; @@ -1415,35 +1418,35 @@ sal_Bool StatementCommand::DisplayHID() { -#define HIGHLIGHT_WIN( WinPtr ) \ - { \ - Color aLineColMem = WinPtr->GetLineColor(); \ - WinPtr->SetLineColor( Color( COL_WHITE ) ); \ - Color aFillColMem = WinPtr->GetFillColor(); \ - WinPtr->SetFillColor( Color( COL_LIGHTRED ) ); \ - RasterOp aROp = WinPtr->GetRasterOp(); \ - WinPtr->SetRasterOp( ROP_XOR ); \ +#define HIGHLIGHT_WIN( WinPtr ) \ + { \ + Color aLineColMem = WinPtr->GetLineColor(); \ + WinPtr->SetLineColor( Color( COL_WHITE ) ); \ + Color aFillColMem = WinPtr->GetFillColor(); \ + WinPtr->SetFillColor( Color( COL_LIGHTRED ) ); \ + RasterOp aROp = WinPtr->GetRasterOp(); \ + WinPtr->SetRasterOp( ROP_XOR ); \ Size aSz = WinPtr->PixelToLogic( WinPtr->GetSizePixel() );\ sal_uLong nMaxCornerRadius = WinPtr->PixelToLogic( Point( 80, 0 ) ).X();\ sal_uLong iCorner = std::max ((sal_uLong) 8, (sal_uLong) std::min( nMaxCornerRadius, (sal_uLong) std::min((sal_uLong) (aSz.Width() / 6), (sal_uLong)(aSz.Height() / 6))));\ WinPtr->DrawRect(Rectangle(Point(),aSz), iCorner, iCorner);\ - WinPtr->SetLineColor( aLineColMem ); \ - WinPtr->SetFillColor( aFillColMem ); \ - WinPtr->SetRasterOp( aROp ); \ + WinPtr->SetLineColor( aLineColMem ); \ + WinPtr->SetFillColor( aFillColMem ); \ + WinPtr->SetRasterOp( aROp ); \ } -#define SET_WIN( WinPtr ) \ - if ( StatementList::WinPtrValid(WinPtr) ) \ - { \ - HIGHLIGHT_WIN ( WinPtr ); \ +#define SET_WIN( WinPtr ) \ + if ( StatementList::WinPtrValid(WinPtr) ) \ + { \ + HIGHLIGHT_WIN ( WinPtr ); \ } -#define RESET_WIN( WinPtr ) \ - if ( StatementList::WinPtrValid(WinPtr) ) \ - { \ - WinPtr->Invalidate( INVALIDATE_NOTRANSPARENT ); \ - WinPtr->Update(); \ +#define RESET_WIN( WinPtr ) \ + if ( StatementList::WinPtrValid(WinPtr) ) \ + { \ + WinPtr->Invalidate( INVALIDATE_NOTRANSPARENT ); \ + WinPtr->Update(); \ } @@ -1490,9 +1493,9 @@ sal_Bool StatementCommand::DisplayHID() if ( GetTTSettings()->pDisplayHidWin->IsSendData() && GetTTSettings()->Act ) { if ( !StatementFlow::bSending ) - { // Normalerweise syncronisierung �ber Protokoll. Hier ist das aber asyncron!!! + { // Normalerweise syncronisierung �ber Protokoll. Hier ist das aber asyncron!!! WriteControlData( GetTTSettings()->Act, GetTTSettings()->pDisplayHidWin->GetConfig() ); - new StatementFlow( this, F_EndCommandBlock ); // Kommando zum Senden erzeugen und in que eintragen + new StatementFlow( this, F_EndCommandBlock ); // Kommando zum Senden erzeugen und in que eintragen } } } @@ -1505,9 +1508,9 @@ sal_Bool StatementCommand::DisplayHID() } } - if ( pFirst == this ) // Sollte immer so sein, aber besser isses - if ( pNext ) // Befehle warten auf Ausf�hrung - { // An Ende neu einsortieren + if ( pFirst == this ) // Sollte immer so sein, aber besser isses + if ( pNext ) // Befehle warten auf Ausf�hrung + { // An Ende neu einsortieren Advance(); QueStatement( NULL ); } @@ -1683,11 +1686,11 @@ IMPL_LINK( TranslateWin, DoRestore, PushButton*, EMPTYARG ) sTT_E_NEW.SearchAndReplaceAll( CUniString("\\t"), CUniString("\t") ); if ( StatementList::WinPtrValid( pTranslateWin ) && pTranslateWin->GetText().CompareTo( sTT_E_NEW ) == COMPARE_EQUAL ) - { // Im ersten schritt nur in der UI zur�ck + { // Im ersten schritt nur in der UI zur�ck pTranslateWin->SetText( sTT_E_OLD ); } else - { // Im zweite Schritt auch den eingegebenen Text + { // Im zweite Schritt auch den eingegebenen Text EditTT_E_NEW.SetText( FixedTextTT_FT_OLD.GetText() ); PushButtonTT_PB_RESTORE.Disable(); } @@ -1814,9 +1817,9 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) return 0; } -#define FDS_ACTION_COLLECT 1 -#define FDS_ACTION_MARK 2 -#define FDS_ACTION_UNMARK 3 +#define FDS_ACTION_COLLECT 1 +#define FDS_ACTION_MARK 2 +#define FDS_ACTION_UNMARK 3 class FindShortcutErrors: public Search { @@ -1832,7 +1835,7 @@ public: FindShortcutErrors::FindShortcutErrors() : Search( SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN ) { - SetAction( FDS_ACTION_COLLECT ); // Wir fange immer mit sammeln an, ODER?? + SetAction( FDS_ACTION_COLLECT ); // Wir fange immer mit sammeln an, ODER?? } void FindShortcutErrors::SetAction( sal_uInt16 nA ) @@ -1873,10 +1876,10 @@ sal_Bool FindShortcutErrors::IsWinOK( Window *pWin ) case FDS_ACTION_MARK: { sal_Bool bMissing = sal_False; - if ( !bHasAccel && aText.Len() ) // should there be an accelarator defined + if ( !bHasAccel && aText.Len() ) // should there be an accelarator defined { - Window* pChild; + Window* pChild; pChild = pWin->GetWindow( WINDOW_CLIENT ); if ( (pChild->GetType() == WINDOW_RADIOBUTTON) || @@ -1974,7 +1977,7 @@ String TranslateWin::MarkShortcutErrors( Window* pBase, sal_Bool bMark ) FindShortcutErrors aFinder; if ( bMark ) { - StatementList::SearchAllWin( pBase, aFinder, sal_True ); // collect Shortcuts first + StatementList::SearchAllWin( pBase, aFinder, sal_True ); // collect Shortcuts first aFinder.SetAction( FDS_ACTION_MARK ); } else @@ -1996,7 +1999,7 @@ void TranslateWin::EnableTranslation() void StatementCommand::Translate() { // Es wurde eine initale UniqueId mitgegeben. Dann nur die dopelten Shortcuts liefern - if( (nParams & PARAM_STR_1) && nLNr1 ) + if( (nParams & PARAM_STR_1) && nLNr1_and_Pointer.nLNr1 ) { String aDouble; Window *pWin = SearchTree( Str2Id( aString1 ) ,sal_False ); @@ -2063,7 +2066,7 @@ void StatementCommand::Translate() aTranslation += TypeString( pParentDialog->GetType() ); } else - aTranslation.AppendAscii( "0;" ); // Zahl + leerer String + aTranslation.AppendAscii( "0;" ); // Zahl + leerer String aTranslation += ';'; aTranslation += '\"'; @@ -2116,7 +2119,7 @@ void StatementCommand::Translate() } Window* StatementCommand::GetNextOverlap( Window* pBase ) -{ // Findet irgendwelche Overlap-Fenster, die schlie�bar aussehen +{ // Findet irgendwelche Overlap-Fenster, die schlie�bar aussehen // Eventuell mu� noch die Auswahl verfeinert werden. if ( pBase->GetType() != WINDOW_BORDERWINDOW ) @@ -2217,25 +2220,25 @@ sal_Bool StatementCommand::Execute() #if OSL_DEBUG_LEVEL > 1 -#define REPORT_WIN_CLOSED(pControl, aInfo) \ - _REPORT_WIN_CLOSED(pControl, aInfo) \ +#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( UIdString( pControl->GetUniqueOrHelpId() ) ) ); #else -#define REPORT_WIN_CLOSED(pControl, aInfo) _REPORT_WIN_CLOSED(pControl, aInfo) +#define REPORT_WIN_CLOSED(pControl, aInfo) _REPORT_WIN_CLOSED(pControl, aInfo) #endif -#define REPORT_WIN_CLOSEDc(pControl, aInfo ) \ +#define REPORT_WIN_CLOSEDc(pControl, aInfo ) \ REPORT_WIN_CLOSED(pControl, CUniString(aInfo) ) -#define _REPORT_WIN_CLOSED(pControl, aInfo) \ - if ( aString1.Len() ) \ - aString1 += '\n'; \ - aString1 += aInfo; \ - aString1.AppendAscii(" \""); \ - aString1 += pControl->GetText(); \ +#define _REPORT_WIN_CLOSED(pControl, aInfo) \ + if ( aString1.Len() ) \ + aString1 += '\n'; \ + aString1 += aInfo; \ + aString1.AppendAscii(" \""); \ + aString1 += pControl->GetText(); \ aString1.AppendAscii("\" geschlossen, RType = ");\ - aString1 += TypeString(pControl->GetType()); \ - aString1.AppendAscii(", UId = "); \ + aString1 += TypeString(pControl->GetType()); \ + aString1.AppendAscii(", UId = "); \ aString1 += UIdString(pControl->GetUniqueOrHelpId()); @@ -2244,10 +2247,10 @@ sal_Bool StatementCommand::Execute() case RC_AppDelay: if ( !bBool1 ) { - nLNr1 = Time().GetTime() + nNr1/10; + nLNr1_and_Pointer.nLNr1 = Time().GetTime() + nNr1/10; bBool1 = sal_True; } - if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit + if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) ) // Aktuelle Zeit kleiner Endzeit return sal_False; break; case RC_DisplayHid: @@ -2258,11 +2261,11 @@ sal_Bool StatementCommand::Execute() { if ( !bBool1 ) { - nRetryCount = 150; // das sollte reichen. - bBool1 = sal_True; // Nur beim ersten mal! - nNr1 = 1; // Welcher Button ist dran? - nLNr1 = 0; // Speichern des AppWin - aString1 = UniString(); // Liste der geschlossenen Fenster + nRetryCount = 150; // das sollte reichen. + bBool1 = sal_True; // Nur beim ersten mal! + nNr1 = 1; // Welcher Button ist dran? + nLNr1_and_Pointer.pWindow = 0; // Speichern des AppWin + aString1 = UniString(); // Liste der geschlossenen Fenster // So da� nacher auch wieder alles auf Default steht nUseBindings = 0; @@ -2284,7 +2287,7 @@ sal_Bool StatementCommand::Execute() bBool2 = sal_False; // flag for wait when all windows are closed pControl->GrabFocus(); - if ( pControl->GetType() != WINDOW_DOCKINGWINDOW + if ( pControl->GetType() != WINDOW_DOCKINGWINDOW && pControl->GetType() != WINDOW_FLOATINGWINDOW && pControl->GetType() != WINDOW_MODELESSDIALOG && pControl->GetType() != WINDOW_WORKWINDOW @@ -2295,7 +2298,7 @@ sal_Bool StatementCommand::Execute() short nRT = ImpGetRType( pControl ); if ( nRT == C_TabControl && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - { // Bei Tabcontrol den zugeh�rigen Tabdialog nehmen + { // Bei Tabcontrol den zugeh�rigen Tabdialog nehmen pControl = pControl->GET_REAL_PARENT(); nRT = ImpGetRType( pControl ); } @@ -2330,7 +2333,7 @@ sal_Bool StatementCommand::Execute() SET_WINP_CLOSING(pControl); pBD->EndDialog(RET_OK); } - nNr1 = 10; // Nochmal alle Buttons der Reihe nach + nNr1 = 10; // Nochmal alle Buttons der Reihe nach break; case 4: if ( pBD->GetPushButton( BUTTONID_CANCEL ) ) @@ -2396,18 +2399,18 @@ sal_Bool StatementCommand::Execute() ((DockingWindow*)pControl)->Close(); // Eigentlich nur bei TaskWindows! Hoffen wir mal, da� keine anderen DockingWindows dazwischen hauen. - if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en - nLNr1 = (sal_uLong)pControl; + if ( nLNr1_and_Pointer.pWindow != pControl ) + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1_and_Pointer.pWindow = pControl; return sal_False; } } if ( nRetryCount-- - && ( (pControl->GetType() == WINDOW_FLOATINGWINDOW) - || (pControl->GetType() == WINDOW_MODELESSDIALOG) - || (pControl->GetType() == WINDOW_WORKWINDOW) - || (pControl->GetType() == WINDOW_BORDERWINDOW) ) ) + && ( (pControl->GetType() == WINDOW_FLOATINGWINDOW) + || (pControl->GetType() == WINDOW_MODELESSDIALOG) + || (pControl->GetType() == WINDOW_WORKWINDOW) + || (pControl->GetType() == WINDOW_BORDERWINDOW) ) ) { // Special handling for last Document; do not close the Frame, only the Document if ( GetDocWinCount() == 1 && IsDocFrame( pControl ) ) @@ -2425,9 +2428,9 @@ sal_Bool StatementCommand::Execute() pMenu->GetCloserHdl().Call( pMenu ); // nur bei TaskWindows! - if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en - nLNr1 = (sal_uLong)pControl; + if ( nLNr1_and_Pointer.pWindow != pControl ) + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1_and_Pointer.pWindow = pControl; return sal_False; } @@ -2441,9 +2444,9 @@ sal_Bool StatementCommand::Execute() ((SystemWindow*)pControl)->Close(); // Eigentlich nur bei TaskWindows! - if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en - nLNr1 = (sal_uLong)pControl; + if ( nLNr1_and_Pointer.pWindow != pControl ) + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1_and_Pointer.pWindow = pControl; return sal_False; } @@ -2454,10 +2457,10 @@ sal_Bool StatementCommand::Execute() // E.g.: Floating toolbars on a Task which was hidden by another Task before if ( !bBool2 ) { - nLNr1 = Time().GetTime() + 100; // 100 = 1 Second + nLNr1_and_Pointer.nLNr1 = Time().GetTime() + 100; // 100 = 1 Second bBool2 = sal_True; } - if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit + if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) ) // Aktuelle Zeit kleiner Endzeit return sal_False; else pRet->GenReturn ( RET_Value, nMethodId, aString1); @@ -2465,21 +2468,21 @@ sal_Bool StatementCommand::Execute() break; case RC_WaitSlot: { - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) nNr1 = 1000; // defaults to 1000 = 1 Sec. if ( !bBool1 ) { - nLNr1 = Time().GetTime() + nNr1/10; + nLNr1_and_Pointer.nLNr1 = Time().GetTime() + nNr1/10; bBool1 = sal_True; } if ( !bIsSlotInExecute ) - pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSFinished) ); + pRet->GenReturn ( RET_Value, nMethodId, comm_UINT16(CONST_WSFinished) ); else { - if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit + if ( Time().GetTime() < sal_Int32(nLNr1_and_Pointer.nLNr1) ) // Aktuelle Zeit kleiner Endzeit return sal_False; - pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSTimeout) ); + pRet->GenReturn ( RET_Value, nMethodId, comm_UINT16(CONST_WSTimeout) ); } } break; @@ -2491,12 +2494,12 @@ sal_Bool StatementCommand::Execute() switch ( nMethodId ) { - case RC_AppDelay: // Diese Befehle werden anderswo behandelt + case RC_AppDelay: // Diese Befehle werden anderswo behandelt case RC_DisplayHid: case RC_ResetApplication: case RC_WaitSlot: - case RC_AppAbort: // Sofortiges L�schen aller Befehle + case RC_AppAbort: // Sofortiges L�schen aller Befehle break; case RC_Assert: { @@ -2579,12 +2582,12 @@ sal_Bool StatementCommand::Execute() nUseBindings = 0; break; case RC_Profile: - // Bei folgenden Parametern passiert folgendes: - // ein boolean=false Alles Profiling stoppen (Ergebnisse liefern) - // ein boolean=true, 1-4 ints Einteilung der Zeiten in K�stchen - // kein! boolean keine ints loggen jeden Befehls - // kein! boolean 1 int loggen alle int Millisekunden - // ein String wird in das Logfile �bernommen(sonst passiert nichts) + // Bei folgenden Parametern passiert folgendes: + // ein boolean=false Alles Profiling stoppen (Ergebnisse liefern) + // ein boolean=true, 1-4 ints Einteilung der Zeiten in K�stchen + // kein! boolean keine ints loggen jeden Befehls + // kein! boolean 1 int loggen alle int Millisekunden + // ein String wird in das Logfile �bernommen(sonst passiert nichts) if( !(nParams & PARAM_BOOL_1) || bBool1 ) { if ( !pProfiler ) @@ -2593,8 +2596,8 @@ sal_Bool StatementCommand::Execute() InitProfile(); } - if( !(nParams & PARAM_BOOL_1) && (nParams & PARAM_USHORT_1) ) - { // Autoprofiling: Profile nNr + if( !(nParams & PARAM_BOOL_1) && (nParams & PARAM_UINT16_1) ) + { // Autoprofiling: Profile nNr if ( pProfiler->IsProfilingPerCommand() ) { pProfiler->StopProfilingPerCommand(); @@ -2604,13 +2607,13 @@ sal_Bool StatementCommand::Execute() // Der Header ist abh�ngig vom Modus pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() ); } - else if ( nParams & PARAM_USHORT_1 ) - { // Partitioning initialisieren: Profile true [,nNr][,nNr][,nNr][,nNr] - comm_ULONG nAnzahl=0; - if ( nParams & PARAM_USHORT_1 ) { nAnzahl++; }; - if ( nParams & PARAM_USHORT_2 ) { nAnzahl++; }; - if ( nParams & PARAM_USHORT_3 ) { nAnzahl++; }; - if ( nParams & PARAM_USHORT_4 ) { nAnzahl++; }; + else if ( nParams & PARAM_UINT16_1 ) + { // Partitioning initialisieren: Profile true [,nNr][,nNr][,nNr][,nNr] + comm_UINT32 nAnzahl=0; + if ( nParams & PARAM_UINT16_1 ) { nAnzahl++; }; + if ( nParams & PARAM_UINT16_2 ) { nAnzahl++; }; + if ( nParams & PARAM_UINT16_3 ) { nAnzahl++; }; + if ( nParams & PARAM_UINT16_4 ) { nAnzahl++; }; // Hier werden die Parameter ans Testtool zur�ck �bertragen. // Das ist zwar etwas eigenartig, aber ansonsten m�sste man im Testtool @@ -2618,20 +2621,20 @@ sal_Bool StatementCommand::Execute() pRet->GenReturn( RET_ProfileInfo, S_ProfileReset, nAnzahl ); // Und die einzelnen Grenzen - 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 ); }; + if ( nParams & PARAM_UINT16_1 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder1, (comm_UINT32)nNr1 ); }; + if ( nParams & PARAM_UINT16_2 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder2, (comm_UINT32)nNr2 ); }; + if ( nParams & PARAM_UINT16_3 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder3, (comm_UINT32)nNr3 ); }; + if ( nParams & PARAM_UINT16_4 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder4, (comm_UINT32)nNr4 ); }; pProfiler->StartPartitioning(); } - else if( nParams == PARAM_STR_1 ) // Genau ein String! - { // Nur einen String ins Profiling aufnehmen + else if( nParams == PARAM_STR_1 ) // Genau ein String! + { // Nur einen String ins Profiling aufnehmen aString1 += '\n'; pRet->GenReturn( RET_ProfileInfo, 0, aString1 ); } else - { // Normales Profiling je Kommando: profile + { // Normales Profiling je Kommando: profile if ( pProfiler->IsAutoProfiling() ) { pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() ); @@ -2643,7 +2646,7 @@ sal_Bool StatementCommand::Execute() pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() ); } } - else // Profiling wieder ausschalten: Profile false + else // Profiling wieder ausschalten: Profile false if ( pProfiler ) { if ( pProfiler->IsProfilingPerCommand() ) @@ -2657,7 +2660,7 @@ sal_Bool StatementCommand::Execute() if ( pProfiler->IsPartitioning() ) { - pRet->GenReturn( RET_ProfileInfo, S_ProfileDump, (comm_ULONG)0 ); + pRet->GenReturn( RET_ProfileInfo, S_ProfileDump, (comm_UINT32)0 ); pProfiler->StopPartitioning(); } @@ -2700,8 +2703,8 @@ sal_Bool StatementCommand::Execute() { nItemCount = pMenu->GetItemCount(); if ( pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES ) - { // jep, we have to adjust the count - sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top + { // jep, we have to adjust the count + sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top for ( sal_uInt16 i = 0 ; i < pMenu->GetItemCount() ; i++ ) { if ( !pMenu->IsItemEnabled( pMenu->GetItemId( i ) ) ) @@ -2713,7 +2716,7 @@ sal_Bool StatementCommand::Execute() bLastWasSeperator = pMenu->GetItemType( i ) == MENUITEM_SEPARATOR; } } - if ( bLastWasSeperator ) // Separator at bottom + if ( bLastWasSeperator ) // Separator at bottom nItemCount--; } } @@ -2729,8 +2732,8 @@ sal_Bool StatementCommand::Execute() { nPhysicalIndex = nNr1; if ( pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES ) - { // jep, we have to adjust the position - sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top + { // jep, we have to adjust the position + sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top sal_uInt16 nVisibleCount = 0; for ( sal_uInt16 i = 0 ; i < pMenu->GetItemCount() && nVisibleCount < nNr1 ; i++ ) { @@ -2755,20 +2758,20 @@ sal_Bool StatementCommand::Execute() { case RC_MenuGetItemCount: { - pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)nItemCount ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_UINT32)nItemCount ); } break; case RC_MenuGetItemId: { if ( ValueOK( rtl::OString(), RcString( nMethodId ),nNr1,nItemCount) ) - pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pMenu->GetItemId(nPhysicalIndex-1) ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_UINT32)pMenu->GetItemId(nPhysicalIndex-1) ); } break; case RC_MenuGetItemPos: { sal_uInt16 nLogicalPos = pMenu->GetItemPos(nNr1); if ( MENU_ITEM_NOTFOUND != nLogicalPos && pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES ) - { // jep, we have to adjust the position + { // jep, we have to adjust the position if ( !pMenu->IsItemEnabled( nNr1 ) ) nLogicalPos = MENU_ITEM_NOTFOUND; else @@ -2783,7 +2786,7 @@ sal_Bool StatementCommand::Execute() } } } - pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)(nLogicalPos+1) ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_UINT32)(nLogicalPos+1) ); } break; case RC_MenuIsSeperator: @@ -2940,7 +2943,7 @@ sal_Bool StatementCommand::Execute() else { sal_uInt16 nFlags = 0; - if ( (nParams & PARAM_USHORT_1) ) + if ( (nParams & PARAM_UINT16_1) ) nDirFlags = nFlags = nNr1; else nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY; @@ -2994,7 +2997,7 @@ sal_Bool StatementCommand::Execute() if ( FSYS_ERR_OK == nErrorcode ) { FileStat aFS( aFile ); - pRet->GenReturn ( RET_Value, nMethodId, static_cast<comm_ULONG>(aFS.GetSize()) ); //GetSize() sal_uLong != comm_ULONG on 64bit + pRet->GenReturn ( RET_Value, nMethodId, static_cast<comm_UINT32>(aFS.GetSize()) ); //GetSize() sal_uLong != comm_UINT32 on 64bit nErrorcode = aFS.GetError(); } } @@ -3109,10 +3112,10 @@ sal_Bool StatementCommand::Execute() { bDoTypeKeysDelay = bBool1; } - else if( nParams & PARAM_USHORT_1 ) + else if( nParams & PARAM_UINT16_1 ) { nMinTypeKeysDelay = nNr1; - if( nParams & PARAM_USHORT_2 ) + if( nParams & PARAM_UINT16_2 ) nMaxTypeKeysDelay = nNr2; else nMaxTypeKeysDelay = nMinTypeKeysDelay; @@ -3132,7 +3135,7 @@ sal_Bool StatementCommand::Execute() ReportError( GEN_RES_STR1( S_POINTER_OUTSIDE_APPWIN, RcString( nMethodId ) ) ); aPointer = Pointer( POINTER_NULL ); } - pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)aPointer.GetStyle() ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_UINT32)aPointer.GetStyle() ); } break; case RC_UnpackStorage: @@ -3171,7 +3174,7 @@ sal_Bool StatementCommand::Execute() case RC_CloseSysDialog: case RC_ExistsSysDialog: { - if( (nParams & PARAM_USHORT_1) ) + if( (nParams & PARAM_UINT16_1) ) { Reference < ::com::sun::star::util::XCancellable > xPicker; switch( nNr1 ) @@ -3242,12 +3245,12 @@ sal_Bool StatementCommand::Execute() break; case RC_GetDocumentCount : { - pRet->GenReturn ( RET_Value, nMethodId, (comm_USHORT)GetDocWinCount() ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_UINT16)GetDocWinCount() ); } break; case RC_ActivateDocument : { - if( nParams & PARAM_USHORT_1 ) + if( nParams & PARAM_UINT16_1 ) { if ( ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, GetDocWinCount() ) ) { @@ -3265,7 +3268,7 @@ sal_Bool StatementCommand::Execute() break; case RC_GetSystemLanguage : { - pRet->GenReturn ( RET_Value, nMethodId, (comm_USHORT)Application::GetSettings().GetLanguage() ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_UINT16)Application::GetSettings().GetLanguage() ); } break; case RC_CatchGPF : @@ -3364,7 +3367,7 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdTyp //HELPID BACKWARD (SIControl is no longer needed) if ( nControlIdType == SIControl ) { - comm_ULONG nId; + comm_UINT32 nId; pCmdIn->Read( nId ); aUId = rtl::OString( nId ); if ( nId == 0 ) @@ -3386,15 +3389,15 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdTyp pCmdIn->Read( nMethodId ); pCmdIn->Read( nParams ); - if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nNr1 ); - if( nParams & PARAM_USHORT_2 ) pCmdIn->Read( nNr2 ); - if( nParams & PARAM_USHORT_3 ) pCmdIn->Read( nNr3 ); - if( nParams & PARAM_USHORT_4 ) pCmdIn->Read( nNr4 ); - if( nParams & PARAM_ULONG_1 ) pCmdIn->Read( nLNr1 ); - if( nParams & PARAM_STR_1 ) pCmdIn->Read( aString1 ); - if( nParams & PARAM_STR_2 ) pCmdIn->Read( aString2 ); - if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 ); - if( nParams & PARAM_BOOL_2 ) pCmdIn->Read( bBool2 ); + if( nParams & PARAM_UINT16_1 ) pCmdIn->Read( nNr1 ); + if( nParams & PARAM_UINT16_2 ) pCmdIn->Read( nNr2 ); + if( nParams & PARAM_UINT16_3 ) pCmdIn->Read( nNr3 ); + if( nParams & PARAM_UINT16_4 ) pCmdIn->Read( nNr4 ); + if( nParams & PARAM_UINT32_1 ) pCmdIn->Read( nLNr1 ); + if( nParams & PARAM_STR_1 ) pCmdIn->Read( aString1 ); + if( nParams & PARAM_STR_2 ) pCmdIn->Read( aString2 ); + if( nParams & PARAM_BOOL_1 ) pCmdIn->Read( bBool1 ); + if( nParams & PARAM_BOOL_2 ) pCmdIn->Read( bBool2 ); #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Reading Control: UId: " ); @@ -3402,19 +3405,19 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdTyp m_pDbgWin->AddText( " Methode: " ); 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 ) );} - if( nParams & PARAM_USHORT_3 ) {m_pDbgWin->AddText( " n3:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );} - if( nParams & PARAM_USHORT_4 ) {m_pDbgWin->AddText( " n4:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );} - if( nParams & PARAM_ULONG_1 ) {m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} - if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} - if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );} + if( nParams & PARAM_UINT16_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );} + if( nParams & PARAM_UINT16_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );} + if( nParams & PARAM_UINT16_3 ) {m_pDbgWin->AddText( " n3:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );} + if( nParams & PARAM_UINT16_4 ) {m_pDbgWin->AddText( " n4:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );} + if( nParams & PARAM_UINT32_1 ) {m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );} + if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );} + if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );} m_pDbgWin->AddText( "\n" ); #endif } sal_Bool IsDialog(Window *pWin) -{ // Alles was von SystemWindow abgeleitet ist +{ // Alles was von SystemWindow abgeleitet ist if ( !pWin ) return sal_False; @@ -3610,7 +3613,7 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin ) aDiff *= 1000; aDiff /= nSteps; - StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird. for ( ; nSteps ; nSteps-- ) @@ -3623,7 +3626,7 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin ) SafeReschedule(); } pControl->SetPointerPosPixel(aZiel); - StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack } @@ -3637,13 +3640,13 @@ sal_Bool StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow ) Timer aTimer; aTimer.SetTimeout( nTimeWait ); aTimer.Start(); - StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird. while ( aTimer.IsActive() ) { SafeReschedule( sal_True ); } - StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack if ( !WinPtrValid(pTestWindow ) ) { ReportError( aUId, GEN_RES_STR1( S_WINDOW_DISAPPEARED, MethodString( nMethodId ) ) ); @@ -3655,7 +3658,7 @@ sal_Bool StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow ) sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) { - if( pControl ) // Also auch bei Disabled nicht jedoch bei Invisible + if( pControl ) // Also auch bei Disabled nicht jedoch bei Invisible { switch( nMethodId ) { @@ -3667,11 +3670,11 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) break; case M_GetPosX: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border if ( (nParams & PARAM_BOOL_1) && bBool1 ) pControl = pControl->GetWindow( WINDOW_OVERLAP ); @@ -3679,18 +3682,18 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) { Point aPos = pControl->GetPosPixel(); aPos = pControl->GET_REAL_PARENT()->OutputToScreenPixel( aPos ); - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)aPos.X() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)aPos.X() ); } else - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pControl->GetPosPixel().X() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pControl->GetPosPixel().X() ); break; case M_GetPosY: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border if ( (nParams & PARAM_BOOL_1) && bBool1 ) pControl = pControl->GetWindow( WINDOW_OVERLAP ); @@ -3698,43 +3701,43 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) { Point aPos = pControl->GetPosPixel(); aPos = pControl->GET_REAL_PARENT()->OutputToScreenPixel( aPos ); - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)aPos.Y() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)aPos.Y() ); } else - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pControl->GetPosPixel().Y() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pControl->GetPosPixel().Y() ); break; case M_GetSizeX: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border if ( (nParams & PARAM_BOOL_1) && bBool1 ) pControl = pControl->GetWindow( WINDOW_OVERLAP ); - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pControl->GetSizePixel().Width() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pControl->GetSizePixel().Width() ); break; case M_GetSizeY: if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border if ( (nParams & PARAM_BOOL_1) && bBool1 ) pControl = pControl->GetWindow( WINDOW_OVERLAP ); - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pControl->GetSizePixel().Height() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pControl->GetSizePixel().Height() ); break; case M_SnapShot: { if ( pControl->GetType() == WINDOW_DOCKINGWINDOW && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_FLOATINGWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r FloatingWindows if ( pControl->GetType() == WINDOW_TABCONTROL && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r TabDialoge if ( pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_BORDERWINDOW ) - pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border + pControl = pControl->GET_REAL_PARENT(); // Sonderbehandlung f�r Border if ( (nParams & PARAM_BOOL_1) && bBool1 ) pControl = pControl->GetWindow( WINDOW_OVERLAP ); @@ -3742,12 +3745,12 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) if ( pControl->GetType() == WINDOW_WORKWINDOW ) { Point aStart = pControl->GetPosPixel(); - if ( !(nParams & PARAM_USHORT_4) ) + if ( !(nParams & PARAM_UINT16_4) ) { - nParams |= PARAM_USHORT_1; - nParams |= PARAM_USHORT_2; - nParams |= PARAM_USHORT_3; - nParams |= PARAM_USHORT_4; + nParams |= PARAM_UINT16_1; + nParams |= PARAM_UINT16_2; + nParams |= PARAM_UINT16_3; + nParams |= PARAM_UINT16_4; nNr1 = (sal_uInt16)-aStart.X(); nNr2 = (sal_uInt16)-aStart.Y(); nNr3 = (sal_uInt16)pControl->GetSizePixel().Width() + 2*(sal_uInt16)aStart.X(); @@ -3758,8 +3761,8 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) nNr3 = std::min((sal_uInt16)(pControl->GetSizePixel().Width() + 2*(sal_uInt16)aStart.X()),nNr3); nNr4 = std::min((sal_uInt16)(pControl->GetSizePixel().Height() + 2*(sal_uInt16)aStart.Y()),nNr4); } - if( nParams & PARAM_USHORT_4 ) - { // Zuschneiden + if( nParams & PARAM_UINT16_4 ) + { // Zuschneiden Point aPt(-nNr1,-nNr2); Size aSz(nNr3,nNr4); VirtualDevice aVDev( *pControl ); @@ -3784,7 +3787,7 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) break; case M_GetFixedText: { - if( ( nParams & PARAM_USHORT_1 ) == 0 ) + if( ( nParams & PARAM_UINT16_1 ) == 0 ) nNr1 = 1; FixedText* pFixedText = (FixedText*)GetWinByRT( pControl, WINDOW_FIXEDTEXT, sal_True, nNr1-1 ); @@ -3805,9 +3808,9 @@ sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) { - switch( nMethodId ) // Diese k�nnen an jedem Window ausgef�hrt werden + switch( nMethodId ) // Diese k�nnen an jedem Window ausgef�hrt werden { - case M_Exists: // Oben schon Behandelt. Unterdr�ckt hier nur Fehler + case M_Exists: // Oben schon Behandelt. Unterdr�ckt hier nur Fehler case M_NotExists: case M_IsEnabled: case M_IsVisible: @@ -3823,17 +3826,17 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) break; case M_GetRT: { - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pControl->GetType() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pControl->GetType() ); } break; case M_TypeKeys: { - if( !(nParams & PARAM_USHORT_1) ) // Anzahl wiederholungen + if( !(nParams & PARAM_UINT16_1) ) // Anzahl wiederholungen nNr1 = 1; - if( !(nParams & PARAM_BOOL_1) ) // Follow Focus - bBool1 = sal_False; // so bleibt das bisherige Verhalten + if( !(nParams & PARAM_BOOL_1) ) // Follow Focus + bBool1 = sal_False; // so bleibt das bisherige Verhalten - if ( !bBool1 ) // Altes Verhalten + if ( !bBool1 ) // Altes Verhalten pControl->GrabFocus(); else // If focus is not inside given control we grab it once. { @@ -3845,7 +3848,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) // maybe this can get removed since we are using GetPreferredKeyInputWindow() if ( pControl->GetType() == WINDOW_COMBOBOX ) - { // Bei COMBOBOX an das Edit direkt liefern + { // Bei COMBOBOX an das Edit direkt liefern Window *pTemp = NULL; for ( sal_uInt16 i = 0 ; i < pControl->GetChildCount() && !pTemp ; i++ ) if ( pControl->GetChild( i )->GetType() == WINDOW_EDIT ) @@ -3864,12 +3867,12 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) if ( !pFocus || !pControl->IsWindowOrChild( pFocus, sal_True ) ) pControl->GrabFocus(); } - if ( bBool1 ) // Jedesmal das FocusWindow finden + if ( bBool1 ) // Jedesmal das FocusWindow finden { Window *pFocus = GetpApp()->GetFocusWindow(); if ( pFocus && pControl->IsWindowOrChild( pFocus, sal_True ) ) pDeliverHere = pFocus; - else // sonst fallback auf das Basisfenster + else // sonst fallback auf das Basisfenster pDeliverHere = pControl; } pDeliverHere = pDeliverHere->GetPreferredKeyInputWindow(); @@ -3911,7 +3914,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) aCh += 'a'; break; case KEYGROUP_MISC: - { // CR ESC TAB BACK + { // CR ESC TAB BACK ByteString aPrintableMisc("\x0d\x1b\x09\x08 **+-*/.,<>=",16); if ( nKeyCode-KEY_RETURN < aPrintableMisc.Len() && nKeyCode != KEY_INSERT && nKeyCode != KEY_DELETE ) @@ -3940,7 +3943,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_NUM + aCh-'0', 0)); else if ( aPrintableMisc.Search(aCh) != STRING_NOTFOUND ) aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_MISC + (sal_uInt16)aPrintableMisc.Search(aCh), 0)); - else // Sollte eigentlich nicht auftreten + else // Sollte eigentlich nicht auftreten aEvent = KeyEvent(aCh, KeyCode()); } ImplKeyInput( pDeliverHere, aEvent ); @@ -3954,7 +3957,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) #define CalcMouseButton\ sal_uInt16 nButton = MOUSE_LEFT;\ - if ( (nParams & PARAM_USHORT_3) )\ + if ( (nParams & PARAM_UINT16_3) )\ {\ switch ( nNr3 )\ {\ @@ -4127,7 +4130,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) case M_IsPin: { WindowAlign aWindowAlign = WINDOWALIGN_LEFT; - if ( (nParams & PARAM_USHORT_1) ) + if ( (nParams & PARAM_UINT16_1) ) { switch ( nNr1 ) { @@ -4161,7 +4164,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) break; } - pControl = pTemp; // So da� wir unten ohne Fehler durchkommen + pControl = pTemp; // So da� wir unten ohne Fehler durchkommen SplitWindow *pSW = (SplitWindow*) pTemp; switch( nMethodId ) @@ -4219,7 +4222,7 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) { case M_StatusGetText: { - if ( (nParams & PARAM_USHORT_1) ) + if ( (nParams & PARAM_UINT16_1) ) { if ( pStatus->AreItemsVisible() ) pRet->GenReturn ( RET_Value, aUId, String(pStatus->GetItemText(nNr1))); @@ -4251,13 +4254,13 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) break; case M_StatusGetItemCount: if ( pStatus->AreItemsVisible() ) - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(pStatus->GetItemCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(pStatus->GetItemCount())); else - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0)); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(0)); break; case M_StatusGetItemId: if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,pStatus->GetItemCount()) ) - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(pStatus->GetItemId(nNr1-1))); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(pStatus->GetItemId(nNr1-1))); break; } } @@ -4265,14 +4268,14 @@ sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) case M_HasScrollBar: case M_IsScrollBarEnabled: { - if ( (nParams | PARAM_USHORT_1) != PARAM_USHORT_1 ) // so there are other params + if ( (nParams | PARAM_UINT16_1) != PARAM_UINT16_1 ) // so there are other params { ReportError( aUId, GEN_RES_STR0( S_INVALID_PARAMETERS ) ); break; } - if( !(nParams & PARAM_USHORT_1) ) - nNr1 = CONST_ALIGN_RIGHT; // default is right Scrollbar(vertical) + if( !(nParams & PARAM_UINT16_1) ) + nNr1 = CONST_ALIGN_RIGHT; // default is right Scrollbar(vertical) if ( (nNr1 != CONST_ALIGN_RIGHT) && (nNr1 != CONST_ALIGN_BOTTOM) ) { @@ -4354,7 +4357,7 @@ sal_Bool StatementControl::Execute() else { sal_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); + bSearchButtonOnToolbox |= (nParams == PARAM_UINT16_1) && (M_GetState == nMethodId); if ( nMethodId == M_TypeKeys || nMethodId == M_MouseDown || nMethodId == M_MouseUp || nMethodId == M_MouseMove || nMethodId == M_SnapShot ) @@ -4380,7 +4383,7 @@ sal_Bool StatementControl::Execute() case M_GetState: break; case M_IsEnabled: - nMethodId = _M_IsEnabled; // Umlabeln, da die Behandlung essentiell anders ist! + nMethodId = _M_IsEnabled; // Umlabeln, da die Behandlung essentiell anders ist! break; default: pControl = NULL; @@ -4395,25 +4398,25 @@ sal_Bool StatementControl::Execute() case M_NotExists: Time aT; sal_uInt16 aSeconds = aT.GetMin()*60+aT.GetSec(); - if ( !bBool2 ) // wurde im Konstruktor auf sal_False gesetzt + if ( !bBool2 ) // wurde im Konstruktor auf sal_False gesetzt { bBool2 = sal_True; nNr2 = aSeconds; - if( !(nParams & PARAM_USHORT_1) ) - nNr1 = 0; // defaultm��ig sofort zur�ck + if( !(nParams & PARAM_UINT16_1) ) + nNr1 = 0; // defaultm��ig sofort zur�ck } - if ( aSeconds < nNr2 ) // Falls die Stunde umgesprungen ist + if ( aSeconds < nNr2 ) // Falls die Stunde umgesprungen ist aSeconds += 60*60; if ( !pControl || !pControl->IsVisible() ) pControl = NULL; if ( ((nMethodId == M_Exists) && pControl) || ((nMethodId == M_NotExists) && !pControl) ) - { // Wenn Bedingung erf�llt + { // Wenn Bedingung erf�llt pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_True ); } else - if ( aSeconds <= nNr2 + nNr1 ) // Zeit ist noch nicht abgelaufen + if ( aSeconds <= nNr2 + nNr1 ) // Zeit ist noch nicht abgelaufen return sal_False; else pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_False ); @@ -4426,7 +4429,7 @@ sal_Bool StatementControl::Execute() short nRT = 0; - if( pControl ) // Das Fenster Existiert irgendwo, kann aber auch hidden sein! + if( pControl ) // Das Fenster Existiert irgendwo, kann aber auch hidden sein! { nRT = ImpGetRType( pControl ); #if OSL_DEBUG_LEVEL > 1 @@ -4476,7 +4479,7 @@ sal_Bool StatementControl::Execute() // TODO: handle GetFocus for all Methods and Windows like this (remove part below) // See for impact of changed focus for HandleVisibleControls() (taking Snapshots might be different, possible exclude those methods) if (( (nRT == C_TreeListBox) && !bBool2 ) - && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht + && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht && nMethodId != M_MouseDown && nMethodId != M_MouseUp && nMethodId != M_MouseMove ) @@ -4517,7 +4520,7 @@ sal_Bool StatementControl::Execute() || nRT == C_TreeListBox ) || nMethodId == M_OpenContextMenu ) - && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht + && nMethodId != M_TypeKeys // TypeKeys macht das selbst, falls eigenes Focushandling gew�nscht && nMethodId != M_MouseDown && nMethodId != M_MouseUp && nMethodId != M_MouseMove ) @@ -4531,16 +4534,16 @@ sal_Bool StatementControl::Execute() switch( nMethodId ) { case M_GetPageId: - if ( (nParams & PARAM_USHORT_1) ) + if ( (nParams & PARAM_UINT16_1) ) { if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((TabControl*)pControl)->GetPageCount() ) ) - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)((TabControl*)pControl)->GetPageId(nNr1-1)); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)((TabControl*)pControl)->GetPageId(nNr1-1)); } else - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)((TabControl*)pControl)->GetCurPageId()); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)((TabControl*)pControl)->GetCurPageId()); break; case M_GetPageCount: - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)((TabControl*)pControl)->GetPageCount()); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)((TabControl*)pControl)->GetPageCount()); break; case M_SetPageId: if (((TabControl*)pControl)->GetCurPageId()) @@ -4561,14 +4564,14 @@ sal_Bool StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, Id2Str( ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetUniqueOrHelpId() ) ); break; case M_SetPage : - { // Wegen lokaler Variablen + { // Wegen lokaler Variablen TabControl *pTControl = ((TabControl*)pControl); sal_uInt16 nActive = pTControl->GetCurPageId(); sal_uInt16 i,anz; rtl::OString aID; rtl::OString aWantedID; - //HELPID BACKWARD (No numbers please (remove PARAM_ULONG_1 part) - if ( (nParams & PARAM_ULONG_1) ) + //HELPID BACKWARD (No numbers please (remove PARAM_UINT32_1 part) + if ( (nParams & PARAM_UINT32_1) ) { ReportError( aUId, GEN_RES_STR1c( S_INTERNAL_ERROR, "using numeric HelpID from old Testtool" ) ); } @@ -4587,7 +4590,7 @@ sal_Bool StatementControl::Execute() i++; if ( i >= pTControl->GetPageCount() ) i = 0; - if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) ) // 3 Mal aufrufen + if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) ) // 3 Mal aufrufen break; } if ( !aID.equals( aWantedID ) ) @@ -4635,7 +4638,7 @@ sal_Bool StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, comm_BOOL( ((TriStateBox*)pControl)->GetState() == STATE_DONTKNOW) ); break; case M_GetState : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((TriStateBox*)pControl)->GetState())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(((TriStateBox*)pControl)->GetState())); break; case M_Check : ((TriStateBox*)pControl)->SetState( STATE_CHECK ); @@ -4723,28 +4726,28 @@ sal_Bool StatementControl::Execute() AnimateMouse( pControl, MitteOben); break; case M_GetSelCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((ListBox*)pControl)->GetSelectEntryCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(((ListBox*)pControl)->GetSelectEntryCount())); break; case M_GetSelIndex : - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) { if ( ((ListBox*)pControl)->GetSelectEntryCount() == 0 ) { - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0)); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(0)); break; } nNr1 = 1; } ValueOK(aUId, MethodString( nMethodId ),nNr1,((ListBox*)pControl)->GetSelectEntryCount()); - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((ListBox*)pControl)->GetSelectEntryPos(nNr1-1)) +1); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(((ListBox*)pControl)->GetSelectEntryPos(nNr1-1)) +1); break; case M_GetSelText : - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) nNr1 = 1; pRet->GenReturn ( RET_Value, aUId, ((ListBox*)pControl)->GetSelectEntry(nNr1-1)); break; case M_GetItemCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((ListBox*)pControl)->GetEntryCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(((ListBox*)pControl)->GetEntryCount())); break; case M_GetItemText : pRet->GenReturn ( RET_Value, aUId, ((ListBox*)pControl)->GetEntry(nNr1-1)); @@ -4782,7 +4785,7 @@ sal_Bool StatementControl::Execute() if ( bUnselectBeforeSelect ) pLB->SetNoSelection(); pLB->SelectEntryPos( nPos, bBool1 ); - if ( pLB->IsEntryPosSelected( nPos ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL + if ( pLB->IsEntryPosSelected( nPos ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) ); } } @@ -4795,7 +4798,7 @@ sal_Bool StatementControl::Execute() if ( bUnselectBeforeSelect ) pLB->SetNoSelection(); pLB->SelectEntryPos( nNr1-1, bBool1 ); - if ( pLB->IsEntryPosSelected( nNr1-1 ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL + if ( pLB->IsEntryPosSelected( nNr1-1 ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), UniString::CreateFromInt32( nNr1 ) ) ); } } @@ -4834,11 +4837,11 @@ sal_Bool StatementControl::Execute() nPos = 0; else nPos++; - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG) nPos); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32) nPos); } break; case M_GetItemCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((ComboBox*)pControl)->GetEntryCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(((ComboBox*)pControl)->GetEntryCount())); break; case M_GetItemText : pRet->GenReturn ( RET_Value, aUId, ((ComboBox*)pControl)->GetEntry(nNr1-1)); @@ -4847,7 +4850,7 @@ sal_Bool StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, (comm_BOOL) !((ComboBox*)pControl)->IsReadOnly() ); break; case M_Select : - if( nParams & PARAM_USHORT_1 ) + if( nParams & PARAM_UINT16_1 ) { if ( !ValueOK(aUId, MethodString( nMethodId ),nNr1,((ComboBox*)pControl)->GetEntryCount()) ) break; @@ -4954,7 +4957,7 @@ sal_Bool StatementControl::Execute() break; case M_More : { - if ( !(nParams & PARAM_USHORT_1) ) + if ( !(nParams & PARAM_UINT16_1) ) nNr1 = 1; for (int i = 1; i<= nNr1; i++) { @@ -4966,7 +4969,7 @@ sal_Bool StatementControl::Execute() break; case M_Less : { - if ( !(nParams & PARAM_USHORT_1) ) + if ( !(nParams & PARAM_UINT16_1) ) nNr1 = 1; for (int i = 1; i<= nNr1; i++) { @@ -5036,10 +5039,10 @@ sal_Bool StatementControl::Execute() case C_ToolBox: { ToolBox *pTB = ((ToolBox*)pControl); - if ( !aUId.equals( pTB->GetUniqueOrHelpId() ) ) // So we found a Button on the ToolBox + if ( !aUId.equals( pTB->GetUniqueOrHelpId() ) ) // So we found a Button on the ToolBox { - if ( (nParams == PARAM_NONE) || (nParams == PARAM_USHORT_1) ) - { // Wir f�lschen einen Parameter + if ( (nParams == PARAM_NONE) || (nParams == PARAM_UINT16_1) ) + { // Wir f�lschen einen Parameter nParams |= PARAM_STR_1; aString1 = Id2Str( aUId ); } @@ -5110,7 +5113,7 @@ sal_Bool StatementControl::Execute() case M_Click : { FIND_ITEM; - if ( bItemFound ) // FIND_ITEM Erfolgreich + if ( bItemFound ) // FIND_ITEM Erfolgreich { Rectangle aRect = pTB->GetItemRect(pTB->GetItemId(nItemPos)); if ( aRect.IsEmpty() ) @@ -5122,7 +5125,7 @@ sal_Bool StatementControl::Execute() aSubMenuId3 = 0; pMenuWindow = NULL; - new StatementCommand( this, RC_MenuSelect, PARAM_USHORT_1, pTB->GetItemId(nItemPos) + TOOLBOX_MENUITEM_START ); + new StatementCommand( this, RC_MenuSelect, PARAM_UINT16_1, pTB->GetItemId(nItemPos) + TOOLBOX_MENUITEM_START ); } else { @@ -5138,7 +5141,7 @@ sal_Bool StatementControl::Execute() case M_TearOff : { FIND_ITEM; - if ( bItemFound ) // FIND_ITEM Erfolgreich + if ( bItemFound ) // FIND_ITEM Erfolgreich { Rectangle aRect = pTB->GetItemPosDropDownRect( nItemPos ); AnimateMouse( pControl, aRect.Center() ); @@ -5147,13 +5150,13 @@ sal_Bool StatementControl::Execute() Window *pWin = NULL; // Wait for the window to open. - StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack - { // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird. + StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack + { // Das verhindert, da� schon der n�chste Befehl ausgef�hrt wird. Time aDelay; while ( !pWin && ( (pWin = GetPopupFloatingWin()) == NULL ) && ( Time() - aDelay ).GetSec() < 15 ) SafeReschedule(); } - StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack if ( pWin && pWin->GetType() == WINDOW_FLOATINGWINDOW ) { @@ -5173,7 +5176,7 @@ sal_Bool StatementControl::Execute() case M_OpenMenu : { FIND_ITEM; - if ( bItemFound ) // FIND_ITEM Erfolgreich + if ( bItemFound ) // FIND_ITEM Erfolgreich { Rectangle aRect = pTB->GetItemPosDropDownRect( nItemPos ); AnimateMouse( pControl, aRect.Center() ); @@ -5192,7 +5195,7 @@ sal_Bool StatementControl::Execute() case _M_IsEnabled: { FIND_ITEM; - if ( bItemFound ) // FIND_ITEM Erfolgreich + if ( bItemFound ) // FIND_ITEM Erfolgreich { pRet->GenReturn ( RET_Value, aUId, pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) ); } @@ -5201,7 +5204,7 @@ sal_Bool StatementControl::Execute() case M_GetState : { FIND_ITEM; - if ( bItemFound ) // FIND_ITEM Erfolgreich + if ( bItemFound ) // FIND_ITEM Erfolgreich { if ( ValueOK( aUId, CUniString("GetState"), nNr1, 4 ) ) switch (nNr1) @@ -5210,17 +5213,17 @@ sal_Bool StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, Id2Str( pTB->GetHelpId(pTB->GetItemId(nItemPos)) ) ); break; case 1: - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemType(nItemPos)); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pTB->GetItemType(nItemPos)); break; case 2: - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemState(pTB->GetItemId(nItemPos))); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pTB->GetItemState(pTB->GetItemId(nItemPos))); break; case 3: - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemId(nItemPos)); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pTB->GetItemId(nItemPos)); break; default: ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) ); - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0)); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(0)); break; } } @@ -5233,7 +5236,7 @@ sal_Bool StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, (String)pTB->GetText()); break; case M_GetItemCount : - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTB->GetItemCount()); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pTB->GetItemCount()); break; case M_SetNextToolBox : if ( (nParams & PARAM_STR_1) ) @@ -5254,7 +5257,7 @@ sal_Bool StatementControl::Execute() case M_IsMax: case M_Minimize: case M_Maximize: - case M_Help: // Alles was unten weiterbehandelt werden soll + case M_Help: // Alles was unten weiterbehandelt werden soll goto DockingWin; default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "ToolBox" ) ); @@ -5269,7 +5272,7 @@ sal_Bool StatementControl::Execute() -#define GET_NTH_ENTRY_LBOX( First, Next, Anzahl) \ +#define GET_NTH_ENTRY_LBOX( First, Next, Anzahl) \ SvLBoxEntry *pThisEntry = ((SvTreeListBox*)pControl)->First(); \ { \ int niTemp = Anzahl; \ @@ -5283,7 +5286,7 @@ sal_Bool StatementControl::Execute() { // should get removed some time SvTreeListBox *pTree = (SvTreeListBox*)pControl; SvLBoxEntry *pThisEntry = pTree->GetCurEntry(); - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) nNr1 = 1; if ( pThisEntry ) { @@ -5311,19 +5314,19 @@ sal_Bool StatementControl::Execute() } break; case M_GetSelCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((SvLBox*)pControl)->GetSelectionCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(((SvLBox*)pControl)->GetSelectionCount())); break; case M_GetItemCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((SvLBox*)pControl)->GetVisibleCount()) ); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(((SvLBox*)pControl)->GetVisibleCount()) ); break; case M_GetSelIndex : - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) nNr1 = 1; if ( ValueOK(aUId, CUniString("GetSelIndex"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) ) { nNr1--; GET_NTH_ENTRY_LBOX( FirstSelected, NextSelected, nNr1); - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( ((SvTreeListBox*)pControl)->GetVisiblePos( pThisEntry )) +1 ); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( ((SvTreeListBox*)pControl)->GetVisiblePos( pThisEntry )) +1 ); } break; case M_Select : @@ -5343,9 +5346,9 @@ sal_Bool StatementControl::Execute() } break; case M_GetSelText : - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) nNr1 = 1; - if ( ! (nParams & PARAM_USHORT_2) ) + if ( ! (nParams & PARAM_UINT16_2) ) nNr2 = 1; if ( ValueOK(aUId, CUniString("GetSelText"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) ) { @@ -5354,7 +5357,7 @@ sal_Bool StatementControl::Execute() if ( ValueOK( aUId, MethodString( nMethodId ),nNr2,pThisEntry->ItemCount() ) ) { SvLBoxString* pItem = NULL; - if ( ! (nParams & PARAM_USHORT_2) ) + if ( ! (nParams & PARAM_UINT16_2) ) pItem = (SvLBoxString*)pThisEntry->GetFirstItem( SV_ITEM_ID_LBOXSTRING ); else { @@ -5374,12 +5377,12 @@ sal_Bool StatementControl::Execute() if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) ) { SvLBoxEntry *pThisEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 ); - if ( ! (nParams & PARAM_USHORT_2) ) + if ( ! (nParams & PARAM_UINT16_2) ) nNr2 = 1; if ( ValueOK( aUId, MethodString( nMethodId ),nNr2,pThisEntry->ItemCount() ) ) { SvLBoxString* pItem = NULL; - if ( ! (nParams & PARAM_USHORT_2) ) + if ( ! (nParams & PARAM_UINT16_2) ) pItem = (SvLBoxString*)pThisEntry->GetFirstItem( SV_ITEM_ID_LBOXSTRING ); else { @@ -5405,7 +5408,7 @@ sal_Bool StatementControl::Execute() SvTreeListBox *pTree = (SvTreeListBox*)pControl; SvLBoxEntry *pThisEntry = NULL; - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) { pThisEntry = pTree->GetCurEntry(); if ( !pThisEntry ) @@ -5419,7 +5422,7 @@ sal_Bool StatementControl::Execute() } } - if ( ! (nParams & PARAM_USHORT_2) ) + if ( ! (nParams & PARAM_UINT16_2) ) nNr2 = 1; if ( pThisEntry ) @@ -5427,7 +5430,7 @@ sal_Bool StatementControl::Execute() if ( ValueOK( aUId, MethodString( nMethodId ),nNr2,pThisEntry->ItemCount() ) ) { SvLBoxButton* pItem = NULL; - if ( ! (nParams & PARAM_USHORT_2) ) + if ( ! (nParams & PARAM_UINT16_2) ) pItem = (SvLBoxButton*)pThisEntry->GetFirstItem( SV_ITEM_ID_LBOXBUTTON ); else { @@ -5447,7 +5450,7 @@ sal_Bool StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, comm_BOOL( pItem->IsStateTristate() ) ); break; case M_GetState : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pItem->GetButtonFlags() & ~SV_STATE_MASK )); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( pItem->GetButtonFlags() & ~SV_STATE_MASK )); break; case M_Check : if ( !pItem->IsStateChecked() ) @@ -5489,7 +5492,7 @@ sal_Bool StatementControl::Execute() SvTreeListBox *pTree = (SvTreeListBox*)pControl; SvLBoxEntry *pThisEntry = NULL; - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) { pThisEntry = pTree->GetCurEntry(); if ( !pThisEntry ) @@ -5505,12 +5508,12 @@ sal_Bool StatementControl::Execute() if ( pThisEntry ) { - if ( ! (nParams & PARAM_USHORT_2) ) + if ( ! (nParams & PARAM_UINT16_2) ) nNr2 = 1; if ( ValueOK( aUId, MethodString( nMethodId ),nNr2,pThisEntry->ItemCount() ) ) { SvLBoxItem *pMyItem = pThisEntry->GetItem( nNr2-1 ); - comm_USHORT nType; + comm_UINT16 nType; switch ( pMyItem->IsA() ) { case SV_ITEM_ID_LBOXSTRING: nType = CONST_ItemTypeText ; break; @@ -5566,7 +5569,7 @@ sal_Bool StatementControl::Execute() case M_GetColumnCount : { sal_uInt16 nColCount = pEBBox->GetColumnCount(); - comm_USHORT nUnfrozenColCount = 0; + comm_UINT16 nUnfrozenColCount = 0; sal_uInt16 i; for ( i=0 ; i < nColCount ; i++ ) { @@ -5578,7 +5581,7 @@ sal_Bool StatementControl::Execute() break; case M_GetRowCount : { - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pEBBox->GetRowCount() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pEBBox->GetRowCount() ); } break; case M_IsEditing : @@ -5593,7 +5596,7 @@ sal_Bool StatementControl::Execute() if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,pEBBox->GetRowCount() ) ) { sal_uInt16 nColCount = pEBBox->GetColumnCount(); - comm_USHORT nUnfrozenColCount = 0; + comm_UINT16 nUnfrozenColCount = 0; sal_uInt16 i; for ( i=0 ; i < nColCount ; i++ ) { @@ -5618,7 +5621,7 @@ sal_Bool StatementControl::Execute() switch ( nMethodId ) { case M_GetItemCount: - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pVS->GetItemCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( pVS->GetItemCount())); break; case M_GetItemText: if ( ValueOK( aUId, MethodString( nMethodId ), nNr1, pVS->GetItemCount() )) @@ -5630,9 +5633,9 @@ sal_Bool StatementControl::Execute() break; case M_GetSelIndex : if ( pVS->IsNoSelection() ) - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(0)); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(0)); else - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pVS->GetItemPos( pVS->GetSelectItemId() ) +1)); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( pVS->GetItemPos( pVS->GetSelectItemId() ) +1)); break; case M_GetSelText : if ( pVS->IsNoSelection() ) @@ -5655,7 +5658,7 @@ sal_Bool StatementControl::Execute() switch ( nMethodId ) { case M_GetItemCount: - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pRM->GetItemCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( pRM->GetItemCount())); break; case M_GetItemText: if ( ValueOK( aUId, MethodString( nMethodId ), nNr1, pRM->GetItemCount() )) @@ -5671,7 +5674,7 @@ sal_Bool StatementControl::Execute() } break; case M_GetSelIndex : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pRM->GetItemIndex( pRM->GetCurrentRoadmapItemID() ) +1)); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( pRM->GetItemIndex( pRM->GetCurrentRoadmapItemID() ) +1)); break; case M_GetSelText : pRet->GenReturn ( RET_Value, aUId, pRM->GetRoadmapItemLabel( pRM->GetCurrentRoadmapItemID() ) ); @@ -5692,7 +5695,7 @@ sal_Bool StatementControl::Execute() switch ( nMethodId ) { case M_GetItemCount: - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pELB->getItemCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( pELB->getItemCount())); break; case M_GetItemText: if ( ValueOK( aUId, MethodString( nMethodId ), nNr1, pELB->getItemCount() )) @@ -5718,7 +5721,7 @@ sal_Bool StatementControl::Execute() } break; case M_Select: - if ( (nParams & PARAM_USHORT_1) ) + if ( (nParams & PARAM_UINT16_1) ) { if ( ValueOK( aUId, MethodString( nMethodId ), nNr1, pELB->getItemCount() )) { @@ -5742,15 +5745,15 @@ sal_Bool StatementControl::Execute() break; case M_GetSelCount : if ( pELB->getSelIndex() == EXTENSION_LISTBOX_ENTRY_NOTFOUND ) - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( 0 )); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( 0 )); else - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( 1 )); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( 1 )); break; case M_GetSelIndex : if ( pELB->getSelIndex() == EXTENSION_LISTBOX_ENTRY_NOTFOUND ) - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( 0 )); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( 0 )); else - pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pELB->getSelIndex() +1)); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32( pELB->getSelIndex() +1)); break; default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "RoadMap" ) ); @@ -5812,20 +5815,20 @@ sal_Bool StatementControl::Execute() case TypeClass_UNSIGNED_LONG: case TypeClass_UNSIGNED_HYPER: { - comm_ULONG val = 0; + comm_UINT32 val = 0; aCell >>= val; pRet->GenReturn ( RET_Value, aUId, val ); } break; case TypeClass_UNSIGNED_SHORT: { - comm_USHORT val = 0; + comm_UINT16 val = 0; aCell >>= val; pRet->GenReturn ( RET_Value, aUId, val ); } break; default: - pRet->GenReturn ( RET_Value, aUId, comm_USHORT(0) ); + pRet->GenReturn ( RET_Value, aUId, comm_UINT16(0) ); break; } } @@ -5833,12 +5836,12 @@ sal_Bool StatementControl::Execute() break; case M_GetColumnCount : { - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTC->GetColumnCount() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pTC->GetColumnCount() ); } break; case M_GetRowCount : { - pRet->GenReturn ( RET_Value, aUId, (comm_ULONG)pTC->GetRowCount() ); + pRet->GenReturn ( RET_Value, aUId, (comm_UINT32)pTC->GetRowCount() ); } break; case M_Select : @@ -5876,13 +5879,13 @@ sal_Bool StatementControl::Execute() } break; case M_GetSelCount : - pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowCount() )); + pRet->GenReturn ( RET_Value, aUId, comm_UINT16( pTC->GetSelectedRowCount() )); break; case M_GetSelIndex : - if ( ! (nParams & PARAM_USHORT_1) ) + if ( ! (nParams & PARAM_UINT16_1) ) nNr1 = 1; if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRowCount() ) ) - pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowIndex( nNr1-1 ) +1 ) ); + pRet->GenReturn ( RET_Value, aUId, comm_UINT16( pTC->GetSelectedRowIndex( nNr1-1 ) +1 ) ); break; default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "TableControl" ) ); @@ -5968,7 +5971,7 @@ sal_Bool StatementControl::Execute() else ReportError( aUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_DOCKING_MODE, MethodString( nMethodId ) ) ); break; - case M_Help: // Alles was unten weiterbehandelt werden soll + case M_Help: // Alles was unten weiterbehandelt werden soll goto MoreDialog; default: @@ -6016,7 +6019,7 @@ sal_Bool StatementControl::Execute() SET_WINP_CLOSING(pControl); ((FloatingWindow*)pControl)->Close(); break; - case M_Help: // Alles was unten weiterbehandelt werden soll + case M_Help: // Alles was unten weiterbehandelt werden soll case M_Move: goto MoreDialog; default: @@ -6119,7 +6122,7 @@ sal_Bool StatementControl::Execute() ((WorkWindow*)pControl)->Maximize( sal_False ); ((WorkWindow*)pControl)->Restore(); break; - case M_Help: // Alles was unten weiterbehandelt werden soll + case M_Help: // Alles was unten weiterbehandelt werden soll goto MoreDialog; default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "WorkWindow" ) ); @@ -6160,7 +6163,7 @@ sal_Bool StatementControl::Execute() break; } if ( bDone ) - break; // break the case here else continue at C_ButtonDialog + break; // break the case here else continue at C_ButtonDialog } case C_ButtonDialog: { @@ -6267,7 +6270,7 @@ sal_Bool StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, pControl->GetText()); break; case M_Click: - if ( nParams & PARAM_USHORT_1 ) + if ( nParams & PARAM_UINT16_1 ) { if ( pBD->GetPushButton( nNr1 ) ) { @@ -6284,11 +6287,11 @@ sal_Bool StatementControl::Execute() ReportError( aUId, GEN_RES_STR1( S_BUTTONID_REQUIRED, MethodString( nMethodId ) ) ); break; case M_GetButtonCount : - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(pBD->GetButtonCount())); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(pBD->GetButtonCount())); break; case M_GetButtonId : if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,pBD->GetButtonCount()) ) - pRet->GenReturn ( RET_Value, aUId, comm_ULONG(pBD->GetButtonId(nNr1-1))); + pRet->GenReturn ( RET_Value, aUId, comm_UINT32(pBD->GetButtonId(nNr1-1))); break; default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "MessageBox" ) ); @@ -6323,7 +6326,7 @@ sal_Bool StatementControl::Execute() #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( CUniString("Reschedule command (requed) (").Append( UniString::CreateFromInt32(nRetryCount) ).AppendAscii(")\n") ); #endif - QueStatement( this ); // will que at the start of the list + QueStatement( this ); // will que at the start of the list } else { diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx index 40795641322c..2fb5092763bc 100644 --- a/automation/source/testtool/tcommuni.cxx +++ b/automation/source/testtool/tcommuni.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -84,7 +84,7 @@ sal_Bool CommunicationManagerClientViaSocketTT::RetryConnect() if ( bSucc ) { - aFirstRetryCall = Time() + Time( 0, 1 ); // Max eine Minute Zeit + aFirstRetryCall = Time() + Time( 0, 1 ); // Max eine Minute Zeit for ( int i = 10 ; i-- ; ) GetpApp()->Reschedule(); } @@ -159,7 +159,7 @@ sal_uLong GetTTPortConfig() #endif ) { - aPortToTalk = Application::GetCommandLineParam( i ).Copy(6); + aPortToTalk = Application::GetCommandLineParam( i ).Copy(6); return (sal_uLong)aPortToTalk.ToInt64(); } } @@ -168,7 +168,8 @@ sal_uLong GetTTPortConfig() Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); aConf.SetGroup("Communication"); - GETSET( abPortToTalk, "TTPort", ByteString::CreateFromInt32( TESTTOOL_DEFAULT_PORT ) ); + GETSET( abPortToTalk, "TTPort", + rtl::OString::valueOf(static_cast<sal_Int32>(TESTTOOL_DEFAULT_PORT)) ); return (sal_uLong)abPortToTalk.ToInt64(); } @@ -194,7 +195,8 @@ sal_uLong GetUnoPortConfig() Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); aConf.SetGroup("Communication"); - GETSET( abPortToTalk, "UnoPort", ByteString::CreateFromInt32( UNO_DEFAULT_PORT ) ); + GETSET( abPortToTalk, "UnoPort", + rtl::OString::valueOf(static_cast<sal_Int32>(UNO_DEFAULT_PORT)) ); return (sal_uLong)abPortToTalk.ToInt64(); } |