Difference between revisions of "Macros in Database Documents"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Milestones)
(References)
Line 112: Line 112:
 
| n/a
 
| n/a
 
|-
 
|-
| '''Product Requirement, RFE, Issue ID''' (required)
+
| '''Product Requirement, RFE, Issue ID'''
 
|available
 
|available
 
|
 
|
Line 119: Line 119:
 
[http://www.openoffice.org/issues/show_bug.cgi?id=83816 RFE: add database specific event for macros to the database]
 
[http://www.openoffice.org/issues/show_bug.cgi?id=83816 RFE: add database specific event for macros to the database]
 
|-
 
|-
| '''[[Test case specification]]''' (required)
+
| '''[[Test case specification]]'''
 
|not available
 
|not available
 
|
 
|

Revision as of 10:34, 28 November 2007

Specification Status
Author Frank Schönheit
Last Change 2007-11-27
Status (Help) Preliminary

Abstract

OpenOffice.org Base, unlike the other OpenOffice.org applications, is currently not able to embed macros and scripts into its documents. We will empower Base users to use macros and scripts (StarBasic, JavaScript, BeanShell, Python) in their database documents the very same way they can use them in all other application's documents.

Detailed Specification

Help | User Interface Element Templates

Accessing Macros and Scripts

  • Macro and Script Organizers (Template:Menuitem) will show opened database documents, and allow editing/creating macros/scripts therein.
  • The Basic IDE will treat macros in database documents the very same way as macros in other application's documents.
  • The Macro Selector (Template:Menuitem) will show opened database documents, and allow to run them.
  • The UI customization dialog (Template:Menuitem) will allow access to the current database document's macros and scripts, when invoked for this document.


Database Document Macros vs. Macros in Sub Documents.

Up to now, macros can be embedded into sub documents of a database document, that is, into forms and reports (which technically are Text documents).

We will not allow this in the future anymore. The reason is that it is hard to find a consistent concept (in particular: create a consistent user experience) which allows both, macros in the embedding database document and macros in the embedded form/report document.

As a consequence, in any place where you can currently access macros in forms (which we'll use as placeholder for forms and reports from now on), you won't be able to do so anymore. Instead, you can access the database documents's macros.

This means:

  • Currently, when you have a form, and open the customization dialog, it will give you access to macros embedded in this form. In the future, you will have access to the database document's macros only.
  • Currently, you see all open form documents in the macro organizer and the macro selector. In the future, you will see open database documents only (and all other application's documents, of course).
  • Assigning macros to elements in a form document (in particular: to events of form controls, from the "Events" tab page of the property browser) will be possible with macros from the database document only, not with macros from the form document.

Migration

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.>

Configuration

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.>

File Format

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.>

Implementation Milestones

Definition and Timeline

The development of this feature will produce the following milestones:

Milestone Due
M1 embedding/organizing/running macros/scripts works t.b.d.
M2 sub documents cannot contain macros/scripts anymore, old documents which still do are handled appropriately t.b.d.
M3 Assigning macros to database document events (Template:Menuitem) works. For instance, it is possible to assign a macro to the OnLoad event of an DB document itself. t.b.d.
M4 TODO t.b.d.
M5 TODO t.b.d.

Tasks

Task Status M
<area>
<lengthy task description> planned M1
<lengthy task description> planned M1
<area>
<lengthy task description> planned M1
<lengthy task description> planned M2

Open Issues

  • When assigning a macro, located in the database document, to, say, the "When initiated" event of a button in an embedded form document: should the called Basic code have some easy access to the form which the button lives in? It might become necessary to refer to this form document, similar to how ThisComponent will refer to the database document as a whole. On the other hand, the macros get an css.lang.EventObject, which in all cases is sufficient to obtain the form document (which is an ancestor in the parent-child-hierarchy of the control model).

Future Tasks

  • For the moment, it will not be possible to sign macros embedded in database documents. This is up to a later step.
  • Macro recording will still not be possible in database documents. This is a separate topic, which requires implementations in a completely different area.

Appendix

Acronyms and Abbreviations

Acronym / Abbreviation Definition
Customization dialog is the dialog which allows to customize menus, toolbars, keyboard and event bindings. Reached via Template:Menuitem in all OpenOffice.org applications. For all aforementioned UI types, it allows to add macros or scripts, for instance, you can customize your toolbar or menu to include a reference certain Basic function. This holds for office-wide macros as well as document-local macros, in which case you usually store the customization in the document only, and not application-wide.
Macro Organizer is the dialog which you open via Template:Menuitem in all applications.
Macro Selector is the dialog allows you to select a single macro. It is invoked whenever the user needs to specify a macro or script function or method, for instance when you choose the "Macro" button on the "Events" tab page of the organizer dialog. Note that there are cases where the macro selector allows to select macros or scripts from all currently-open documents (for instance when invoked via Template:Menuitem), and cases where it contains only macros/scripts from the active document (e.g. when invoked from the customization dialog of an active document).

References

Reference Document Check Location (URL)
Specification Process Entry Check [passed/failed] n/a
Product Requirement, RFE, Issue ID available

Possibility to put macros in *.odb files
Impossible to bind a macro to an OpenOffice.org Base document
RFE: add database specific event for macros to the database

Test case specification not available

Contacts

Role Name
Developer Frank Schönheit
Quality Assurance Marc Neumann
Documentation Uwe Fischer
User Experience Bettina Haberer
Personal tools