From 28a63715f4434d39e90022f99bc2d88cea2dcd91 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 1 Aug 2016 20:26:44 +0200 Subject: [PATCH] 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 --- formula/source/core/api/FormulaCompiler.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index b317f31abe7f..62547c86b907 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -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