summaryrefslogtreecommitdiff
path: root/sc/source/core/data/conditio.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-04 22:24:39 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-06 20:40:21 -0500
commita09f7fddb4e847b35e6d47a45403c649152dd671 (patch)
tree4d411affe2ec89e289fbefacf8db00ee2572a8ee /sc/source/core/data/conditio.cxx
parentdf8257faf64b01f3de26277742195693ddfe29fc (diff)
Modify ScFormulaCell's ctor to take a const reference to ScTokenArray.
Instead of a pointer to ScTokenArray, and then clone its instance. If the token array gets cloned in ctor, take a const reference. Change-Id: I280fd7eb9eaea9905dbf954a1ace904ab0814dfe
Diffstat (limited to 'sc/source/core/data/conditio.cxx')
-rw-r--r--sc/source/core/data/conditio.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index c0d6f0d1c0fc..cd1d2dfef97a 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -414,13 +414,13 @@ void ScConditionEntry::MakeCells( const ScAddress& rPos ) // Formelzel
{
if ( pFormula1 && !pFCell1 && !bRelRef1 )
{
- pFCell1 = new ScFormulaCell( mpDoc, rPos, pFormula1 );
+ pFCell1 = new ScFormulaCell(mpDoc, rPos, *pFormula1);
pFCell1->StartListeningTo( mpDoc );
}
if ( pFormula2 && !pFCell2 && !bRelRef2 )
{
- pFCell2 = new ScFormulaCell( mpDoc, rPos, pFormula2 );
+ pFCell2 = new ScFormulaCell(mpDoc, rPos, *pFormula2);
pFCell2->StartListeningTo( mpDoc );
}
}
@@ -630,7 +630,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
ScFormulaCell* pEff1 = pFCell1;
if ( bRelRef1 )
{
- pTemp1 = new ScFormulaCell( mpDoc, rPos, pFormula1 ); // ohne Listening
+ pTemp1 = pFormula1 ? new ScFormulaCell(mpDoc, rPos, *pFormula1) : new ScFormulaCell(mpDoc, rPos);
pEff1 = pTemp1;
}
if ( pEff1 )
@@ -660,7 +660,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
ScFormulaCell* pEff2 = pFCell2; //@ 1!=2
if ( bRelRef2 )
{
- pTemp2 = new ScFormulaCell( mpDoc, rPos, pFormula2 ); // ohne Listening
+ pTemp2 = pFormula2 ? new ScFormulaCell(mpDoc, rPos, *pFormula2) : new ScFormulaCell(mpDoc, rPos);
pEff2 = pTemp2;
}
if ( pEff2 )