tdf124710 convert Calc functions IFS and SWITCH to jump functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread 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

_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux