Bug 159343 - Function wizard breaks formula reference to database range
Summary: Function wizard breaks formula reference to database range
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: XLSX-DataRange
  Show dependency treegraph
 
Reported: 2024-01-23 16:00 UTC by Gabor Kelemen (allotropia)
Modified: 2024-08-06 07:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The example file in Excel 2016 and Calc master while in the Wizard (111.49 KB, image/png)
2024-01-23 16:00 UTC, Gabor Kelemen (allotropia)
Details
The example file after closing the wizard (74.47 KB, image/png)
2024-01-23 16:01 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-01-23 16:00:58 UTC
Created attachment 192124 [details]
The example file in Excel 2016 and Calc master while in the Wizard

If a formula containing table reference / database range is edited in the formula wizard, the range name is replaced with #NAME? upon closing the wizard.

1. Open attachment 192122 [details]  from bug 159341
2. Go to cell H6, open the Formula Wizard
3. Close the Formula Wizard with the OK button
-> the formula is changed, the Animals range name is replaced by #NAME? and the value of the formula becomes Err:507.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d49b0c3654e50ff9b74545140e6f19e008009c33
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Seems to be like this since 5.0 when importing Excel tables started to be supported.
Comment 1 Gabor Kelemen (allotropia) 2024-01-23 16:01:22 UTC
Created attachment 192125 [details]
The example file after closing the wizard
Comment 2 m_a_riosv 2024-01-24 01:45:19 UTC
Reproducible
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d49b0c3654e50ff9b74545140e6f19e008009c33
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 Commit Notification 2024-07-26 22:20:48 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0b683547bbb22cab46e92dfd65c129630bd9ca94

Related: tdf#159343 Handle TableRef separator in brackets for Function Wizard

It will be available in 25.2.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 4 Eike Rathke 2024-07-26 22:30:17 UTC
That commit does not solve the problem, but only keeps the table structured reference together for one argument of a function's parameter in the wizard, not splitting it at the embedded separator.

The actual problem of the name being lost is caused by the ocTableRef token not being implemented in the API token conversion. More work to do.
Comment 5 Commit Notification 2024-07-29 14:29:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4c3f65ea3b1f2e7f6d92c732f72936fecc017b29

Resolves: tdf#159343 Implement TableRef API token conversion

It will be available in 25.2.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 6 Commit Notification 2024-08-06 07:12:10 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6e12713a7938e464b55a54b9dfd662000057a85f

Do not assert TableRef inner reference for dumb sequence, tdf#159343

It will be available in 25.2.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.