Kaydet (Commit) fda007e6 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

use static_cast instead of c style cast

Change-Id: I9194d5fb9fc42247cf43bfcd0327472eeca7c297
üst abbe4414
...@@ -2183,13 +2183,13 @@ void ScColumn::CalcAll() ...@@ -2183,13 +2183,13 @@ void ScColumn::CalcAll()
ScBaseCell* pCell = maItems[i].pCell; ScBaseCell* pCell = maItems[i].pCell;
if (pCell->GetCellType() == CELLTYPE_FORMULA) if (pCell->GetCellType() == CELLTYPE_FORMULA)
{ {
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
// after F9 ctrl-F9: check the calculation for each FormulaTree // after F9 ctrl-F9: check the calculation for each FormulaTree
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
double nOldVal, nNewVal; double nOldVal, nNewVal;
nOldVal = pFCell->GetValue(); nOldVal = pFCell->GetValue();
#endif #endif
((ScFormulaCell*)pCell)->Interpret(); pFCell->Interpret();
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
if ( pFCell->GetCode()->IsRecalcModeNormal() ) if ( pFCell->GetCode()->IsRecalcModeNormal() )
nNewVal = pFCell->GetValue(); nNewVal = pFCell->GetValue();
...@@ -2214,9 +2214,10 @@ void ScColumn::CompileAll() ...@@ -2214,9 +2214,10 @@ void ScColumn::CompileAll()
SCROW nRow = maItems[i].nRow; SCROW nRow = maItems[i].nRow;
// for unconditional compilation // for unconditional compilation
// bCompile=true and pCode->nError=0 // bCompile=true and pCode->nError=0
((ScFormulaCell*)pCell)->GetCode()->SetCodeError( 0 ); ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
((ScFormulaCell*)pCell)->SetCompile( true ); pFCell->GetCode()->SetCodeError( 0 );
((ScFormulaCell*)pCell)->CompileTokenArray(); pFCell->SetCompile( true );
pFCell->CompileTokenArray();
if ( nRow != maItems[i].nRow ) if ( nRow != maItems[i].nRow )
Search( nRow, i ); // Listener deleted/inserted? Search( nRow, i ); // Listener deleted/inserted?
} }
...@@ -2234,7 +2235,7 @@ void ScColumn::CompileXML( ScProgress& rProgress ) ...@@ -2234,7 +2235,7 @@ void ScColumn::CompileXML( ScProgress& rProgress )
if ( pCell->GetCellType() == CELLTYPE_FORMULA ) if ( pCell->GetCellType() == CELLTYPE_FORMULA )
{ {
SCROW nRow = maItems[i].nRow; SCROW nRow = maItems[i].nRow;
((ScFormulaCell*)pCell)->CompileXML( rProgress ); static_cast<ScFormulaCell*>(pCell)->CompileXML( rProgress );
if ( nRow != maItems[i].nRow ) if ( nRow != maItems[i].nRow )
Search( nRow, i ); // Listener deleted/inserted? Search( nRow, i ); // Listener deleted/inserted?
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment