sc/source/filter/oox/worksheethelper.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
New commits: commit 1ef72f5bf48516113b0f3b25e52d124229a792b2 Author: Daniel Bankston <daniel.e.banks...@gmail.com> Date: Thu May 10 17:12:09 2012 -0500 Removed sneaky evil tabs. Change-Id: Ibf27039e2449e5452f8401b298ee30fe13682c89 diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 642fa4d..49ab86a 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -1554,8 +1554,8 @@ void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) con void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fValue ) const { ScDocument& rDoc = getScDocument(); - ScAddress aCellPos; - ScUnoConversion::FillScAddress( aCellPos, rAddress ); + ScAddress aCellPos; + ScUnoConversion::FillScAddress( aCellPos, rAddress ); if ( rDoc.GetCellType( aCellPos ) == CELLTYPE_FORMULA ) { ScFormulaCell* pCell = (ScFormulaCell *)rDoc.GetCell( aCellPos ); commit 2ee400c8dcd6088eccd4bcb70ffb0342ac002cbc Author: Daniel Bankston <daniel.e.banks...@gmail.com> Date: Thu May 10 17:01:37 2012 -0500 Pass forumlaResult value directly to ScDocument - Removed extra call to XCell2 and instead passed formula result directly to ScDocument. Change-Id: Ifea731e44f12a048b76f8d5a4cc2d0619a56bbbc diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 0f6fb0a..642fa4d 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -56,8 +56,10 @@ #include "oox/helper/propertyset.hxx" #include "addressconverter.hxx" #include "autofilterbuffer.hxx" +#include "cell.hxx" #include "commentsbuffer.hxx" #include "condformatbuffer.hxx" +#include "convuno.hxx" #include "document.hxx" #include "drawingfragment.hxx" #include "drawingmanager.hxx" @@ -1551,9 +1553,16 @@ void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) con void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fValue ) const { - Reference< XCell2 > xCell( getCell( rAddress ), UNO_QUERY ); - OSL_ENSURE( xCell.is(), "WorksheetHelper::putFormulaResult - missing cell interface" ); - if( xCell.is() ) xCell->setFormulaResult( fValue ); + ScDocument& rDoc = getScDocument(); + ScAddress aCellPos; + ScUnoConversion::FillScAddress( aCellPos, rAddress ); + if ( rDoc.GetCellType( aCellPos ) == CELLTYPE_FORMULA ) + { + ScFormulaCell* pCell = (ScFormulaCell *)rDoc.GetCell( aCellPos ); + pCell->SetHybridDouble( fValue ); + pCell->ResetDirty(); + pCell->ResetChanged(); + } } void WorksheetHelper::putString( const CellAddress& rAddress, const OUString& rText ) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits