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

Replace extra XFormulaTokens call with direct ScDocument

Change-Id: Ib7469c4214687021efdcfb9bbf162ee6eb6404c4
üst 82f91c90
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#include "sharedstringsbuffer.hxx" #include "sharedstringsbuffer.hxx"
#include "sheetdatabuffer.hxx" #include "sheetdatabuffer.hxx"
#include "stylesbuffer.hxx" #include "stylesbuffer.hxx"
#include "tokenuno.hxx"
#include "unitconverter.hxx" #include "unitconverter.hxx"
#include "viewsettings.hxx" #include "viewsettings.hxx"
#include "workbooksettings.hxx" #include "workbooksettings.hxx"
...@@ -1587,9 +1588,13 @@ void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichStri ...@@ -1587,9 +1588,13 @@ void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichStri
void WorksheetHelper::putFormulaTokens( const CellAddress& rAddress, const ApiTokenSequence& rTokens ) const void WorksheetHelper::putFormulaTokens( const CellAddress& rAddress, const ApiTokenSequence& rTokens ) const
{ {
Reference< XFormulaTokens > xTokens( getCell( rAddress ), UNO_QUERY ); ScDocument& rDoc = getScDocument();
OSL_ENSURE( xTokens.is(), "WorksheetHelper::putFormulaTokens - missing token interface" ); ScTokenArray aTokenArray;
if( xTokens.is() ) xTokens->setTokens( rTokens ); ScAddress aCellPos;
ScUnoConversion::FillScAddress( aCellPos, rAddress );
ScTokenConversion::ConvertToTokenArray( rDoc, aTokenArray, rTokens );
ScBaseCell* pNewCell = new ScFormulaCell( &rDoc, aCellPos, &aTokenArray );
rDoc.PutCell( aCellPos, pNewCell, sal_True );
} }
void WorksheetHelper::initializeWorksheetImport() void WorksheetHelper::initializeWorksheetImport()
......
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