fdo69552 backward compatibility with optional arguments in calc functions

Winfried Donkers W.Donkers at dci-electronics.nl
Wed Dec 4 00:39:57 PST 2013


Hi Eike,

>> I shall have a look at the code and see if your stepped approach is easy to
>> apply. Also, I shall have a look if and how this has effect on the Excel 2010 functions
>> CEILING.PRECISE, ISO.CEILING and FLOOR.PRECISE.
>It might in future if we want to map those (or some) to their ODFF equivalent.

>>>1) for the next release (4.3) implement a second function named a little
>>>   different in the UI (e.g. CEILING_ODF) with the correct handling of
>>>   parameters, do not offer it in the FunctionWizard yet (there's a flag
>>>   in scfuncs.src to suppress functions and their descriptions) and when
>>>   reading from an ODF document a function that does not have the
>>>   optional but so far expected parameter map it to the new function
>>>   (CEILING_ODF), else map it to the old function (CEILING). Both are
>>>   saved as CEILING again in ODF without intervention, not changing
>>>   anything. This enables a release to read and handle future versions
>>>   (or correct ODF files).

formula/source/core/resource/core_resource.src has a one-to-one relation of opcode and function name.
Can you tell me how to map a function in a saved ODF document to one or another function? 
And if this can be done, can't we do this the other way round as well?
I mean using the function CEILING in the UI and saving it as CEILING or CEILING_ODF depending on the used arguments and when reading a file converting both CEILING and CEILING_ODF to CEILING in the UI.
This way the user only has to use 1 function name now and in the future.
And with next releases we can gradually skip the CEILING_ODF in the ODF files.

>> Where would be a good place to put the 'to Do list' (planned changes per release per function)?
>> In the code, in a wiki, which file/page?
>Wiki would be best, as a subpage of .../Development/Calc/ and categorize
>it as [[Category:Calc|{{SUBPAGENAME}}]]
>Maybe also as a subpage of .../Development/Calc/Spreadsheet_Functions/

As the wikis are public from the moment it is written, I intend to send the text to you/the mailinglist  for review first.
But, of course, the changes for each release need to be defined first ;)

Winfried



More information about the LibreOffice mailing list