summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-04 20:04:54 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-04 20:12:50 +0100
commit63b5af3d1f355a5f9649302058b32124ab262a20 (patch)
treee46917047bcb55166cc5d996896b4e33601a0063
parent86024f7ff841e016c4b4616802eaadc744a5b8bf (diff)
don't forget the dependency tree during formula import
Change-Id: I0a9137e4f72477c0cffde6056d8952aa08e13f35
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 58919b087e20..2369dce6b213 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1025,16 +1025,16 @@ void ScXMLTableRowCellContext::PutFormulaCell( const ScAddress& rCellPos )
if ( aText[0] == '=' && aText.getLength() > 1 )
{
// temporary formula string as string tokens
- ScTokenArray* pCode = new ScTokenArray;
+ boost::scoped_ptr<ScTokenArray> pCode(new ScTokenArray);
pCode->AddStringXML( aText );
if( (eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) && !aFormulaNmsp.isEmpty() )
pCode->AddStringXML( aFormulaNmsp );
pDoc->IncXMLImportedFormulaCount( aText.getLength() );
- pNewCell = new ScFormulaCell( pDoc, rCellPos, pCode, eGrammar, MM_NONE );
- delete pCode;
+ pNewCell = new ScFormulaCell( pDoc, rCellPos, pCode.get(), eGrammar, MM_NONE );
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pNewCell);
+ pFCell->StartListeningTo(pDoc);
SetFormulaCell(pFCell);
}
else if ( aText[0] == '\'' && aText.getLength() > 1 )