Pass forumlaResult value directly to ScDocument
- Removed extra call to XCell2 and instead passed formula result directly to ScDocument. Change-Id: Ifea731e44f12a048b76f8d5a4cc2d0619a56bbbc
This commit is contained in:
committed by
Markus Mohrhard
parent
14f23858c6
commit
ac409adb19
@@ -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
|
||||
|
Reference in New Issue
Block a user