From 77ccf8a9ca527ff261218208c1b838922001ce9b Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 14 Jul 2016 23:13:18 +0200 Subject: store WEEKNUM_OOO as ORG.LIBREOFFICE.WEEKNUM_OOO Now that the previous two releases can read it. Change-Id: Ie04c7b0fd94f5906b678d738370e4fc0696da79c --- formula/source/core/api/token.cxx | 17 ----------------- formula/source/core/resource/core_resource.src | 2 -- 2 files changed, 19 deletions(-) (limited to 'formula') diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 072216b955cb..f8d7a9db78ea 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -1066,7 +1066,6 @@ inline bool MissingConventionODF::isRewriteNeeded( OpCode eOp ) const case ocAddress: case ocLogNormDist: case ocNormDist: - case ocWeeknumOOo: return true; case ocMissing: case ocLog: @@ -1514,22 +1513,6 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( const MissingConvention & ( pCur->GetOpCode() == ocCeil ? ocCeil_Math : ocFloor_Math ) ); pNewArr->Add( pToken ); } - else if (pCur->GetOpCode() == ocWeeknumOOo && - rConv.getConvention() == MissingConvention::FORMULA_MISSING_CONVENTION_ODFF) - { - /* XXX TODO FIXME: Remove this special handling (also - * ocWeeknumOOo in MissingConventionODF::isRewriteNeeded() - * above) in 5.3 or later, this still abuses the ODFF - * ISOWEEKNUM function to store the old WEEKNUM (now - * WEEKNUM_OOO) cases that can't be mapped to the new WEEKNUM - * or ISOWEEKNUM, as 5.0 and earlier always stored the old - * WEEKNUM as ISOWEEKNUM. Ugly nasty ... - * Later write ORG.LIBREOFFICE.WEEKNUM_OOO, see - * formula/source/core/resource/core_resource.src - * SC_OPCODE_WEEKNUM_OOO */ - FormulaToken *pToken = new FormulaByteToken( ocIsoWeeknum, pCur->GetByte(), pCur->IsInForceArray()); - pNewArr->Add( pToken ); - } else pNewArr->AddToken( *pCur ); } diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src index d32a578f76bf..a953db0c36d6 100644 --- a/formula/source/core/resource/core_resource.src +++ b/formula/source/core/resource/core_resource.src @@ -405,8 +405,6 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF String SC_OPCODE_BETA_INV_MS { Text = "COM.MICROSOFT.BETA.INV" ; }; String SC_OPCODE_WEEK { Text = "WEEKNUM" ; }; String SC_OPCODE_ISOWEEKNUM { Text = "ISOWEEKNUM" ; }; - /* WEEKNUM_OOO currently (5.1) not written, see - * formula/source/core/api/token.cxx FormulaTokenArray::RewriteMissing() */ String SC_OPCODE_WEEKNUM_OOO { Text = "ORG.LIBREOFFICE.WEEKNUM_OOO" ; }; String SC_OPCODE_EASTERSUNDAY { Text = "ORG.OPENOFFICE.EASTERSUNDAY" ; }; String SC_OPCODE_GET_DAY_OF_WEEK { Text = "WEEKDAY" ; }; -- cgit