summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-05-03 03:41:12 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-02 03:24:55 +0200
commit326fc28c4180bad32858bbc4ae4883043d4d0750 (patch)
treecb7ef4442dddeff87d01eed3a40831655de7139d
parentf41c3e5071df3562de58ce6bb19723d2a1aa3af5 (diff)
let us use scoped_ptr when possible
Change-Id: Ia8199bdc63ee732bada51687df195c9ab9cae9aa
-rw-r--r--sc/source/ui/app/inputhdl.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index aa761b7054eb..3a4f2b9d2a67 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1308,7 +1308,7 @@ static String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScA
if (rFormula.Len())
{
- ScFormulaCell* pCell = new ScFormulaCell( pDoc, rPos, rFormula );
+ boost::scoped_ptr<ScFormulaCell> pCell(new ScFormulaCell( pDoc, rPos, rFormula ));
// HACK! um bei ColRowNames kein #REF! zu bekommen,
// wenn ein Name eigentlich als Bereich in die Gesamt-Formel
@@ -1325,8 +1325,7 @@ static String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScA
aBraced.append('(');
aBraced.append(rFormula);
aBraced.append(')');
- delete pCell;
- pCell = new ScFormulaCell( pDoc, rPos, aBraced.makeStringAndClear() );
+ pCell.reset(new ScFormulaCell( pDoc, rPos, aBraced.makeStringAndClear() ));
}
else
bColRowName = false;
@@ -1370,7 +1369,6 @@ static String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScA
}
else
aValue = ScGlobal::GetErrorString(nErrCode);
- delete pCell;
}
return aValue;