[Libreoffice-bugs] [Bug 113768] New: Meaning of last VDB function argument ("Type") inverted in help tip, LO help and variable name
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Nov 11 09:02:08 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=113768
Bug ID: 113768
Summary: Meaning of last VDB function argument ("Type")
inverted in help tip, LO help and variable name
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: klasse at partyheld.de
According to the requirement in [1] (ODF 1.2), the meaning of the last argument
of Calc's VDB function is:
> noSwitch is an optional argument that you include if you do not want VDB to
> switch to straight-line depreciation for the remaining useful life.
> Normally, declining-balance switches to such a straight-line calculation
> when it is greater than the declining-balance calculation.
> If noSwitch is FALSE() or omitted, VDB automatically switches to straight-
> line depreciation when that is greater than declining-balance depreciation.
> If noSwitch is TRUE(), VDB never switches to straight-line depreciation.
Current situation:
------------------
That last argument currently has the following description in LO:
I) In the help tip on entering the VDB function in a cell in Calc (with cursor
on the last function argument):
> Do not alter. Type = 1 denotes switch to linear depreciation, type = 0 do
> not switch.
II) In LO help ([2])
> Type = 1 means a switch to linear depreciation. In Type = 0 no switch is
> made.
III) In LO code:
- bType variable name in [4]
- nType variable name in [5]
The issue is that in the above cases I and II, the description of the argument
is the opposite to the requirement. Although the logic seems to be implemented
correctly in the code with respect to the values 0 (false) and 1 (true).
Proposal:
---------
For the cases I (help tip) and II (LO help) above:
- Correct the tip and the help content according to the requirement. (I.e.,
invert the meaning of the content.)
- Change the name of the argument from "Type" to "No_switch", as, e.g., in MS
Office (see [2]). Which is close to name in the requirement.
For the case III above, as alignment:
- Rename the variables to bNoSwitch and nNoSwitch respectively
References:
-----------
[1]
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018330_715980110
[2]
https://support.office.com/en-us/article/VDB-function-dde4e207-f3fa-488d-91d2-66d55e861d73
[3] https://help.libreoffice.org/Calc/Financial_Functions_Part_Three#VDB
[4]
https://gerrit.libreoffice.org/gitweb?p=core.git;a=blob;f=sc/source/core/tool/interpr2.cxx;h=d4c27a4d0fd5ccf73a1f81b46a0155b1135dd17e;hb=HEAD#l1798
[5]
https://gerrit.libreoffice.org/gitweb?p=core.git;a=blob;f=sc/source/core/opencl/opinlinefun_finacial.cxx;h=38eb41db02db218f56b13630670b29c59c40567b;hb=HEAD#l1535
Correctness of the implemented logic tested on:
-----------------------------------------------
Version: 5.3.7.2
Build ID: 1:5.3.7~rc2-0ubuntu0.17.04.1~lo0
CPU Threads: 4; OS Version: Linux 4.10; UI Render: default; VCL: gtk3; Layout
Engine: new;
Locale: de-DE (en_US.UTF-8); Calc: group
Version 5.3.6.1 Portable on Win10 64-bit
And compared to MS Excel 2016
--
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/20171111/f636ea9b/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list