[Libreoffice-bugs] [Bug 119035] INDIRECT uses R1C1 syntax when uses 2-argument syntax with empty second argument

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 19 05:56:45 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=119035

--- Comment #6 from himajin100000 at gmail.com ---
How LibreOffice handles missing parameter(but how should Libreoffice handle is
another question):

https://opengrok.libreoffice.org/xref/core/sc/inc/compiler.hxx?r=346ba4be#174
https://opengrok.libreoffice.org/xref/core/sc/source/core/tool/compiler.cxx?r=85f141b5#4546

https://opengrok.libreoffice.org/xref/core/formula/source/core/api/FormulaCompiler.cxx?r=ff4d6a7e#1493
https://opengrok.libreoffice.org/xref/core/formula/source/core/api/FormulaCompiler.cxx?r=ff4d6a7e#1506
https://opengrok.libreoffice.org/xref/core/formula/source/core/api/FormulaCompiler.cxx?r=ff4d6a7e#1521

https://opengrok.libreoffice.org/xref/core/formula/source/core/api/FormulaCompiler.cxx?r=ff4d6a7e#1602
https://opengrok.libreoffice.org/xref/core/formula/source/core/api/FormulaCompiler.cxx?r=ff4d6a7e#1631
https://opengrok.libreoffice.org/xref/core/formula/source/core/api/FormulaCompiler.cxx?r=ff4d6a7e#1661

https://opengrok.libreoffice.org/xref/core/include/formula/token.hxx?r=346ba4be#394
https://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr4.cxx?r=a0a8c958#2129

Evaluation stack is, as its name indicates, "stack" and LIFO

https://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr1.cxx?r=346ba4be#7901

=INDIRECT("R1C1";) => two arguments(svString and svMissing) and the second
parameter is treated as 0

=INDIRECT("R1C1") => only one argument, as the number of parameters is not 2,
line 7904 will not be reached

in the same way

=POWER(,5) is POWER(0,5)
=POWER(5,) is POWER(5,0)

but 
=EXP() is not =EXP(0),so  Err:511 will be produced.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180819/e9f9b919/attachment-0001.html>


More information about the Libreoffice-bugs mailing list