fdo#77300: Don't re-compile formulas when the hybrid formula is not there.

Change-Id: I9b0f8d031fec08bb8d92333ff67074fdc739e034
This commit is contained in:
Kohei Yoshida
2014-04-11 00:43:18 -04:00
parent bdc8d5f9e7
commit 66c6a3bfc9

View File

@@ -661,16 +661,19 @@ public:
ScFormulaCell* pCell = rEntry.mpCell;
OUString aFormula = pCell->GetHybridFormula();
// Create token array from formula string.
ScCompiler aComp(mrCompileFormulaCxt, pCell->aPos);
ScTokenArray* pNewCode = aComp.CompileString(aFormula);
if (!aFormula.isEmpty())
{
// Create token array from formula string.
ScCompiler aComp(mrCompileFormulaCxt, pCell->aPos);
ScTokenArray* pNewCode = aComp.CompileString(aFormula);
// Generate RPN tokens.
ScCompiler aComp2(mpDoc, pCell->aPos, *pNewCode);
aComp2.CompileTokenArray();
// Generate RPN tokens.
ScCompiler aComp2(mpDoc, pCell->aPos, *pNewCode);
aComp2.CompileTokenArray();
pCell->SetCode(pNewCode);
pCell->SetDirty();
pCell->SetCode(pNewCode);
pCell->SetDirty();
}
}
}
};