summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@erack.de>2011-09-11 22:08:45 +0200
committerEike Rathke <erack@erack.de>2011-09-11 22:08:45 +0200
commit8e81b988cef8ba6cbf4b122670be8e2c36cfc92e (patch)
treeb606780dbb4fe9af41d997e6a935399d0a7e99a7 /sc
parenttranslated some comments (diff)
downloadcore-8e81b988cef8ba6cbf4b122670be8e2c36cfc92e.tar.gz
core-8e81b988cef8ba6cbf4b122670be8e2c36cfc92e.zip
sal_Bool to bool and cosmetics
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/cell.hxx106
-rw-r--r--sc/source/core/data/cell.cxx142
-rw-r--r--sc/source/core/data/cell2.cxx150
3 files changed, 199 insertions, 199 deletions
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 6266142d3ea6..7551ba693b15 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -158,12 +158,12 @@ public:
sal_uInt16 GetErrorCode() const;
/** ScFormulaCell with formula::svEmptyCell result, or ScNoteCell (may have been
created due to reference to empty cell). */
- sal_Bool HasEmptyData() const;
- sal_Bool HasValueData() const;
- sal_Bool HasStringData() const;
+ bool HasEmptyData() const;
+ bool HasValueData() const;
+ bool HasStringData() const;
String GetStringData() const; // only real strings
- static sal_Bool CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 );
+ static bool CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 );
private:
ScBaseCell& operator=( const ScBaseCell& );
@@ -341,19 +341,19 @@ private:
ScFormulaCell* pNext;
ScFormulaCell* pPreviousTrack;
ScFormulaCell* pNextTrack;
- sal_uLong nFormatIndex; // Number format set by calculation
+ sal_uLong nFormatIndex; // Number format set by calculation
short nFormatType; // Number format type set by calculation
- sal_uInt16 nSeenInIteration; // Iteration cycle in which the cell was last encountered
- sal_uInt8 cMatrixFlag; // One of ScMatrixMode
- sal_Bool bDirty : 1; // Must be (re)calculated
- sal_Bool bChanged : 1; // Whether something changed regarding display/representation
- sal_Bool bRunning : 1; // Already interpreting right now
- sal_Bool bCompile : 1; // Must be (re)compiled
- sal_Bool bSubTotal : 1; // Cell is part of or contains a SubTotal
- sal_Bool bIsIterCell : 1; // Cell is part of a circular reference
- sal_Bool bInChangeTrack : 1; // Cell is in ChangeTrack
- sal_Bool bTableOpDirty : 1; // Dirty flag for TableOp
- sal_Bool bNeedListening : 1; // Listeners need to be re-established after UpdateReference
+ sal_uInt16 nSeenInIteration; // Iteration cycle in which the cell was last encountered
+ sal_uInt8 cMatrixFlag; // One of ScMatrixMode
+ bool bDirty : 1; // Must be (re)calculated
+ bool bChanged : 1; // Whether something changed regarding display/representation
+ bool bRunning : 1; // Already interpreting right now
+ bool bCompile : 1; // Must be (re)compiled
+ bool bSubTotal : 1; // Cell is part of or contains a SubTotal
+ bool bIsIterCell : 1; // Cell is part of a circular reference
+ bool bInChangeTrack : 1; // Cell is in ChangeTrack
+ bool bTableOpDirty : 1; // Dirty flag for TableOp
+ bool bNeedListening : 1; // Listeners need to be re-established after UpdateReference
enum ScInterpretTailParameter
{
@@ -403,23 +403,23 @@ public:
void SetDirtyAfterLoad();
inline void ResetTableOpDirtyVar() { bTableOpDirty = false; }
void SetTableOpDirty();
- sal_Bool IsDirtyOrInTableOpDirty() const;
- sal_Bool GetDirty() const { return bDirty; }
- void ResetDirty() { bDirty = false; }
- sal_Bool NeedsListening() const { return bNeedListening; }
- void SetNeedsListening( sal_Bool bVar ) { bNeedListening = bVar; }
+ bool IsDirtyOrInTableOpDirty() const;
+ bool GetDirty() const { return bDirty; }
+ void ResetDirty() { bDirty = false; }
+ bool NeedsListening() const { return bNeedListening; }
+ void SetNeedsListening( bool bVar ) { bNeedListening = bVar; }
void Compile(const String& rFormula,
- sal_Bool bNoListening = false,
+ bool bNoListening = false,
const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT );
- void CompileTokenArray( sal_Bool bNoListening = false );
+ void CompileTokenArray( bool bNoListening = false );
void CompileXML( ScProgress& rProgress ); // compile temporary string tokens
void CalcAfterLoad();
bool MarkUsedExternalReferences();
void Interpret();
- inline sal_Bool IsIterCell() const { return bIsIterCell; }
+ inline bool IsIterCell() const { return bIsIterCell; }
inline sal_uInt16 GetSeenInIteration() const { return nSeenInIteration; }
- sal_Bool HasOneReference( ScRange& r ) const;
+ bool HasOneReference( ScRange& r ) const;
/* Checks if the formula contains reference list that can be
expressed by one reference (like A1;A2;A3:A5 -> A1:A5). The
reference list is not required to be sorted (i.e. A3;A1;A2 is
@@ -429,8 +429,8 @@ public:
It is similar to HasOneReference(), but more general.
*/
bool HasRefListExpressibleAsOneReference(ScRange& rRange) const;
- sal_Bool HasRelNameReference() const;
- sal_Bool HasColRowName() const;
+ bool HasRelNameReference() const;
+ bool HasColRowName() const;
bool UpdateReference(UpdateRefMode eUpdateRefMode,
const ScRange& r,
@@ -446,43 +446,43 @@ public:
void UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets = 1);
void UpdateInsertTabAbs(SCTAB nTable);
- sal_Bool UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove = false, SCTAB nSheets = 1);
+ bool UpdateDeleteTab(SCTAB nTable, bool bIsMove = false, SCTAB nSheets = 1);
void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo);
void UpdateRenameTab(SCTAB nTable, const String& rName);
- sal_Bool TestTabRefAbs(SCTAB nTable);
- void UpdateCompile( sal_Bool bForceIfNameInUse = false );
- sal_Bool IsRangeNameInUse(sal_uInt16 nIndex) const;
+ bool TestTabRefAbs(SCTAB nTable);
+ void UpdateCompile( bool bForceIfNameInUse = false );
+ bool IsRangeNameInUse(sal_uInt16 nIndex) const;
void FindRangeNamesInUse(std::set<sal_uInt16>& rIndexes) const;
void ReplaceRangeNamesInUse( const ScRangeData::IndexMap& rMap );
- sal_Bool IsSubTotal() const { return bSubTotal; }
- sal_Bool IsChanged() const { return bChanged; }
+ bool IsSubTotal() const { return bSubTotal; }
+ bool IsChanged() const { return bChanged; }
void ResetChanged() { bChanged = false; }
- sal_Bool IsEmpty(); // formula::svEmptyCell result
+ bool IsEmpty(); // formula::svEmptyCell result
// display as empty string if formula::svEmptyCell result
- sal_Bool IsEmptyDisplayedAsString();
- sal_Bool IsValue(); // also sal_True if formula::svEmptyCell
+ bool IsEmptyDisplayedAsString();
+ bool IsValue(); // also true if formula::svEmptyCell
double GetValue();
double GetValueAlways(); // ignore errors
void GetString( String& rString );
void GetString( rtl::OUString& rString );
const ScMatrix* GetMatrix();
- sal_Bool GetMatrixOrigin( ScAddress& rPos ) const;
+ bool GetMatrixOrigin( ScAddress& rPos ) const;
void GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows );
- sal_uInt16 GetMatrixEdge( ScAddress& rOrgPos );
- sal_uInt16 GetErrCode(); // interpret first if necessary
- sal_uInt16 GetRawError(); // don't interpret, just return code or result error
+ sal_uInt16 GetMatrixEdge( ScAddress& rOrgPos );
+ sal_uInt16 GetErrCode(); // interpret first if necessary
+ sal_uInt16 GetRawError(); // don't interpret, just return code or result error
short GetFormatType() const { return nFormatType; }
- sal_uLong GetFormatIndex() const { return nFormatIndex; }
+ sal_uLong GetFormatIndex() const { return nFormatIndex; }
void GetFormatInfo( short& nType, sal_uLong& nIndex ) const
{ nType = nFormatType; nIndex = nFormatIndex; }
- sal_uInt8 GetMatrixFlag() const { return cMatrixFlag; }
+ sal_uInt8 GetMatrixFlag() const { return cMatrixFlag; }
ScTokenArray* GetCode() const { return pCode; }
- sal_Bool IsRunning() const { return bRunning; }
- void SetRunning( sal_Bool bVal ) { bRunning = bVal; }
+ bool IsRunning() const { return bRunning; }
+ void SetRunning( bool bVal ) { bRunning = bVal; }
void CompileDBFormula();
- void CompileDBFormula( sal_Bool bCreateFormulaString );
- void CompileNameFormula( sal_Bool bCreateFormulaString );
+ void CompileDBFormula( bool bCreateFormulaString );
+ void CompileNameFormula( bool bCreateFormulaString );
void CompileColRowNameFormula();
ScFormulaCell* GetPrevious() const { return pPrevious; }
ScFormulaCell* GetNext() const { return pNext; }
@@ -494,18 +494,18 @@ public:
void SetNextTrack( ScFormulaCell* pF ) { pNextTrack = pF; }
virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint);
- void SetCompile( sal_Bool bVal ) { bCompile = bVal; }
+ void SetCompile( bool bVal ) { bCompile = bVal; }
ScDocument* GetDocument() const { return pDocument; }
void SetMatColsRows( SCCOL nCols, SCROW nRows );
void GetMatColsRows( SCCOL& nCols, SCROW& nRows ) const;
// cell belongs to ChangeTrack and not to the real document
- void SetInChangeTrack( sal_Bool bVal ) { bInChangeTrack = bVal; }
- sal_Bool IsInChangeTrack() const { return bInChangeTrack; }
+ void SetInChangeTrack( bool bVal ) { bInChangeTrack = bVal; }
+ bool IsInChangeTrack() const { return bInChangeTrack; }
// standard format for type and format
// for format "Standard" possibly the format used in the formula cell
- sal_uLong GetStandardFormat( SvNumberFormatter& rFormatter, sal_uLong nFormat ) const;
+ sal_uLong GetStandardFormat( SvNumberFormatter& rFormatter, sal_uLong nFormat ) const;
// For import filters!
void AddRecalcMode( formula::ScRecalcMode );
@@ -525,8 +525,8 @@ public:
const formula::FormulaGrammar::Grammar eGrammar )
{ aResult.SetHybridFormula( r); eTempGrammar = eGrammar; }
void SetErrCode( sal_uInt16 n );
- inline sal_Bool IsHyperLinkCell() const { return pCode && pCode->IsHyperLink(); }
- EditTextObject* CreateURLObject() ;
+ inline bool IsHyperLinkCell() const { return pCode && pCode->IsHyperLink(); }
+ EditTextObject* CreateURLObject() ;
void GetURLResult( String& rURL, String& rCellText );
/** Determines whether or not the result string contains more than one paragraph */
@@ -543,7 +543,7 @@ private:
ScAddress aPos;
public:
ScDetectiveRefIter( ScFormulaCell* pCell );
- sal_Bool GetNextRef( ScRange& rRange );
+ bool GetNextRef( ScRange& rRange );
ScToken* GetNextRefToken();
};
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 8b1b99ea613c..a3e53ddd9589 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -336,7 +336,7 @@ void ScBaseCell::StartListeningTo( ScDocument* pDoc )
&& !((ScFormulaCell*)this)->IsInChangeTrack()
)
{
- pDoc->SetDetectiveDirty(sal_True); // es hat sich was geaendert...
+ pDoc->SetDetectiveDirty(true); // es hat sich was geaendert...
ScFormulaCell* pFormCell = (ScFormulaCell*)this;
ScTokenArray* pArr = pFormCell->GetCode();
@@ -422,7 +422,7 @@ void ScBaseCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
&& !((ScFormulaCell*)this)->IsInChangeTrack()
)
{
- pDoc->SetDetectiveDirty(sal_True); // es hat sich was geaendert...
+ pDoc->SetDetectiveDirty(true); // es hat sich was geaendert...
ScFormulaCell* pFormCell = (ScFormulaCell*)this;
if( pFormCell->GetCode()->IsRecalcModeAlways() )
@@ -514,12 +514,12 @@ sal_uInt16 ScBaseCell::GetErrorCode() const
}
-sal_Bool ScBaseCell::HasEmptyData() const
+bool ScBaseCell::HasEmptyData() const
{
switch ( eCellType )
{
case CELLTYPE_NOTE :
- return sal_True;
+ return true;
case CELLTYPE_FORMULA :
return ((ScFormulaCell*)this)->IsEmpty();
default:
@@ -528,12 +528,12 @@ sal_Bool ScBaseCell::HasEmptyData() const
}
-sal_Bool ScBaseCell::HasValueData() const
+bool ScBaseCell::HasValueData() const
{
switch ( eCellType )
{
case CELLTYPE_VALUE :
- return sal_True;
+ return true;
case CELLTYPE_FORMULA :
return ((ScFormulaCell*)this)->IsValue();
default:
@@ -542,13 +542,13 @@ sal_Bool ScBaseCell::HasValueData() const
}
-sal_Bool ScBaseCell::HasStringData() const
+bool ScBaseCell::HasStringData() const
{
switch ( eCellType )
{
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
- return sal_True;
+ return true;
case CELLTYPE_FORMULA :
return !((ScFormulaCell*)this)->IsValue();
default:
@@ -574,7 +574,7 @@ String ScBaseCell::GetStringData() const
return aStr;
}
-sal_Bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
+bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
{
CellType eType1 = CELLTYPE_NONE;
CellType eType2 = CELLTYPE_NONE;
@@ -600,7 +600,7 @@ sal_Bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCel
switch ( eType1 ) // beide Typen gleich
{
case CELLTYPE_NONE: // beide leer
- return sal_True;
+ return true;
case CELLTYPE_VALUE: // wirklich Value-Zellen
return ( ((const ScValueCell*)pCell1)->GetValue() ==
((const ScValueCell*)pCell2)->GetValue() );
@@ -629,7 +629,7 @@ sal_Bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCel
if (pCode1->GetLen() == pCode2->GetLen()) // nicht-UPN
{
- sal_Bool bEqual = sal_True;
+ bool bEqual = true;
sal_uInt16 nLen = pCode1->GetLen();
FormulaToken** ppToken1 = pCode1->GetArray();
FormulaToken** ppToken2 = pCode2->GetArray();
@@ -641,7 +641,7 @@ sal_Bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCel
}
if (bEqual)
- return sal_True;
+ return true;
}
return false; // unterschiedlich lang oder unterschiedliche Tokens
@@ -763,7 +763,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
nFormatType( NUMBERFORMAT_NUMBER ),
nSeenInIteration(0),
cMatrixFlag ( cMatInd ),
- bDirty( sal_True ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cMatInd != 0
+ bDirty( true ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cMatInd != 0
bChanged( false ),
bRunning( false ),
bCompile( false ),
@@ -774,7 +774,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
bNeedListening( false ),
aPos( rPos )
{
- Compile( rFormula, sal_True, eGrammar ); // bNoListening, Insert does that
+ Compile( rFormula, true, eGrammar ); // bNoListening, Insert does that
}
// Wird von den Importfiltern verwendet
@@ -817,7 +817,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
{
pCode->Reset();
if ( pCode->GetNextOpCodeRPN( ocSubTotal ) )
- bSubTotal = sal_True;
+ bSubTotal = true;
}
if (bSubTotal)
@@ -860,11 +860,11 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
if ( pCode->GetCodeError() && !pDocument->IsClipboard() && pCode->GetLen() )
{
pCode->SetCodeError( 0 );
- bCompile = sal_True;
+ bCompile = true;
}
//! Compile ColRowNames on URM_MOVE/URM_COPY _after_ UpdateReference
- sal_Bool bCompileLater = false;
- sal_Bool bClipMode = rCell.pDocument->IsClipboard();
+ bool bCompileLater = false;
+ bool bClipMode = rCell.pDocument->IsClipboard();
//update ScNameTokens
if (!pDocument->IsClipOrUndo() || rDoc.IsUndo())
@@ -900,14 +900,14 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
if( pRangeData )
{
if( pRangeData->HasReferences() )
- bCompile = sal_True;
+ bCompile = true;
}
else
- bCompile = sal_True; // invalid reference!
+ bCompile = true; // invalid reference!
}
else if ( t->GetOpCode() == ocColRowName )
{
- bCompile = sal_True; // new lookup needed
+ bCompile = true; // new lookup needed
bCompileLater = bClipMode;
}
}
@@ -924,7 +924,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
{
// bNoListening, not at all if in Clipboard/Undo,
// and not from Clipboard either, instead after Insert(Clone) and UpdateReference.
- CompileTokenArray( sal_True );
+ CompileTokenArray( true );
}
}
@@ -1034,11 +1034,11 @@ void ScFormulaCell::GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows )
}
}
-void ScFormulaCell::Compile( const String& rFormula, sal_Bool bNoListening,
+void ScFormulaCell::Compile( const String& rFormula, bool bNoListening,
const FormulaGrammar::Grammar eGrammar )
{
if ( pDocument->IsClipOrUndo() ) return;
- sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
+ bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
if ( bWasInFormulaTree )
pDocument->RemoveFromFormulaTree( this );
// pCode darf fuer Abfragen noch nicht geloescht, muss aber leer sein
@@ -1059,12 +1059,12 @@ void ScFormulaCell::Compile( const String& rFormula, sal_Bool bNoListening,
else
pCode->AddBad( rFormula.GetBuffer() );
}
- bCompile = sal_True;
+ bCompile = true;
CompileTokenArray( bNoListening );
}
else
{
- bChanged = sal_True;
+ bChanged = true;
SetTextWidth( TEXTWIDTH_DIRTY );
SetScriptType( SC_SCRIPTTYPE_UNKNOWN );
}
@@ -1073,7 +1073,7 @@ void ScFormulaCell::Compile( const String& rFormula, sal_Bool bNoListening,
}
-void ScFormulaCell::CompileTokenArray( sal_Bool bNoListening )
+void ScFormulaCell::CompileTokenArray( bool bNoListening )
{
// Not already compiled?
if( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
@@ -1081,13 +1081,13 @@ void ScFormulaCell::CompileTokenArray( sal_Bool bNoListening )
else if( bCompile && !pDocument->IsClipOrUndo() && !pCode->GetCodeError() )
{
// RPN length may get changed
- sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
+ bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
if ( bWasInFormulaTree )
pDocument->RemoveFromFormulaTree( this );
// Loading from within filter? No listening yet!
if( pDocument->IsInsertingFromOtherDoc() )
- bNoListening = sal_True;
+ bNoListening = true;
if( !bNoListening && pCode->GetCodeLen() )
EndListeningTo( pDocument );
@@ -1098,7 +1098,7 @@ void ScFormulaCell::CompileTokenArray( sal_Bool bNoListening )
{
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bChanged = sal_True;
+ bChanged = true;
aResult.SetToken( NULL);
bCompile = false;
if ( !bNoListening )
@@ -1148,7 +1148,7 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
{
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bChanged = sal_True;
+ bChanged = true;
bCompile = false;
StartListeningTo( pDocument );
}
@@ -1158,7 +1158,7 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
}
else
{
- bChanged = sal_True;
+ bChanged = true;
SetTextWidth( TEXTWIDTH_DIRTY );
SetScriptType( SC_SCRIPTTYPE_UNKNOWN );
}
@@ -1166,21 +1166,21 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
// Same as in Load: after loading, it must be known if ocMacro is in any formula
// (for macro warning, CompileXML is called at the end of loading XML file)
if ( !pDocument->GetHasMacroFunc() && pCode->HasOpCodeRPN( ocMacro ) )
- pDocument->SetHasMacroFunc( sal_True );
+ pDocument->SetHasMacroFunc( true );
}
void ScFormulaCell::CalcAfterLoad()
{
- sal_Bool bNewCompiled = false;
+ bool bNewCompiled = false;
// Falls ein Calc 1.0-Doc eingelesen wird, haben wir ein Ergebnis,
// aber kein TokenArray
if( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
{
- Compile( aResult.GetHybridFormula(), sal_True, eTempGrammar);
+ Compile( aResult.GetHybridFormula(), true, eTempGrammar);
aResult.SetToken( NULL);
- bDirty = sal_True;
- bNewCompiled = sal_True;
+ bDirty = true;
+ bNewCompiled = true;
}
// Das UPN-Array wird nicht erzeugt, wenn ein Calc 3.0-Doc eingelesen
// wurde, da die RangeNames erst jetzt existieren.
@@ -1206,7 +1206,7 @@ void ScFormulaCell::CalcAfterLoad()
{
OSL_FAIL("Formelzelle INFINITY !!! Woher kommt das Dokument?");
aResult.SetResultError( errIllegalFPOperation );
- bDirty = sal_True;
+ bDirty = true;
}
// DoubleRefs bei binaeren Operatoren waren vor v5.0 immer Matrix,
// jetzt nur noch wenn in Matrixformel, sonst implizite Schnittmenge
@@ -1223,12 +1223,12 @@ void ScFormulaCell::CalcAfterLoad()
{
StartListeningTo( pDocument );
if( !pCode->IsRecalcModeNormal() )
- bDirty = sal_True;
+ bDirty = true;
}
if ( pCode->IsRecalcModeAlways() )
{ // zufall(), heute(), jetzt() bleiben immer im FormulaTree, damit sie
// auch bei jedem F9 berechnet werden.
- bDirty = sal_True;
+ bDirty = true;
}
// Noch kein SetDirty weil noch nicht alle Listener bekannt, erst in
// SetDirtyAfterLoad.
@@ -1279,10 +1279,10 @@ void ScFormulaCell::Interpret()
return ;
ScRecursionHelper& rRecursionHelper = pDocument->GetRecursionHelper();
- sal_Bool bOldRunning = bRunning;
+ bool bOldRunning = bRunning;
if (rRecursionHelper.GetRecursionCount() > MAXRECURSION)
{
- bRunning = sal_True;
+ bRunning = true;
rRecursionHelper.SetInRecursionReturn( true);
}
else
@@ -1322,7 +1322,7 @@ void ScFormulaCell::Interpret()
aOldStart; ++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = sal_True;
+ pIterCell->bIsIterCell = true;
}
// Mark older cells dirty again, in case they converted
// without accounting for all remaining cells in the circle
@@ -1342,7 +1342,7 @@ void ScFormulaCell::Interpret()
}
--pIterCell->nSeenInIteration;
}
- pIterCell->bDirty = sal_True;
+ pIterCell->bDirty = true;
}
}
else
@@ -1359,7 +1359,7 @@ void ScFormulaCell::Interpret()
rRecursionHelper.GetIterationEnd(); ++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = sal_True;
+ pIterCell->bIsIterCell = true;
}
}
bIterationFromRecursion = false;
@@ -1422,7 +1422,7 @@ void ScFormulaCell::Interpret()
pIterCell->bDirty = false;
pIterCell->bTableOpDirty = false;
pIterCell->aResult.SetResultError( errNoConvergence);
- pIterCell->bChanged = sal_True;
+ pIterCell->bChanged = true;
pIterCell->SetTextWidth( TEXTWIDTH_DIRTY);
pIterCell->SetScriptType( SC_SCRIPTTYPE_UNKNOWN);
}
@@ -1545,9 +1545,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
sal_uInt16 nOldErrCode = aResult.GetResultError();
if ( nSeenInIteration == 0 )
{ // Only the first time
- // With bChanged=sal_False, if a newly compiled cell has a result of
+ // With bChanged=false, if a newly compiled cell has a result of
// 0.0, no change is detected and the cell will not be repainted.
- // bChanged = sal_False;
+ // bChanged = false;
aResult.SetResultError( 0 );
}
@@ -1558,8 +1558,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
break;
}
- sal_Bool bOldRunning = bRunning;
- bRunning = sal_True;
+ bool bOldRunning = bRunning;
+ bRunning = true;
p->Interpret();
if (pDocument->GetRecursionHelper().IsInReturn() && eTailParam != SCITP_CLOSE_ITERATION_CIRCLE)
{
@@ -1571,7 +1571,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// #i102616# For single-sheet saving consider only content changes, not format type,
// because format type isn't set on loading (might be changed later)
- sal_Bool bContentChanged = false;
+ bool bContentChanged = false;
// Do not create a HyperLink() cell if the formula results in an error.
if( p->GetError() && pCode->IsHyperLink())
@@ -1581,7 +1581,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
{
bDirty = false;
bTableOpDirty = false;
- bChanged = sal_True;
+ bChanged = true;
}
if (eTailParam == SCITP_FROM_ITERATION && IsDirtyOrInTableOpDirty())
{
@@ -1612,21 +1612,21 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// New error code?
if( p->GetError() != nOldErrCode )
{
- bChanged = sal_True;
+ bChanged = true;
// bContentChanged only has to be set if the file content would be changed
if ( aResult.GetCellResultType() != svUnknown )
- bContentChanged = sal_True;
+ bContentChanged = true;
}
// Different number format?
if( nFormatType != p->GetRetFormatType() )
{
nFormatType = p->GetRetFormatType();
- bChanged = sal_True;
+ bChanged = true;
}
if( nFormatIndex != p->GetRetFormatIndex() )
{
nFormatIndex = p->GetRetFormatIndex();
- bChanged = sal_True;
+ bChanged = true;
}
// In case of changes just obtain the result, no temporary and
@@ -1679,7 +1679,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// no change, see above
}
else
- bContentChanged = sal_True;
+ bContentChanged = true;
}
aResult.Assign( aNewResult);
@@ -1727,9 +1727,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
}
if (bContentChanged && pDocument->IsStreamValid(aPos.Tab()))
{
- // pass bIgnoreLock=sal_True, because even if called from pending row height update,
+ // pass bIgnoreLock=true, because even if called from pending row height update,
// a changed result must still reset the stream flag
- pDocument->SetStreamValid(aPos.Tab(), false, sal_True);
+ pDocument->SetStreamValid(aPos.Tab(), false, true);
}
if ( !pCode->IsRecalcModeAlways() )
pDocument->RemoveFromFormulaTree( this );
@@ -1840,14 +1840,14 @@ void ScFormulaCell::Notify( SvtBroadcaster&, const SfxHint& rHint)
sal_uLong nHint = (p ? p->GetId() : 0);
if (nHint & (SC_HINT_DATACHANGED | SC_HINT_DYING | SC_HINT_TABLEOPDIRTY))
{
- sal_Bool bForceTrack = false;
+ bool bForceTrack = false;
if ( nHint & SC_HINT_TABLEOPDIRTY )
{
bForceTrack = !bTableOpDirty;
if ( !bTableOpDirty )
{
pDocument->AddTableOpFormulaCell( this );
- bTableOpDirty = sal_True;
+ bTableOpDirty = true;
}
}
else
@@ -1881,7 +1881,7 @@ void ScFormulaCell::SetDirty()
{
// Mehrfach-FormulaTracking in Load und in CompileAll
// nach CopyScenario und CopyBlockFromClip vermeiden.
- // Wenn unbedingtes FormulaTracking noetig, vor SetDirty bDirty=sal_False
+ // Wenn unbedingtes FormulaTracking noetig, vor SetDirty bDirty=false
// setzen, z.B. in CompileTokenArray
if ( !bDirty || !pDocument->IsInFormulaTree( this ) )
{
@@ -1905,7 +1905,7 @@ void ScFormulaCell::SetDirtyVar()
void ScFormulaCell::SetDirtyAfterLoad()
{
- bDirty = sal_True;
+ bDirty = true;
if ( !pDocument->GetHardRecalcState() )
pDocument->PutInFormulaTree( this );
}
@@ -1915,7 +1915,7 @@ void ScFormulaCell::SetTableOpDirty()
if ( !IsInChangeTrack() )
{
if ( pDocument->GetHardRecalcState() )
- bTableOpDirty = sal_True;
+ bTableOpDirty = true;
else
{
if ( !bTableOpDirty || !pDocument->IsInFormulaTree( this ) )
@@ -1923,7 +1923,7 @@ void ScFormulaCell::SetTableOpDirty()
if ( !bTableOpDirty )
{
pDocument->AddTableOpFormulaCell( this );
- bTableOpDirty = sal_True;
+ bTableOpDirty = true;
}
pDocument->AppendToFormulaTrack( this );
pDocument->TrackFormulas( SC_HINT_TABLEOPDIRTY );
@@ -1933,7 +1933,7 @@ void ScFormulaCell::SetTableOpDirty()
}
-sal_Bool ScFormulaCell::IsDirtyOrInTableOpDirty() const
+bool ScFormulaCell::IsDirtyOrInTableOpDirty() const
{
return bDirty || (bTableOpDirty && pDocument->IsInInterpreterTableOp());
}
@@ -1954,7 +1954,7 @@ void ScFormulaCell::SetErrCode( sal_uInt16 n )
void ScFormulaCell::AddRecalcMode( ScRecalcMode nBits )
{
if ( (nBits & RECALCMODE_EMASK) != RECALCMODE_NORMAL )
- bDirty = sal_True;
+ bDirty = true;
if ( nBits & RECALCMODE_ONLOAD_ONCE )
{ // OnLoadOnce nur zum Dirty setzen nach Filter-Import
nBits = (nBits & ~RECALCMODE_EMASK) | RECALCMODE_NORMAL;
@@ -2048,7 +2048,7 @@ ScDetectiveRefIter::ScDetectiveRefIter( ScFormulaCell* pCell )
aPos = pCell->aPos;
}
-sal_Bool lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
+bool lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
{
ScSingleRefData& rRef1 = p->GetSingleRef();
if ( rRef1.IsColDeleted() || rRef1.IsRowDeleted() || rRef1.IsTabDeleted()
@@ -2059,14 +2059,14 @@ sal_Bool lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
if ( rRef2.IsColDeleted() || rRef2.IsRowDeleted() || rRef2.IsTabDeleted()
|| !rRef2.Valid() )
- return sal_True;
+ return true;
}
return false;
}
-sal_Bool ScDetectiveRefIter::GetNextRef( ScRange& rRange )
+bool ScDetectiveRefIter::GetNextRef( ScRange& rRange )
{
- sal_Bool bRet = false;
+ bool bRet = false;
ScToken* p = GetNextRefToken();
if( p )
{
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index b69d2af4f8f0..afbba01096e6 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -188,7 +188,7 @@ void ScEditCell::SetTextObject( const EditTextObject* pObject,
{
sal_uLong nControl = rEngine.GetControlWord();
const sal_uLong nSpellControl = EE_CNTRL_ONLINESPELLING | EE_CNTRL_ALLOWBIGOBJS;
- sal_Bool bNewControl = ( (nControl & nSpellControl) != nSpellControl );
+ bool bNewControl = ( (nControl & nSpellControl) != nSpellControl );
if ( bNewControl )
rEngine.SetControlWord( nControl | nSpellControl );
rEngine.SetText( *pObject );
@@ -493,19 +493,19 @@ bool lcl_isReference(const FormulaToken& rToken)
}
-sal_Bool ScFormulaCell::IsEmpty()
+bool ScFormulaCell::IsEmpty()
{
MaybeInterpret();
return aResult.GetCellResultType() == formula::svEmptyCell;
}
-sal_Bool ScFormulaCell::IsEmptyDisplayedAsString()
+bool ScFormulaCell::IsEmptyDisplayedAsString()
{
MaybeInterpret();
return aResult.IsEmptyDisplayedAsString();
}
-sal_Bool ScFormulaCell::IsValue()
+bool ScFormulaCell::IsValue()
{
MaybeInterpret();
return aResult.IsValue();
@@ -558,7 +558,7 @@ const ScMatrix* ScFormulaCell::GetMatrix()
return aResult.GetMatrix().get();
}
-sal_Bool ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
+bool ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
{
switch ( cMatrixFlag )
{
@@ -576,7 +576,7 @@ sal_Bool ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
if ( rRef.Valid() )
{
rPos.Set( rRef.nCol, rRef.nRow, rRef.nTab );
- return sal_True;
+ return true;
}
}
}
@@ -632,7 +632,7 @@ sal_uInt16 ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
ScBaseCell* pCell;
ScAddress aAdr( aOrg );
aAdr.IncCol();
- sal_Bool bCont = sal_True;
+ bool bCont = true;
do
{
pCell = pDocument->GetCell( aAdr );
@@ -649,7 +649,7 @@ sal_uInt16 ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
} while ( bCont );
aAdr = aOrg;
aAdr.IncRow();
- bCont = sal_True;
+ bCont = true;
do
{
pCell = pDocument->GetCell( aAdr );
@@ -749,7 +749,7 @@ sal_uInt16 ScFormulaCell::GetRawError()
return aResult.GetResultError();
}
-sal_Bool ScFormulaCell::HasOneReference( ScRange& r ) const
+bool ScFormulaCell::HasOneReference( ScRange& r ) const
{
pCode->Reset();
ScToken* p = static_cast<ScToken*>(pCode->GetNextReferenceRPN());
@@ -763,7 +763,7 @@ sal_Bool ScFormulaCell::HasOneReference( ScRange& r ) const
r.aEnd.Set( aProv.Ref2.nCol,
aProv.Ref2.nRow,
aProv.Ref2.nTab );
- return sal_True;
+ return true;
}
else
return false;
@@ -823,7 +823,7 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const
return false;
}
-sal_Bool ScFormulaCell::HasRelNameReference() const
+bool ScFormulaCell::HasRelNameReference() const
{
pCode->Reset();
ScToken* t;
@@ -832,12 +832,12 @@ sal_Bool ScFormulaCell::HasRelNameReference() const
if ( t->GetSingleRef().IsRelName() ||
(t->GetType() == formula::svDoubleRef &&
t->GetDoubleRef().Ref2.IsRelName()) )
- return sal_True;
+ return true;
}
return false;
}
-sal_Bool ScFormulaCell::HasColRowName() const
+bool ScFormulaCell::HasColRowName() const
{
pCode->Reset();
return (pCode->GetNextColRowName() != NULL);
@@ -863,8 +863,8 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pUndoCellPos )
aUndoPos = *pUndoCellPos;
ScAddress aOldPos( aPos );
-// sal_Bool bPosChanged = sal_False; // ob diese Zelle bewegt wurde
- sal_Bool bIsInsert = false;
+// bool bPosChanged = false; // ob diese Zelle bewegt wurde
+ bool bIsInsert = false;
if (eUpdateRefMode == URM_INSDEL)
{
bIsInsert = (nDx >= 0 && nDy >= 0 && nDz >= 0);
@@ -917,9 +917,9 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
aOldPos.Set( nCol - nDx, nRow - nDy, nTab - nDz );
}
- sal_Bool bHasRefs = false;
- sal_Bool bHasColRowNames = false;
- sal_Bool bOnRefMove = false;
+ bool bHasRefs = false;
+ bool bHasColRowNames = false;
+ bool bOnRefMove = false;
if ( !pDocument->IsClipOrUndo() )
{
pCode->Reset();
@@ -962,7 +962,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
bOnRefMove = (bValChanged || (aPos != aOldPos));
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
- sal_Bool bColRowNameCompile, bHasRelName, bNewListening, bInDeleteUndo;
+ bool bColRowNameCompile, bHasRelName, bNewListening, bInDeleteUndo;
if ( bHasRefs )
{
// Upon Insert ColRowNames have to be recompiled in case the
@@ -987,12 +987,12 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pR )
{ // definiert
if ( pR->GetRange(1).aStart.Row() == nRow1 )
- bColRowNameCompile = sal_True;
+ bColRowNameCompile = true;
}
else
{ // on the fly
if ( rRef.nRow + 1 == nRow1 )
- bColRowNameCompile = sal_True;
+ bColRowNameCompile = true;
}
}
if ( nDx > 0 && rRef.IsRowRel() )
@@ -1003,12 +1003,12 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pR )
{ // definiert
if ( pR->GetRange(1).aStart.Col() == nCol1 )
- bColRowNameCompile = sal_True;
+ bColRowNameCompile = true;
}
else
{ // on the fly
if ( rRef.nCol + 1 == nCol1 )
- bColRowNameCompile = sal_True;
+ bColRowNameCompile = true;
}
}
}
@@ -1019,11 +1019,11 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
bColRowNameCompile = bCompile; // evtl. aus Copy-ctor
if ( !bColRowNameCompile )
{
- sal_Bool bMoved = (aPos != aOldPos);
+ bool bMoved = (aPos != aOldPos);
pCode->Reset();
ScToken* t = static_cast<ScToken*>(pCode->GetNextColRowName());
if ( t && bMoved )
- bColRowNameCompile = sal_True;
+ bColRowNameCompile = true;
while ( t && !bColRowNameCompile )
{
ScSingleRefData& rRef = t->GetSingleRef();
@@ -1032,7 +1032,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
{
ScAddress aAdr( rRef.nCol, rRef.nRow, rRef.nTab );
if ( r.In( aAdr ) )
- bColRowNameCompile = sal_True;
+ bColRowNameCompile = true;
}
t = static_cast<ScToken*>(pCode->GetNextColRowName());
}
@@ -1040,11 +1040,11 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
}
else if ( eUpdateRefMode == URM_COPY && bHasColRowNames && bValChanged )
{
- bColRowNameCompile = sal_True;
+ bColRowNameCompile = true;
}
ScChangeTrack* pChangeTrack = pDocument->GetChangeTrack();
if ( pChangeTrack && pChangeTrack->IsInDeleteUndo() )
- bInDeleteUndo = sal_True;
+ bInDeleteUndo = true;
else
bInDeleteUndo = false;
// RelNameRefs are always moved
@@ -1127,7 +1127,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
// UpdateReference calls.
// All replaced shared formula listeners have to be
// established after an Insert or Delete. Do nothing here.
- SetNeedsListening( sal_True);
+ SetNeedsListening( true);
}
else
StartListeningTo( pDocument );
@@ -1135,7 +1135,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
}
if ( bNeedDirty && (!(eUpdateRefMode == URM_INSDEL && bHasRelName) || pRangeData) )
{ // Referenzen abgeschnitten, ungueltig o.ae.?
- sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ bool bOldAutoCalc = pDocument->GetAutoCalc();
// kein Interpret in SubMinimalRecalc wegen evtl. falscher Referenzen
pDocument->SetAutoCalc( false );
SetDirty();
@@ -1149,7 +1149,7 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
void ScFormulaCell::UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets)
{
- sal_Bool bPosChanged = ( aPos.Tab() >= nTable ? sal_True : false );
+ bool bPosChanged = ( aPos.Tab() >= nTable ? true : false );
pCode->Reset();
if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
{
@@ -1174,7 +1174,7 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets)
// If the shared formula contained a named range/formula containing
// an absolute reference to a sheet, those have to be readjusted.
aComp2.UpdateDeleteTab( nTable, false, true, bRefChanged, nNewSheets );
- bCompile = sal_True;
+ bCompile = true;
}
// kein StartListeningTo weil pTab[nTab] noch nicht existiert!
}
@@ -1182,10 +1182,10 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets)
aPos.IncTab();
}
-sal_Bool ScFormulaCell::UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove, SCTAB nSheets)
+bool ScFormulaCell::UpdateDeleteTab(SCTAB nTable, bool bIsMove, SCTAB nSheets)
{
bool bRefChanged = false;
- sal_Bool bPosChanged = ( aPos.Tab() > nTable + nSheets ? sal_True : false );
+ bool bPosChanged = ( aPos.Tab() > nTable + nSheets ? true : false );
pCode->Reset();
if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
{
@@ -1211,8 +1211,8 @@ sal_Bool ScFormulaCell::UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove, SCTAB nS
// an absolute reference to a sheet, those have to be readjusted.
aComp2.UpdateInsertTab( nTable,true, nSheets );
// bRefChanged kann beim letzten UpdateDeleteTab zurueckgesetzt worden sein
- bRefChanged = sal_True;
- bCompile = sal_True;
+ bRefChanged = true;
+ bCompile = true;
}
// kein StartListeningTo weil pTab[nTab] noch nicht korrekt!
}
@@ -1244,7 +1244,7 @@ void ScFormulaCell::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo )
aComp2.CompileTokenArray();
aComp2.MoveRelWrap(pRangeData->GetMaxCol(), pRangeData->GetMaxRow());
aComp2.UpdateMoveTab( nOldPos, nNewPos, true );
- bCompile = sal_True;
+ bCompile = true;
}
// kein StartListeningTo weil pTab[nTab] noch nicht korrekt!
}
@@ -1274,9 +1274,9 @@ void ScFormulaCell::UpdateInsertTabAbs(SCTAB nTable)
}
}
-sal_Bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
+bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
{
- sal_Bool bRet = false;
+ bool bRet = false;
if( !pDocument->IsClipOrUndo() )
{
pCode->Reset();
@@ -1287,7 +1287,7 @@ sal_Bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
if( !rRef1.IsTabRel() )
{
if( (SCsTAB) nTable != rRef1.nTab )
- bRet = sal_True;
+ bRet = true;
else if (nTable != aPos.Tab())
rRef1.nTab = aPos.Tab();
}
@@ -1297,7 +1297,7 @@ sal_Bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
if( !rRef2.IsTabRel() )
{
if( (SCsTAB) nTable != rRef2.nTab )
- bRet = sal_True;
+ bRet = true;
else if (nTable != aPos.Tab())
rRef2.nTab = aPos.Tab();
}
@@ -1308,7 +1308,7 @@ sal_Bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
return bRet;
}
-void ScFormulaCell::UpdateCompile( sal_Bool bForceIfNameInUse )
+void ScFormulaCell::UpdateCompile( bool bForceIfNameInUse )
{
if ( bForceIfNameInUse && !bCompile )
bCompile = pCode->HasNameOrColRowName();
@@ -1321,7 +1321,7 @@ void ScFormulaCell::UpdateCompile( sal_Bool bForceIfNameInUse )
void ScFormulaCell::TransposeReference()
{
- sal_Bool bFound = false;
+ bool bFound = false;
pCode->Reset();
ScToken* t;
while ( ( t = static_cast<ScToken*>(pCode->GetNextReference()) ) != NULL )
@@ -1329,7 +1329,7 @@ void ScFormulaCell::TransposeReference()
ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() && rRef1.IsRowRel() )
{
- sal_Bool bDouble = (t->GetType() == formula::svDoubleRef);
+ bool bDouble = (t->GetType() == formula::svDoubleRef);
ScSingleRefData& rRef2 = (bDouble ? t->GetDoubleRef().Ref2 : rRef1);
if ( !bDouble || (rRef2.IsColRel() && rRef2.IsRowRel()) )
{
@@ -1346,13 +1346,13 @@ void ScFormulaCell::TransposeReference()
rRef2.nRelRow = static_cast<SCROW>(nTemp);
}
- bFound = sal_True;
+ bFound = true;
}
}
}
if (bFound)
- bCompile = sal_True;
+ bCompile = true;
}
void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
@@ -1361,7 +1361,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
EndListeningTo( pDocument );
ScAddress aOldPos = aPos;
- sal_Bool bPosChanged = false; // ob diese Zelle bewegt wurde
+ bool bPosChanged = false; // ob diese Zelle bewegt wurde
ScRange aDestRange( rDest, ScAddress(
static_cast<SCCOL>(rDest.Col() + rSource.aEnd.Row() - rSource.aStart.Row()),
@@ -1375,11 +1375,11 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
SCsTAB nRelPosZ = aOldPos.Tab();
ScRefUpdate::DoTranspose( nRelPosX, nRelPosY, nRelPosZ, pDocument, aDestRange, rSource.aStart );
aOldPos.Set( nRelPosX, nRelPosY, nRelPosZ );
- bPosChanged = sal_True;
+ bPosChanged = true;
}
ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL;
- sal_Bool bRefChanged = false;
+ bool bRefChanged = false;
ScToken* t;
ScRangeData* pShared = NULL;
@@ -1392,7 +1392,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
if (pName)
{
if (pName->IsModified())
- bRefChanged = sal_True;
+ bRefChanged = true;
if (pName->HasType(RT_SHAREDMOD))
pShared = pName;
}
@@ -1400,7 +1400,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
else if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aOldPos );
- sal_Bool bMod;
+ bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1410,7 +1410,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
if ( bMod )
{
t->CalcRelFromAbs( aPos );
- bRefChanged = sal_True;
+ bRefChanged = true;
}
}
}
@@ -1420,14 +1420,14 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = sal_True;
+ bRefChanged = true;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
{
if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aOldPos );
- sal_Bool bMod;
+ bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1450,7 +1450,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
pUndoDoc->PutCell( aPos.Col(), aPos.Row(), aPos.Tab(), pFCell );
}
- bCompile = sal_True;
+ bCompile = true;
CompileTokenArray(); // ruft auch StartListeningTo
SetDirty();
}
@@ -1464,7 +1464,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
{
EndListeningTo( pDocument );
- sal_Bool bRefChanged = false;
+ bool bRefChanged = false;
ScToken* t;
ScRangeData* pShared = NULL;
@@ -1477,7 +1477,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if (pName)
{
if (pName->IsModified())
- bRefChanged = sal_True;
+ bRefChanged = true;
if (pName->HasType(RT_SHAREDMOD))
pShared = pName;
}
@@ -1485,7 +1485,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
else if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aPos );
- sal_Bool bMod;
+ bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1495,7 +1495,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if ( bMod )
{
t->CalcRelFromAbs( aPos );
- bRefChanged = sal_True;
+ bRefChanged = true;
}
}
}
@@ -1505,14 +1505,14 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = sal_True;
+ bRefChanged = true;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
{
if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aPos );
- sal_Bool bMod;
+ bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1527,7 +1527,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if (bRefChanged)
{
- bCompile = sal_True;
+ bCompile = true;
CompileTokenArray(); // ruft auch StartListeningTo
SetDirty();
}
@@ -1535,7 +1535,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
StartListeningTo( pDocument ); // Listener wie vorher
}
-sal_Bool lcl_IsRangeNameInUse(size_t nIndex, ScTokenArray* pCode, ScRangeName* pNames)
+bool lcl_IsRangeNameInUse(size_t nIndex, ScTokenArray* pCode, ScRangeName* pNames)
{
for (FormulaToken* p = pCode->First(); p; p = pCode->Next())
{
@@ -1549,14 +1549,14 @@ sal_Bool lcl_IsRangeNameInUse(size_t nIndex, ScTokenArray* pCode, ScRangeName* p
ScRangeData* pSubName = pNames->findByIndex(p->GetIndex());
if (pSubName && lcl_IsRangeNameInUse(nIndex,
pSubName->GetCode(), pNames))
- return sal_True;
+ return true;
}
}
}
return false;
}
-sal_Bool ScFormulaCell::IsRangeNameInUse(sal_uInt16 nIndex) const
+bool ScFormulaCell::IsRangeNameInUse(sal_uInt16 nIndex) const
{
return lcl_IsRangeNameInUse( nIndex, pCode, pDocument->GetRangeName() );
}
@@ -1594,7 +1594,7 @@ void ScFormulaCell::ReplaceRangeNamesInUse( const ScRangeData::IndexMap& rMap )
if ( nIndex != nNewIndex )
{
p->SetIndex( nNewIndex );
- bCompile = sal_True;
+ bCompile = true;
}
}
}
@@ -1609,7 +1609,7 @@ void ScFormulaCell::CompileDBFormula()
if ( p->GetOpCode() == ocDBArea
|| (p->GetOpCode() == ocName && p->GetIndex() >= SC_START_INDEX_DB_COLL) )
{
- bCompile = sal_True;
+ bCompile = true;
CompileTokenArray();
SetDirty();
break;
@@ -1617,14 +1617,14 @@ void ScFormulaCell::CompileDBFormula()
}
}
-void ScFormulaCell::CompileDBFormula( sal_Bool bCreateFormulaString )
+void ScFormulaCell::CompileDBFormula( bool bCreateFormulaString )
{
// zwei Phasen, muessen (!) nacheinander aufgerufen werden:
// 1. FormelString mit alten Namen erzeugen
// 2. FormelString mit neuen Namen kompilieren
if ( bCreateFormulaString )
{
- sal_Bool bRecompile = false;
+ bool bRecompile = false;
pCode->Reset();
for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() )
{
@@ -1633,11 +1633,11 @@ void ScFormulaCell::CompileDBFormula( sal_Bool bCreateFormulaString )
case ocBad: // DB-Bereich evtl. zugefuegt
case ocColRowName: // falls Namensgleichheit
case ocDBArea: // DB-Bereich
- bRecompile = sal_True;
+ bRecompile = true;
break;
case ocName:
if ( p->GetIndex() >= SC_START_INDEX_DB_COLL )
- bRecompile = sal_True; // DB-Bereich
+ bRecompile = true; // DB-Bereich
break;
default:
; // nothing
@@ -1668,14 +1668,14 @@ void ScFormulaCell::CompileDBFormula( sal_Bool bCreateFormulaString )
}
}
-void ScFormulaCell::CompileNameFormula( sal_Bool bCreateFormulaString )
+void ScFormulaCell::CompileNameFormula( bool bCreateFormulaString )
{
// zwei Phasen, muessen (!) nacheinander aufgerufen werden:
// 1. FormelString mit alten RangeNames erzeugen
// 2. FormelString mit neuen RangeNames kompilieren
if ( bCreateFormulaString )
{
- sal_Bool bRecompile = false;
+ bool bRecompile = false;
pCode->Reset();
for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() )
{
@@ -1687,7 +1687,7 @@ void ScFormulaCell::CompileNameFormula( sal_Bool bCreateFormulaString )
break;
default:
if ( p->GetType() == svIndex )
- bRecompile = sal_True; // RangeName
+ bRecompile = true; // RangeName
}
}
if ( bRecompile )
@@ -1722,7 +1722,7 @@ void ScFormulaCell::CompileColRowNameFormula()
{
if ( p->GetOpCode() == ocColRowName )
{
- bCompile = sal_True;
+ bCompile = true;
CompileTokenArray();
SetDirty();
break;