Kaydet (Commit) 6b6e82c5 authored tarafından Eike Rathke's avatar Eike Rathke

convert the final double result to FormulaDoubleToken

... if it was a FormulaTypedDoubleToken, and set type information.

Change-Id: I2debcda4650d621311d5d7670ffdedecb2e25a04
üst a59c4e26
......@@ -4299,10 +4299,24 @@ StackVar ScInterpreter::Interpret()
nGlobalError = pCur->GetError();
break;
case svDouble :
if ( nFuncFmtType == css::util::NumberFormat::UNDEFINED )
{
nRetTypeExpr = css::util::NumberFormat::NUMBER;
nRetIndexExpr = 0;
// If typed, pop token to obtain type information and
// push a plain untyped double so the result token to
// be transfered to the formula cell result does not
// unnecessarily duplicate the information.
if (pCur->GetDoubleType())
{
const double fVal = PopDouble();
if (nCurFmtType != nFuncFmtType)
nRetIndexExpr = 0; // carry format index only for matching type
nRetTypeExpr = nFuncFmtType = nCurFmtType;
PushTempToken( new FormulaDoubleToken( fVal));
}
if ( nFuncFmtType == css::util::NumberFormat::UNDEFINED )
{
nRetTypeExpr = css::util::NumberFormat::NUMBER;
nRetIndexExpr = 0;
}
}
break;
case svString :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment