Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Winfried,

On Thursday, 2013-11-28 12:23:56 +0100, Winfried Donkers wrote:

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.

Indeed, that was the problem with these functions :-(

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?

What follows is just a brainstorm, there may be quirks..

Over a long term, spanned over several releases:

0) current release (4.2)

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

2) in the then next release (4.4) activate CEILING_ODF in the
   FunctionWizard, deprecate CEILING saying CEILING_ODF should be used
   and that functions will be renamed in future, but offer both this
   time.

3) in next release (4.5) in the UI rename CEILING to CEILING_OOO and
   rename CEILING_ODF to CEILING. Function descriptions should state
   that.

4) next release (4.6) deactivate CEILING_OOO in the FunctionWizard.
   Users will still see that function name when such a document was
   loaded, but will use CEILING else.

5) next release (4.7) drop CEILING_OOO completely. Users hopefully will
   not miss it ;-)

By the time 4.5 will be published hopefully most users will have
switched from 4.2 to at least 4.3 so will be able to read the new
CEILING of 4.5 as CEILING_ODF

  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

Attachment: pgptOz7auJQaA.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.