Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Need to be able to bind to scripts on filesystem | ||
---|---|---|---|
Product: | General | Reporter: | duncan.foster |
Component: | scripting | Assignee: | duncan.foster |
Status: | CLOSED FIXED | QA Contact: | issues@framework <issues> |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues |
Version: | OOo 1.1 Beta | ||
Target Milestone: | OOo 2.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | FEATURE | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
duncan.foster
2003-05-02 10:25:12 UTC
Accepting issue. Retargetting to OOo2.0. Plan to implement looks something like: Starting from the outside, the UI, and working our way in The Assign dialogs will probably require a little more thought, but from a first impression, and discussion with Noel Assign dialogs 1. Add the location "Filesystem" to the Location list 2. Move the "Detailed View" checkbox up a little 3. Add a button "Browse" just below the checkbox 4. Add a new global list to the ScriptBindingLibrary module 5. Write a StarBasic sub to popup the filepicker (we've got one from the Developers' Guide), take the chosen filepath, and add it to the list created in 4, and call the LangLocComboListener sub to repopulate the dialog. 6. modify the PopulateScriptList sub to deal with location="FileSystem", clear the script list, and repopulate using the list created in 4. ScriptProtocolHandler 7. When creating a FunctionProvider, need now to check for location equal to either document or filesystem, if not then pass the extra arg (no security dialogs). scripthandler.cxx l.345 8. When creating the ScriptStorage need to check for location=filesystem (ScriptStorage.cxx l. 182), and if so call an alternative to the usual ScriptStorage::create. 9. This new method needs to create a ScriptInfo object from just the URL, and add it to the hashmaps. the ScriptSecurityManager is unchanged. The ScriptStorageManager just needs a change to do with the disposing of the storage (see below) Outstanding issues: I'm unsure as to how best to dispose of the ScriptStorage after execution?? The method to do this (ScriptStoragemanager::disposing) only allows passing in an EventObject ( a struct containing an XInterface). For a document we pass in the XModel of the document, and use this to get the URL, and hence the ScriptStorage. Could we simple pass in the scripts XScriptInfo? This would contain enough info to get or construct the filesystem URL, and hence he key to the storage. Steps 7-9 coded & in testing. Hard coded relationship between file extension (.eg .bsh) and script language (eg "BeanShell"). This will need to be read from the registry or similiar if the scripting framework is to remain extensible. All steps according to outline above done. Outstanding: dispose issue & how to relate runtimes and their file extensions. Currently hard coded in ScriptStorage.cxx, and in ScriptBinding.xba Code tested on Linux & Windows. Hmm, problems with marking this as started?? Another attempt to mark as started. Have fiexed disposing of filesys storages. Will open separate bug to deal with configuration issue (realtionship between runtime and the file extensions it can deal with). tested on OO.org SF0.3 rc4, user can bind to benashell and javascript. closing issue as verified fixed |