Get cell instance once and use c++style cast
Change-Id: I0a2a06b805ba1fd7d03937e767568d622615b059
This commit is contained in:
committed by
Markus Mohrhard
parent
1158a8b833
commit
82f91c909a
@@ -1558,9 +1558,10 @@ void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fVal
|
|||||||
ScDocument& rDoc = getScDocument();
|
ScDocument& rDoc = getScDocument();
|
||||||
ScAddress aCellPos;
|
ScAddress aCellPos;
|
||||||
ScUnoConversion::FillScAddress( aCellPos, rAddress );
|
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->SetHybridDouble( fValue );
|
||||||
pCell->ResetDirty();
|
pCell->ResetDirty();
|
||||||
pCell->ResetChanged();
|
pCell->ResetChanged();
|
||||||
|
Reference in New Issue
Block a user