BOOL to bool conversion.

This commit is contained in:
Kohei Yoshida 2011-03-07 16:40:08 -05:00
parent eb888e66ee
commit 22ffbb90a3
3 changed files with 18 additions and 18 deletions

View file

@ -433,7 +433,7 @@ public:
ScRangeData* UpdateReference( UpdateRefMode eUpdateRefMode, ScRangeData* UpdateReference( UpdateRefMode eUpdateRefMode,
const ScAddress& rOldPos, const ScRange&, const ScAddress& rOldPos, const ScRange&,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz, SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
BOOL& rChanged, BOOL& rRefSizeChanged ); bool& rChanged, bool& rRefSizeChanged );
/// Only once for converted shared formulas, /// Only once for converted shared formulas,
/// token array has to be compiled afterwards. /// token array has to be compiled afterwards.

View file

@ -912,10 +912,10 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if( bHasRefs || bOnRefMove ) if( bHasRefs || bOnRefMove )
{ {
ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL; ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL;
BOOL bValChanged; bool bValChanged = false;
ScRangeData* pRangeData; ScRangeData* pRangeData;
BOOL bRangeModified; // any range, not only shared formula bool bRangeModified = false; // any range, not only shared formula
BOOL bRefSizeChanged; bool bRefSizeChanged = false;
if ( bHasRefs ) if ( bHasRefs )
{ {
ScCompiler aComp(pDocument, aPos, *pCode); ScCompiler aComp(pDocument, aPos, *pCode);

View file

@ -4100,9 +4100,9 @@ void ScCompiler::MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddr
ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
const ScAddress& rOldPos, const ScRange& r, const ScAddress& rOldPos, const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz, SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
BOOL& rChanged, BOOL& rRefSizeChanged ) bool& rChanged, bool& rRefSizeChanged )
{ {
rChanged = rRefSizeChanged = FALSE; rChanged = rRefSizeChanged = false;
if ( eUpdateRefMode == URM_COPY ) if ( eUpdateRefMode == URM_COPY )
{ // Normally nothing has to be done here since RelRefs are used, also { // Normally nothing has to be done here since RelRefs are used, also
// SharedFormulas don't need any special handling, except if they // SharedFormulas don't need any special handling, except if they
@ -4124,7 +4124,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
SingleDoubleRefModifier( rRef ).Ref() ) SingleDoubleRefModifier( rRef ).Ref() )
!= UR_NOTHING != UR_NOTHING
) )
rChanged = TRUE; rChanged = true;
} }
} }
// Check for SharedFormulas. // Check for SharedFormulas.
@ -4164,7 +4164,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if (!bValid) if (!bValid)
{ {
pRangeData = pName; pRangeData = pName;
rChanged = TRUE; rChanged = true;
} }
} }
} }
@ -4193,7 +4193,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
{ {
pRangeData = pName; // maybe need a replacement of shared with own code pRangeData = pName; // maybe need a replacement of shared with own code
#if ! SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE #if ! SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
rChanged = TRUE; rChanged = true;
#endif #endif
} }
} }
@ -4218,7 +4218,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
SingleDoubleRefModifier( SingleDoubleRefModifier(
t->GetSingleRef()).Ref()) t->GetSingleRef()).Ref())
!= UR_NOTHING) != UR_NOTHING)
rChanged = TRUE; rChanged = true;
} }
break; break;
default: default:
@ -4231,11 +4231,11 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
aPos, r, nDx, nDy, nDz, aPos, r, nDx, nDy, nDz,
t->GetDoubleRef()) != UR_NOTHING) t->GetDoubleRef()) != UR_NOTHING)
{ {
rChanged = TRUE; rChanged = true;
if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols || if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols ||
rRef.Ref2.nRow - rRef.Ref1.nRow != nRows || rRef.Ref2.nRow - rRef.Ref1.nRow != nRows ||
rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs) rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs)
rRefSizeChanged = TRUE; rRefSizeChanged = true;
} }
} }
} }
@ -4269,7 +4269,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( rRef.IsRelName() ) if ( rRef.IsRelName() )
{ {
ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, aMod.Ref() ); ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, aMod.Ref() );
rChanged = TRUE; rChanged = true;
} }
else else
{ {
@ -4278,7 +4278,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
r, nDx, nDy, nDz, aMod.Ref() ) r, nDx, nDy, nDz, aMod.Ref() )
!= UR_NOTHING != UR_NOTHING
) )
rChanged = TRUE; rChanged = true;
} }
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE #if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
if ( bEasyShared ) if ( bEasyShared )
@ -4299,7 +4299,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( rRef.Ref1.IsRelName() || rRef.Ref2.IsRelName() ) if ( rRef.Ref1.IsRelName() || rRef.Ref2.IsRelName() )
{ {
ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, rRef ); ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, rRef );
rChanged = TRUE; rChanged = true;
} }
else else
{ {
@ -4308,12 +4308,12 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
!= UR_NOTHING != UR_NOTHING
) )
{ {
rChanged = TRUE; rChanged = true;
if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols || if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols ||
rRef.Ref2.nRow - rRef.Ref1.nRow != nRows || rRef.Ref2.nRow - rRef.Ref1.nRow != nRows ||
rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs) rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs)
{ {
rRefSizeChanged = TRUE; rRefSizeChanged = true;
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE #if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
bEasyShared = FALSE; bEasyShared = FALSE;
#endif #endif
@ -4339,7 +4339,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( bEasyShared ) if ( bEasyShared )
pRangeData = 0; pRangeData = 0;
else else
rChanged = TRUE; rChanged = true;
} }
#endif #endif
#undef SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE #undef SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE