Bug 95010 - INFO function not fully supporting ODF 1.2 specification
Summary: INFO function not fully supporting ODF 1.2 specification
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0
Keywords:
Depends on:
Blocks: ODF-import
  Show dependency treegraph
 
Reported: 2015-10-13 13:20 UTC by tagezi
Modified: 2016-10-25 19:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (11.58 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-10-13 14:09 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tagezi 2015-10-13 13:20:42 UTC
In standard of ODF 1.2 describes the INFO function like:

Evaluators shall support at least the following categories:
"directory"
"memavail"
"memused"
"numfile"
"osversion"
"origin"
"recalc"
"release"
"system"
"totmem"
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018368_715980110

But it is supported only five of them.
http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr5.cxx#3242

I think that it should support all options.
Comment 1 Markus Mohrhard 2015-10-13 13:32:35 UTC
As Eike explained on IRC this is not a bug. We decided not to implement more.
Comment 2 Yousuf Philips (jay) (retired) 2015-10-13 14:09:15 UTC
Created attachment 119557 [details]
sample

Excel no longer supports these memory values - "memavail", "memused", and "totmem"

https://support.office.com/en-us/article/INFO-function-725f259a-0e4b-49b3-8b52-58815c69acae?omkt=en-US&ui=en-US&rs=en-US&ad=US

Markus stated that no calc dev wants to support this function, which is why only a few of its features were implemented. He also stated that 'osversion' always outputting 'Windows (32-bit) NT 5.01' was a decision taken to support some legacy documents.

The LO code shows that 'numfile' always outputs 1, though it should output the number of worksheets in a file. So only 3 of the features (recalc, release, system) actually output something useful in this function.
Comment 3 Eike Rathke 2015-10-26 19:33:44 UTC
(In reply to Yousuf (Jay) Philips from comment #2)
> The LO code shows that 'numfile' always outputs 1, though it should output
> the number of worksheets in a file. So only 3 of the features (recalc,
> release, system) actually output something useful in this function.

It's even more convoluted.. in Excel "numfile" returns the number of all sheets in all open files because historically one sheet was one file before Workbooks existed that could have more than one sheet. So actually that was the number of open files, which may had made sense when the number of open files on a system was limited to 255 (or less?). How helpful is that nowadays? Though this is also specified in ODFF with "Number of active worksheets in files".

Maybe we could do that as well, I'm not sure about "get all docshells of type Calc and count sheets", but as said I consider this totally unimportant.

For unsupported but known arguments we should return #N/A error instead of Err:502 (illegal argument). Not necessary to reopen this bug, I'll just use the bug number.
Comment 4 Commit Notification 2015-11-05 21:51:59 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

return #N/A for defined but unsupported arguments, tdf#95010 related

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.