diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-05-23 23:17:49 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-06-02 03:25:49 +0200 |
commit | fda007e69f16aaebe81ee7b9ac8ea4742801bb85 (patch) | |
tree | 4cbc7954cddde4479c126f8c609bf2dd9e046a81 | |
parent | abbe4414613ac26010cf378a6e52f4e6ce18f3c3 (diff) |
use static_cast instead of c style cast
Change-Id: I9194d5fb9fc42247cf43bfcd0327472eeca7c297
-rw-r--r-- | sc/source/core/data/column.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index dfbc21d3115e..a8f8cbb5550b 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2183,13 +2183,13 @@ void ScColumn::CalcAll() ScBaseCell* pCell = maItems[i].pCell; if (pCell->GetCellType() == CELLTYPE_FORMULA) { + ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell); #if OSL_DEBUG_LEVEL > 1 // after F9 ctrl-F9: check the calculation for each FormulaTree - ScFormulaCell* pFCell = (ScFormulaCell*)pCell; double nOldVal, nNewVal; nOldVal = pFCell->GetValue(); #endif - ((ScFormulaCell*)pCell)->Interpret(); + pFCell->Interpret(); #if OSL_DEBUG_LEVEL > 1 if ( pFCell->GetCode()->IsRecalcModeNormal() ) nNewVal = pFCell->GetValue(); @@ -2214,9 +2214,10 @@ void ScColumn::CompileAll() SCROW nRow = maItems[i].nRow; // for unconditional compilation // bCompile=true and pCode->nError=0 - ((ScFormulaCell*)pCell)->GetCode()->SetCodeError( 0 ); - ((ScFormulaCell*)pCell)->SetCompile( true ); - ((ScFormulaCell*)pCell)->CompileTokenArray(); + ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell); + pFCell->GetCode()->SetCodeError( 0 ); + pFCell->SetCompile( true ); + pFCell->CompileTokenArray(); if ( nRow != maItems[i].nRow ) Search( nRow, i ); // Listener deleted/inserted? } @@ -2234,7 +2235,7 @@ void ScColumn::CompileXML( ScProgress& rProgress ) if ( pCell->GetCellType() == CELLTYPE_FORMULA ) { SCROW nRow = maItems[i].nRow; - ((ScFormulaCell*)pCell)->CompileXML( rProgress ); + static_cast<ScFormulaCell*>(pCell)->CompileXML( rProgress ); if ( nRow != maItems[i].nRow ) Search( nRow, i ); // Listener deleted/inserted? } |