Kaydet (Commit) ac409adb authored tarafından Daniel Bankston's avatar Daniel Bankston Kaydeden (comit) Markus Mohrhard

Pass forumlaResult value directly to ScDocument

- Removed extra call to XCell2 and instead passed formula result directly to ScDocument.

Change-Id: Ifea731e44f12a048b76f8d5a4cc2d0619a56bbbc
üst 14f23858
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment