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


Hi Eike, all,

I have been concentrating on converting IFS functions to their equivalent with nested IF functions, e.g. IFS(b1;r1;b2;r2) to IF(b1;r1;IF(b2;r2;#NA)).

I now think I know where to insert ocIf tokens in the IFS-function string when looking at FormulaCompiler::Factor(), but I don't know how to insert a FormulaTokenRef in the code and not destroy the stack, jump array or other at the same time.

For some time thought that FormulaTokenArray::RewriteMissing(...) might be a better and easier place, but this function is only called after ScInterpreter::Interpret(), so that has no use.


Do you have any suggestions where and how I might try to insert these extra ocIf, ocSep and #NA tokens (and replace ocIfs with ocIf).

With ocSwitch I also must be able to copy (the result of) the first argument on top of the stack before the next ocIf is executed. The equivalent in those case would be SWITCH(x;b1;r1;b2;r2) converted to IF(x=b1;r1;IF(x=b2;r2;#NA)).

Winfried


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.