From 1c2d84e8e15031a45a0c5642520befb9320fe271 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 24 May 2011 10:05:12 +0100 Subject: replace comm_USHORT with comm_UINT16 --- automation/inc/automation/commdefines.hxx | 4 +- automation/inc/automation/commtypes.hxx | 4 +- automation/source/inc/cmdbasestream.hxx | 38 ++++----- automation/source/inc/icommstream.hxx | 4 +- automation/source/inc/svcommstream.hxx | 4 +- automation/source/server/cmdbasestream.cxx | 120 ++++++++++++++--------------- automation/source/server/recorder.cxx | 24 +++--- automation/source/server/retstrm.cxx | 4 +- automation/source/server/retstrm.hxx | 18 ++--- automation/source/server/scmdstrm.cxx | 4 +- automation/source/server/scmdstrm.hxx | 2 +- automation/source/server/statemnt.cxx | 22 +++--- automation/source/server/statemnt.hxx | 6 +- automation/source/server/svcommstream.cxx | 4 +- automation/source/simplecm/communiio.hxx | 4 +- automation/source/simplecm/tcpio.cxx | 4 +- automation/source/simplecm/tcpio.hxx | 4 +- automation/source/testtool/cmdstrm.hxx | 4 +- automation/source/testtool/cretstrm.hxx | 2 +- 19 files changed, 137 insertions(+), 139 deletions(-) (limited to 'automation') diff --git a/automation/inc/automation/commdefines.hxx b/automation/inc/automation/commdefines.hxx index 433cdeca9e45..24ca05809034 100644 --- a/automation/inc/automation/commdefines.hxx +++ b/automation/inc/automation/commdefines.hxx @@ -123,8 +123,8 @@ typedef comm_UINT16 CMProtocol; #define CM_PROTOCOL_BROADCASTER (CMProtocol)0x0002 #define CM_PROTOCOL_USER_START (CMProtocol)0x0100 -typedef comm_USHORT HandshakeType; -typedef comm_USHORT CommunicationOption; +typedef comm_UINT16 HandshakeType; +typedef comm_UINT16 CommunicationOption; #define CH_NoHeader 0x0000 #define CH_SimpleMultiChannel 0x0001 diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx index c2b8619c2eef..0ae6edd9b5cc 100644 --- a/automation/inc/automation/commtypes.hxx +++ b/automation/inc/automation/commtypes.hxx @@ -36,11 +36,10 @@ * ************************************************************************/ -/** defines al least types +/** defines: comm_BYTE comm_BOOL comm_ULONG - comm_USHORT comm_UINT16 comm_UINT32 comm_UniChar @@ -59,7 +58,6 @@ typedef sal_Unicode comm_UniChar; typedef sal_uInt8 comm_BYTE; typedef sal_Bool comm_BOOL; typedef sal_uInt32 comm_ULONG; -typedef sal_uInt16 comm_USHORT; typedef sal_uInt16 comm_UINT16; typedef sal_uInt32 comm_UINT32; diff --git a/automation/source/inc/cmdbasestream.hxx b/automation/source/inc/cmdbasestream.hxx index ce3ee45e095f..89bb123617c1 100644 --- a/automation/source/inc/cmdbasestream.hxx +++ b/automation/source/inc/cmdbasestream.hxx @@ -51,33 +51,33 @@ public: void GenError( rtl::OString *pUId, comm_String *pString ); - void GenReturn( comm_USHORT nRet, comm_ULONG nNr ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_String *pString ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ); + void GenReturn( comm_UINT16 nRet, comm_ULONG nNr ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_ULONG nNr ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_String *pString ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_BOOL bBool ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr ); - void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString ); - void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr ); + void GenReturn( comm_UINT16 nRet, comm_UINT16 nMethod, comm_ULONG nNr ); + void GenReturn( comm_UINT16 nRet, comm_UINT16 nMethod, comm_String *pString ); + void GenReturn( comm_UINT16 nRet, comm_UINT16 nMethod, comm_BOOL bBool ); + void GenReturn( comm_UINT16 nRet, comm_UINT16 nMethod, comm_UINT16 nNr ); // MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ); // also used outside MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod ); // also used outside MacroRecorder + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_String *pString ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_String *pString, comm_BOOL bBool ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_BOOL bBool ); + void GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_ULONG nNr ); - void Read ( comm_USHORT &nNr ); + void Read ( comm_UINT16 &nNr ); void Read ( comm_ULONG &nNr ); - void Read (comm_UniChar* &aString, comm_USHORT &nLenInChars ); + void Read (comm_UniChar* &aString, comm_UINT16 &nLenInChars ); void Read ( comm_BOOL &bBool ); - comm_USHORT GetNextType(); + comm_UINT16 GetNextType(); - void Write( comm_USHORT nNr ); + void Write( comm_UINT16 nNr ); void Write( comm_ULONG nNr ); - void Write( const comm_UniChar* aString, comm_USHORT nLenInChars ); + void Write( const comm_UniChar* aString, comm_UINT16 nLenInChars ); void Write( comm_BOOL bBool ); // Complex Datatypes to be handled system dependent diff --git a/automation/source/inc/icommstream.hxx b/automation/source/inc/icommstream.hxx index adc9be16063e..baba01b59e07 100644 --- a/automation/source/inc/icommstream.hxx +++ b/automation/source/inc/icommstream.hxx @@ -46,11 +46,11 @@ public: ICommStream(){} virtual ~ICommStream(){} - virtual ICommStream& operator>>( comm_USHORT& rUShort )=0; + virtual ICommStream& operator>>( comm_UINT16& rUShort )=0; virtual ICommStream& operator>>( comm_ULONG& rULong )=0; virtual ICommStream& operator>>( comm_BOOL& rChar )=0; - virtual ICommStream& operator<<( comm_USHORT nUShort )=0; + virtual ICommStream& operator<<( comm_UINT16 nUShort )=0; virtual ICommStream& operator<<( comm_ULONG nULong )=0; virtual ICommStream& operator<<( comm_BOOL nChar )=0; diff --git a/automation/source/inc/svcommstream.hxx b/automation/source/inc/svcommstream.hxx index 0cf289147f04..2a5f7044048a 100644 --- a/automation/source/inc/svcommstream.hxx +++ b/automation/source/inc/svcommstream.hxx @@ -41,11 +41,11 @@ public: SvCommStream( SvStream* pIO ); ~SvCommStream(); - ICommStream& operator>>( comm_USHORT& rUShort ); + ICommStream& operator>>( comm_UINT16& rUShort ); ICommStream& operator>>( comm_ULONG& rULong ); ICommStream& operator>>( comm_BOOL& rChar ); - ICommStream& operator<<( comm_USHORT nUShort ); + ICommStream& operator<<( comm_UINT16 nUShort ); ICommStream& operator<<( comm_ULONG nULong ); ICommStream& operator<<( comm_BOOL nChar ); diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx index 3988bcbab154..2c3dec7cac15 100644 --- a/automation/source/server/cmdbasestream.cxx +++ b/automation/source/server/cmdbasestream.cxx @@ -53,162 +53,162 @@ CmdBaseStream::~CmdBaseStream() void CmdBaseStream::GenError (rtl::OString *pUId, comm_String *pString ) { - Write(comm_USHORT(SIReturnError)); + Write(comm_UINT16(SIReturnError)); Write(pUId); Write(pString); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_ULONG nUId ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_ULONG nUId ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write(nUId); - Write(comm_USHORT(PARAM_NONE)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_NONE)); // Typ der folgenden Parameter } -void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_ULONG nNr ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) Write(comm_ULONG(0)); else Write(pUId); - Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_ULONG_1)); // Typ der folgenden Parameter Write(nNr); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_String *pString ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_String *pString ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) Write(comm_ULONG(0)); else Write(pUId); - Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_STR_1)); // Typ der folgenden Parameter Write(pString); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_BOOL bBool ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) Write(comm_ULONG(0)); else Write(pUId); - Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_BOOL_1)); // Typ der folgenden Parameter Write(bBool); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) Write(comm_ULONG(0)); else Write(pUId); - Write(comm_USHORT(PARAM_ULONG_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_ULONG_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter Write(nNr); Write(pString); Write(bBool); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_ULONG nNr ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) - Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_ULONG_1)); // Typ der folgenden Parameter Write(nNr); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_String *pString ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) - Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_STR_1)); // Typ der folgenden Parameter Write(pString); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_BOOL bBool ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) - Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_BOOL_1)); // Typ der folgenden Parameter Write(bBool); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr ) +void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_UINT16 nNr ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) - Write(comm_USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_USHORT_1)); // Typ der folgenden Parameter Write(nNr); } // MacroRecorder -void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ) +void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write(pUId); - Write(comm_USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_USHORT_1)); // Typ der folgenden Parameter Write(nMethod); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString ) +void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_String *pString ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write(pUId); - Write(comm_USHORT(PARAM_USHORT_1|PARAM_STR_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_USHORT_1|PARAM_STR_1)); // Typ der folgenden Parameter Write(nMethod); Write(pString); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ) +void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_String *pString, comm_BOOL bBool ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write(pUId); - Write(comm_USHORT(PARAM_USHORT_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_USHORT_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter Write(nMethod); Write(pString); Write(bBool); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool ) +void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_BOOL bBool ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write(pUId); - Write(comm_USHORT(PARAM_USHORT_1|PARAM_BOOL_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_USHORT_1|PARAM_BOOL_1)); // Typ der folgenden Parameter Write(nMethod); Write(bBool); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr ) +void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16 nMethod, comm_ULONG nNr ) { - Write(comm_USHORT(SIReturn)); + Write(comm_UINT16(SIReturn)); Write(nRet); Write(pUId); - Write(comm_USHORT(PARAM_USHORT_1|PARAM_ULONG_1)); // Typ der folgenden Parameter + Write(comm_UINT16(PARAM_USHORT_1|PARAM_ULONG_1)); // Typ der folgenden Parameter Write(nMethod); Write(nNr); } -void CmdBaseStream::Read (comm_USHORT &nNr) +void CmdBaseStream::Read (comm_UINT16 &nNr) { - comm_USHORT nId; + comm_UINT16 nId; *pCommStream >> nId; if (pCommStream->IsEof()) return; #if OSL_DEBUG_LEVEL > 1 @@ -219,7 +219,7 @@ void CmdBaseStream::Read (comm_USHORT &nNr) void CmdBaseStream::Read (comm_ULONG &nNr) { - comm_USHORT nId; + comm_UINT16 nId; *pCommStream >> nId; if (pCommStream->IsEof()) return; #if OSL_DEBUG_LEVEL > 1 @@ -228,9 +228,9 @@ void CmdBaseStream::Read (comm_ULONG &nNr) *pCommStream >> nNr; } -void CmdBaseStream::Read (comm_UniChar* &aString, comm_USHORT &nLenInChars ) +void CmdBaseStream::Read (comm_UniChar* &aString, comm_UINT16 &nLenInChars ) { - comm_USHORT nId; + comm_UINT16 nId; *pCommStream >> nId; #if OSL_DEBUG_LEVEL > 1 if (nId != BinString) OSL_TRACE( "Falscher Typ im Stream: Erwartet String, gefunden :%hu", nId ); @@ -242,7 +242,7 @@ void CmdBaseStream::Read (comm_UniChar* &aString, comm_USHORT &nLenInChars ) pCommStream->Read( aString, ((comm_ULONG)nLenInChars) * sizeof( comm_UniChar ) ); #ifdef OSL_BIGENDIAN // we have to change the byteorder - comm_USHORT n; + comm_UINT16 n; for ( n = 0 ; n < nLenInChars ; n++ ) aString[ n ] = aString[ n ] >> 8 | aString[ n ] << 8; #endif @@ -250,7 +250,7 @@ void CmdBaseStream::Read (comm_UniChar* &aString, comm_USHORT &nLenInChars ) void CmdBaseStream::Read (comm_BOOL &bBool) { - comm_USHORT nId; + comm_UINT16 nId; *pCommStream >> nId; #if OSL_DEBUG_LEVEL > 1 if (nId != BinBool) OSL_TRACE( "Falscher Typ im Stream: Erwartet BOOL, gefunden :%hu", nId ); @@ -258,39 +258,39 @@ void CmdBaseStream::Read (comm_BOOL &bBool) *pCommStream >> bBool; } -comm_USHORT CmdBaseStream::GetNextType() +comm_UINT16 CmdBaseStream::GetNextType() { - comm_USHORT nId; + comm_UINT16 nId; *pCommStream >> nId; pCommStream->SeekRel(-2); return nId; } -void CmdBaseStream::Write( comm_USHORT nNr ) +void CmdBaseStream::Write( comm_UINT16 nNr ) { - *pCommStream << comm_USHORT( BinUSHORT ); + *pCommStream << comm_UINT16( BinUSHORT ); *pCommStream << nNr; } void CmdBaseStream::Write( comm_ULONG nNr ) { - *pCommStream << comm_USHORT( BinULONG ); + *pCommStream << comm_UINT16( BinULONG ); *pCommStream << nNr; } -void CmdBaseStream::Write( const comm_UniChar* aString, comm_USHORT nLenInChars ) +void CmdBaseStream::Write( const comm_UniChar* aString, comm_UINT16 nLenInChars ) { - *pCommStream << comm_USHORT(BinString); + *pCommStream << comm_UINT16(BinString); - comm_USHORT n; + comm_UINT16 n; // remove BiDi and zero-width-markers 0x200B - 0x200F // remove BiDi and paragraph-markers 0x2028 - 0x202E comm_UniChar* aNoBiDiString; aNoBiDiString = new comm_UniChar [nLenInChars]; - comm_USHORT nNewLenInChars = 0; + comm_UINT16 nNewLenInChars = 0; for ( n = 0 ; n < nLenInChars ; n++ ) { comm_UniChar c = aString[ n ]; @@ -324,7 +324,7 @@ void CmdBaseStream::Write( const comm_UniChar* aString, comm_USHORT nLenInChars void CmdBaseStream::Write( comm_BOOL bBool ) { - *pCommStream << comm_USHORT( BinBool ); + *pCommStream << comm_UINT16( BinBool ); *pCommStream << bBool; } diff --git a/automation/source/server/recorder.cxx b/automation/source/server/recorder.cxx index 6ec7ed48cc2e..79e0a409b92f 100644 --- a/automation/source/server/recorder.cxx +++ b/automation/source/server/recorder.cxx @@ -190,7 +190,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_WINDOW_ACTIVATE: if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), Id2Str( pWin->GetUniqueOrHelpId() ) ); + StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString(), (comm_UINT16)(M_SetPage|M_RET_NUM_CONTROL), Id2Str( pWin->GetUniqueOrHelpId() ) ); bSendData = sal_True; } if ( m_bLog ) @@ -210,7 +210,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Check ); + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_UINT16)M_Check ); bSendData = sal_True; } if ( m_bLog ) @@ -228,7 +228,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { case VCLEVENT_BUTTON_CLICK: //VCLEVENT_CHECKBOX_TOGGLE: { - comm_USHORT nMethod; + comm_UINT16 nMethod; String aMethod; switch ( ((TriStateBox*)pWin)->GetState() ) { @@ -273,7 +273,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_LISTBOX_SELECT: if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) ); + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_UINT16)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) ); bSendData = sal_True; } if ( m_bLog ) @@ -308,7 +308,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) Sound::Beep(); else { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, (comm_ULONG) nPos+1 ); + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_UINT16)M_Select, (comm_ULONG) nPos+1 ); bSendData = sal_True; } } @@ -341,7 +341,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case WINDOW_QUERYBOX: case WINDOW_BUTTONDIALOG: { - comm_USHORT nMethod; + comm_UINT16 nMethod; String aMethod; ButtonDialog* pBD = (ButtonDialog*)pParent; @@ -387,7 +387,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) break; default: { - comm_USHORT nMethod; + comm_UINT16 nMethod; String aMethod; switch ( pWin->GetType() ) { @@ -415,7 +415,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { if ( !bSendData && pWin->GetUniqueOrHelpId().getLength() ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click ); + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_UINT16)M_Click ); bSendData = sal_True; } } @@ -443,7 +443,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) pEditModify = NULL; aEditModifyString.Erase(); - comm_USHORT nMethod; + comm_UINT16 nMethod; String aMethod; switch ( nEventID ) { @@ -478,7 +478,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_BUTTON_CLICK: if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click ); + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_UINT16)M_Click ); bSendData = sal_True; } if ( m_bLog ) @@ -502,10 +502,10 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { if ( !pWin->GetUniqueOrHelpId().getLength() /* || pWin->GetUniqueOrHelpId().Matches( 1 ) */ ) // generate direct Button access - StatementList::pRet->GenReturn( RET_MacroRecorder, Str2Id( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) ); + StatementList::pRet->GenReturn( RET_MacroRecorder, Str2Id( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_UINT16)(M_Click) ); else // access via Toolbox - StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), Id2Str( pTB->GetHelpId( pTB->GetCurItemId() ) ) ); + StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_UINT16)(M_Click|M_RET_NUM_CONTROL), Id2Str( pTB->GetHelpId( pTB->GetCurItemId() ) ) ); bSendData = sal_True; } } diff --git a/automation/source/server/retstrm.cxx b/automation/source/server/retstrm.cxx index 3f5d2d8744ab..cbc23f5f62cf 100644 --- a/automation/source/server/retstrm.cxx +++ b/automation/source/server/retstrm.cxx @@ -64,12 +64,12 @@ void RetStream::GenReturn ( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, } // MacroRecorder -void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ) +void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_UINT16 nMethod, String aString ) { CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString ); } -void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool ) +void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_UINT16 nMethod, String aString, sal_Bool bBool ) { CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString, bBool ); } diff --git a/automation/source/server/retstrm.hxx b/automation/source/server/retstrm.hxx index d21650898933..4e604aa583a0 100644 --- a/automation/source/server/retstrm.hxx +++ b/automation/source/server/retstrm.hxx @@ -44,14 +44,14 @@ public: void GenError( rtl::OString aUId, String aString ); using CmdBaseStream::GenReturn; - void GenReturn( comm_USHORT nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );} - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );} - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );} + void GenReturn( comm_UINT16 nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );} + void GenReturn( comm_UINT16 nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );} + void GenReturn( comm_UINT16 nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );} // MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );} - void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );} + void GenReturn( comm_UINT16 nRet, rtl::OString aUId, comm_UINT16 nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder + void GenReturn( comm_UINT16 nRet, rtl::OString aUId, comm_UINT16 nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );} + void GenReturn( comm_UINT16 nRet, rtl::OString aUId, comm_UINT16 nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );} void GenReturn( sal_uInt16 nRet, rtl::OString aUId, String aString ); void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool ); @@ -61,8 +61,8 @@ public: void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString ); // MacroRecorder - void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ); - void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool ); + void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_UINT16 nMethod, String aString ); + void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_UINT16 nMethod, String aString, sal_Bool bBool ); void Reset(); SvStream* GetStream(); @@ -70,7 +70,7 @@ public: using CmdBaseStream::Write; - void Write( comm_USHORT nNr ){CmdBaseStream::Write( nNr );} + void Write( comm_UINT16 nNr ){CmdBaseStream::Write( nNr );} void Write( comm_ULONG nNr ){CmdBaseStream::Write( nNr );} void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );} void Write( SbxValue &aValue ); diff --git a/automation/source/server/scmdstrm.cxx b/automation/source/server/scmdstrm.cxx index 8cd69cbb2aae..8edc15d8f2aa 100644 --- a/automation/source/server/scmdstrm.cxx +++ b/automation/source/server/scmdstrm.cxx @@ -88,7 +88,7 @@ void SCmdStream::Read ( SfxPoolItem *&pItem ) { case BinUSHORT: { - comm_USHORT nNr; + comm_UINT16 nNr; Read (nNr ); pItem = new SfxUInt16Item(nId,nNr); #if OSL_DEBUG_LEVEL > 1 @@ -159,7 +159,7 @@ void SCmdStream::Read ( ::com::sun::star::beans::PropertyValue &rItem ) { case BinUSHORT: { - comm_USHORT nNr; + comm_UINT16 nNr; Read (nNr ); rItem.Value <<= nNr; #if OSL_DEBUG_LEVEL > 1 diff --git a/automation/source/server/scmdstrm.hxx b/automation/source/server/scmdstrm.hxx index e2725b6f0070..a6f3e04e1057 100644 --- a/automation/source/server/scmdstrm.hxx +++ b/automation/source/server/scmdstrm.hxx @@ -47,7 +47,7 @@ public: ~SCmdStream(); using CmdBaseStream::Read; - void Read ( comm_USHORT &nNr ){CmdBaseStream::Read ( nNr );} + void Read ( comm_UINT16 &nNr ){CmdBaseStream::Read ( nNr );} void Read ( comm_ULONG &nNr ){CmdBaseStream::Read ( nNr );} void Read ( comm_BOOL &bBool ){CmdBaseStream::Read ( bBool );} void Read ( String &aString ); diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 7acabf1c238f..fe656166260e 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -2474,12 +2474,12 @@ sal_Bool StatementCommand::Execute() } 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 return sal_False; - pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSTimeout) ); + pRet->GenReturn ( RET_Value, nMethodId, comm_UINT16(CONST_WSTimeout) ); } } break; @@ -3242,7 +3242,7 @@ 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 : @@ -3265,7 +3265,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 : @@ -5510,7 +5510,7 @@ sal_Bool StatementControl::Execute() 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 +5566,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++ ) { @@ -5593,7 +5593,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++ ) { @@ -5819,13 +5819,13 @@ sal_Bool StatementControl::Execute() 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; } } @@ -5876,13 +5876,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) ) 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" ) ); diff --git a/automation/source/server/statemnt.hxx b/automation/source/server/statemnt.hxx index d7f63a39cd91..d525779b0d11 100644 --- a/automation/source/server/statemnt.hxx +++ b/automation/source/server/statemnt.hxx @@ -336,7 +336,7 @@ class StatementCommand : public StatementList // Befehl ausf�hren (wintree, protected: sal_uInt16 nMethodId; sal_uInt16 nParams; - comm_USHORT nNr1,nNr2,nNr3,nNr4; + comm_UINT16 nNr1,nNr2,nNr3,nNr4; comm_ULONG nLNr1; String aString1,aString2; sal_Bool bBool1,bBool2; @@ -372,7 +372,7 @@ protected: rtl::OString aUId; sal_uInt16 nMethodId; sal_uInt16 nParams; - comm_USHORT nNr1,nNr2,nNr3,nNr4; + comm_UINT16 nNr1,nNr2,nNr3,nNr4; comm_ULONG nLNr1; String aString1,aString2; sal_Bool bBool1,bBool2; @@ -396,7 +396,7 @@ class StatementFlow : public StatementList // Kommunikation mit Sequence sal_uInt16 nArt; sal_uInt16 nParams; - comm_USHORT nSNr1; + comm_UINT16 nSNr1; comm_ULONG nLNr1; String aString1; sal_Bool bBool1; diff --git a/automation/source/server/svcommstream.cxx b/automation/source/server/svcommstream.cxx index c689f9137a3f..97d639ce4a7d 100644 --- a/automation/source/server/svcommstream.cxx +++ b/automation/source/server/svcommstream.cxx @@ -34,11 +34,11 @@ SvCommStream::SvCommStream( SvStream* pIO ) { pStream = pIO; } SvCommStream::~SvCommStream() {} -ICommStream& SvCommStream::operator>>( comm_USHORT& rUShort ) { *pStream >> rUShort; return *this; } +ICommStream& SvCommStream::operator>>( comm_UINT16& rUShort ) { *pStream >> rUShort; return *this; } ICommStream& SvCommStream::operator>>( comm_ULONG& rULong ) { *pStream >> rULong; return *this; } ICommStream& SvCommStream::operator>>( comm_BOOL& rChar ) { *pStream >> rChar; return *this; } -ICommStream& SvCommStream::operator<<( comm_USHORT nUShort ) { *pStream << nUShort; return *this; } +ICommStream& SvCommStream::operator<<( comm_UINT16 nUShort ) { *pStream << nUShort; return *this; } ICommStream& SvCommStream::operator<<( comm_ULONG nULong ) { *pStream << nULong; return *this; } ICommStream& SvCommStream::operator<<( comm_BOOL nChar ) { *pStream << nChar; return *this; } diff --git a/automation/source/simplecm/communiio.hxx b/automation/source/simplecm/communiio.hxx index 65466a26b271..b09354054fd9 100644 --- a/automation/source/simplecm/communiio.hxx +++ b/automation/source/simplecm/communiio.hxx @@ -48,7 +48,7 @@ protected: public: ITransmiter() :nLastSent( 0 ){} virtual ~ITransmiter() {} - virtual comm_USHORT TransferBytes( const void* pBuffer, comm_UINT32 nLen ) = 0; + virtual comm_UINT16 TransferBytes( const void* pBuffer, comm_UINT32 nLen ) = 0; comm_ULONG GetLastSent() const { return nLastSent; } }; @@ -60,7 +60,7 @@ protected: public: IReceiver() :nLastReceived( 0 ){} virtual ~IReceiver() {;} - virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) = 0; + virtual comm_UINT16 ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) = 0; comm_ULONG GetLastReceived() const { return nLastReceived; } }; diff --git a/automation/source/simplecm/tcpio.cxx b/automation/source/simplecm/tcpio.cxx index e71afb399b84..9c0bc2185704 100644 --- a/automation/source/simplecm/tcpio.cxx +++ b/automation/source/simplecm/tcpio.cxx @@ -32,7 +32,7 @@ #include "tcpio.hxx" /// implement ITransmiter -comm_USHORT TCPIO::TransferBytes( const void* pBuffer, comm_UINT32 nLen ) +comm_UINT16 TCPIO::TransferBytes( const void* pBuffer, comm_UINT32 nLen ) { osl::MutexGuard aGuard( aMSocketWriteAccess ); if ( !pStreamSocket ) @@ -48,7 +48,7 @@ comm_USHORT TCPIO::TransferBytes( const void* pBuffer, comm_UINT32 nLen ) /// implement IReceiver -comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) +comm_UINT16 TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) { osl::MutexGuard aGuard( aMSocketReadAccess ); if ( !pStreamSocket ) diff --git a/automation/source/simplecm/tcpio.hxx b/automation/source/simplecm/tcpio.hxx index 07c3edba7a5b..3240a8156d60 100644 --- a/automation/source/simplecm/tcpio.hxx +++ b/automation/source/simplecm/tcpio.hxx @@ -49,10 +49,10 @@ public: /// implement ITransmiter - virtual comm_USHORT TransferBytes( const void* pBuffer, comm_UINT32 nLen ); + virtual comm_UINT16 TransferBytes( const void* pBuffer, comm_UINT32 nLen ); /// implement IReceiver - virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen ); + virtual comm_UINT16 ReceiveBytes( void* pBuffer, comm_UINT32 nLen ); // helper void SetStreamSocket( osl::StreamSocket* pSocket ); diff --git a/automation/source/testtool/cmdstrm.hxx b/automation/source/testtool/cmdstrm.hxx index d9c3cec49c73..f23c479d686c 100644 --- a/automation/source/testtool/cmdstrm.hxx +++ b/automation/source/testtool/cmdstrm.hxx @@ -66,9 +66,9 @@ private: String WandleKeyEventString( String aKeys ); // Nutzt pKeyCodes. using CmdBaseStream::Write; - void Write( comm_USHORT nNr ){CmdBaseStream::Write( nNr );} + void Write( comm_UINT16 nNr ){CmdBaseStream::Write( nNr );} void Write( comm_ULONG nNr ){CmdBaseStream::Write( nNr );} - void Write( const comm_UniChar* aString, comm_USHORT nLenInChars ){CmdBaseStream::Write( aString, nLenInChars );} + void Write( const comm_UniChar* aString, comm_UINT16 nLenInChars ){CmdBaseStream::Write( aString, nLenInChars );} void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );} // new void Write( String aString, sal_Bool IsKeyString = sal_False ); diff --git a/automation/source/testtool/cretstrm.hxx b/automation/source/testtool/cretstrm.hxx index 0315c53828b7..09c948a36e69 100644 --- a/automation/source/testtool/cretstrm.hxx +++ b/automation/source/testtool/cretstrm.hxx @@ -43,7 +43,7 @@ public: ~CRetStream(); using CmdBaseStream::Read; - void Read ( comm_USHORT &nNr ){CmdBaseStream::Read ( nNr );} + void Read ( comm_UINT16 &nNr ){CmdBaseStream::Read ( nNr );} void Read ( comm_ULONG &nNr ){CmdBaseStream::Read ( nNr );} virtual void Read ( rtl::OString* &pId ){CmdBaseStream::Read ( pId );} void Read ( comm_BOOL &bBool ){CmdBaseStream::Read ( bBool );} -- cgit