From fc305bb6d656736bedc2f89789e18d8c9a3bbf2c Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 14 Jul 2016 23:16:41 +0200 Subject: strip second parameter from ISOWEEKNUM if literal double != 1.0 For other arguments convert to WEEKNUM_OOO, which now can be saved as ORG.LIBREOFFICE.WEEKNUM_OOO. Change-Id: I63fd3df1ec4ccaa535a1437200854d8734544a2c --- formula/source/core/api/FormulaCompiler.cxx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 1379cba1aed1..3143525635f5 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1412,12 +1412,6 @@ void FormulaCompiler::Factor() pFacToken->SetByte( nSepCount ); if (nSepCount == 2) { - /* XXX TODO FIXME: activate this conversion to ISOWEEKNUM - * when at least two releases can actually handle the real - * ISOWEEKNUM with one parameter, i.e. for 5.3 or 5.2 if - * 5.0.5 is patched. Until then unconditionally use the - * WEEKNUM_OOO compatibility function. */ -#if 0 // An old mode!=1 indicates ISO week, remove argument if // literal double value and keep function. Anything else // can not be resolved, there exists no "like ISO but week @@ -1440,11 +1434,6 @@ void FormulaCompiler::Factor() // compatibility function. pFacToken->NewOpCode( ocWeeknumOOo, FormulaToken::PrivateAccess()); } -#else - (void) nSepPos; - // Use compatibility function. - pFacToken->NewOpCode( ocWeeknumOOo, FormulaToken::PrivateAccess()); -#endif } PutCode( pFacToken ); } -- cgit