sc/source/filter/oox/worksheethelper.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
New commits: commit 09c095bbc9dd44d9dc46e09d6fd75d56edda42d8 Author: Daniel Bankston <daniel.e.banks...@gmail.com> Date: Fri May 11 12:04:14 2012 -0500 Replace extra XFormulaTokens call with direct ScDocument Change-Id: Ib7469c4214687021efdcfb9bbf162ee6eb6404c4 diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 835324b..84b1678 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() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits