diff options
author | Eike Rathke <erack@erack.de> | 2011-08-14 16:10:05 +0200 |
---|---|---|
committer | Eike Rathke <erack@erack.de> | 2011-08-14 16:10:05 +0200 |
commit | 5849f748704b3a7312997f30461c001f37bf6969 (patch) | |
tree | 13602a13bf106890cb8ba67964154a3052ec9c66 /sc | |
parent | baca3632869b2b0b81e5a7dd83b189d3c8367652 (diff) |
sal_Bool -> bool and cosmetics
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/inc/interpre.hxx | 157 | ||||
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 172 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 68 | ||||
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 34 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 85 | ||||
-rw-r--r-- | sc/source/core/tool/interpr5.cxx | 26 |
6 files changed, 271 insertions, 271 deletions
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 7caee7518f8b..95466cf01fbe 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -55,8 +55,8 @@ struct ScCompare { double nVal[2]; String* pVal[2]; - sal_Bool bVal[2]; - sal_Bool bEmpty[2]; + bool bVal[2]; + bool bEmpty[2]; ScCompare( String* p1, String* p2 ) { pVal[ 0 ] = p1; @@ -127,9 +127,9 @@ public: /// Could string be a regular expression? /// If pDoc!=NULL the document options are taken into account and if - /// RegularExpressions are disabled the function returns sal_False regardless + /// RegularExpressions are disabled the function returns false regardless /// of the string content. - static sal_Bool MayBeRegExp( const String& rStr, const ScDocument* pDoc ); + static bool MayBeRegExp( const String& rStr, const ScDocument* pDoc ); /// Fail safe division, returning an errDivisionByZero coded into a double /// if denominator is 0.0 @@ -147,7 +147,7 @@ public: private: static ScTokenStack* pGlobalStack; - static sal_Bool bGlobalStackInUse; + static bool bGlobalStackInUse; formula::FormulaTokenIterator aCode; ScAddress aPos; @@ -160,32 +160,32 @@ private: SvNumberFormatter* pFormatter; const formula::FormulaToken* - pCur; // current token + pCur; // current token String aTempStr; // for GetString() ScTokenStack* pStackObj; // contains the stacks - formula::FormulaToken** pStack; // the current stack - sal_uInt16 nGlobalError; // global (local to this formula expression) error - sal_uInt16 sp; // stack pointer - sal_uInt16 maxsp; // the maximal used stack pointer - sal_uLong nFuncFmtIndex; // NumberFormatIndex of a function - sal_uLong nCurFmtIndex; // current NumberFormatIndex - sal_uLong nRetFmtIndex; // NumberFormatIndex of an expression, if any + formula::FormulaToken** pStack; // the current stack + sal_uInt16 nGlobalError; // global (local to this formula expression) error + sal_uInt16 sp; // stack pointer + sal_uInt16 maxsp; // the maximal used stack pointer + sal_uLong nFuncFmtIndex; // NumberFormatIndex of a function + sal_uLong nCurFmtIndex; // current NumberFormatIndex + sal_uLong nRetFmtIndex; // NumberFormatIndex of an expression, if any short nFuncFmtType; // NumberFormatType of a function short nCurFmtType; // current NumberFormatType short nRetFmtType; // NumberFormatType of an expression - sal_uInt16 mnStringNoValueError; // the error set in ConvertStringToValue() if no value - sal_Bool glSubTotal; // flag for subtotal functions - sal_uInt8 cPar; // current count of parameters - sal_Bool bCalcAsShown; // precision as shown - sal_Bool bMatrixFormula; // formula cell is a matrix formula + sal_uInt16 mnStringNoValueError; // the error set in ConvertStringToValue() if no value + bool glSubTotal; // flag for subtotal functions + sal_uInt8 cPar; // current count of parameters + bool bCalcAsShown; // precision as shown + bool bMatrixFormula; // formula cell is a matrix formula VolatileType meVolaileType; //---------------------------------Funktionen in interpre.cxx--------- // nMust <= nAct <= nMax ? ok : PushError -inline sal_Bool MustHaveParamCount( short nAct, short nMust ); -inline sal_Bool MustHaveParamCount( short nAct, short nMust, short nMax ); -inline sal_Bool MustHaveParamCountMin( short nAct, short nMin ); +inline bool MustHaveParamCount( short nAct, short nMust ); +inline bool MustHaveParamCount( short nAct, short nMust, short nMax ); +inline bool MustHaveParamCountMin( short nAct, short nMin ); void PushParameterExpected(); void PushIllegalParameter(); void PushIllegalArgument(); @@ -196,7 +196,7 @@ void PushNA(); //------------------------------------------------------------------------- void ReplaceCell( ScAddress& ); // for TableOp void ReplaceCell( SCCOL& rCol, SCROW& rRow, SCTAB& rTab ); // for TableOp -sal_Bool IsTableOpInRange( const ScRange& ); +bool IsTableOpInRange( const ScRange& ); sal_uLong GetCellNumberFormat( const ScAddress&, const ScBaseCell* ); double ConvertStringToValue( const String& ); double GetCellValue( const ScAddress&, const ScBaseCell* ); @@ -210,20 +210,20 @@ inline sal_uInt16 GetCellErrCode( const ScBaseCell* pCell ) inline CellType GetCellType( const ScBaseCell* pCell ) { return pCell ? pCell->GetCellType() : CELLTYPE_NONE; } /// Really empty or inherited emptiness. -inline sal_Bool HasCellEmptyData( const ScBaseCell* pCell ) - { return pCell ? pCell->HasEmptyData() : sal_True; } +inline bool HasCellEmptyData( const ScBaseCell* pCell ) + { return pCell ? pCell->HasEmptyData() : true; } /// This includes inherited emptiness, which usually is regarded as value! -inline sal_Bool HasCellValueData( const ScBaseCell* pCell ) +inline bool HasCellValueData( const ScBaseCell* pCell ) { return pCell ? pCell->HasValueData() : false; } /// Not empty and not value. -inline sal_Bool HasCellStringData( const ScBaseCell* pCell ) +inline bool HasCellStringData( const ScBaseCell* pCell ) { return pCell ? pCell->HasStringData() : false; } -sal_Bool CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, +bool CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr); -sal_Bool CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, +bool CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr); -sal_Bool CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, +bool CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr); //----------------------------------------------------------------------------- @@ -292,7 +292,7 @@ void ValidateRef( const ScRefList & rRefList ); void SingleRefToVars( const ScSingleRefData & rRef, SCCOL & rCol, SCROW & rRow, SCTAB & rTab ); void PopSingleRef( ScAddress& ); void PopSingleRef(SCCOL& rCol, SCROW &rRow, SCTAB& rTab); -void DoubleRefToRange( const ScComplexRefData&, ScRange&, sal_Bool bDontCheckForTableOp = false ); +void DoubleRefToRange( const ScComplexRefData&, ScRange&, bool bDontCheckForTableOp = false ); /** If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of ScComplexRefData. Else if StackVar svRefList return values of the ScComplexRefData where @@ -302,26 +302,26 @@ void DoubleRefToRange( const ScComplexRefData&, ScRange&, sal_Bool bDontCheckFor while(nParamCount--) PopDoubleRef(aRange,nParamCount,nRefInList); */ void PopDoubleRef( ScRange & rRange, short & rParam, size_t & rRefInList ); -void PopDoubleRef( ScRange&, sal_Bool bDontCheckForTableOp = false ); +void PopDoubleRef( ScRange&, bool bDontCheckForTableOp = false ); void DoubleRefToVars( const ScToken* p, SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - sal_Bool bDontCheckForTableOp = false ); + bool bDontCheckForTableOp = false ); ScDBRangeBase* PopDBDoubleRef(); void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - sal_Bool bDontCheckForTableOp = false ); + bool bDontCheckForTableOp = false ); void PopExternalSingleRef(sal_uInt16& rFileId, String& rTabName, ScSingleRefData& rRef); void PopExternalSingleRef(ScExternalRefCache::TokenRef& rToken, ScExternalRefCache::CellFormat* pFmt = NULL); void PopExternalDoubleRef(sal_uInt16& rFileId, String& rTabName, ScComplexRefData& rRef); void PopExternalDoubleRef(ScExternalRefCache::TokenArrayRef& rArray); void PopExternalDoubleRef(ScMatrixRef& rMat); void GetExternalDoubleRef(sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& aData, ScExternalRefCache::TokenArrayRef& rArray); -sal_Bool PopDoubleRefOrSingleRef( ScAddress& rAdr ); +bool PopDoubleRefOrSingleRef( ScAddress& rAdr ); void PopDoubleRefPushMatrix(); // If MatrixFormula: convert formula::svDoubleRef to svMatrix, create JumpMatrix. // Else convert area reference parameters marked as ForceArray to array. -// Returns sal_True if JumpMatrix created. +// Returns true if JumpMatrix created. bool ConvertMatrixParameters(); inline void MatrixDoubleRefToMatrix(); // if MatrixFormula: PopDoubleRefPushMatrix // If MatrixFormula or ForceArray: ConvertMatrixParameters() @@ -351,12 +351,12 @@ formula::StackVar GetStackType(); formula::StackVar GetStackType( sal_uInt8 nParam ); sal_uInt8 GetByte() { return cPar; } // generiert aus DoubleRef positionsabhaengige SingleRef -sal_Bool DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr ); +bool DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr ); double GetDoubleFromMatrix(const ScMatrixRef& pMat); double GetDouble(); double GetDoubleWithDefault(double nDefault); -sal_Bool IsMissing(); -sal_Bool GetBool() { return GetDouble() != 0.0; } +bool IsMissing(); +bool GetBool() { return GetDouble() != 0.0; } const String& GetString(); const String& GetStringFromMatrix(const ScMatrixRef& pMat); // pop matrix and obtain one element, upper left or according to jump matrix @@ -375,11 +375,11 @@ void SetMaxIterationCount(sal_uInt16 n); inline void CurFmtToFuncFmt() { nFuncFmtType = nCurFmtType; nFuncFmtIndex = nCurFmtIndex; } // Check for String overflow of rResult+rAdd and set error and erase rResult -// if so. Return sal_True if ok, sal_False if overflow -inline sal_Bool CheckStringResultLen( String& rResult, const String& rAdd ); +// if so. Return true if ok, false if overflow +inline bool CheckStringResultLen( String& rResult, const String& rAdd ); // Set error according to rVal, and set rVal to 0.0 if there was an error. inline void TreatDoubleError( double& rVal ); -// Lookup using ScLookupCache, @returns sal_True if found and result address +// Lookup using ScLookupCache, @returns true if found and result address bool LookupQueryWithCache( ScAddress & o_rResultPos, const ScQueryParam & rParam ) const; @@ -476,20 +476,20 @@ void ScJis(); void ScAsc(); void ScUnicode(); void ScUnichar(); -void ScMin( sal_Bool bTextAsZero = false ); -void ScMax( sal_Bool bTextAsZero = false ); -double IterateParameters( ScIterFunc, sal_Bool bTextAsZero = false ); +void ScMin( bool bTextAsZero = false ); +void ScMax( bool bTextAsZero = false ); +double IterateParameters( ScIterFunc, bool bTextAsZero = false ); void ScSumSQ(); void ScSum(); void ScProduct(); -void ScAverage( sal_Bool bTextAsZero = false ); +void ScAverage( bool bTextAsZero = false ); void ScCount(); void ScCount2(); -void GetStVarParams( double& rVal, double& rValCount, sal_Bool bTextAsZero = false ); -void ScVar( sal_Bool bTextAsZero = false ); -void ScVarP( sal_Bool bTextAsZero = false ); -void ScStDev( sal_Bool bTextAsZero = false ); -void ScStDevP( sal_Bool bTextAsZero = false ); +void GetStVarParams( double& rVal, double& rValCount, bool bTextAsZero = false ); +void ScVar( bool bTextAsZero = false ); +void ScVarP( bool bTextAsZero = false ); +void ScStDev( bool bTextAsZero = false ); +void ScStDevP( bool bTextAsZero = false ); void ScColumns(); void ScRows(); void ScTables(); @@ -505,13 +505,13 @@ void ScHLookup(); void ScVLookup(); void ScSubTotal(); -// If upon call rMissingField==sal_True then the database field parameter may be +// If upon call rMissingField==true then the database field parameter may be // missing (Xcl DCOUNT() syntax), or may be faked as missing by having the // value 0.0 or being exactly the entire database range reference (old SO -// compatibility). If this was the case then rMissingField is set to sal_True upon -// return. If rMissingField==sal_False upon call all "missing cases" are considered +// compatibility). If this was the case then rMissingField is set to true upon +// return. If rMissingField==false upon call all "missing cases" are considered // to be an error. -ScDBQueryParamBase* GetDBParams( sal_Bool& rMissingField ); +ScDBQueryParamBase* GetDBParams( bool& rMissingField ); void DBIterator( ScIterFunc ); void ScDBSum(); @@ -549,8 +549,8 @@ void ScConcat(); void ScExternal(); void ScMissing(); void ScMacro(); -sal_Bool SetSbxVariable( SbxVariable* pVar, const ScAddress& ); -sal_Bool SetSbxVariable( SbxVariable* pVar, SCCOL nCol, SCROW nRow, SCTAB nTab ); +bool SetSbxVariable( SbxVariable* pVar, const ScAddress& ); +bool SetSbxVariable( SbxVariable* pVar, SCCOL nCol, SCROW nRow, SCTAB nTab ); void ScErrorType(); void ScDBArea(); void ScColRowNameAuto(); @@ -678,19 +678,19 @@ void ScSumX2DY2(); void ScSumXMY2(); void ScGrowth(); bool CalculateSkew(double& fSum,double& fCount,double& vSum,std::vector<double>& values); -void CalculateSlopeIntercept(sal_Bool bSlope); -void CalculateSmallLarge(sal_Bool bSmall); -void CalculatePearsonCovar(sal_Bool _bPearson,sal_Bool _bStexy); -bool CalculateTest( sal_Bool _bTemplin +void CalculateSlopeIntercept(bool bSlope); +void CalculateSmallLarge(bool bSmall); +void CalculatePearsonCovar(bool _bPearson,bool _bStexy); +bool CalculateTest( bool _bTemplin ,const SCSIZE nC1, const SCSIZE nC2,const SCSIZE nR1,const SCSIZE nR2 ,const ScMatrixRef& pMat1,const ScMatrixRef& pMat2 ,double& fT,double& fF); -void CalculateLookup(sal_Bool HLookup); +void CalculateLookup(bool HLookup); bool FillEntry(ScQueryEntry& rEntry); -void CalculateAddSub(sal_Bool _bSub); +void CalculateAddSub(bool _bSub); void CalculateTrendGrowth(bool _bGrowth); void CalulateRGPRKP(bool _bRKP); -void CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2); +void CalculateSumX2MY2SumX2DY2(bool _bSumX2DY2); void CalculateMatrixValue(const ScMatrix* pMat,SCSIZE nC,SCSIZE nR); bool CheckMatrix(bool _bLOG,sal_uInt8& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY); void ScRGP(); @@ -815,14 +815,13 @@ public: void SetError(sal_uInt16 nError) { if (nError && !nGlobalError) nGlobalError = nError; } - sal_uInt16 GetError() const { return nGlobalError; } - formula::StackVar GetResultType() const { return xResult->GetType(); } - const String& GetStringResult() const { return xResult->GetString(); } - double GetNumResult() const { return xResult->GetDouble(); } - formula::FormulaTokenRef - GetResultToken() const { return xResult; } - short GetRetFormatType() const { return nRetFmtType; } - sal_uLong GetRetFormatIndex() const { return nRetFmtIndex; } + sal_uInt16 GetError() const { return nGlobalError; } + formula::StackVar GetResultType() const { return xResult->GetType(); } + const String& GetStringResult() const { return xResult->GetString(); } + double GetNumResult() const { return xResult->GetDouble(); } + formula::FormulaTokenRef GetResultToken() const { return xResult; } + short GetRetFormatType() const { return nRetFmtType; } + sal_uLong GetRetFormatIndex() const { return nRetFmtIndex; } }; @@ -852,10 +851,10 @@ inline ScTokenMatrixMap& ScInterpreter::GetTokenMatrixMap() } -inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust ) +inline bool ScInterpreter::MustHaveParamCount( short nAct, short nMust ) { if ( nAct == nMust ) - return sal_True; + return true; if ( nAct < nMust ) PushParameterExpected(); else @@ -864,10 +863,10 @@ inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust ) } -inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust, short nMax ) +inline bool ScInterpreter::MustHaveParamCount( short nAct, short nMust, short nMax ) { if ( nMust <= nAct && nAct <= nMax ) - return sal_True; + return true; if ( nAct < nMust ) PushParameterExpected(); else @@ -876,16 +875,16 @@ inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust, shor } -inline sal_Bool ScInterpreter::MustHaveParamCountMin( short nAct, short nMin ) +inline bool ScInterpreter::MustHaveParamCountMin( short nAct, short nMin ) { if ( nAct >= nMin ) - return sal_True; + return true; PushParameterExpected(); return false; } -inline sal_Bool ScInterpreter::CheckStringResultLen( String& rResult, const String& rAdd ) +inline bool ScInterpreter::CheckStringResultLen( String& rResult, const String& rAdd ) { if ( (sal_uLong) rResult.Len() + rAdd.Len() > STRING_MAXLEN ) { @@ -893,7 +892,7 @@ inline sal_Bool ScInterpreter::CheckStringResultLen( String& rResult, const Stri rResult.Erase(); return false; } - return sal_True; + return true; } diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 1fa28cffe1c1..73fc350328c0 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -81,7 +81,7 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScTokenStack, 8, 4 ) IMPL_FIXEDMEMPOOL_NEWDEL( ScInterpreter, 32, 16 ) ScTokenStack* ScInterpreter::pGlobalStack = NULL; -sal_Bool ScInterpreter::bGlobalStackInUse = false; +bool ScInterpreter::bGlobalStackInUse = false; using namespace formula; using ::std::auto_ptr; @@ -580,7 +580,7 @@ bool ScInterpreter::JumpMatrix( short nStackLevel ) { // push all results that have no jump path if ( pResMat ) { - // a sal_False without path results in an empty path value + // a false without path results in an empty path value if ( fBool == 0.0 ) pResMat->PutEmptyPath( nC, nR ); else @@ -779,12 +779,12 @@ double ScInterpreter::Compare() { case svEmptyCell: Pop(); - aComp.bEmpty[ i ] = sal_True; + aComp.bEmpty[ i ] = true; break; case svMissing: case svDouble: aComp.nVal[ i ] = GetDouble(); - aComp.bVal[ i ] = sal_True; + aComp.bVal[ i ] = true; break; case svString: *aComp.pVal[ i ] = GetString(); @@ -798,7 +798,7 @@ double ScInterpreter::Compare() break; ScBaseCell* pCell = GetCell( aAdr ); if (HasCellEmptyData( pCell)) - aComp.bEmpty[ i ] = sal_True; + aComp.bEmpty[ i ] = true; else if (HasCellStringData( pCell)) { GetCellString( *aComp.pVal[ i ], pCell); @@ -807,7 +807,7 @@ double ScInterpreter::Compare() else { aComp.nVal[ i ] = GetCellValue( aAdr, pCell ); - aComp.bVal[ i ] = sal_True; + aComp.bVal[ i ] = true; } } break; @@ -868,12 +868,12 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions ) { case svEmptyCell: Pop(); - aComp.bEmpty[ i ] = sal_True; + aComp.bEmpty[ i ] = true; break; case svMissing: case svDouble: aComp.nVal[ i ] = GetDouble(); - aComp.bVal[ i ] = sal_True; + aComp.bVal[ i ] = true; break; case svString: *aComp.pVal[ i ] = GetString(); @@ -884,7 +884,7 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions ) PopSingleRef( aAdr ); ScBaseCell* pCell = GetCell( aAdr ); if (HasCellEmptyData( pCell)) - aComp.bEmpty[ i ] = sal_True; + aComp.bEmpty[ i ] = true; else if (HasCellStringData( pCell)) { GetCellString( *aComp.pVal[ i ], pCell); @@ -893,7 +893,7 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions ) else { aComp.nVal[ i ] = GetCellValue( aAdr, pCell ); - aComp.bVal[ i ] = sal_True; + aComp.bVal[ i ] = true; } } break; @@ -943,7 +943,7 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions ) } else { - aComp.bVal[i] = sal_True; + aComp.bVal[i] = true; aComp.nVal[i] = pMat[i]->GetDouble(j,k); aComp.bEmpty[i] = false; } @@ -1157,8 +1157,8 @@ void ScInterpreter::ScAnd() short nParamCount = GetByte(); if ( MustHaveParamCountMin( nParamCount, 1 ) ) { - sal_Bool bHaveValue = false; - short nRes = sal_True; + bool bHaveValue = false; + short nRes = true; size_t nRefInList = 0; while( nParamCount-- > 0) { @@ -1167,7 +1167,7 @@ void ScInterpreter::ScAnd() switch ( GetStackType() ) { case svDouble : - bHaveValue = sal_True; + bHaveValue = true; nRes &= ( PopDouble() != 0.0 ); break; case svString : @@ -1183,7 +1183,7 @@ void ScInterpreter::ScAnd() ScBaseCell* pCell = GetCell( aAdr ); if ( HasCellValueData( pCell ) ) { - bHaveValue = sal_True; + bHaveValue = true; nRes &= ( GetCellValue( aAdr, pCell ) != 0.0 ); } // else: Xcl raises no error here @@ -1202,7 +1202,7 @@ void ScInterpreter::ScAnd() ScValueIterator aValIter( pDok, aRange ); if ( aValIter.GetFirst( fVal, nErr ) ) { - bHaveValue = sal_True; + bHaveValue = true; do { nRes &= ( fVal != 0.0 ); @@ -1218,7 +1218,7 @@ void ScInterpreter::ScAnd() ScMatrixRef pMat = GetMatrix(); if ( pMat ) { - bHaveValue = sal_True; + bHaveValue = true; double fVal = pMat->And(); sal_uInt16 nErr = GetDoubleErrorValue( fVal ); if ( nErr ) @@ -1255,7 +1255,7 @@ void ScInterpreter::ScOr() short nParamCount = GetByte(); if ( MustHaveParamCountMin( nParamCount, 1 ) ) { - sal_Bool bHaveValue = false; + bool bHaveValue = false; short nRes = false; size_t nRefInList = 0; while( nParamCount-- > 0) @@ -1265,7 +1265,7 @@ void ScInterpreter::ScOr() switch ( GetStackType() ) { case svDouble : - bHaveValue = sal_True; + bHaveValue = true; nRes |= ( PopDouble() != 0.0 ); break; case svString : @@ -1281,7 +1281,7 @@ void ScInterpreter::ScOr() ScBaseCell* pCell = GetCell( aAdr ); if ( HasCellValueData( pCell ) ) { - bHaveValue = sal_True; + bHaveValue = true; nRes |= ( GetCellValue( aAdr, pCell ) != 0.0 ); } // else: Xcl raises no error here @@ -1300,7 +1300,7 @@ void ScInterpreter::ScOr() ScValueIterator aValIter( pDok, aRange ); if ( aValIter.GetFirst( fVal, nErr ) ) { - bHaveValue = sal_True; + bHaveValue = true; do { nRes |= ( fVal != 0.0 ); @@ -1313,11 +1313,11 @@ void ScInterpreter::ScOr() break; case svMatrix: { - bHaveValue = sal_True; + bHaveValue = true; ScMatrixRef pMat = GetMatrix(); if ( pMat ) { - bHaveValue = sal_True; + bHaveValue = true; double fVal = pMat->Or(); sal_uInt16 nErr = GetDoubleErrorValue( fVal ); if ( nErr ) @@ -1678,7 +1678,7 @@ void ScInterpreter::ScIsEmpty() pJumpMatrix->GetPos( nC, nR); if ( nC < nCols && nR < nRows ) nRes = pMat->IsEmpty( nC, nR); - // else: sal_False, not empty (which is what Xcl does) + // else: false, not empty (which is what Xcl does) } } break; @@ -1886,13 +1886,13 @@ void ScInterpreter::ScType() } -inline sal_Bool lcl_FormatHasNegColor( const SvNumberformat* pFormat ) +inline bool lcl_FormatHasNegColor( const SvNumberformat* pFormat ) { return pFormat && pFormat->GetColor( 1 ); } -inline sal_Bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat ) +inline bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat ) { return pFormat && (pFormat->GetFormatstring().Search( '(' ) != STRING_NOTFOUND); } @@ -1904,7 +1904,7 @@ void ScInterpreter::ScCell() if( MustHaveParamCount( nParamCount, 1, 2 ) ) { ScAddress aCellPos( aPos ); - sal_Bool bError = false; + bool bError = false; if( nParamCount == 2 ) bError = !PopDoubleRefOrSingleRef( aCellPos ); String aInfoType( GetString() ); @@ -2641,14 +2641,14 @@ void ScInterpreter::ScT() PushInt(0); return ; } - sal_Bool bValue = false; + bool bValue = false; ScBaseCell* pCell = GetCell( aAdr ); if ( GetCellErrCode( pCell ) == 0 ) { switch ( GetCellType( pCell ) ) { case CELLTYPE_VALUE : - bValue = sal_True; + bValue = true; break; case CELLTYPE_FORMULA : bValue = ((ScFormulaCell*)pCell)->IsValue(); @@ -2759,7 +2759,7 @@ void ScInterpreter::ScValue() //2do: this should be a proper unicode string method -inline sal_Bool lcl_ScInterpreter_IsPrintable( sal_Unicode c ) +inline bool lcl_ScInterpreter_IsPrintable( sal_Unicode c ) { return 0x20 <= c && c != 0x7f; } @@ -2915,7 +2915,7 @@ void ScInterpreter::ScUnichar() } -void ScInterpreter::ScMin( sal_Bool bTextAsZero ) +void ScInterpreter::ScMin( bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMin" ); short nParamCount = GetByte(); @@ -3038,7 +3038,7 @@ void ScInterpreter::ScMin( sal_Bool bTextAsZero ) PushDouble(nMin); } -void ScInterpreter::ScMax( sal_Bool bTextAsZero ) +void ScInterpreter::ScMax( bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMax" ); short nParamCount = GetByte(); @@ -3167,7 +3167,7 @@ void ScInterpreter::ScMax( sal_Bool bTextAsZero ) namespace { void IterateMatrix( - const ScMatrixRef& pMat, ScIterFunc eFunc, sal_Bool bTextAsZero, + const ScMatrixRef& pMat, ScIterFunc eFunc, bool bTextAsZero, sal_uLong& rCount, short& rFuncFmtType, double& fRes, double& fMem, bool& bNull) { if (!pMat) @@ -3218,7 +3218,7 @@ void IterateMatrix( } -double ScInterpreter::IterateParameters( ScIterFunc eFunc, sal_Bool bTextAsZero ) +double ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IterateParameters" ); short nParamCount = GetByte(); @@ -3554,7 +3554,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, sal_Bool bTextAsZero case ifPRODUCT: if ( !nCount ) fRes = 0.0; break; default: ; // nothing } - // Bei Summen etc. macht ein sal_Bool-Ergebnis keinen Sinn + // Bei Summen etc. macht ein bool-Ergebnis keinen Sinn // und Anzahl ist immer Number (#38345#) if( eFunc == ifCOUNT || nFuncFmtType == NUMBERFORMAT_LOGICAL ) nFuncFmtType = NUMBERFORMAT_NUMBER; @@ -3583,7 +3583,7 @@ void ScInterpreter::ScProduct() } -void ScInterpreter::ScAverage( sal_Bool bTextAsZero ) +void ScInterpreter::ScAverage( bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAverage" ); PushDouble( IterateParameters( ifAVERAGE, bTextAsZero ) ); @@ -3605,7 +3605,7 @@ void ScInterpreter::ScCount2() void ScInterpreter::GetStVarParams( double& rVal, double& rValCount, - sal_Bool bTextAsZero ) + bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetStVarParams" ); short nParamCount = GetByte(); @@ -3721,7 +3721,7 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount, } -void ScInterpreter::ScVar( sal_Bool bTextAsZero ) +void ScInterpreter::ScVar( bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVar" ); double nVal; @@ -3735,7 +3735,7 @@ void ScInterpreter::ScVar( sal_Bool bTextAsZero ) } -void ScInterpreter::ScVarP( sal_Bool bTextAsZero ) +void ScInterpreter::ScVarP( bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVarP" ); double nVal; @@ -3746,7 +3746,7 @@ void ScInterpreter::ScVarP( sal_Bool bTextAsZero ) } -void ScInterpreter::ScStDev( sal_Bool bTextAsZero ) +void ScInterpreter::ScStDev( bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDev" ); double nVal; @@ -3759,7 +3759,7 @@ void ScInterpreter::ScStDev( sal_Bool bTextAsZero ) } -void ScInterpreter::ScStDevP( sal_Bool bTextAsZero ) +void ScInterpreter::ScStDevP( bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDevP" ); double nVal; @@ -4331,10 +4331,10 @@ void ScInterpreter::ScMatch() rParam.nRow1 = nRow1; rParam.nCol2 = nCol2; rParam.nTab = nTab1; - rParam.bMixedComparison = sal_True; + rParam.bMixedComparison = true; ScQueryEntry& rEntry = rParam.GetEntry(0); - rEntry.bDoQuery = sal_True; + rEntry.bDoQuery = true; if (fTyp < 0.0) rEntry.eOp = SC_GREATER_EQUAL; else if (fTyp > 0.0) @@ -4351,7 +4351,7 @@ void ScInterpreter::ScMatch() case svString: { sStr = GetString(); - rEntry.bQueryByString = sal_True; + rEntry.bQueryByString = true; *rEntry.pStr = sStr; } break; @@ -4374,7 +4374,7 @@ void ScInterpreter::ScMatch() else { GetCellString(sStr, pCell); - rEntry.bQueryByString = sal_True; + rEntry.bQueryByString = true; *rEntry.pStr = sStr; } } @@ -4420,7 +4420,7 @@ void ScInterpreter::ScMatch() } if ( rEntry.bQueryByString ) { - sal_Bool bIsVBAMode = false; + bool bIsVBAMode = false; if ( pDok ) bIsVBAMode = pDok->IsInVBAMode(); @@ -4546,7 +4546,7 @@ void ScInterpreter::ScMatch() rEntry.nField = nCol1; ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false); // Advance Entry.nField in Iterator if column changed - aCellIter.SetAdvanceQueryParamEntryField( sal_True ); + aCellIter.SetAdvanceQueryParamEntryField( true ); if (fTyp == 0.0) { // EQUAL if ( aCellIter.GetFirst() ) @@ -4636,7 +4636,7 @@ void ScInterpreter::ScCountIf() { String rString; double fVal = 0.0; - sal_Bool bIsString = sal_True; + bool bIsString = true; switch ( GetStackType() ) { case svDoubleRef : @@ -4761,7 +4761,7 @@ void ScInterpreter::ScCountIf() rParam.nRow2 = nRow2; ScQueryEntry& rEntry = rParam.GetEntry(0); - rEntry.bDoQuery = sal_True; + rEntry.bDoQuery = true; if (!bIsString) { rEntry.bQueryByString = false; @@ -4965,7 +4965,7 @@ void ScInterpreter::ScSumIf() double fSum = 0.0; double fMem = 0.0; - sal_Bool bNull = true; + bool bNull = true; short nParam = 1; size_t nRefInList = 0; while (nParam-- > 0) @@ -5656,7 +5656,7 @@ void ScInterpreter::ScLookup() aParam.bByRow = bVertical; aParam.bMixedComparison = true; - rEntry.bDoQuery = sal_True; + rEntry.bDoQuery = true; rEntry.eOp = SC_LESS_EQUAL; rEntry.nField = nCol1; if ( rEntry.bQueryByString ) @@ -5788,19 +5788,19 @@ void ScInterpreter::ScLookup() void ScInterpreter::ScHLookup() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScHLookup" ); - CalculateLookup(sal_True); + CalculateLookup(true); } -void ScInterpreter::CalculateLookup(sal_Bool HLookup) +void ScInterpreter::CalculateLookup(bool HLookup) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateLookup" ); sal_uInt8 nParamCount = GetByte(); if ( MustHaveParamCount( nParamCount, 3, 4 ) ) { - sal_Bool bSorted; + bool bSorted; if (nParamCount == 4) bSorted = GetBool(); else - bSorted = sal_True; + bSorted = true; double fIndex = ::rtl::math::approxFloor( GetDouble() ) - 1.0; ScMatrixRef pMat = NULL; SCSIZE nC = 0, nR = 0; @@ -5874,10 +5874,10 @@ void ScInterpreter::CalculateLookup(sal_Bool HLookup) rParam.nRow2 = nRow2; rParam.nTab = nTab1; } - rParam.bMixedComparison = sal_True; + rParam.bMixedComparison = true; ScQueryEntry& rEntry = rParam.GetEntry(0); - rEntry.bDoQuery = sal_True; + rEntry.bDoQuery = true; if ( bSorted ) rEntry.eOp = SC_LESS_EQUAL; if ( !FillEntry(rEntry) ) @@ -5979,7 +5979,7 @@ void ScInterpreter::CalculateLookup(sal_Bool HLookup) else { rEntry.nField = nCol1; - sal_Bool bFound = false; + bool bFound = false; SCCOL nCol = 0; SCROW nRow = 0; if ( bSorted ) @@ -5988,7 +5988,7 @@ void ScInterpreter::CalculateLookup(sal_Bool HLookup) { ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false); // advance Entry.nField in Iterator upon switching columns - aCellIter.SetAdvanceQueryParamEntryField( sal_True ); + aCellIter.SetAdvanceQueryParamEntryField( true ); if ( bSorted ) { SCROW nRow1_temp; @@ -5996,7 +5996,7 @@ void ScInterpreter::CalculateLookup(sal_Bool HLookup) } else if ( aCellIter.GetFirst() ) { - bFound = sal_True; + bFound = true; nCol = aCellIter.GetCol(); } nRow = nZIndex; @@ -6036,7 +6036,7 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry) case svString: { const String sStr = GetString(); - rEntry.bQueryByString = sal_True; + rEntry.bQueryByString = true; *rEntry.pStr = sStr; } break; @@ -6066,7 +6066,7 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry) { String sStr; GetCellString(sStr, pCell); - rEntry.bQueryByString = sal_True; + rEntry.bQueryByString = true; *rEntry.pStr = sStr; } } @@ -6107,7 +6107,7 @@ void ScInterpreter::ScSubTotal() else { cPar = nParamCount - 1; - glSubTotal = sal_True; + glSubTotal = true; switch( nFunc ) { case SUBTOTAL_FUNC_AVE : ScAverage(); break; @@ -6132,13 +6132,13 @@ void ScInterpreter::ScSubTotal() } } -ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField ) +ScDBQueryParamBase* ScInterpreter::GetDBParams( bool& rMissingField ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDBParams" ); - sal_Bool bAllowMissingField = false; + bool bAllowMissingField = false; if ( rMissingField ) { - bAllowMissingField = sal_True; + bAllowMissingField = true; rMissingField = false; } if ( GetByte() == 3 ) @@ -6148,17 +6148,17 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField ) if (!pQueryRef.get()) return NULL; - sal_Bool bByVal = sal_True; + bool bByVal = true; double nVal = 0.0; String aStr; ScRange aMissingRange; - sal_Bool bRangeFake = false; + bool bRangeFake = false; switch (GetStackType()) { case svDouble : nVal = ::rtl::math::approxFloor( GetDouble() ); if ( bAllowMissingField && nVal == 0.0 ) - rMissingField = sal_True; // fake missing parameter + rMissingField = true; // fake missing parameter break; case svString : bByVal = false; @@ -6181,7 +6181,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField ) case svDoubleRef : if ( bAllowMissingField ) { // fake missing parameter for old SO compatibility - bRangeFake = sal_True; + bRangeFake = true; PopDoubleRef( aMissingRange ); } else @@ -6193,7 +6193,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField ) case svMissing : PopError(); if ( bAllowMissingField ) - rMissingField = sal_True; + rMissingField = true; else SetError( errIllegalParameter ); break; @@ -6211,7 +6211,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField ) { // range parameter must match entire database range if (pDBRef->isRangeEqual(aMissingRange)) - rMissingField = sal_True; + rMissingField = true; else SetError( errIllegalParameter ); } @@ -6272,9 +6272,9 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc ) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DBIterator" ); double nErg = 0.0; double fMem = 0.0; - sal_Bool bNull = sal_True; + bool bNull = true; sal_uLong nCount = 0; - sal_Bool bMissingField = false; + bool bMissingField = false; auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); if (pQueryParam.get()) { @@ -6343,7 +6343,7 @@ void ScInterpreter::ScDBSum() void ScInterpreter::ScDBCount() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount" ); - sal_Bool bMissingField = sal_True; + bool bMissingField = true; auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); if (pQueryParam.get()) { @@ -6403,7 +6403,7 @@ void ScInterpreter::ScDBCount() void ScInterpreter::ScDBCount2() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount2" ); - sal_Bool bMissingField = sal_True; + bool bMissingField = true; auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); if (pQueryParam.get()) { @@ -6469,7 +6469,7 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount ) rValCount = 0.0; double fSum = 0.0; - sal_Bool bMissingField = false; + bool bMissingField = false; auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); if (pQueryParam.get()) { @@ -6983,7 +6983,7 @@ void ScInterpreter::ScIndex() SCCOL nCol2 = 0; SCROW nRow2 = 0; SCTAB nTab2 = 0; - sal_Bool bRowArray = false; + bool bRowArray = false; if (GetStackType() == svRefList) { FormulaTokenRef xRef = PopToken(); @@ -6996,13 +6996,13 @@ void ScInterpreter::ScIndex() DoubleRefToRange( (*(static_cast<ScToken*>(xRef.get())->GetRefList()))[nArea-1], aRange); aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); if ( nParamCount == 2 && nRow1 == nRow2 ) - bRowArray = sal_True; + bRowArray = true; } else { PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); if ( nParamCount == 2 && nRow1 == nRow2 ) - bRowArray = sal_True; + bRowArray = true; } if ( nTab1 != nTab2 || (nCol > 0 && nCol1+nCol-1 > nCol2) || @@ -7143,7 +7143,7 @@ void ScInterpreter::ScCurrency() pFormatter->GenerateFormat(sFormatString, nIndex, ScGlobal::eLnge, - sal_True, // mit Tausenderpunkt + true, // mit Tausenderpunkt false, // nicht rot (sal_uInt16) fDec,// Nachkommastellen 1); // 1 Vorkommanull @@ -7201,11 +7201,11 @@ void ScInterpreter::ScFixed() { String aStr; double fDec; - sal_Bool bThousand; + bool bThousand; if (nParamCount == 3) bThousand = !GetBool(); // Param TRUE: keine Tausenderpunkte else - bThousand = sal_True; + bThousand = true; if (nParamCount >= 2) { fDec = ::rtl::math::approxFloor(GetDoubleWithDefault( 2.0 )); @@ -7506,7 +7506,7 @@ void ScInterpreter::ScSubstitute() xub_StrLen nCount = 0; xub_StrLen nNewLen = sNewStr.Len(); xub_StrLen nOldLen = sOldStr.Len(); - while( sal_True ) + while( true ) { nPos = sStr.Search( sOldStr, nPos ); if (nPos != STRING_NOTFOUND) @@ -7663,7 +7663,7 @@ void ScInterpreter::ScErrorType() } -sal_Bool ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc ) +bool ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::MayBeRegExp" ); if ( pDoc && !pDoc->GetDocOptions().IsFormulaRegexEnabled() ) @@ -7679,7 +7679,7 @@ sal_Bool ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc while ( *p2 ) { if ( c1 == *p2++ ) - return sal_True; + return true; } } return false; diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 659cdfb48efd..bbde6aaad2c0 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -345,7 +345,7 @@ void ScInterpreter::ScGetDiffDate360() sal_uInt8 nParamCount = GetByte(); if ( MustHaveParamCount( nParamCount, 2, 3 ) ) { - sal_Bool bFlag; + bool bFlag; if (nParamCount == 3) bFlag = GetBool(); else @@ -501,7 +501,7 @@ void ScInterpreter::ScCeil() sal_uInt8 nParamCount = GetByte(); if ( MustHaveParamCount( nParamCount, 2, 3 ) ) { - sal_Bool bAbs = ( nParamCount == 3 ? GetBool() : false ); + bool bAbs = ( nParamCount == 3 ? GetBool() : false ); double fDec = GetDouble(); double fVal = GetDouble(); if ( fDec == 0.0 ) @@ -524,7 +524,7 @@ void ScInterpreter::ScFloor() sal_uInt8 nParamCount = GetByte(); if ( MustHaveParamCount( nParamCount, 2, 3 ) ) { - sal_Bool bAbs = ( nParamCount == 3 ? GetBool() : false ); + bool bAbs = ( nParamCount == 3 ? GetBool() : false ); double fDec = GetDouble(); double fVal = GetDouble(); if ( fDec == 0.0 ) @@ -775,7 +775,7 @@ void ScInterpreter::ScMIRR() sal_uLong nCount = 0; sal_uInt16 nIterError = 0; - sal_Bool bLoop = aValIter.GetFirst( fCellValue, nIterError ); + bool bLoop = aValIter.GetFirst( fCellValue, nIterError ); while( bLoop ) { if( fCellValue > 0.0 ) // reinvestments @@ -979,7 +979,7 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer, double fTerm, fLia; double fRestwert = fWert - fRest; - sal_Bool bNowLia = false; + bool bNowLia = false; double fGda; sal_uLong i; @@ -994,7 +994,7 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer, if (fLia > fGda) { fTerm = fLia; - bNowLia = sal_True; + bNowLia = true; } else { @@ -1029,7 +1029,7 @@ void ScInterpreter::ScVDB() if ( MustHaveParamCount( nParamCount, 5, 7 ) ) { double fWert, fRest, fDauer, fAnfang, fEnde, fFaktor, fVdb = 0.0; - sal_Bool bFlag; + bool bFlag; if (nParamCount == 7) bFlag = GetBool(); else @@ -1598,7 +1598,7 @@ void ScInterpreter::ScBackSolver() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBackSolver" ); if ( MustHaveParamCount( GetByte(), 3 ) ) { - sal_Bool bDoneIteration = false; + bool bDoneIteration = false; ScAddress aValueAdr, aFormulaAdr; double fTargetVal = GetDouble(); PopSingleRef( aFormulaAdr ); @@ -1608,7 +1608,7 @@ void ScInterpreter::ScBackSolver() { ScBaseCell* pVCell = GetCell( aValueAdr ); // CELLTYPE_NOTE: kein Value aber von Formel referiert - sal_Bool bTempCell = (!pVCell || pVCell->GetCellType() == CELLTYPE_NOTE); + bool bTempCell = (!pVCell || pVCell->GetCellType() == CELLTYPE_NOTE); ScBaseCell* pFCell = GetCell( aFormulaAdr ); if ( ((pVCell && pVCell->GetCellType() == CELLTYPE_VALUE) || bTempCell) @@ -1640,14 +1640,14 @@ void ScInterpreter::ScBackSolver() ScValueCell* pValue = (ScValueCell*) pVCell; pFormula->Interpret(); - sal_Bool bError = ( pFormula->GetErrCode() != 0 ); + bool bError = ( pFormula->GetErrCode() != 0 ); // bError always corresponds with fF fFPrev = pFormula->GetValue() - fTargetVal; fBestF = fabs( fFPrev ); if ( fBestF < fDelta ) - bDoneIteration = sal_True; + bDoneIteration = true; double fX = fXPrev + fEps; double fF = fFPrev; @@ -1655,7 +1655,7 @@ void ScInterpreter::ScBackSolver() sal_uInt16 nIter = 0; - sal_Bool bHorMoveError = false; + bool bHorMoveError = false; // Nach der Regula Falsi Methode while ( !bDoneIteration && ( nIter++ < nMaxIter ) ) { @@ -1677,7 +1677,7 @@ void ScInterpreter::ScBackSolver() const double fHorStepAngle = 5.0; const double fHorMaxAngle = 80.0; int nHorMaxIter = static_cast<int>( fHorMaxAngle / fHorStepAngle ); - sal_Bool bDoneHorMove = false; + bool bDoneHorMove = false; while ( !bDoneHorMove && !bHorMoveError && nHorIter++ < nHorMaxIter ) { @@ -1704,12 +1704,12 @@ void ScInterpreter::ScBackSolver() if ( fF != fFPrev ) { fX = fHorX; - bDoneHorMove = sal_True; + bDoneHorMove = true; } } } if ( !bDoneHorMove ) - bHorMoveError = sal_True; + bHorMoveError = true; } if ( bError ) @@ -1726,7 +1726,7 @@ void ScInterpreter::ScBackSolver() { // converged to root fBestX = fX; - bDoneIteration = sal_True; + bDoneIteration = true; } else { @@ -2152,8 +2152,8 @@ void ScInterpreter::ScDde() // solange der Link nicht ausgewertet ist, Idle abklemmen // (um zirkulaere Referenzen zu vermeiden) - sal_Bool bOldDis = pDok->IsIdleDisabled(); - pDok->DisableIdle( sal_True ); + bool bOldDis = pDok->IsIdleDisabled(); + pDok->DisableIdle( true ); // Link-Objekt holen / anlegen @@ -2162,7 +2162,7 @@ void ScInterpreter::ScDde() //! Dde-Links (zusaetzlich) effizienter am Dokument speichern !!!!! // ScDdeLink* pLink = pDok->GetDdeLink( aAppl, aTopic, aItem ); - sal_Bool bWasError = ( pMyFormulaCell->GetRawError() != 0 ); + bool bWasError = ( pMyFormulaCell->GetRawError() != 0 ); if (!pLink) { @@ -2275,7 +2275,7 @@ void ScInterpreter::ScBase() } else { - sal_Bool bDirt = false; + bool bDirt = false; while ( fVal && p > pBuf ) { //! mit fmod Rundungsfehler ab 2**48 @@ -2305,7 +2305,7 @@ void ScInterpreter::ScBase() size_t nDig; if ( fVal < fMult ) { // da ist was gekippt - bDirt = sal_True; + bDirt = true; nDig = 0; } else @@ -2482,21 +2482,21 @@ void ScInterpreter::ScRoman() } -sal_Bool lcl_GetArabicValue( sal_Unicode cChar, sal_uInt16& rnValue, sal_Bool& rbIsDec ) +bool lcl_GetArabicValue( sal_Unicode cChar, sal_uInt16& rnValue, bool& rbIsDec ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBase" ); switch( cChar ) { - case 'M': rnValue = 1000; rbIsDec = sal_True; break; + case 'M': rnValue = 1000; rbIsDec = true; break; case 'D': rnValue = 500; rbIsDec = false; break; - case 'C': rnValue = 100; rbIsDec = sal_True; break; + case 'C': rnValue = 100; rbIsDec = true; break; case 'L': rnValue = 50; rbIsDec = false; break; - case 'X': rnValue = 10; rbIsDec = sal_True; break; + case 'X': rnValue = 10; rbIsDec = true; break; case 'V': rnValue = 5; rbIsDec = false; break; - case 'I': rnValue = 1; rbIsDec = sal_True; break; + case 'I': rnValue = 1; rbIsDec = true; break; default: return false; } - return sal_True; + return true; } @@ -2514,14 +2514,14 @@ void ScInterpreter::ScArabic() sal_uInt16 nValidRest = 3999; sal_uInt16 nCharIndex = 0; sal_uInt16 nCharCount = aRoman.Len(); - sal_Bool bValid = sal_True; + bool bValid = true; while( bValid && (nCharIndex < nCharCount) ) { sal_uInt16 nDigit1 = 0; sal_uInt16 nDigit2 = 0; - sal_Bool bIsDec1 = false; - sal_Bool bIsDec2 = false; + bool bIsDec1 = false; + bool bIsDec2 = false; bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex ), nDigit1, bIsDec1 ); if( bValid && (nCharIndex + 1 < nCharCount) ) bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex + 1 ), nDigit2, bIsDec2 ); @@ -2642,7 +2642,7 @@ void ScInterpreter::ScHyperLink() } -sal_Bool lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec ) +bool lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec ) { struct ConvertInfo { @@ -2676,7 +2676,7 @@ sal_Bool lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec { rfRate = aConvertTable[i].fRate; rnDec = aConvertTable[i].nDec; - return sal_True; + return true; } return false; } @@ -2696,7 +2696,7 @@ void ScInterpreter::ScEuroConvert() return; } } - sal_Bool bFullPrecision = false; + bool bFullPrecision = false; if ( nParamCount >= 4 ) bFullPrecision = GetBool(); String aToUnit( GetString() ); @@ -2970,7 +2970,7 @@ void ScInterpreter::ScGetPivotData() while( i-- > 0 ) { //! should allow numeric constraint values - aFilters[i].mbValIsStr = sal_True; + aFilters[i].mbValIsStr = true; aFilters[i].maValStr = GetString(); aFilters[i].maFieldName = GetString(); diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 62d670d65e06..728faea6f1b9 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -2344,7 +2344,7 @@ void ScInterpreter::ScZTest() PushDouble(0.5 - gauss((mue-x)*sqrt(rValCount)/sigma)); } } -bool ScInterpreter::CalculateTest(sal_Bool _bTemplin +bool ScInterpreter::CalculateTest(bool _bTemplin ,const SCSIZE nC1, const SCSIZE nC2,const SCSIZE nR1,const SCSIZE nR2 ,const ScMatrixRef& pMat1,const ScMatrixRef& pMat2 ,double& fT,double& fF) @@ -2478,7 +2478,7 @@ void ScInterpreter::ScTTest() } else if (fTyp == 3.0) { - CalculateTest(sal_True,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF); + CalculateTest(true,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF); } else @@ -3207,7 +3207,7 @@ void ScInterpreter::ScModalValue() } } -void ScInterpreter::CalculateSmallLarge(sal_Bool bSmall) +void ScInterpreter::CalculateSmallLarge(bool bSmall) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSmallLarge" ); if ( !MustHaveParamCount( GetByte(), 2 ) ) @@ -3246,7 +3246,7 @@ void ScInterpreter::ScLarge() void ScInterpreter::ScSmall() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSmall" ); - CalculateSmallLarge(sal_True); + CalculateSmallLarge(true); } void ScInterpreter::ScPercentrank() @@ -3521,13 +3521,13 @@ void ScInterpreter::ScRank() sal_uInt8 nParamCount = GetByte(); if ( !MustHaveParamCount( nParamCount, 2, 3 ) ) return; - sal_Bool bDescending; + bool bDescending; if (nParamCount == 3) bDescending = GetBool(); else bDescending = false; double fCount = 1.0; - sal_Bool bValid = false; + bool bValid = false; switch (GetStackType()) { case formula::svDouble : @@ -3535,7 +3535,7 @@ void ScInterpreter::ScRank() double x = GetDouble(); double fVal = GetDouble(); if (x == fVal) - bValid = sal_True; + bValid = true; break; } case svSingleRef : @@ -3548,7 +3548,7 @@ void ScInterpreter::ScRank() { double x = GetCellValue( aAdr, pCell ); if (x == fVal) - bValid = sal_True; + bValid = true; } break; } @@ -3574,7 +3574,7 @@ void ScInterpreter::ScRank() if (aValIter.GetFirst(nCellVal, nErr)) { if (nCellVal == fVal) - bValid = sal_True; + bValid = true; else if ((!bDescending && nCellVal > fVal) || (bDescending && nCellVal < fVal) ) fCount++; @@ -3582,7 +3582,7 @@ void ScInterpreter::ScRank() while ((nErr == 0) && aValIter.GetNext(nCellVal, nErr)) { if (nCellVal == fVal) - bValid = sal_True; + bValid = true; else if ((!bDescending && nCellVal > fVal) || (bDescending && nCellVal < fVal) ) fCount++; @@ -3607,7 +3607,7 @@ void ScInterpreter::ScRank() { double x = pMat->GetDouble(i); if (x == fVal) - bValid = sal_True; + bValid = true; else if ((!bDescending && x > fVal) || (bDescending && x < fVal) ) fCount++; @@ -3620,7 +3620,7 @@ void ScInterpreter::ScRank() { double x = pMat->GetDouble(i); if (x == fVal) - bValid = sal_True; + bValid = true; else if ((!bDescending && x > fVal) || (bDescending && x < fVal) ) fCount++; @@ -3840,7 +3840,7 @@ void ScInterpreter::ScProbability() { double fSum = 0.0; double fRes = 0.0; - sal_Bool bStop = false; + bool bStop = false; double fP, fW; for ( SCSIZE i = 0; i < nC1 && !bStop; i++ ) { @@ -3887,9 +3887,9 @@ void ScInterpreter::ScCovar() void ScInterpreter::ScPearson() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPearson" ); - CalculatePearsonCovar(sal_True,false); + CalculatePearsonCovar(true,false); } -void ScInterpreter::CalculatePearsonCovar(sal_Bool _bPearson,sal_Bool _bStexy) +void ScInterpreter::CalculatePearsonCovar(bool _bPearson,bool _bStexy) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculatePearsonCovar" ); if ( !MustHaveParamCount( GetByte(), 2 ) ) @@ -4002,7 +4002,7 @@ void ScInterpreter::ScSTEXY() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSTEXY" ); CalculatePearsonCovar(true,true); } -void ScInterpreter::CalculateSlopeIntercept(sal_Bool bSlope) +void ScInterpreter::CalculateSlopeIntercept(bool bSlope) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSlopeIntercept" ); if ( !MustHaveParamCount( GetByte(), 2 ) ) @@ -4077,7 +4077,7 @@ void ScInterpreter::CalculateSlopeIntercept(sal_Bool bSlope) void ScInterpreter::ScSlope() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSlope" ); - CalculateSlopeIntercept(sal_True); + CalculateSlopeIntercept(true); } void ScInterpreter::ScIntercept() diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 68d07d1a0d7d..a8c7cdcb241c 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -145,7 +145,7 @@ void ScInterpreter::ReplaceCell( SCCOL& rCol, SCROW& rRow, SCTAB& rTab ) } -sal_Bool ScInterpreter::IsTableOpInRange( const ScRange& rRange ) +bool ScInterpreter::IsTableOpInRange( const ScRange& rRange ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsTableOpInRange" ); if ( rRange.aStart == rRange.aEnd ) @@ -157,7 +157,7 @@ sal_Bool ScInterpreter::IsTableOpInRange( const ScRange& rRange ) { ScInterpreterTableOpParams* pTOp = &pDok->aTableOpList[ i ]; if ( rRange.In( pTOp->aOld1 ) ) - return sal_True; + return true; if ( rRange.In( pTOp->aOld2 ) ) return true; } @@ -561,7 +561,7 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell ) } -sal_Bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, +bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateDoubleArr" ); @@ -602,7 +602,7 @@ sal_Bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, { sal_uInt16 nErr = 0; double nVal = 0.0; - sal_Bool bOk = sal_True; + bool bOk = true; switch ( pCell->GetCellType() ) { case CELLTYPE_VALUE : @@ -642,11 +642,11 @@ sal_Bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, nTab++; } *pCount = nCount; - return sal_True; + return true; } -sal_Bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, +bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr) { @@ -685,7 +685,7 @@ sal_Bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, { String aStr; sal_uInt16 nErr = 0; - sal_Bool bOk = sal_True; + bool bOk = true; switch ( pCell->GetCellType() ) { case CELLTYPE_STRING : @@ -742,11 +742,11 @@ sal_Bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, nTab++; } *pCount = nCount; - return sal_True; + return true; } -sal_Bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, +bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr) { @@ -790,7 +790,7 @@ sal_Bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, sal_uInt16 nType = 0; // 0 = Zahl; 1 = String double nVal = 0.0; String aStr; - sal_Bool bOk = sal_True; + bool bOk = true; switch ( pCell->GetCellType() ) { case CELLTYPE_STRING : @@ -863,7 +863,7 @@ sal_Bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, nTab++; } *pCount = nCount; - return sal_True; + return true; } @@ -1241,7 +1241,7 @@ void ScInterpreter::PopSingleRef( ScAddress& rAdr ) void ScInterpreter::DoubleRefToVars( const ScToken* p, SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - sal_Bool bDontCheckForTableOp ) + bool bDontCheckForTableOp ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToVars" ); const ScComplexRefData& rCRef = p->GetDoubleRef(); @@ -1296,7 +1296,7 @@ ScDBRangeBase* ScInterpreter::PopDBDoubleRef() void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - sal_Bool bDontCheckForTableOp ) + bool bDontCheckForTableOp ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRef" ); if( sp ) @@ -1322,7 +1322,7 @@ void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, void ScInterpreter::DoubleRefToRange( const ScComplexRefData & rCRef, - ScRange & rRange, sal_Bool bDontCheckForTableOp ) + ScRange & rRange, bool bDontCheckForTableOp ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToRange" ); SCCOL nCol; @@ -1387,7 +1387,7 @@ void ScInterpreter::PopDoubleRef( ScRange & rRange, short & rParam, size_t & rRe } -void ScInterpreter::PopDoubleRef( ScRange& rRange, sal_Bool bDontCheckForTableOp ) +void ScInterpreter::PopDoubleRef( ScRange& rRange, bool bDontCheckForTableOp ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRef" ); if( sp ) @@ -1585,7 +1585,7 @@ void ScInterpreter::GetExternalDoubleRef( rArray = pArray; } -sal_Bool ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr ) +bool ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRefOrSingleRef" ); switch ( GetStackType() ) @@ -1593,13 +1593,13 @@ sal_Bool ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr ) case svDoubleRef : { ScRange aRange; - PopDoubleRef( aRange, sal_True ); + PopDoubleRef( aRange, true ); return DoubleRefToPosSingleRef( aRange, rAdr ); } case svSingleRef : { PopSingleRef( rAdr ); - return sal_True; + return true; } default: PopError(); @@ -2024,7 +2024,7 @@ void ScInterpreter::PushNoValue() } -sal_Bool ScInterpreter::IsMissing() +bool ScInterpreter::IsMissing() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsMissing" ); return sp && pStack[sp - 1]->GetType() == svMissing; @@ -2083,17 +2083,17 @@ StackVar ScInterpreter::GetStackType( sal_uInt8 nParam ) } -sal_Bool ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr ) +bool ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToPosSingleRef" ); // Check for a singleton first - no implicit intersection for them. if( rRange.aStart == rRange.aEnd ) { rAdr = rRange.aStart; - return sal_True; + return true; } - sal_Bool bOk = false; + bool bOk = false; if ( pJumpMatrix ) { @@ -2128,13 +2128,13 @@ sal_Bool ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddres nRow = rRange.aStart.Row(); if ( nRow == rRange.aEnd.Row() ) { - bOk = sal_True; + bOk = true; nCol = nMyCol; } else if ( nTab != nMyTab && nTab == rRange.aEnd.Tab() && rRange.aStart.Row() <= nMyRow && nMyRow <= rRange.aEnd.Row() ) { - bOk = sal_True; + bOk = true; nCol = nMyCol; nRow = nMyRow; } @@ -2144,13 +2144,13 @@ sal_Bool ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddres nCol = rRange.aStart.Col(); if ( nCol == rRange.aEnd.Col() ) { - bOk = sal_True; + bOk = true; nRow = nMyRow; } else if ( nTab != nMyTab && nTab == rRange.aEnd.Tab() && rRange.aStart.Col() <= nMyCol && nMyCol <= rRange.aEnd.Col() ) { - bOk = sal_True; + bOk = true; nCol = nMyCol; nRow = nMyRow; } @@ -2441,7 +2441,7 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( double& rDouble, void ScInterpreter::ScDBGet() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBGet" ); - sal_Bool bMissingField = false; + bool bMissingField = false; auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); if (!pQueryParam.get()) { @@ -2675,7 +2675,8 @@ void ScInterpreter::ScExternal() } else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, false) ).Len() ) { - // bLocalFirst=sal_False in FindFunction, cFunc should be the stored internal name + // bLocalFirst=false in FindFunction, cFunc should be the stored + // internal name ScUnoAddInCall aCall( *ScGlobal::GetAddInCollection(), aUnoName, nParamCount ); @@ -3137,7 +3138,7 @@ void ScInterpreter::ScMacro() // Parameter-Array zusammenbauen SbxArrayRef refPar = new SbxArray; - sal_Bool bOk = sal_True; + bool bOk = true; for( short i = nParamCount; i && bOk ; i-- ) { SbxVariable* pPar = refPar->Get( (sal_uInt16) i ); @@ -3334,10 +3335,10 @@ void ScInterpreter::ScMacro() } -sal_Bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos ) +bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::SetSbxVariable" ); - sal_Bool bOk = sal_True; + bool bOk = true; ScBaseCell* pCell = pDok->GetCell( rPos ); if (pCell) { @@ -3429,11 +3430,11 @@ void ScInterpreter::ScTableOp() pDok->aTableOpList.push_back( pTableOp ); pDok->IncInterpreterTableOpLevel(); - sal_Bool bReuseLastParams = (pDok->aLastTableOpParams == *pTableOp); + bool bReuseLastParams = (pDok->aLastTableOpParams == *pTableOp); if ( bReuseLastParams ) { pTableOp->aNotifiedFormulaPos = pDok->aLastTableOpParams.aNotifiedFormulaPos; - pTableOp->bRefresh = sal_True; + pTableOp->bRefresh = true; for ( ::std::vector< ScAddress >::const_iterator iBroadcast( pTableOp->aNotifiedFormulaPos.begin() ); iBroadcast != pTableOp->aNotifiedFormulaPos.end(); @@ -3547,7 +3548,7 @@ void ScInterpreter::ScColRowNameAuto() (SCROW&) aRefData.Ref1.nRow, (SCCOL&) aRefData.Ref2.nCol, (SCROW&) aRefData.Ref2.nRow, - sal_True, false ); + true, false ); // DataArea im Ursprung begrenzen aRefData.Ref1.nCol = nStartCol; aRefData.Ref1.nRow = nStartRow; @@ -3642,7 +3643,7 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc, bMatrixFormula = ( cMatFlag == MM_FORMULA || cMatFlag == MM_FAKE ); if (!bGlobalStackInUse) { - bGlobalStackInUse = sal_True; + bGlobalStackInUse = true; if (!pGlobalStack) pGlobalStack = new ScTokenStack; pStackObj = pGlobalStack; @@ -3881,9 +3882,9 @@ StackVar ScInterpreter::Interpret() case ocGetDiffDate : ScGetDiffDate(); break; case ocGetDiffDate360 : ScGetDiffDate360(); break; case ocMin : ScMin( false ); break; - case ocMinA : ScMin( sal_True ); break; + case ocMinA : ScMin( true ); break; case ocMax : ScMax( false ); break; - case ocMaxA : ScMax( sal_True ); break; + case ocMaxA : ScMax( true ); break; case ocSum : ScSum(); break; case ocProduct : ScProduct(); break; case ocNPV : ScNPV(); break; @@ -3891,17 +3892,17 @@ StackVar ScInterpreter::Interpret() case ocMIRR : ScMIRR(); break; case ocISPMT : ScISPMT(); break; case ocAverage : ScAverage( false ); break; - case ocAverageA : ScAverage( sal_True ); break; + case ocAverageA : ScAverage( true ); break; case ocCount : ScCount(); break; case ocCount2 : ScCount2(); break; case ocVar : ScVar( false ); break; - case ocVarA : ScVar( sal_True ); break; + case ocVarA : ScVar( true ); break; case ocVarP : ScVarP( false ); break; - case ocVarPA : ScVarP( sal_True ); break; + case ocVarPA : ScVarP( true ); break; case ocStDev : ScStDev( false ); break; - case ocStDevA : ScStDev( sal_True ); break; + case ocStDevA : ScStDev( true ); break; case ocStDevP : ScStDevP( false ); break; - case ocStDevPA : ScStDevP( sal_True ); break; + case ocStDevPA : ScStDevP( true ); break; case ocBW : ScBW(); break; case ocDIA : ScDIA(); break; case ocGDA : ScGDA(); break; diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 1a65d20ac145..20ddd2c46b61 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1209,7 +1209,7 @@ void ScInterpreter::ScAdd() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAdd" ); CalculateAddSub(false); } -void ScInterpreter::CalculateAddSub(sal_Bool _bSub) +void ScInterpreter::CalculateAddSub(bool _bSub) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateAddSub" ); ScMatrixRef pMat1 = NULL; @@ -1284,13 +1284,13 @@ void ScInterpreter::CalculateAddSub(sal_Bool _bSub) else if (pMat1 || pMat2) { double fVal; - sal_Bool bFlag; + bool bFlag; ScMatrixRef pMat = pMat1; if (!pMat) { fVal = fVal1; pMat = pMat2; - bFlag = sal_True; // double - Matrix + bFlag = true; // double - Matrix } else { @@ -1369,13 +1369,13 @@ void ScInterpreter::ScAmpersand() else if (pMat1 || pMat2) { String sStr; - sal_Bool bFlag; + bool bFlag; ScMatrixRef pMat = pMat1; if (!pMat) { sStr = sStr1; pMat = pMat2; - bFlag = sal_True; // double - Matrix + bFlag = true; // double - Matrix } else { @@ -1441,7 +1441,7 @@ void ScInterpreter::ScAmpersand() void ScInterpreter::ScSub() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSub" ); - CalculateAddSub(sal_True); + CalculateAddSub(true); } void ScInterpreter::ScMul() @@ -1565,13 +1565,13 @@ void ScInterpreter::ScDiv() else if (pMat1 || pMat2) { double fVal; - sal_Bool bFlag; + bool bFlag; ScMatrixRef pMat = pMat1; if (!pMat) { fVal = fVal1; pMat = pMat2; - bFlag = sal_True; // double - Matrix + bFlag = true; // double - Matrix } else { @@ -1647,13 +1647,13 @@ void ScInterpreter::ScPow() else if (pMat1 || pMat2) { double fVal; - sal_Bool bFlag; + bool bFlag; ScMatrixRef pMat = pMat1; if (!pMat) { fVal = fVal1; pMat = pMat2; - bFlag = sal_True; // double - Matrix + bFlag = true; // double - Matrix } else { @@ -1748,7 +1748,7 @@ void ScInterpreter::ScSumX2MY2() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2MY2" ); CalculateSumX2MY2SumX2DY2(false); } -void ScInterpreter::CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2) +void ScInterpreter::CalculateSumX2MY2SumX2DY2(bool _bSumX2DY2) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSumX2MY2SumX2DY2" ); if ( !MustHaveParamCount( GetByte(), 2 ) ) @@ -1792,7 +1792,7 @@ void ScInterpreter::CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2) void ScInterpreter::ScSumX2DY2() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2DY2" ); - CalculateSumX2MY2SumX2DY2(sal_True); + CalculateSumX2MY2SumX2DY2(true); } void ScInterpreter::ScSumXMY2() @@ -3244,7 +3244,7 @@ void ScInterpreter::ScMatRef() if (ScMatrix::IsNonValueType( nMatValType)) { if (ScMatrix::IsEmptyPathType( nMatValType)) - { // result of empty sal_False jump path + { // result of empty false jump path nFuncFmtType = NUMBERFORMAT_LOGICAL; PushInt(0); } |