summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr5.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/interpr5.cxx')
-rw-r--r--sc/source/core/tool/interpr5.cxx76
1 files changed, 38 insertions, 38 deletions
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index a40bc6e572f6..0d0b50d70baf 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -173,7 +173,7 @@ void ScInterpreter::ScGCD()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -266,7 +266,7 @@ void ScInterpreter:: ScLCM()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -605,7 +605,7 @@ void ScInterpreter::ScMatValue()
ScBaseCell* pCell = GetCell( aAdr );
if (pCell && pCell->GetCellType() == CELLTYPE_FORMULA)
{
- USHORT nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
+ sal_uInt16 nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
if (nErrCode != 0)
PushError( nErrCode);
else
@@ -892,7 +892,7 @@ void ScInterpreter::ScMatDet()
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
- if ( nC != nR || nC == 0 || (ULONG) nC * nC > ScMatrix::GetElementsMax() )
+ if ( nC != nR || nC == 0 || (sal_uLong) nC * nC > ScMatrix::GetElementsMax() )
PushIllegalArgument();
else
{
@@ -938,7 +938,7 @@ void ScInterpreter::ScMatInv()
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
- if ( nC != nR || nC == 0 || (ULONG) nC * nC > ScMatrix::GetElementsMax() )
+ if ( nC != nR || nC == 0 || (sal_uLong) nC * nC > ScMatrix::GetElementsMax() )
PushIllegalArgument();
else
{
@@ -1154,7 +1154,7 @@ ScMatrixRef ScInterpreter::MatConcat(const ScMatrixRef& pMat1, const ScMatrixRef
{
for (j = 0; j < nMinR; j++)
{
- USHORT nErr = pMat1->GetErrorIfNotString( i, j);
+ sal_uInt16 nErr = pMat1->GetErrorIfNotString( i, j);
if (!nErr)
nErr = pMat2->GetErrorIfNotString( i, j);
if (nErr)
@@ -1203,9 +1203,9 @@ void lcl_GetDiffDateTimeFmtType( short& nFuncFmt, short nFmt1, short nFmt2 )
void ScInterpreter::ScAdd()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAdd" );
- CalculateAddSub(FALSE);
+ CalculateAddSub(false);
}
-void ScInterpreter::CalculateAddSub(BOOL _bSub)
+void ScInterpreter::CalculateAddSub(sal_Bool _bSub)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateAddSub" );
ScMatrixRef pMat1 = NULL;
@@ -1214,7 +1214,7 @@ void ScInterpreter::CalculateAddSub(BOOL _bSub)
short nFmt1, nFmt2;
nFmt1 = nFmt2 = NUMBERFORMAT_UNDEFINED;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
short nFmtPercentType = nCurFmtType;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1280,18 +1280,18 @@ void ScInterpreter::CalculateAddSub(BOOL _bSub)
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1365,18 +1365,18 @@ void ScInterpreter::ScAmpersand()
else if (pMat1 || pMat2)
{
String sStr;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
sStr = sStr1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
sStr = sStr2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1394,7 +1394,7 @@ void ScInterpreter::ScAmpersand()
for (SCSIZE i = 0; i < nC; ++i)
for (SCSIZE j = 0; j < nR; ++j)
{
- USHORT nErr = pMat->GetErrorIfNotString( i, j);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( i, j);
if (nErr)
pResMat->PutError( nErr, i, j);
else
@@ -1410,7 +1410,7 @@ void ScInterpreter::ScAmpersand()
for (SCSIZE i = 0; i < nC; ++i)
for (SCSIZE j = 0; j < nR; ++j)
{
- USHORT nErr = pMat->GetErrorIfNotString( i, j);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( i, j);
if (nErr)
pResMat->PutError( nErr, i, j);
else
@@ -1437,7 +1437,7 @@ void ScInterpreter::ScAmpersand()
void ScInterpreter::ScSub()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSub" );
- CalculateAddSub(TRUE);
+ CalculateAddSub(sal_True);
}
void ScInterpreter::ScMul()
@@ -1447,7 +1447,7 @@ void ScInterpreter::ScMul()
ScMatrixRef pMat2 = NULL;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
else
@@ -1526,7 +1526,7 @@ void ScInterpreter::ScDiv()
ScMatrixRef pMat2 = NULL;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
short nFmtCurrencyType2 = NUMBERFORMAT_UNDEFINED;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1561,18 +1561,18 @@ void ScInterpreter::ScDiv()
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1643,18 +1643,18 @@ void ScInterpreter::ScPow()
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = false; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1688,7 +1688,7 @@ void ScInterpreter::ScPow()
void ScInterpreter::ScSumProduct()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumProduct" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 30 ) )
return;
@@ -1706,7 +1706,7 @@ void ScInterpreter::ScSumProduct()
pMat2->GetDimensions(nC, nR);
pMat = pMat2;
MatrixMul aMul;
- for (USHORT i = 1; i < nParamCount; i++)
+ for (sal_uInt16 i = 1; i < nParamCount; i++)
{
pMat1 = GetMatrix();
if (!pMat1)
@@ -1742,9 +1742,9 @@ void ScInterpreter::ScSumProduct()
void ScInterpreter::ScSumX2MY2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2MY2" );
- CalculateSumX2MY2SumX2DY2(FALSE);
+ CalculateSumX2MY2SumX2DY2(false);
}
-void ScInterpreter::CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2)
+void ScInterpreter::CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSumX2MY2SumX2DY2" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -1788,7 +1788,7 @@ void ScInterpreter::CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2)
void ScInterpreter::ScSumX2DY2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2DY2" );
- CalculateSumX2MY2SumX2DY2(TRUE);
+ CalculateSumX2MY2SumX2DY2(sal_True);
}
void ScInterpreter::ScSumXMY2()
@@ -2265,7 +2265,7 @@ double lcl_GetSSresid(ScMatrixRef pMatX, ScMatrixRef pMatY, double fSlope,
// Fill default values in matrix X, transform Y to log(Y) in case LOGEST|GROWTH,
// determine sizes of matrices X and Y, determine kind of regression, clone
// Y in case LOGEST|GROWTH, if constant.
-bool ScInterpreter::CheckMatrix(bool _bLOG, BYTE& nCase, SCSIZE& nCX,
+bool ScInterpreter::CheckMatrix(bool _bLOG, sal_uInt8& nCase, SCSIZE& nCX,
SCSIZE& nCY, SCSIZE& nRX, SCSIZE& nRY, SCSIZE& M,
SCSIZE& N, ScMatrixRef& pMatX, ScMatrixRef& pMatY)
{
@@ -2388,7 +2388,7 @@ void ScInterpreter::ScRKP()
void ScInterpreter::CalulateRGPRKP(bool _bRKP)
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (!MustHaveParamCount( nParamCount, 1, 4 ))
return;
bool bConstant, bStats;
@@ -2441,7 +2441,7 @@ void ScInterpreter::CalulateRGPRKP(bool _bRKP)
}
// 1 = simple; 2 = multiple with Y as column; 3 = multiple with Y as row
- BYTE nCase;
+ sal_uInt8 nCase;
SCSIZE nCX, nCY; // number of columns
SCSIZE nRX, nRY; //number of rows
@@ -2919,7 +2919,7 @@ void ScInterpreter::ScGrowth()
void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (!MustHaveParamCount( nParamCount, 1, 4 ))
return;
@@ -2973,7 +2973,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
}
// 1 = simple; 2 = multiple with Y as column; 3 = multiple with Y as row
- BYTE nCase;
+ sal_uInt8 nCase;
SCSIZE nCX, nCY; // number of columns
SCSIZE nRX, nRY; //number of rows
@@ -3244,7 +3244,7 @@ void ScInterpreter::ScMatRef()
if (ScMatrix::IsNonValueType( nMatValType))
{
if (ScMatrix::IsEmptyPathType( nMatValType))
- { // result of empty FALSE jump path
+ { // result of empty sal_False jump path
nFuncFmtType = NUMBERFORMAT_LOGICAL;
PushInt(0);
}
@@ -3268,7 +3268,7 @@ void ScInterpreter::ScMatRef()
else
{
// If not a result matrix, obtain the cell value.
- USHORT nErr = pCell->GetErrCode();
+ sal_uInt16 nErr = pCell->GetErrCode();
if (nErr)
PushError( nErr );
else if( pCell->IsValue() )