Issue 53615 - Starbasic functions residing in user-created library cannot be called from Calc cell
Summary: Starbasic functions residing in user-created library cannot be called from Ca...
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.0 Beta
Hardware: All Windows NT
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-08-22 14:54 UTC by eberlein
Modified: 2017-05-20 10:45 UTC (History)
9 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description eberlein 2005-08-22 14:54:51 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
Comment 1 christianjunker 2005-09-02 15:45:43 UTC
confirmed. adding myself to cc.
Comment 2 christianjunker 2005-09-02 15:49:20 UTC
changing topic, adding keyword oooqa.
Comment 3 christianjunker 2005-09-02 16:36:46 UTC
ScCompiler::IsMacro is the important function here.
Comment 4 christianjunker 2005-09-11 02:03:47 UTC
cyb->ab: Can you take a quick look at this? Standard module lookup is done, I could not find the weak 
spot yet.
Comment 5 ab 2005-09-13 14:10:57 UTC
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.
Comment 6 ab 2005-09-14 12:52:04 UTC
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
Comment 7 ab 2005-09-14 12:52:59 UTC
Really set to OOo Later now...
Comment 8 eberlein 2005-09-14 13:10:21 UTC
<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
Comment 9 christianjunker 2005-09-14 17:46:50 UTC
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).
Comment 10 Regina Henschel 2008-06-06 16:43:13 UTC
add me to cc
Comment 11 T. J. Frazier 2009-03-17 14:08:35 UTC
add me to cc.
Comment 12 gercokees 2009-08-05 11:03:38 UTC
add me to cc
Comment 13 j.tronel 2014-01-16 22:44:16 UTC
Annoying, no way to build independant libraries of Calc functions : have to be defined in modules in Standard library
Comment 14 Marcus 2017-05-20 10:45:31 UTC
Reset the assignee to the default "issues@openoffice.apache.org".