diff options
author | Daniel Bankston <daniel.e.bankston@gmail.com> | 2012-05-11 12:04:14 -0500 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-05-15 11:28:08 +0200 |
commit | 844bba4bb44966a1d27f55c4e511eb7f5887d147 (patch) | |
tree | b7489439367105b2cb38f948987151f29a171072 /sc/source | |
parent | 82f91c909a49d3556e771f420c48d41eb71f506f (diff) |
Replace extra XFormulaTokens call with direct ScDocument
Change-Id: Ib7469c4214687021efdcfb9bbf162ee6eb6404c4
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/oox/worksheethelper.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 835324b2c13c..84b167848e1f 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -69,6 +69,7 @@ #include "sharedstringsbuffer.hxx" #include "sheetdatabuffer.hxx" #include "stylesbuffer.hxx" +#include "tokenuno.hxx" #include "unitconverter.hxx" #include "viewsettings.hxx" #include "workbooksettings.hxx" @@ -1587,9 +1588,13 @@ void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichStri void WorksheetHelper::putFormulaTokens( const CellAddress& rAddress, const ApiTokenSequence& rTokens ) const { - Reference< XFormulaTokens > xTokens( getCell( rAddress ), UNO_QUERY ); - OSL_ENSURE( xTokens.is(), "WorksheetHelper::putFormulaTokens - missing token interface" ); - if( xTokens.is() ) xTokens->setTokens( rTokens ); + ScDocument& rDoc = getScDocument(); + ScTokenArray aTokenArray; + 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() |