Apache OpenOffice (AOO) Bugzilla – Issue 24829
Enable Calc to use Scripting Framework scripts as Calc functions
Last modified: 2010-10-22 19:37:07 UTC
Enable Calc to use Scripting Framework scripts as Calc functions. Currently OpenOffice.org Basic macros can be used as Calc functions. However, there a number of limitations: 1. The macro must be in the Standard library of OpenOffice.org or the document. 2. There is no way to browse the available macros in the Functions autopilot. I would like to see the code in Calc modified so that: 1) The Functions autopilot uses the Scripting Framework Script Selector to browse and select Scripting framework scripts 2) Execution of all Basic macros and Scripting framework scripts is performed through the Scripting Framework. According to Nickas Nebel the relevant code in Calc can be found in: It's in ScCompiler::IsMacro, sc/source/core/tool/compiler.cxx, for parsing, and ScInterpreter::ScMacro, sc/source/core/tool/interpr4.cxx, for calculation.
Set target to OOo 2.0
very very interresting (yes, really :) ) adding myself to CC Hope i will be able to help someway (poor macro coder)
While this would be desirable, i can't see this being implemented for OOo2.0. Retargetting.
While it is certainly too late to get item (1) above done for OOo2.0, it may be possible to get (2). I've managed to modify the parsing code so that it hunts for SF macros in the same way as it does for Basic ones. Have also managed to get the calculation code to invoke SF macros. Still to do: 1. Evaluate the performance implications of the changes to IsMacro(), or discuss with sc team. 2. Add code to handle the argument passing in ScMacro().
I take this over until I have found a new developer assignment
Meanwhile I doubt that this is worth the effort. The performance will be worse compared to Basic macros and the demand is not very high. I don't see developer resources in the forseeable future, so to avoid getting drowned under old issues I close this one as "won't fix".
closing
Created attachment 72214