Kaydet (Commit) b4387143 authored tarafından Caolán McNamara's avatar Caolán McNamara

PARAM_USHORT_->PARAM_UINT16_ && PARAM_ULONG_->PARAM_UINT32_

üst b2df7eb8
......@@ -443,12 +443,12 @@
// Beschreibt die Parametertypen als Bitfeld Reihenfolge immer!
// wie hier Aufgelistet
#define PARAM_NONE 0x0000
#define PARAM_USHORT_1 0x0001
#define PARAM_USHORT_2 0x0002
#define PARAM_USHORT_3 0x0100 // Nicht in der Reihe!!
#define PARAM_USHORT_4 0x0200 // Nicht in der Reihe!!
#define PARAM_ULONG_1 0x0004
#define PARAM_ULONG_2 0x0008
#define PARAM_UINT16_1 0x0001
#define PARAM_UINT16_2 0x0002
#define PARAM_UINT16_3 0x0100 // Nicht in der Reihe!!
#define PARAM_UINT16_4 0x0200 // Nicht in der Reihe!!
#define PARAM_UINT32_1 0x0004
#define PARAM_UINT32_2 0x0008
#define PARAM_STR_1 0x0010
#define PARAM_STR_2 0x0020
#define PARAM_BOOL_1 0x0040
......
......@@ -524,7 +524,7 @@ void StatementCommand::HandleSAXParser()
break;
case RC_SAXGetAttributeName:
{
if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
if( (nParams & PARAM_UINT16_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
{
String aRet( xAttributeList->getNameByIndex( nNr1-1 ) );
pRet->GenReturn ( RET_Value, nMethodId, aRet );
......@@ -536,7 +536,7 @@ void StatementCommand::HandleSAXParser()
case RC_SAXGetAttributeValue:
// Number or String
{
if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
if( (nParams & PARAM_UINT16_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) )
{
String aRet( xAttributeList->getValueByIndex( nNr1-1 ) );
pRet->GenReturn ( RET_Value, nMethodId, aRet );
......@@ -578,7 +578,7 @@ void StatementCommand::HandleSAXParser()
{
sal_Bool bCheckOnly = nMethodId == RC_SAXHasElement;
if( (nParams & PARAM_USHORT_1) && !(nParams & PARAM_STR_1) )
if( (nParams & PARAM_UINT16_1) && !(nParams & PARAM_STR_1) )
{
if ( nNr1 == 0 )
{
......@@ -623,7 +623,7 @@ void StatementCommand::HandleSAXParser()
else if ( pElementNode )
{
sal_uInt16 nNthOccurrence;
if( (nParams & PARAM_USHORT_1) )
if( (nParams & PARAM_UINT16_1) )
nNthOccurrence = nNr1;
else
nNthOccurrence = 1;
......
......@@ -74,7 +74,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_UINT32
Write(comm_UINT32(0));
else
Write(pUId);
Write(comm_UINT16(PARAM_ULONG_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT32_1)); // Typ der folgenden Parameter
Write(nNr);
}
......@@ -110,7 +110,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, rtl::OString *pUId, comm_UINT32
Write(comm_UINT32(0));
else
Write(pUId);
Write(comm_UINT16(PARAM_ULONG_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT32_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(nNr);
Write(pString);
Write(bBool);
......@@ -121,7 +121,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_UINT3
Write(comm_UINT16(SIReturn));
Write(nRet);
Write((comm_UINT32)nMethod); //HELPID BACKWARD (no sal_uLong needed)
Write(comm_UINT16(PARAM_ULONG_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT32_1)); // Typ der folgenden Parameter
Write(nNr);
}
......@@ -148,7 +148,7 @@ void CmdBaseStream::GenReturn (comm_UINT16 nRet, comm_UINT16 nMethod, comm_UINT1
Write(comm_UINT16(SIReturn));
Write(nRet);
Write((comm_UINT32)nMethod); //HELPID BACKWARD (no sal_uLong needed)
Write(comm_UINT16(PARAM_USHORT_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT16_1)); // Typ der folgenden Parameter
Write(nNr);
}
......@@ -159,7 +159,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
Write(comm_UINT16(PARAM_USHORT_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT16_1)); // Typ der folgenden Parameter
Write(nMethod);
}
......@@ -168,7 +168,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
Write(comm_UINT16(PARAM_USHORT_1|PARAM_STR_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT16_1|PARAM_STR_1)); // Typ der folgenden Parameter
Write(nMethod);
Write(pString);
}
......@@ -178,7 +178,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
Write(comm_UINT16(PARAM_USHORT_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT16_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(nMethod);
Write(pString);
Write(bBool);
......@@ -189,7 +189,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
Write(comm_UINT16(PARAM_USHORT_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT16_1|PARAM_BOOL_1)); // Typ der folgenden Parameter
Write(nMethod);
Write(bBool);
}
......@@ -199,7 +199,7 @@ void CmdBaseStream::GenReturn( comm_UINT16 nRet, rtl::OString *pUId, comm_UINT16
Write(comm_UINT16(SIReturn));
Write(nRet);
Write(pUId);
Write(comm_UINT16(PARAM_USHORT_1|PARAM_ULONG_1)); // Typ der folgenden Parameter
Write(comm_UINT16(PARAM_UINT16_1|PARAM_UINT32_1)); // Typ der folgenden Parameter
Write(nMethod);
Write(nNr);
}
......
......@@ -193,24 +193,24 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
case SbxINT:
case SbxUINT:
case SbxSINGLE:
if ( (nParams & PARAM_USHORT_1) == 0 )
if ( (nParams & PARAM_UINT16_1) == 0 )
{
nParams |= PARAM_USHORT_1;
nParams |= PARAM_UINT16_1;
nNr1 = rPar->Get( i )->GetUShort();
}
else if ( (nParams & PARAM_USHORT_2) == 0 )
else if ( (nParams & PARAM_UINT16_2) == 0 )
{
nParams |= PARAM_USHORT_2;
nParams |= PARAM_UINT16_2;
nNr2 = rPar->Get( i )->GetUShort();
}
else if ( (nParams & PARAM_USHORT_3) == 0 )
else if ( (nParams & PARAM_UINT16_3) == 0 )
{
nParams |= PARAM_USHORT_3;
nParams |= PARAM_UINT16_3;
nNr3 = rPar->Get( i )->GetUShort();
}
else if ( (nParams & PARAM_USHORT_4) == 0 )
else if ( (nParams & PARAM_UINT16_4) == 0 )
{
nParams |= PARAM_USHORT_4;
nParams |= PARAM_UINT16_4;
nNr4 = rPar->Get( i )->GetUShort();
}
else
......@@ -242,11 +242,11 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
}
else if ( pMember->GetType() == SbxULONG )
{
if ( nParams & PARAM_ULONG_1 )
if ( nParams & PARAM_UINT32_1 )
SbxBase::SetError( SbxERR_WRONG_ARGS );
else
{
nParams |= PARAM_ULONG_1;
nParams |= PARAM_UINT32_1;
nLNr1 = pMember->GetULong();
}
}
......@@ -297,11 +297,11 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString )
}
}
Write (nParams);
if( nParams & PARAM_USHORT_1 ) Write( nNr1 );
if( nParams & PARAM_USHORT_2 ) Write( nNr2 );
if( nParams & PARAM_USHORT_3 ) Write( nNr3 );
if( nParams & PARAM_USHORT_4 ) Write( nNr4 );
if( nParams & PARAM_ULONG_1 ) Write( nLNr1 );
if( nParams & PARAM_UINT16_1 ) Write( nNr1 );
if( nParams & PARAM_UINT16_2 ) Write( nNr2 );
if( nParams & PARAM_UINT16_3 ) Write( nNr3 );
if( nParams & PARAM_UINT16_4 ) Write( nNr4 );
if( nParams & PARAM_UINT32_1 ) Write( nLNr1 );
if( nParams & PARAM_STR_1 ) Write( aString1, IsKeyString );
if( nParams & PARAM_STR_2 ) Write( aString2, IsKeyString );
if( nParams & PARAM_BOOL_1 ) Write( bBool1 );
......@@ -426,7 +426,7 @@ void CmdStream::GenCmdFlow( sal_uInt16 nArt, sal_uInt16 nNr1 )
{
Write(sal_uInt16(SIFlow));
Write(nArt);
Write(sal_uInt16(PARAM_USHORT_1)); // Typ der folgenden Parameter
Write(sal_uInt16(PARAM_UINT16_1)); // Typ der folgenden Parameter
Write(nNr1);
}
......@@ -434,7 +434,7 @@ void CmdStream::GenCmdFlow( sal_uInt16 nArt, comm_UINT32 nNr1 )
{
Write(sal_uInt16(SIFlow));
Write(nArt);
Write(sal_uInt16(PARAM_ULONG_1)); // Typ der folgenden Parameter
Write(sal_uInt16(PARAM_UINT32_1)); // Typ der folgenden Parameter
Write(nNr1);
}
......
......@@ -3183,9 +3183,9 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
sal_Bool bBool1 = sal_False;
SbxValueRef xValue1 = new SbxValue;
if( nParams & PARAM_USHORT_1 )
if( nParams & PARAM_UINT16_1 )
pRetStream->Read( nNr1 );
if( nParams & PARAM_ULONG_1 )
if( nParams & PARAM_UINT32_1 )
pRetStream->Read( nLNr1 );
if( nParams & PARAM_STR_1 )
{
......@@ -3222,14 +3222,14 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
{
if ( aNextReturnId.equals( aUId ) )
{
if( nParams & PARAM_ULONG_1 ) // FIXME this is to allow negative numbers, hoping that no large numbers are interpreted wrong. should have new PARAM_LONG_1 instead
if( nParams & PARAM_UINT32_1 ) // FIXME this is to allow negative numbers, hoping that no large numbers are interpreted wrong. should have new PARAM_LONG_1 instead
{
if ( nLNr1 > 0x7fffffff )
pImpl->pNextReturn->PutLong( long(nLNr1 - 0xffffffff) -1 );
else
pImpl->pNextReturn->PutULong( nLNr1 );
}
if( nParams & PARAM_USHORT_1 ) pImpl->pNextReturn->PutUShort( nNr1 );
if( nParams & PARAM_UINT16_1 ) pImpl->pNextReturn->PutUShort( nNr1 );
if( nParams & PARAM_STR_1 ) pImpl->pNextReturn->PutString( aString1 );
if( nParams & PARAM_BOOL_1 ) pImpl->pNextReturn->PutBool( bBool1 );
if( nParams & PARAM_SBXVALUE_1 ) // FIXME: allow generic datatype
......@@ -3368,7 +3368,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
aStrm.Close();
}
}
if ( nParams & PARAM_ULONG_1 )
if ( nParams & PARAM_UINT32_1 )
{
switch ( nUId )
{
......@@ -3532,7 +3532,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
}
aULongNames.Erase();
if( (nParams & PARAM_ULONG_1) && (nNr1 & M_RET_NUM_CONTROL) )
if( (nParams & PARAM_UINT32_1) && (nNr1 & M_RET_NUM_CONTROL) )
{
if ( m_pReverseControls )
{
......@@ -3729,7 +3729,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
}
aCommand.AppendAscii( "\"" );
}
if( nParams & PARAM_ULONG_1 )
if( nParams & PARAM_UINT32_1 )
{
if ( bWasParam )
aCommand.AppendAscii( ", " );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment