Kaydet (Commit) 63b5af3d authored tarafından Markus Mohrhard's avatar Markus Mohrhard

don't forget the dependency tree during formula import

Change-Id: I0a9137e4f72477c0cffde6056d8952aa08e13f35
üst 86024f7f
...@@ -1025,16 +1025,16 @@ void ScXMLTableRowCellContext::PutFormulaCell( const ScAddress& rCellPos ) ...@@ -1025,16 +1025,16 @@ void ScXMLTableRowCellContext::PutFormulaCell( const ScAddress& rCellPos )
if ( aText[0] == '=' && aText.getLength() > 1 ) if ( aText[0] == '=' && aText.getLength() > 1 )
{ {
// temporary formula string as string tokens // temporary formula string as string tokens
ScTokenArray* pCode = new ScTokenArray; boost::scoped_ptr<ScTokenArray> pCode(new ScTokenArray);
pCode->AddStringXML( aText ); pCode->AddStringXML( aText );
if( (eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) && !aFormulaNmsp.isEmpty() ) if( (eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) && !aFormulaNmsp.isEmpty() )
pCode->AddStringXML( aFormulaNmsp ); pCode->AddStringXML( aFormulaNmsp );
pDoc->IncXMLImportedFormulaCount( aText.getLength() ); pDoc->IncXMLImportedFormulaCount( aText.getLength() );
pNewCell = new ScFormulaCell( pDoc, rCellPos, pCode, eGrammar, MM_NONE ); pNewCell = new ScFormulaCell( pDoc, rCellPos, pCode.get(), eGrammar, MM_NONE );
delete pCode;
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pNewCell); ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pNewCell);
pFCell->StartListeningTo(pDoc);
SetFormulaCell(pFCell); SetFormulaCell(pFCell);
} }
else if ( aText[0] == '\'' && aText.getLength() > 1 ) else if ( aText[0] == '\'' && aText.getLength() > 1 )
......
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