summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-04-26 10:54:34 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-04-29 00:15:00 +0200
commit4e3e171262aed0e52fa76158950d5be770249e80 (patch)
tree6728a385ea19ed30b0c5f4369c03178bbb54bd16 /sc
parent14a96e28c9dac64cfa0d1cf1c6fc3fece8ed6b0c (diff)
use boost::scoped_ptr and direct values
Change-Id: I70be33bc4843a19a24ce2fcb0cda094684557c04
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index a92abe79e25e..b7d8ed3fe372 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -283,15 +283,14 @@ void ScMyTables::AddMatrixRange(
ScMarkData aMark;
aMark.SetMarkArea( aScRange );
aMark.SelectTable( aScRange.aStart.Tab(), sal_True );
- ScTokenArray* pCode = new ScTokenArray;
+ boost::scoped_ptr<ScTokenArray> pCode(new ScTokenArray);
pCode->AddStringXML( rFormula );
if( (eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) && !rFormulaNmsp.isEmpty() )
pCode->AddStringXML( rFormulaNmsp );
pDoc->InsertMatrixFormula(
- aScRange.aStart.Col(), aScRange.aStart.Row(),
- aScRange.aEnd.Col(), aScRange.aEnd.Row(),
- aMark, EMPTY_OUSTRING, pCode, eGrammar, false );
- delete pCode;
+ nStartColumn, nStartRow,
+ nEndColumn, nEndRow,
+ aMark, EMPTY_OUSTRING, pCode.get(), eGrammar, false );
pDoc->IncXMLImportedFormulaCount( rFormula.getLength() );
}