fdo69552 backward compatibility with optional arguments in calc functions

Winfried Donkers W.Donkers at dci-electronics.nl
Thu Dec 5 23:26:00 PST 2013


Hi Eike,

>> 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.

I wil start trying.

>> 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.

I'm afraid I don't understand. 
AFAICS your proposed change produces CEILING or CEILING_ODF in the file, depending on the number of arguments used. All other users than version 4.3 and up will not know CEILING_ODF.
My suggestion is identical as far as the file is concerned, only I think one UI function would be needed (CEILING) as other users than version 4.3 and up will not know CEILING_ODF anyway.

This is what I understand from your proposal:
UI	->	FILE
CEILING	CEILING
CEILING_ODF	CEILING or CEILING_ODF

FILE	->	UI
CEILING	CEILING
CEILING_ODF	CEILING_ODF or unknown

This is my suggestion:
UI	->	FILE
CEILING	CEILING or CEILING_ODF

FILE	->	UI
CEILING	CEILING
CEILING_ODF	CEILING or unknown

>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..

I'm not afraid of the wiki, I know my flaws (as you do, by now) and I don't want to burden the whole world with it ;-)

>Anyhow, I'll create a page and initialize it with my previous
>brainstorm.

Great. I applicable I will update it when the time comes.

Winfried



More information about the LibreOffice mailing list