The program has a lot of options that make you feel safe about opening potentially macro-ridden documents. Password-Protecting DocumentsSee Password-Protecting Documents on page 158, and Protecting or Hiding Text Using a Section on page 413. Setting Java OptionsChoose Tools > Options > OpenOffice.org > Security. Mark options in Figure 5-55. Figure 5-55. Setting OLE and Basic options
Figure 5-54. Specifying Java options
Notes on the Security Checks option for Java programsWhen the Security Checks option is deselected, applets can read and write on all drives . Since JavaScript can access the entire Java environment via the LiveConnect interface, this is also possible for JavaScript when the check is deactivated. Java classes that are started via the ClassPath, are not subject to any security checks, unlike the Java classes that, for example, are started via an <APPLET> tag in an HTML page. You can deselect the security checks under either of the following conditions:
Controlling Microsoft Documents Containing OLE Objects and Basic Macro CodeChoose Tools > Options > Load/Save and look at the VBA Properties and Microsoft Office windows, shown in Figure 5-55. Specifying StarBasic Macro OptionsTo just turn everything offChoose Tools > Options > OpenOffice.org > Security and turn off macros.
If you'll be handling StarOffice 5.2 or other documents that have StarBasic macros in them, you can determine how and when to run them. The trouble with this of course is that OpenOffice.org still needs some StarBasic scripts to run. Unless you really need to change something, you can leave the defaults as is.
StarOffice Basic and HTMLStarOffice Basic scripts have to be in the header of the HTML document. After you add the macro to the document, it will appear in the source text of the HTML document (in the header) with the following syntax (a "Hello World" example macro is used): <HEAD> (any additional content) <SCRIPT LANGUAGE="STARBASIC"> <!-- ' $LIBRARY: library_name ' $MODULE: module_name Sub test msgbox "Hello World" End Sub // --> </SCRIPT> </HEAD> Note If you restrict the list of trustworthy URLs or choose Run Macro > Never , you may receive an error message about missing access rights when you try to run a script, e.g. when you attempt to run an AutoPilot or to load a template. If you want to be careful but not too careful, select According to Path List from the Run Macro list, then put the path to your program's directory, such as C:\office101 , in the Path List. You can restore the standard for safe URLs if you have made changes by clicking Default . |