summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Bankston <daniel.e.bankston@gmail.com>2012-05-11 10:37:44 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-15 11:28:08 +0200
commit82f91c909a49d3556e771f420c48d41eb71f506f (patch)
tree821b8ad2a38b448c42f3621357767db5a4272d57
parent1158a8b833441b33ca30cfc1fae9f8f283745d81 (diff)
Get cell instance once and use c++style cast
Change-Id: I0a2a06b805ba1fd7d03937e767568d622615b059
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index e9cefd7dd77f..835324b2c13c 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -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();