Bug 149378 - Outer functions returning an array/matrix occupy and display only the top left cell/element if not explicitly entered as array formula (MUNIT, TRANSPOSE, MINVERSE, ...)
Summary: Outer functions returning an array/matrix occupy and display only the top lef...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-30 13:34 UTC by Juliano
Modified: 2022-06-03 21:09 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Picture showing the bug (117.09 KB, image/png)
2022-05-30 13:34 UTC, Juliano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juliano 2022-05-30 13:34:24 UTC
Created attachment 180471 [details]
Picture showing the bug

When I use the command =MINVERSE(A1:C3) (a 3x3 example matrix) the result only shows the first element A(1,1) of the inverse matrix. But when I use the button  or the menu option "insert function" and select from there (the same interval), then it shows the complete inverse matrix. I'm sending a picture.

The same happens with the portuguese version of this function MATRIZ.INVERSO().
Comment 1 Eike Rathke 2022-05-30 14:20:42 UTC
This is the same for most functions that return an array/matrix (e.g. MUNIT() or TRANSPOSE()), the result is not spilled into neighbouring cells and only the top left value is displayed.

However, the full result is displayed when array formula closure is used when entering the formula, i.e. Shift+Ctrl+Enter instead of just Enter. (which is the same the Function Wizard does).
Comment 2 Juliano 2022-05-30 20:37:11 UTC
Well, I've just tried that and it didn't work. Only one single value it's displayed.
Comment 3 Juliano 2022-05-30 20:41:14 UTC
Nevermind, I have no idea why, but now it worked. I may have typed or pressed something wrong.

Thank you very much.
Comment 4 Commit Notification 2022-06-01 22:33:48 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/dad1d7182eda5f0e155964d32ac03e5cd854eb96

Resolves: tdf#149378 Force array input if outer function returns array/matrix

It will be available in 7.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 5 Eike Rathke 2022-06-01 22:42:45 UTC
Fwiw, Excel also enters/displays only the top left, but I think we can do better here. For the old behaviour a single cell can be marked (as any number of cells can) before input.
Comment 6 Eike Rathke 2022-06-02 16:30:00 UTC
This needs further refinement, reopening.
Comment 7 Commit Notification 2022-06-03 11:09:13 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bac202275b1bf1abe4277daf35f74ff973c23483

Propagate inline array only for Value parameters, tdf#149378 follow-up

It will be available in 7.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2022-06-03 13:36:09 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a15ce15709acee3b46fb9f7d6836c57f6e1ef9a7

Propagate ForceArrayReturn only for Value parameters, tdf#149378 follow-up

It will be available in 7.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2022-06-03 15:21:44 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6079bf6879c4baf144b68ef459d825412ecea697

Add binary operators to ForceArrayReturn handling, tdf#149378 follow-up

It will be available in 7.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-06-03 17:33:19 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b72c0abac105d2c921e3e5d3e36d5cf2e5ccdbb2

tdf#149378: sc_uicalc: Add unittest

It will be available in 7.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2022-06-03 21:09:27 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c2a4a7a94887b5ea24e9ba7cfa062842a89e1b4e

tdf#149378: sc_uicalc: Add unittest, follow-up

It will be available in 7.4.0.

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

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