Apache OpenOffice (AOO) Bugzilla – Issue 53615
Starbasic functions residing in user-created library cannot be called from Calc cell
Last modified: 2017-05-20 10:45:31 UTC
StarBasic-Functions must locate in the Standard Library to work. This Library can not made "ReadOnly=True". So every user can overwrite the code. Second, the deployment of shared functions in a network environment is difficult, because you overwrite user-code by changing the Standard Library. So either, #Standard Library could be made password-protected or readonly or #there should be a way to move the standard library to shared (and protected) folders or #StarCalc can invoke functions in other libraries. Regards Peter
confirmed. adding myself to cc.
changing topic, adding keyword oooqa.
ScCompiler::IsMacro is the important function here.
cyb->ab: Can you take a quick look at this? Standard module lookup is done, I could not find the weak spot yet.
ab->cyb: Could you please describe how the function should be accessed from Calc at all to show this problem. E.g. accessing macros for validity check does also work for function outside the Standard library.
Ok, now I managed to reproduce the problem... It's not really the case that functions must be located in the Standard library. I've tested it and found that also macros in other libraries are found, but only if the library is loaded. Initially this is only the case for the Standard library. The problem is that calc still uses the old C++ API for accessing basic and so cannot know that the searched function is located in an unloaded library. As Calc only uses the simple function name and no full qualified access like Library1.Module1.doit this is a fundamental problem that cannot be solved in Basic. It has to be solved in Calc and maybe als in the scripting framwork if additional functionality is required there. -> OOo Later -> nn
Really set to OOo Later now...
<I've tested it and found that also macros in other libraries are found, but only if the library is loaded> I tested it also with loaded libraries and it didn't work. @cyb: you can confirm that, can't you? Peter
eberlein: Yes, can confirm that. ab: That's why I forwarded it to you. It wouldn't have been a big problem for libraries that are not loaded, but it affects loaded libraries as well (tested on Mac OS X Tiger with 2.0b running). The strange thing is that I couldn't find anything wrong about the lookup that is done in isMacro and lateron in scMacro (finally doing the call).
add me to cc
add me to cc.
Annoying, no way to build independant libraries of Calc functions : have to be defined in modules in Standard library
Reset the assignee to the default "issues@openoffice.apache.org".