keep a broken expression as originally broken

The invalid expression ISOWEEKNUM(A1,0+) lead to a replacement with
ISOWEEKNUM(A1+) which of course is also wrong but loses the original
context. Just exchange the call and convert to WEEKNUM_OOO(A1,0+)
without fiddling with the parameters.

Change-Id: Id1c42d3ba084382e09c164b6c35db996f2b0197a
This commit is contained in:
Eike Rathke 2016-08-01 20:26:44 +02:00
parent 04e7304fc1
commit 28a63715f4

View File

@ -1423,6 +1423,7 @@ void FormulaCompiler::Factor()
if (pc >= 2 && (pArr->nIndex == nSepPos + 3 || pArr->nIndex == nSepPos + 4) &&
pArr->pCode[nSepPos+1]->GetType() == svDouble &&
pArr->pCode[nSepPos+1]->GetDouble() != 1.0 &&
pArr->pCode[nSepPos+2]->GetOpCode() == ocClose &&
pArr->RemoveToken( nSepPos, 2) == 2)
{
// Remove the ocPush/svDouble just removed also from