StarOffice 8 Administration Guide
只搜尋這本書
查看這本書:
以 PDF 格式下載這本書 (813 KB)

Chapter 3 Customizing the User Interface

This chapter describes how to customize User Interface (UI) elements in StarOffice.

Creating a Customized XML Configuration File

StarOffice stores most of the UI configuration settings in Extensible Markup Language (XML) format. The UI components are defined in the XML-based User Interface Language (XUL) and stored in XML files.

StarOffice provides a Customize dialog box where you can make changes to most of the UI components. For example, you use this dialog box to add a custom menu to Writer.

You can also edit an XML UI configuration file to make your changes. The XML elements and attributes for the StarOffice UI components are described in Using a Text Editor.

Using the Customize Dialog Box

You can use the Customize dialog box to make changes to or to create the following UI components:

  • Menus

  • Shortcut Keys

  • Toolbars

  • Events

The changes are saved to an XML configuration file. After you make your changes in the Customize dialog box, you can use the XML configuration file that you created to apply the changes to other StarOffice installations.


Note –

For more information on the location of the individual XML configuration files, see Using a Text Editor.


程序To Customize Menus, Keyboard Shortcuts, Toolbars, and Events

Steps
  1. Open the StarOffice program where you want to customize a UI element.

  2. Choose Tools – Customize.

    The Customize dialog box opens.

    Figure 3–1 Customize dialog box.

    Customize dialog box

  3. Click the tab of the UI element that you want to customize.

  4. Make your changes and then click OK.

    The changes are saved to one or more XML configuration files in the StarOffice user directory. The file name path for these files is <StarOffice user directory>/config/soffice.cfg/modules/<short module identifier>/<ui element type>/<ui element name>.xml


    Note –

    To look up the short module identifier for a StarOffice module, see Table 3–1.


Using a Text Editor

You can also use a text editor to customize a UI element in an XML configuration file. For example, to remove a item from the Tools menu in Writer, you open the menubar.xml file for Writer, and delete the XML element for the menu item. If you want, you can also use XML configuration files to limit the functionality of StarOffice. See Chapter 4, Restricting Functionality in StarOffice for more information.

The UI configuration settings for each of the following components in a StarOffice module are stored in separate XML configuration files:

  • Menu bars

  • Shortcut Keys

  • Toolbars

  • Events

  • Status bars

  • Images

The file name path for the default XML configuration files for these UI elements <StarOffice installation/share/config/soffice.cfg/modules/<short module identifier>/<ui element type>/<ui element name>.xml

For example, the XML configuration file for the Writer menu bar is <StarOffice installation>/share/config/soffice.cfg/modules/swriter/menubar/menubar.xml

The short module indentifier for each StarOffice module is listed in the following table:

Table 3–1 Short module identifiers for each StarOffice module.

StarOffice Module

Short Module Identifier

OpenOffice.org Writer

swriter

OpenOffice.org Writer/Web

sweb

OpenOffice.org Writer/Globaldocument

sglobal

OpenOffice.org Calc

scalc

OpenOffice.org Draw

sdraw

OpenOffice.org Impress

simpress

OpenOffice.org Math

smath

OpenOffice.org Chart

schart

OpenOffice.org Bibliography

sbibliography

OpenOffice.org BasicIDE

BasicIDE

OpenOffice.org Database QueryDesign

dbquery

OpenOffice.org Database TableDesign

dbtable

OpenOffice.org Database RelationDesign

dbrelation

OpenOffice.org StartModule (Backing Component)

StartModule

For a description of the XML elements and attributes that the StarOffice configuration files use, see the OpenOffice.org XML File Format Technical Reference Manual at:

http://xml.openoffice.org/xml_specification.pdf

Applying a Customized User Interface to Different StarOffice Installations

You can use XML configuration files to apply a customized user interface to one or more StarOffice installations.

程序To Apply a Customized User Interface to All Users on a Network

Before You Begin

On a master StarOffice installation, create a customized XML configuration file for each UI element that you want to change.

See Creating a Customized XML Configuration File for details.

Steps
  1. Become root.

  2. Copy the contents of the <StarOffice user directory>/config/soffice.cfg/modules directory of the master installation to the <StarOffice network installation directory>/share/config/soffice.cfg/modules directory.

  3. Restart StarOffice.

程序To Apply a Customized User Interface to a Single User

Before You Begin

On a master StarOffice installation, create a customized XML configuration file for each UI element that you want to change.

See Creating a Customized XML Configuration File for details.

Steps
  1. Become root.

  2. Copy the contents of the <StarOffice user directory>/config/soffice.cfg/modules directory of the master installation to the <StarOffice user directory>/share/config/soffice.cfg/modules directory of the single user instalation.

  3. Restart StarOffice.