fdo69552 backward compatibility with optional arguments in calc functions
Eike Rathke
erack at redhat.com
Thu Dec 5 04:53:16 PST 2013
Hi Winfried,
On Wednesday, 2013-12-04 09:39:57 +0100, Winfried Donkers wrote:
> >>>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?
Has to be done as special cases in the compiler, when compiling probably
in FormulaCompiler::Factor(), when creating names from opcodes in
FormulaCompiler::CreateStringFromToken(). The additional UI strings
could be placed in an extra Resource of
formula/source/core/resource/core_resource.src to not interfere with the
existing mapping.
> And if this can be done, can't we do this the other way round as well?
Sure, but we don't want that ;-)
> 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.
No, saving as another function additionally to CEILING would mean that
all other consumers of the file would not know it.
> >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 ;)
Don't be afraid of the wiki ;-) The first version version of a page
doesn't have to be perfect, we can always edit it, nothing to be scared
of..
Anyhow, I'll create a page and initialize it with my previous
brainstorm.
Eike
--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key ID: 0x65632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20131205/a3c4e868/attachment-0001.pgp>
More information about the LibreOffice
mailing list