Bug 59583 - EDITING: Cannot use formula with user-defined function
Summary: EDITING: Cannot use formula with user-defined function
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.1 rc
Hardware: Other Windows (All)
: medium normal
Assignee: Eike Rathke
QA Contact:
URL:
Whiteboard: BSA target:4.1.0 target:3.6.6 target:...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-19 12:05 UTC by Helmut Leininger
Modified: 2013-01-21 18:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet with error (630.23 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-19 12:05 UTC, Helmut Leininger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Leininger 2013-01-19 12:05:23 UTC
Created attachment 73282 [details]
spreadsheet with error

Problem description: 
If I try to enter a user-defined function with the same name as a column header into a cell a #Ref! error or Err.509 is issued

Steps to reproduce:
1. type =STERBENAME(A4) into a column of sheet Alsergrund of the attached spreadsheet

Current behavior:
After leaving the cell, the formula is shown as ='Sterbename'(A4)

Expected behavior:
should recognize it as a function because by the parenthesis ()

Remarks:
I am using the German version. 
The spreadsheet has been generated by copying from a spreadsheet created with LO 3.x.
The working cells are the "old" ones.


              
Operating System: Windows 8
Version: 4.0.0.1 rc
Last worked in: 3.6.4.3 release
Comment 1 Markus Mohrhard 2013-01-19 15:31:20 UTC
The problem is the column label.

@Eike: Can we do anything to fix the problems with column label detection in ScCompiler? IMHO the whole column label handling is non obvious.
Comment 2 Eike Rathke 2013-01-21 13:32:32 UTC
The cure here could indeed be to not detect a column name if a parentheses follows. Taking over.

Removing regression keyword, the behavior with this document is the same in 3.4.6 and 3.5.5 and 3.6.4

Yes, the automatic label recognition is non-obvious, complain with MS ;) who in the mean time deprecated automatic labels. It can be switched off in LibreOffice under Tools->Options->Calc->Calculate "Automatically find column and row labels". IMHO we should switch to default off nowadays.
Comment 3 Not Assigned 2013-01-21 17:06:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

resolved fdo#59583 prevent inappropriate column/row label detection



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 4 Eike Rathke 2013-01-21 17:13:30 UTC
Change pending review for 4-0 https://gerrit.libreoffice.org/1796 and 3-6 https://gerrit.libreoffice.org/1797

Note that in a few cells, for example Alsergrund.B4, the formulas are stored already as broken ='Sterbename'(A4) other cells have the original =STERBENAME(...), the broken formulas need to be edited to work again.
Comment 5 Not Assigned 2013-01-21 17:48:26 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=657ecf4879b44703cfa007146c39e6ec8c94fad5&h=libreoffice-3-6

resolved fdo#59583 prevent inappropriate column/row label detection


It will be available in LibreOffice 3.6.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 6 Not Assigned 2013-01-21 17:48:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

resolved fdo#59583 prevent inappropriate column/row label detection


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