fdo69552 backward compatibility with optional arguments in calc functions

Winfried Donkers W.Donkers at dci-electronics.nl
Thu Nov 28 03:23:56 PST 2013


Hi Eike,

>The problem I have here is that with CEILING() and FLOOR() the second argument (significance) is optional 
>and has its default value (1 or -1) depending on the sign of the first argument (value). 
>How do I obtain this value in formula/source/core/api/token.cxx FormulaMissingContext::AddMoreArgs() 
>and FormulaMissingContext::AddMissing()?

>The same problem may apply in sc/source/filter/excel/xeformula.cxx XclExpFmlaCompImpl::AppendTrailingParam()

I fear I have the answer: I can't make the change to ODF-compliance backwards-compatible.
When the optional 2nd argument (significance) is not entered by the user it has a value depending on the value of 
the 1st argument. But this 1st argument can contain a reference, i.e. is not known at the time of writing the file...

This looks like the WEEKNUM/ISOWEEKNUM problem: to make the formulas comply with ODF1.2, backwards 
compatibilty is broken... :(

What is the best way to proceed?

Winfried


More information about the LibreOffice mailing list