Bug 104473 - Function macro not usable, if name corresponds to english name of builtin function
Summary: Function macro not usable, if name corresponds to english name of builtin fun...
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks:
 
Reported: 2016-12-07 16:58 UTC by T. Kaltenbrunner
Modified: 2016-12-14 20:16 UTC (History)
1 user (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 T. Kaltenbrunner 2016-12-07 16:58:51 UTC
Description:
Language: German (or may any other than English)
Component: Calc

Defined a LO-Basic function with an English name of a builtin function (my case TIMEVALUE).
For the user it is not obvious, that is a builtin function name since all names are translated.
Result: the function is not useable in a calc formular: "#name?" error
  

Steps to Reproduce:
1. see description
2.
3.

Actual Results:  
#Name? error

Expected Results:
Function is found and used.


Reproducible: Always

User Profile Reset: No

Additional Info:
There should be at least a warning in the Basic-IDE.
Otherwise you get crazy ;-) 
I recognized it after closing and opening the file again - the name of macro was translated.


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 Eike Rathke 2016-12-14 13:06:41 UTC
TimeValue is a BASIC runtime function, hence you can't redefine it as a function to be called as spreadsheet function.

Try
print timevalue("12:34:56")
in a Basic macro.
Comment 2 T. Kaltenbrunner 2016-12-14 14:17:36 UTC
You did not understand the problem.
In foreign laguage it is not a BASIC runtime function - it is named differently!!
So how should somebody identify this as a BASIC runtime function?
You can only identify it when you know the name.

The bug is not that you cannot "redefine it", the bug is, that there is not a great chance to identify the problem with this redefinition.

It would have been obviously, if the name of the function would have been translated imediately.
Comment 3 Eike Rathke 2016-12-14 20:16:52 UTC
BASIC runtime function names are not translated. BASIC TimeValue() is named TimeValue() in any UI language. You're quite on the safe side if you prefix your own function names, for example my_timevalue().