diff options
author | Andreas Bregas <ab@openoffice.org> | 2002-11-18 07:38:47 +0000 |
---|---|---|
committer | Andreas Bregas <ab@openoffice.org> | 2002-11-18 07:38:47 +0000 |
commit | 4ba6b71a66aba4ce3866e6e027e89222ba4c8ab0 (patch) | |
tree | 38e6712ffc48cfc65c2fabd99b8c9bafa6bb5faf /basic/source | |
parent | 7e1536e31eac49a2d72d7aced6150d7b8c6d6d1b (diff) |
#102653# 32 bit arrays
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/runtime/methods.cxx | 16 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 10 | ||||
-rw-r--r-- | basic/source/runtime/step0.cxx | 32 | ||||
-rw-r--r-- | basic/source/runtime/step2.cxx | 14 |
4 files changed, 36 insertions, 36 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 1ec88fa4ef473..46cb8cd5efd4a 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2,9 +2,9 @@ * * $RCSfile: methods.cxx,v $ * - * $Revision: 1.45 $ + * $Revision: 1.46 $ * - * last change: $Author: ab $ $Date: 2002-10-17 14:30:00 $ + * last change: $Author: ab $ $Date: 2002-11-18 08:36:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -3480,12 +3480,12 @@ RTLFUNC(LBound) SbxDimArray* pArr = PTR_CAST(SbxDimArray,pParObj); if( pArr ) { - short nLower, nUpper; + INT32 nLower, nUpper; short nDim = (nParCount == 3) ? (short)rPar.Get(2)->GetInteger() : 1; - if( !pArr->GetDim( nDim, nLower, nUpper ) ) + if( !pArr->GetDim32( nDim, nLower, nUpper ) ) StarBASIC::Error( SbERR_OUT_OF_RANGE ); else - rPar.Get(0)->PutInteger( (INT16)nLower ); + rPar.Get(0)->PutLong( nLower ); } else StarBASIC::Error( SbERR_MUST_HAVE_DIMS ); @@ -3504,12 +3504,12 @@ RTLFUNC(UBound) SbxDimArray* pArr = PTR_CAST(SbxDimArray,pParObj); if( pArr ) { - short nLower, nUpper; + INT32 nLower, nUpper; short nDim = (nParCount == 3) ? (short)rPar.Get(2)->GetInteger() : 1; - if( !pArr->GetDim( nDim, nLower, nUpper ) ) + if( !pArr->GetDim32( nDim, nLower, nUpper ) ) StarBASIC::Error( SbERR_OUT_OF_RANGE ); else - rPar.Get(0)->PutInteger( (INT16)nUpper ); + rPar.Get(0)->PutLong( nUpper ); } else StarBASIC::Error( SbERR_MUST_HAVE_DIMS ); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 2a9df28cbdd32..56cfa81923111 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: methods1.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: ab $ $Date: 2002-10-08 09:05:47 $ + * last change: $Author: ab $ $Date: 2002-11-18 08:36:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -594,19 +594,19 @@ RTLFUNC(Array) // Das Array ist immer vom Typ Variant RTLFUNC(DimArray) { - SbxDimArray* pArray = new SbxDimArray( SbxVARIANT ); + SbxDimArray * pArray = new SbxDimArray( SbxVARIANT ); USHORT nArrayDims = rPar.Count() - 1; if( nArrayDims > 0 ) { for( USHORT i = 0; i < nArrayDims ; i++ ) { - INT16 ub = rPar.Get(i+1)->GetInteger(); + INT32 ub = rPar.Get(i+1)->GetLong(); if( ub < 0 ) { StarBASIC::Error( SbERR_OUT_OF_RANGE ); ub = 0; } - pArray->AddDim( 0, ub ); + pArray->AddDim32( 0, ub ); } } // Array zurueckliefern diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 8a783b919a7f5..7410ef7fadd2e 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -2,9 +2,9 @@ * * $RCSfile: step0.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: ab $ $Date: 2002-08-15 07:34:08 $ + * last change: $Author: ab $ $Date: 2002-11-18 08:38:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -391,11 +391,11 @@ void SbiRuntime::DimImpl( SbxVariableRef refVar ) { for( USHORT i = 1; i < pDims->Count(); ) { - INT16 lb = pDims->Get( i++ )->GetInteger(); - INT16 ub = pDims->Get( i++ )->GetInteger(); + INT32 lb = pDims->Get( i++ )->GetLong(); + INT32 ub = pDims->Get( i++ )->GetLong(); if( ub < lb ) Error( SbERR_OUT_OF_RANGE ), ub = lb; - pArray->AddDim( lb, ub ); + pArray->AddDim32( lb, ub ); } } else @@ -426,9 +426,9 @@ void SbiRuntime::StepREDIM() // Helper function for StepREDIMP void implCopyDimArray( SbxDimArray* pNewArray, SbxDimArray* pOldArray, short nMaxDimIndex, - short nActualDim, short* pActualIndices, short* pLowerBounds, short* pUpperBounds ) + short nActualDim, sal_Int32* pActualIndices, sal_Int32* pLowerBounds, sal_Int32* pUpperBounds ) { - short& ri = pActualIndices[nActualDim]; + sal_Int32& ri = pActualIndices[nActualDim]; for( ri = pLowerBounds[nActualDim] ; ri <= pUpperBounds[nActualDim] ; ri++ ) { if( nActualDim < nMaxDimIndex ) @@ -438,8 +438,8 @@ void implCopyDimArray( SbxDimArray* pNewArray, SbxDimArray* pOldArray, short nMa } else { - SbxVariable* pSource = pOldArray->Get( pActualIndices ); - SbxVariable* pDest = pNewArray->Get( pActualIndices ); + SbxVariable* pSource = pOldArray->Get32( pActualIndices ); + SbxVariable* pDest = pNewArray->Get32( pActualIndices ); if( pSource && pDest ) *pDest = *pSource; } @@ -469,9 +469,9 @@ void SbiRuntime::StepREDIMP() BOOL bRangeError = FALSE; // Store dims to use them for copying later - short* pLowerBounds = new short[nDims]; - short* pUpperBounds = new short[nDims]; - short* pActualIndices = new short[nDims]; + sal_Int32* pLowerBounds = new sal_Int32[nDims]; + sal_Int32* pUpperBounds = new sal_Int32[nDims]; + sal_Int32* pActualIndices = new sal_Int32[nDims]; if( nDimsOld != nDimsNew ) { bRangeError = TRUE; @@ -481,10 +481,10 @@ void SbiRuntime::StepREDIMP() // Compare bounds for( short i = 1 ; i <= nDims ; i++ ) { - short lBoundNew, uBoundNew; - short lBoundOld, uBoundOld; - pNewArray->GetDim( i, lBoundNew, uBoundNew ); - pOldArray->GetDim( i, lBoundOld, uBoundOld ); + sal_Int32 lBoundNew, uBoundNew; + sal_Int32 lBoundOld, uBoundOld; + pNewArray->GetDim32( i, lBoundNew, uBoundNew ); + pOldArray->GetDim32( i, lBoundOld, uBoundOld ); /* #69094 Allow all dimensions to be changed although Visual Basic is not able to do so. diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 90e6005ea6481..3554e0bb660ca 100644 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: step2.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: ab $ $Date: 2002-09-30 08:54:11 $ + * last change: $Author: ab $ $Date: 2002-11-18 08:38:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -838,14 +838,14 @@ void SbiRuntime::StepDCREATE( USHORT nOp1, USHORT nOp2 ) // Dimensionen auswerten short nDims = pArray->GetDims(); - USHORT nTotalSize = 0; + UINT32 nTotalSize = 0; // es muss ein eindimensionales Array sein - short nLower, nUpper, nSize; - USHORT i; + INT32 nLower, nUpper, nSize; + UINT32 i; for( i = 0 ; i < nDims ; i++ ) { - pArray->GetDim( i+1, nLower, nUpper ); + pArray->GetDim32( i+1, nLower, nUpper ); nSize = nUpper - nLower + 1; if( i == 0 ) nTotalSize = nSize; @@ -869,7 +869,7 @@ void SbiRuntime::StepDCREATE( USHORT nOp1, USHORT nOp2 ) pObj->SetName( aName ); // Das Objekt muss BASIC rufen koennen pObj->SetParent( &rBasic ); - pArray->SbxArray::Put( pObj, i ); + pArray->SbxArray::Put32( pObj, i ); } } } |