[Libreoffice-commits] .: Branch 'libreoffice-4-0' - 2 commits - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jan 4 11:14:43 PST 2013
sc/source/filter/oox/formulabuffer.cxx | 13 +++++++------
sc/source/filter/xml/xmlcelli.cxx | 6 +++---
2 files changed, 10 insertions(+), 9 deletions(-)
New commits:
commit 7b1ab8f2cf8b07e713c8511984c55e30d70c12d0
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Jan 4 20:06:07 2013 +0100
don't forget the dependency tree during OOXML import, fdo#58863
Change-Id: I8863faddd1bca0b55764d09c4ef9f959264b53ae
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index 70efcaf..bd8598f 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -118,12 +118,13 @@ void FormulaBuffer::finalizeImport()
void FormulaBuffer::applyCellFormula( ScDocument& rDoc, const ApiTokenSequence& rTokens, const ::com::sun::star::table::CellAddress& rAddress )
{
- 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 );
+ ScTokenArray aTokenArray;
+ ScAddress aCellPos;
+ ScUnoConversion::FillScAddress( aCellPos, rAddress );
+ ScTokenConversion::ConvertToTokenArray( rDoc, aTokenArray, rTokens );
+ ScFormulaCell* pNewCell = new ScFormulaCell( &rDoc, aCellPos, &aTokenArray );
+ pNewCell->StartListeningTo( &rDoc );
+ rDoc.PutCell( aCellPos, pNewCell, sal_True );
}
void FormulaBuffer::applyCellFormulas( const std::vector< TokenAddressItem >& rVector )
commit 4e0766f1707434aa34fcd71601d5a74c3865a9df
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Jan 4 20:04:54 2013 +0100
don't forget the dependency tree during formula import
Change-Id: I0a9137e4f72477c0cffde6056d8952aa08e13f35
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index d58b9f5..5e745e9 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 )
More information about the Libreoffice-commits
mailing list