tdf#50950 sort out Calc (ISO)WEEKNUM functions

Winfried Donkers W.Donkers at
Thu Sep 17 03:07:59 PDT 2015

Hi Eike,

I have a problem with backward compatibility. Hopefully I forgot something and the solution is simple.

When opening a Calc document, it may contain ISOWEEKNUM with 1 argument (the 'real' ISOWEEKNUM function, LO version with the patch I'm working on) or with 2 arguments (older version LO, WEEKNUM saved as ISOWEEKNUM).
I want to change the opcode from ocIsoWeeknum to ocWeek when it is an ODF-document and when the number of arguments is 2. 
I currently tried formula/source/core/api/token.cxx because there I can get type (ODF), opcode and argument count. But I can't change the opcode. I tried the dirty FormulaToken;;NewOpCode(), but encounter problems with the const PrivateAccess& argument.

Do you have suggestions to provide backward compatibility?


More information about the LibreOffice mailing list