Bug Hunting Session
Bug 94214 - Function FINV exported as "COM.MICROSOFT.F.INV" although it is spec'ed in OpenFormula
Summary: Function FINV exported as "COM.MICROSOFT.F.INV" although it is spec'ed in Ope...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: Other All
: medium minor
Assignee: Winfried Donkers (retired)
URL:
Whiteboard: target:5.1.0 target:5.0.3 target:4.4....
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-14 17:11 UTC by Daniel Rentz
Modified: 2016-10-25 19:21 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Rentz 2015-09-14 17:11:29 UTC
There are 4 related functions in Excel and LibreOffice, all of them specified in Open Formula 1.2:

1) Excel's "FDIST" is OpenFormula's "LEGACY.FDIST", shown in the UI as "FDIST" (XL and LO).
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#LEGACY_FDIST

2) Excel's "_xlfn.F.DIST" is OpenFormula's "FDIST", shown in the UI as "F.DIST" (XL and LO).
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#FDIST

3) Excel's "FINV" is OpenFormula's "LEGACY.FINV", shown in the UI as "FINV" (XL and LO).
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#LEGACY_FINV

4) Excel's "_xlfn.F.INV" is OpenFormula's "FINV", shown in the UI as "F.INV" (XL and LO).
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#FINV

However: LibreOffice writes the UI function "F.INV" (4) as "COM.MICROSOFT.F.INV" instead of "FINV", which is inconsistent to "F.DIST" (2) written out as "FDIST", and not according to the OF spec.

This may be considered nitpicking... :) But may become a compatibility issue with other spreadsheet applications claiming to supprt OF 1.2.
Comment 1 Cor Nouws 2015-09-14 18:13:52 UTC
(In reply to Daniel Rentz from comment #0)

> This may be considered nitpicking... :) 

Not at all ;)
Comment 2 Eike Rathke 2015-09-15 09:23:56 UTC
Hey Daniel ;-) thanks.

@Winfried:
Maybe something for you? Seems we messed that up somewhere..
Comment 3 Daniel Rentz 2015-09-15 20:51:04 UTC
FYI: related https://bz.apache.org/ooo/show_bug.cgi?id=126519

...
Hi Eike :)
Comment 4 Winfried Donkers (retired) 2015-09-16 05:31:46 UTC
(In reply to Eike Rathke from comment #2)
> Hey Daniel ;-) thanks.
> 
> @Winfried:
> Maybe something for you? Seems we messed that up somewhere..

Will pick up this one.
Comment 5 Daniel Rentz 2015-09-16 19:13:53 UTC
Of course, LO should be able to load both function names from ODS files (FINV and COM.MICROSOFT.F.INV).

To improve compatibility, you may even consider to support some of the wrong function names written by AOO as mentioned in https://bz.apache.org/ooo/show_bug.cgi?id=126519.
Comment 6 Eike Rathke 2015-09-16 20:21:57 UTC
The wrong function names mentioned there are already ironed out in LibreOffice, the correct function names are written and the old wrong ones still accepted.
See also http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/compiler.cxx#2628
Comment 7 Daniel Rentz 2015-09-22 18:23:24 UTC
(In reply to Eike Rathke from comment #6)
> The wrong function names mentioned there are already ironed out in
> LibreOffice, the correct function names are written and the old wrong ones
> still accepted.
> See also
> http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/compiler.
> cxx#2628

Thanks, looks good :)
Comment 8 Winfried Donkers (retired) 2015-09-23 05:38:15 UTC
I checked with LO versions 4.4.5 and 5.1(master):
UI:              saved as ODF:
F.INV            COM.MICROSOFT.F.INV
FINV             LEGACY.FINV
F.DIST           COM.MICROSOFT.F.DIST
FDIST            LEGACY.FDIST

This looks consistent to me.
Comment 9 Winfried Donkers (retired) 2015-09-23 06:07:48 UTC
(In reply to Winfried Donkers from comment #8)
> I checked with LO versions 4.4.5 and 5.1(master):

My comment was saved too soon, here's the correct version:

I checked with LO versions 4.4.5 and 5.0.2:
UI:              saved as ODF (4.4.5):   saved as ODF (5.0.2)
F.INV            COM.MICROSOFT.F.INV     COM.MICROSOFT.F.INV
FINV             LEGACY.FINV             LEGACY.FINV
F.DIST           COM.MICROSOFT.F.DIST    FDIST
FDIST            LEGACY.FDIST            LEGACY.FDIST

However, this bug report states version 4.2 and bug 40835 did fix an inconsistency issue as of version 4.4/5.0.
The fix is that in LO4.4 FDIST in ODF documents is recognised and that in LO5 the UI function F.INV is saved as FDIST in ODF documents (plus that COM.MICROSOFT.F.DIST is still recognised).

So, It seems that whilst fixing the incorrectness of ODFF FDIST, the similar incorrectness of ODFF FINV was overlooked.
Fixing should be straightforward, I'll start with it after final checking.
Comment 10 Commit Notification 2015-09-27 09:18:28 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2cc040878ce816b0353224910333e33a20983359&h=libreoffice-4-4

follow up of tdf#94214

It will be available in 4.4.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2015-09-28 12:30:37 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5ba0f79e246ea970d16f366640c2ccd87e1d8786

tdf#94214 ODFF function FINV incorrectly saved as COM.MICROSOFT.F.INV

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2015-09-28 13:04:25 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4a33435137e4d9fb7a85c527a37edc6780170d9a&h=libreoffice-5-0

follow up of tdf#94214

It will be available in 5.0.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2015-11-23 11:03:28 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=656667ae1c23a35800bb60f9aea09b6a963c2f8a&h=libreoffice-5-0

tdf#94214 ODFF function FINV incorrectly saved as COM.MICROSOFT.F.INV

It will be available in 5.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.