sc/source/filter/oox/worksheethelper.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
New commits: commit f356710356a7bc8b524ef12c862777fb8ee17782 Author: Daniel Bankston <daniel.e.banks...@gmail.com> Date: Fri May 11 10:37:44 2012 -0500 Get cell instance once and use c++style cast Change-Id: I0a2a06b805ba1fd7d03937e767568d622615b059 diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index e9cefd7..835324b 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(); commit e0c744f3a9de2e6927d8af7c5127ca8c6a26ae0c Author: Daniel Bankston <daniel.e.banks...@gmail.com> Date: Fri May 11 10:14:43 2012 -0500 Use ScUnoConversion instead of casts for address conversion Change-Id: Ia3fbe15aeed9a3cb7928ada1a438b190f8fbb017 diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 49ab86a..e9cefd7 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -1548,7 +1548,9 @@ void WorksheetHelper::setManualRowHeight( sal_Int32 nRow ) void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) const { - getScDocument().SetValue( (SCCOL)rAddress.Column, (SCROW)rAddress.Row, (SCTAB)rAddress.Sheet, fValue ); + ScAddress aAddress; + ScUnoConversion::FillScAddress( aAddress, rAddress ); + getScDocument().SetValue( aAddress.Col(), aAddress.Row(), aAddress.Tab(), fValue ); } void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fValue ) const @@ -1567,7 +1569,9 @@ void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fVal void WorksheetHelper::putString( const CellAddress& rAddress, const OUString& rText ) const { - getScDocument().SetString( (SCCOL)rAddress.Column, (SCROW)rAddress.Row, (SCTAB)rAddress.Sheet, rText ); + ScAddress aAddress; + ScUnoConversion::FillScAddress( aAddress, rAddress ); + getScDocument().SetString( aAddress.Col(), aAddress.Row(), aAddress.Tab(), rText ); } void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichString& rString, const Font* pFirstPortionFont ) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits