Get cell instance once and use c++style cast

Change-Id: I0a2a06b805ba1fd7d03937e767568d622615b059
This commit is contained in:
Daniel Bankston
2012-05-11 10:37:44 -05:00
committed by Markus Mohrhard
parent 1158a8b833
commit 82f91c909a

View File

@@ -1558,9 +1558,10 @@ void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fVal
ScDocument& rDoc = getScDocument();
ScAddress aCellPos;
ScUnoConversion::FillScAddress( aCellPos, rAddress );
if ( rDoc.GetCellType( aCellPos ) == CELLTYPE_FORMULA )
ScBaseCell* pBaseCell = rDoc.GetCell( aCellPos );
if ( pBaseCell->GetCellType() == CELLTYPE_FORMULA )
{
ScFormulaCell* pCell = (ScFormulaCell *)rDoc.GetCell( aCellPos );
ScFormulaCell* pCell = static_cast< ScFormulaCell* >( pBaseCell );
pCell->SetHybridDouble( fValue );
pCell->ResetDirty();
pCell->ResetChanged();