Hi Winfried, On Wednesday, 2012-06-20 11:45:08 +0200, Winfried Donkers wrote:
I just uploaded a diff file and test document to bug50950.
Please see my Splinter review in https://bugs.freedesktop.org/show_bug.cgi?id=50950#c3
The ODFF1.2-compliant functions work and I would like some help from you with importing old-style formulas from documents saved with previous LibO versions. Your plan from June 7 (see below) seems clear to me, but I don't know where the import formula complier is located and how to best change it.
It seems one point didn't make it across: I did not suggest to create yet another (internal) WEEKNUM function. My original plan was: * enhance WEEKNUM_ADD to support all ODF WEEKNUM modes * in the UI rename WEEKNUM to ISOWEEKNUM * change ISOWEEKNUM to accept only one parameter * during import's formula compile step for ISOWEEKNUM check if a second argument is provided * if so and if it is a constant value !=1 strip the argument (the Monday case that was and is real ISO 8601) * if it is a constant value ==1 map the function to WEEKNUM * there's a slight chance that a user wanted exactly the behavior "ISO but Sunday" resulting from the current undocumented implementation details, which isn't supported by ODF WEEKNUM definition, but I think that should be a very rare case, if at all, and is neglectable * if it is not a constant (i.e. computed) argument do nothing and let the interpreter complain about the second parameter So we'd end up with only two functions, in the UI that would be WEEKNUM_ADD and ISOWEEKNUM. We can then rename WEEKNUM_ADD to WEEKNUM. I'll come back to the compiler details later. The problem there may be mapping from internal (ISOWEEKNUM) to Add-In (WEEKNUM). Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
Attachment:
pgpJylWMGLJRt.pgp
Description: PGP signature