Getting Started with OpenOffice.org 3 This PDF is designed to be read onscreen, two pages at a time. If you want to print a copy, your PDF viewer should have an option for printing two pages on one sheet of paper, but you may need to start with page 2 to get it to print facing pages correctly. (Print this cover page separately.) Alternatively, you can download a free PDF of the printed edition or buy a low-cost printed copy from http://stores.lulu.com/opendocument. You can also download an editable (.
Copyright This document is Copyright © 2005–2008 by its contributors as listed in the section titled Authors. You may distribute it and/or modify it under the terms of either the GNU General Public License, version 3 or later, or the Creative Commons Attribution License, version 3.0 or later. All trademarks within this guide belong to their legitimate owners.
Contents Chapter 1 Introducing OpenOffice.org.......................................................9 What is OpenOffice.org?...................................................................10 The advantages of OpenOffice.org....................................................12 Minimum requirements....................................................................13 How to get the software....................................................................13 How to install the software..................
Deleting styles..................................................................................68 Using a template to create a document............................................68 Creating a template..........................................................................69 Editing a template.............................................................................72 Adding templates using the Extension Manager...............................73 Setting a default template..............................
Starting new spreadsheets.............................................................130 Opening existing spreadsheets.......................................................131 Saving spreadsheets.......................................................................131 Navigating within spreadsheets......................................................132 Selecting items in a sheet or spreadsheet......................................135 Working with columns and rows........................................
Positioning objects with helper lines...............................................214 The basic drawing shapes...............................................................214 Drawing geometric shapes.............................................................220 Selection modes..............................................................................222 Selecting objects.............................................................................
Chapter 10 Printing, Exporting, and E-mailing........................................323 Introduction....................................................................................324 Quick printing.................................................................................324 Controlling printing........................................................................324 Exporting to PDF............................................................................325 Exporting to other formats......
Macro organization.........................................................................379 How to run a macro........................................................................384 Extensions.......................................................................................389 Writing macros without the recorder..............................................390 Finding more information...............................................................391 Chapter 14 Customizing OpenOffice.org.........
1 Chapter Introducing OpenOffice.
What is OpenOffice.org? OpenOffice.org (OOo) is both a software product and a community of volunteers who produce and support the software. Note Because someone else owns the trademark OpenOffice, the correct name for both the open-source project and its software is OpenOffice.org. The OpenOffice.org software is a freely available, full-featured office suite. OOo 3 is a major upgrade of an already feature-rich office suite.
Impress (presentations) Impress provides all the common multimedia presentation tools, such as special effects, animation, and drawing tools. It is integrated with the advanced graphics capabilities of OOo’s Draw and Math components. Slideshows can be further enhanced with Fontwork’s special effects text, as well as sound and video clips. Impress is compatible with Microsoft’s PowerPoint file format and can also save your work in numerous graphics formats, including Macromedia Flash (SWF).
The advantages of OpenOffice.org Here are some of the advantages of OpenOffice.org over other office suites: • No licensing fees. OOo is free for anyone to use and distribute at no cost. Many features that are available as extra cost add-ins in other office suites (like PDF export) are free with OOo. There are • • • • • no hidden charges now or in the future. Open source. You can distribute, copy, and modify the software as much as you wish, in accordance with either of OOo’s Open Source licenses.
• No vendor lock-in. OOo3 uses OpenDocument, an XML (eXtensible Markup Language) file format developed as an industry standard by OASIS (Organization for the Advancement of Structured Information Standards). These files can easily be unzipped and read by any text editor, and their framework is open and published. • You have a voice. Enhancements, software fixes, and release dates are community-driven. You can join the community and affect the course of the product you use.
from a third-party distributor. The project maintains a list of distributors, but the distributors are not connected with, nor endorsed by, OpenOffice.org. How to install the software Information on installing and setting up OpenOffice.org on the various supported operating systems is given here: http://download.openoffice.org/ common/instructions.html You can also download the more detailed Setup Guide (in several languages) from http://documentation. openoffice.org/setup_guide2/index.
Free OpenOffice.org support Users Mailing List Free community support provided by a network of hundreds of experienced users. You must be subscribed to post messages. To subscribe, send a blank email to users-subscribe@openoffice.org List archives are here: http://www.openoffice.org/servlets/ SummarizeList? listName=users Documentation Project Templates, user guides, how-tos, and other documentation. http://documentation.openoffice.org/ See also the Documentation wiki, http://wiki.services.openoffice.
A list of independent consultants and the services they offer, listed alphabetically by region and then by country, is provided on the OpenOffice.org website. Extensions and add-ons Several websites provide extensions and add-ons to enhance OpenOffice.org. The following table lists a few of these websites. See Chapter 14 (Customizing OpenOffice.org) for more information. Free OOo templates, artwork, addons, and other resources OpenOffice.org Extensions The official repository for extensions to OOo.
open the other components (Draw, Calc, Impress, Base), go to the File menu of the Writer window and select the component you want. OOo does not automatically put a shortcut icon on the desktop, but you can add one if you wish. If you don’t know how to add shortcut icons for launching programs, please consult the help for your operating system. Starting from an existing document You can start OOo by double-clicking the filename of an OOo document in a file manager such as Windows Explorer.
Figure 1: Quickstarter popup menu Disabling the Quickstarter To close the Quickstarter, right-click on the icon in the system tray, and then click Exit Quickstarter on the pop-up menu. The next time the computer is restarted, the Quickstarter will be loaded again. To prevent OpenOffice.org from loading during system startup, deselect the Load OpenOffice.org during system start-up item on the pop-up menu. You might want to do this if your computer has insufficient memory, for example.
Starting from the command line You may want to start OOo from the command line (using the keyboard instead of the mouse). Why? Well, by using the command line, you have more control over what happens when OOo is started. For example, using the command line, you can tell Writer to load a document and print it immediately, or to start without showing the splash screen. Note Most users will never need to do this.
Option Description -help Get a complete list of options. -nologo Do not show the startup screen. -show Start presentation immediately. -view Open documents in viewer (read-only) mode. -minimized Start OOo minimized. -norestore Suppress restart/restore after fatal errors. -invisible No startup screen, no default document and no UI. This is useful for third-party applications that use functionality provided by OOo.
• View contains commands for controlling the display of the • • • • • • document such as Zoom and Web Layout. Insert contains commands for inserting elements into your document such as Header, Footer, and Picture. Format contains commands, such as Styles and Formatting and AutoFormat, for formatting the layout of your document. Table shows all commands to insert and edit a table in a text document. Tools contains functions such as Spelling and Grammar, Customize, and Options.
The tear-off toolbars can be floating or docked along an edge of the screen or in one of the existing toolbar areas. To move a floating tearoff toolbar, drag it by the title bar. See “Moving toolbars” below. Click here and drag Toolbar tears off and floats Figure 2: Example of a tear-off toolbar Moving toolbars To move a docked toolbar, place the mouse pointer over the toolbar handle, hold down the left mouse button, drag the toolbar to the new location, and then release the mouse button (Figure 3).
Floating toolbars OOo includes several additional context-sensitive toolbars, whose defaults appear as floating toolbars in response to the cursor’s current position or selection. For example, when the cursor is in a table, a floating Table toolbar appears, and when the cursor is in a numbered or bullet list, the Bullets and Numbering toolbar appears. You can dock these toolbars to the top, bottom, or side of the window, if you wish (see “Moving toolbars” on page 22).
Customizing toolbars You can customize toolbars in several ways, including choosing which icons are visible and locking the position of a docked toolbar. You can also add icons and create new toolbars, as described in Chapter 14. To access a toolbar’s customization options, use the down-arrow at the end of the toolbar or on its title bar (see Figure 6).
• Use File > Wizards for some types of documents. Opening an existing document When no document is open, the Welcome screen provides an icon for opening an existing document. You can also open an existing document in one of the following ways. If a document is already open in OOo, the second document opens in a new window. • Click File > Open. • Click the Open button on the main toolbar. • Press Control+O on the keyboard. In each case, the Open dialog appears.
Password protection To protect an entire document from being viewable without a password, use the option on the Save As dialog to enter a password. This option is only available for files saved in OpenDocument formats or the older OpenOffice.org 1.x formats. 1) On the Save As dialog, select the checkbox beside Save with password, and then click Save. You will receive a prompt: 2) Type the same password in the Password field and the Confirm field, and then click OK.
Using the Open and Save As dialogs You can choose whether to use the OpenOffice.org Open and Save As dialogs or the ones provided by your operating system. To view or change which type of dialog OpenOffice.org uses: 1) Choose Tools > Options > OpenOffice.org > General. 2) Select the Use OpenOffice.org dialogs checkbox. This section discusses the OpenOffice.org Open and Save As dialogs. See Figure 7 for an example of the Save As dialog; the Open dialog is similar.
For OpenOffice.org documents that have been saved with more than one version, use the version drop-down to select which version you wish to open in read-only mode. For Microsoft Office documents, only the current version can be opened. Use the File type field to specify the type of file to be opened or the format of the file to be saved. The Read-only checkbox opens the file for reading and printing only. Consequently, most of the toolbars disappear, and most menu options are disabled.
To open the Navigator, click its icon on the Standard toolbar, or press F5, or choose Edit > Navigator on the main menu bar. You can dock the Navigator to either side of the main OOo window or leave it floating (see “Docking/floating windows and toolbars“ on page 23). To hide the list of categories and show only the toolbars at the top, click the List Box On/Off icon ( list box. ).
Closing a document To close a document, click File > Close. You can also close a document by clicking on the Close icon on the document window. This button looks like the red X shown in Figure 10. If more than one OOo window is open, each window looks like the sample shown on the left in Figure 10. Closing this window leaves the other OOo windows open. If only one OOo window is open, it looks like the sample shown on the right in Figure 10. Notice the small black X below the large red X.
2 Chapter Setting up OpenOffice.
Choosing options for all of OOo This section covers some of the settings that apply to all the components of OpenOffice.org. For information on settings not discussed here, see the online help. Click Tools > Options. The list in the left-hand box varies depending on which component of OOo is open. The illustrations in this chapter show the list as it appears when a Writer document is open. Click the + sign to the left of OpenOffice.org in the left-hand section of the Options – OpenOffice.org dialog.
Figure 12: Filling in user data General options In the Options dialog, click OpenOffice.org > General. The options on this page are described below. Figure 13: Setting general options for OpenOffice.org Help - Tips When Help Tips are active, one or two words will appear when you hold the cursor over an icon or field on the main OOo window, without clicking.
Help Agent To turn off the Help Agent (similar to Microsoft’s Office Assistant), deselect this option. To restore the default Help Agent behavior, click Reset Help Agent. Help formatting High contrast is an operating system setting that changes the system color scheme to improve readability. To display Help in high contrast (if your computer’s operating system supports this), choose one of the high-contrast style sheets from the pull-down list.
Memory options In the Options dialog, click OpenOffice.org > Memory. Some considerations: • More memory can make OpenOffice.org faster and more convenient (for example, more undo steps require more memory); but the trade-off is less memory available for other applications and you could run out of memory altogether. • To load the Quickstarter (an icon on the desktop or in the system tray) when you start your computer, select the option near the bottom of the dialog. This makes OpenOffice.
depending on the screen fonts available on your system. However, it does not affect the actual font size of the text in your documents. Figure 15: Choosing View options for OOo applications User Interface – Icon size and style The first box specifies the display size of toolbar icons (Automatic, Small, or Large). The Automatic icon size option uses the setting for your operating system.
formatting (Figure 16, Right). The fonts you will see listed are those that are installed on your system. Figure 16. Font list (Left) With preview; (Right) Without preview Font Lists - Show font history When you select this option, the last five fonts you have assigned to the current document are displayed at the top of the font list. 3D view – Use OpenGL Specifies that all 3D graphics from Draw and Impress will be displayed in your system using OpenGL-capable hardware.
Mouse positioning Specifies if and how the mouse pointer will be positioned in newly opened dialogs. Middle mouse button Defines the function of the middle mouse button. • Automatic scrolling – dragging while pressing the middle mouse button shifts the view. • Paste clipboard – pressing the middle mouse button inserts the contents of the “Selection clipboard” at the cursor position.
Figure 17: Choosing general printing options to apply to all OOo components Tip If your printouts are coming out incorrectly placed on the page or chopped off at the top, bottom, or sides, or the printer is refusing to print, the most likely cause is page size incompatibility. Path options You can change the location of files associated with, or used by, OpenOffice.org to suit your working situation.
Figure 18: Viewing the paths of files used by OpenOffice.org Color options On the OpenOffice.org – Colors page (Figure 19), you can specify colors to use in OOo documents. You can select a color from a color table, edit an existing color, or define new colors. These colors will then be available in color selection palettes in OOo. Figure 19: Defining colors to use in color palettes in OOo 40 Getting Started with OpenOffice.
Font options You can define replacements for any fonts that might appear in your documents. If you receive from someone else a document containing fonts that you do not have on your system, OpenOffice.org will substitute fonts for those it does not find. You might prefer to specify a different font from the one the program chooses. On the OpenOffice.org > Fonts page (Figure 20): • Select the Apply Replacement Table option. • Select or type the name of the font to be replaced in the Font box.
Security options Use the OpenOffice.org – Security page (Figure 21) to choose security options for saving documents and for opening documents that contain macros.
Ctrl-click required to follow hyperlinks. In older versions of OOo, clicking on a hyperlink in a document opened the linked document. Now you can choose whether to keep this behavior (by unchecking this box). Many people find creation and editing of documents easier when accidental clicks on links do not activate the links. The other options on this dialog should be self-explanatory.
Appearance options Writing, editing, and page layout are often easier to do when you can see as much as possible of what is going on in your document. You may wish to make visible such items as text, table, and section boundaries (in Writer documents), page breaks in Calc, and grid lines in Draw or Writer. In addition, you might prefer different colors (from OOo’s defaults) for such items as note indicators or field shadings. On the OpenOffice.
Accessibility support relies on Sun Microsystems Java technology for communications with assistive technology tools. See “Java options“ below. The Support assistive technology tools option is not shown on all OOo installations. See Assistive Tools in OpenOffice.org in the Help for other requirements and information. Select or deselect the options as required. Figure 24: Choosing accessibility options Java options If you install or update a Java Runtime Environment (JRE) after you install OpenOffice.
If you are a system administrator, programmer, or other person who customizes JRE installations, you can use the Parameters and Class Path pages (reached from the Java page) to specify this information. If you do not see anything listed in the middle of the page, wait a few minutes while OOo searches for JREs on the hard disk. If OOo finds one or more JREs, it will display them there. You can then select the Use a Java runtime environment option and (if necessary) choose one of the JREs listed.
Choosing options for loading and saving documents You can set the Load/Save options to suit the way you work. Figure 27: Load/Save options General Load/Save options If the Options dialog is not already open, click Tools > Options. Click the + sign to the left of Load/Save. Choose Load/Save > General. Most of the choices on the Load/Save – General page (Figure 28) are familiar to users of other office suites. Some items of interest are described below. Figure 28.
update links is affected by the Load user-specific settings option. Some settings (printer name, data source linked to the document) are always loaded with a document, whether or not this option is selected. If you select this option, these document settings are overruled by the user-specific settings of the person who opens it. If you deselect this option, the user’s personal settings do not overrule the settings in the document.
Size optimization for ODF format. OpenOffice.org documents are XML files. When you select this option, OOo writes the XML data without indents and line breaks. If you want to be able to read the XML files in a text editor in a structured form, deselect this option. Document type. If you routinely share documents with users of Microsoft Word, you might want to change the Always save as attribute for text documents to one of the Word formats.
Microsoft Office Load/Save options On the Load/Save – Microsoft Office page (Figure 30), you can choose what to do when importing and exporting Microsoft Office OLE objects (linked or embedded objects or documents such as spreadsheets or equations). Select the [L] options to convert Microsoft OLE objects into the corresponding OpenOffice.org OLE objects when a Microsoft document is loaded into OOo (mnemonic: “L” for “load”). Select the [S] options to convert OpenOffice.
Figure 31. Choosing HTML compatibility options Import - Use 'English (USA)' locale for numbers When importing numbers from an HTML page, the decimal and thousands separator characters differ according to the locale of the HTML page. The clipboard, however, contains no information about the locale. If this option is not selected, numbers will be interpreted according to the Language - Locale setting in Tools > Options > Language Settings > Languages (see page 53).
create the OpenOffice.org Basic macro; otherwise the script will not be inserted. OpenOffice.org Basic macros must be located in the header of the HTML document. Once you have created the macro in the OpenOffice.org Basic IDE, it appears in the source text of the HTML document in the header. If you want the macro to run automatically when the HTML document is opened, choose Tools > Customize > Events. See Chapter 13 (Getting Started with Macros) for more information.
Change locale and language settings You can change some details of the locale and language settings that OOo uses for all documents, or for specific documents. In the Options dialog, click Language Settings > Languages. Figure 32: Language Setting Options On the right-hand side of the Language Settings – Languages page (Figure 33), change the User interface, Locale setting, Default currency, and Default languages for documents as required.
Figure 34: Extra pages available when enhanced language support options are selected Choose spelling options To choose the options for checking spelling, click Language Settings > Writing Aids. In the Options section of the page (Figure 35), choose the settings that are useful for you. Some considerations: • If you do not want spelling checked while you type, deselect Check spelling as you type and select Do not mark errors. (To find the second item, scroll down in the Options list.
Here you can also check which user-defined (custom) dictionaries are active by default, and add or remove dictionaries, by clicking the New or Delete buttons. Choosing Internet options Use the Internet Options pages to define search engines and save proxy settings for use with OpenOffice.org. If you are using a Netscape or Mozilla browser (such as Firefox), you can enable the Mozilla Plug-in so you can open OOo files in your browser, print them, save them, and work with them in other ways.
Figure 37: The AutoCorrect dialog in Writer, showing the five tabs and some of the choices 56 Getting Started with OpenOffice.
3 Chapter Using Styles and Templates
What is a template? A template is a model that you use to create other documents. For example, you can create a template for business reports that has your company’s logo on the first page. New documents created from this template will all have your company’s logo on the first page.
In addition, styles are used by OpenOffice.org for many processes, even if you are not aware of them. For example, Writer relies on heading styles (or other styles you specify) when it compiles a table of contents. Some common examples of style use are given in “Examples of style use” on page 79. OpenOffice.org supports the following types of styles: • • • • • • • • Page styles include margins, headers and footers, borders and backgrounds.
Table 1. Styles available in OOo components Style Type Writer Calc Page X X Paragraph X Character X Frame X Numbering X Cell Impress X X X X X Presentation Graphics Draw (included in Frame styles) Applying styles OpenOffice.org provides several ways for you to select styles to apply. Using the Styles and Formatting window 1) Click the Styles and Formatting icon located at the left-hand end of the object bar, or click Format > Styles and Formatting, or press F11.
Figure 38: The Styles and Formatting window for Writer, showing paragraph styles. Using Fill Format mode Use Fill Format to apply a style to many different areas quickly without having to go back to the Styles and Formatting window and doubleclick every time. This method is quite useful when you need to format many scattered paragraphs, cells, or other items with the same style. 1) Open the Styles and Formatting window and select the style you want to apply. 2) Click the Fill Format mode icon .
You can open this list and click once on the style you want, or you can use the up and down arrow keys to move through the list and then press Enter to apply the highlighted style. Tip Select More... at the bottom of the list to open the Styles and Formatting window. Figure 39: The Apply Style list on the Formatting toolbar. Using keyboard shortcuts Some keyboard shortcuts for applying styles are predefined.
Changing a style using the Style dialog To change an existing style using the Style dialog, right-click on the required style in the Styles and Formatting window and select Modify from the pop-up menu. The Style dialog displayed depends on the type of style selected. Each style dialog has several tabs. See the chapters on styles in the user guides for details. Updating a style from a selection To update a style from a selection: 1) Open the Styles and Formatting window.
Tip If you are in the habit of manually overriding styles in your document, be sure that AutoUpdate is not enabled. Updating styles from a document or template You can update styles by copying or loading them from a template or another document. See “Copying and moving styles” on page 65. Creating new (custom) styles You may want to add some new styles.
4) In the Create Style dialog, type a name for the new style. The list shows the names of existing custom styles of the selected type. Click OK to save the new style. Figure 41: Naming a new style created from a selection. Dragging and dropping to create a style You can drag and drop a text selection into the Styles and Formatting window to create a new style. Writer Select some text and drag it to the Styles and Formatting window.
Using the Template Management dialog To copy or move styles using the Template Management dialog: 1) Click File > Templates > Organize. 2) In the Template Management dialog (Figure 42), set the lists at the bottom to either Templates or Documents, as needed. The default is Templates on the left and Documents on the right. To load styles from a file that is not open, click the File button. When you return to this dialog, both lists show the selected file as well as all the currently open documents.
Figure 43: Copying a style from one document to another. Loading styles from a template or document You can copy styles by loading them from a template or another document: 1) Open the document you want to copy styles into. 2) In the Styles and Formatting window, long-click on the arrow next to the New Style from Selection icon, and then click on Load Styles (see Figure 40). 3) On the Load Styles dialog (Figure 44), find and select the template you want to copy styles from. Figure 44.
Note Caution To copy the styles from another document, click the From File button to open a window from which you can select the required document. If your document has a table of contents, and if you have used custom styles for headings, the heading levels associated with outline levels (in Tools > Outline Numbering) will revert to the defaults of Heading 1, Heading 2, and so on when you load styles this . You will need to change these back to your custom heading styles. This is a bug.
4) Select the template that you want to use. You can preview the selected template or view the template’s properties: • To preview the template, click the Preview icon. A preview of the template appears in the box on the right. • To view the template’s properties, click the Document Properties icon. The template’s properties appear in the box on the right. 5) Click Open. The Templates and Documents dialog closes and a new document based on the selected template opens in OOo.
3) From the main menu, choose File > Templates > Save. The Templates dialog opens (see Figure 46). 4) In the New template field, type a name for the new template. 5) In the Categories list, click the category to which you want to assign the template. The category you choose has no effect on the template itself; it is simply the folder in which you save the template. Choosing an appropriate category makes it easier to find the template easily when you want to use it.
Creating a template using a wizard You can use wizards to create templates for letters, faxes, agendas, presentations, and Web pages.
Editing a template You can edit a template’s styles and content, and then, if you wish, you can reapply the template’s styles to documents that were created from that template. (Note that you can only reapply styles. You cannot reapply content.) To edit a template: 1) From the main menu, choose File > Templates > Organize. The Template Management dialog opens (see Figure 48).
Updating a document from a changed template The next time you open a document that was created from the changed template, the following message appears. Figure 49. Apply current styles message Click Yes to apply the template’s changed styles to the document. Click No if you do not want to apply the template’s changed styles to the document. Whichever option you choose, the message box closes and the document opens in OOo.
Figure 50: Newly-added package of templates. Setting a default template If you create a document by choosing File > New > Text Document (or Spreadsheet, Presentation, or Drawing) from the main menu, OOo creates the document from the Default template for that type of document. You can, however, set a custom template to be the default. You can reset the default later if you choose.
Although many important settings can be changed in the Options dialog (see Chapter 2), for example default fonts and page size, more advanced settings (such as page margins) can only be changed by replacing the default template with a new one. Resetting the default template To re-enable OOo’s Default template for a document type as the default: 1) In the Template Management dialog, click any folder in the box on the left.
1) Use File > New > Templates and Documents. Choose the template you want. If the template has unwanted text or graphics in it, delete them. 2) Open the document you want to change. (It opens in a new window.) Press Control+A to select everything in the document. Paste into the blank document created in step 1. 3) Update the table of contents, if there is one. Save the file.
Creating a template folder To create a template folder: 1) In the Template Management dialog, click any folder. 2) Click the Commands button and choose New from the dropdown menu. A new folder called Untitled appears. 3) Type a name for the new folder, and then press Enter. OOo saves the folder with the name that you entered. Deleting a template folder You cannot delete template folders supplied with OOo or installed using the Extension Manager; you can only delete template folders that you have created.
To delete a template: 1) In the Template Management dialog, double-click the folder that contains the template you want to delete. A list of the templates contained in that folder appears underneath the folder name. 2) Click the template that you want to delete. 3) Click the Commands button and choose Delete from the dropdown menu. A message box appears and asks you to confirm the deletion. Click Yes.
Examples of style use The following examples of common use of page and paragraph styles are taken from Writer. There are many other ways to use styles; see the guides for the various components for details. Defining a different first page for a document Many documents, such as letters and reports, have a first page that is different from the other pages in the document.
Changing page orientation within a document A Writer document can contain pages in more than one orientation. A common scenario is to have a landscape page in the middle of a document, whereas the other pages are in a portrait orientation. This can also be done with page breaks and page styles. Different headers on right and left pages Page styles can be set up to have the facing left and right pages mirrored or only right (first pages of chapters are often defined to be right-page only) or only left.
4 Chapter Getting Started with Writer Word processing with OpenOffice.
What is Writer? Writer is the word processor component of OpenOffice.org (OOo).
Status bar The Writer status bar provides information about the document and convenient ways to quickly change some document features. From left to right, the fields are as follows. Page number Shows the current page number, the sequence number of the current page (if different), and the total number of pages in the document. For example, if you restarted page numbering at 1 on the third page, its page number is 1 and its sequence number is 3.
Section or object information When the cursor is on a section or object (such as a picture), information about that item appears in this field. For details, consult the Help or the Writer Guide. View layout Click the appropriate icon to change between single page, side-byside, and book layout views (Figure 54). You can edit the document in any view. Figure 54: View layouts: single, side-by-side, book.
When in Web Layout, you can use the Zoom slider on the Status bar, as described above. In Print Layout, you can use both the Zoom slider and the View Layout icons on the Status bar. Figure 55: Choosing Zoom and View Layout options. You can also choose View > Zoom from the menu bar to display the Zoom & View Layout dialog (see Figure 55), where you can set the same options as on the Status bar. In Web Layout view, most of the choices are not available.
Figure 57: Navigation toolbar Click an icon to select that object type. Now all the Previous and Next icons (in the Navigator itself, in the Navigation Toolbar, and on the scroll bar) will jump to the next object of the selected type. This is particularly helpful for finding items like index entries, which can be difficult to see in the text. The names of the icons (shown in the tooltips) change to match the selected category; for example, Next Graphic, Next Bookmark, or Continue search forward.
Tip To have OOo save documents by default in the Microsoft Word file format, go to Tools > Options > Load/Save. See “Choosing options for loading and saving documents” in Chapter 2 (Setting up OpenOffice.org). Figure 58. Saving a file in Microsoft Word format Working with text Working with text (selecting, copying, pasting, moving) in Writer is similar to working with text in any other program.
Note Macintosh users: substitute the Command key when instructions in this chapter say to use the Control key. Figure 59: Selecting items that are not next to each other To select nonconsecutive items using the keyboard: 1) Select the first piece of text. (For more information about keyboard selection of text, see the topic “Navigating and selecting with the keyboard” in the Help.) 2) Press Shift+F8. This puts Writer in Add mode. The word ADD appears on the status bar.
Figure 60: Selecting a vertical block of text Cutting, copying, and pasting text Cutting and copying text in Writer is similar to cutting and copying text in other applications. You can use the mouse or the keyboard for these operations. Cut: Use Edit > Cut or Control+X or the Cut icon on the toolbar. Copy: Use Edit > Copy or Control+C or the Copy icon. Paste: Use Edit > Paste or Control+V or the Paste icon.
Type the text you want to find in the Search for box. To replace the text with different text, type the new text in the Replace with box. You can select various options such as matching the case, matching whole words only, or doing a search for similar words. (See below for some other choices.) When you have set up your search, click Find. To replace text, click Replace instead. Tip If you click Find All, OOo selects all instances of the search text in the document.
Inserting special characters A special character is one not found on a standard English keyboard. For example, © ¾ æ ç ñ ö ø ¢ are all special characters. To insert a special character: 1) Place the cursor where you want the character to appear. 2) Click Insert > Special Character to open the Special Characters window (Figure 63). 3) Select the characters you wish to insert, in order, then click OK. The selected characters are shown in the lower left of the dialog.
Figure 64: Ruler showing default tab stops Double-click on a blank part of the ruler to open the Indents & Spacing page of the Paragraph dialog. Double-click on the ruler itself to open the Tabs page of the Paragraph dialog (Figure 65) and fine-tune tab stop settings. Figure 65: The Tabs page of the Paragraph dialog Checking spelling Writer provides a spelling checker, which can be used in two ways. AutoSpellcheck checks each word as it is typed and displays a wavy red line under any misspelled words.
Here are some more features of the spelling checker: • Right-click on a word with a wavy underline to open a menu. If you select from the suggested words on the menu, the selection will replace the misspelled word in your text. • You can change the dictionary language (for example, to Spanish, French or German) on the Spellcheck dialog. • You can add a word to the dictionary. Click Add in the Spellcheck dialog and pick the dictionary to add it to.
Figure 66: The Language menu The following options are available: • For selection: select this option to apply a specified language to the selected text (the selection can comprise only a few characters or several paragraphs). • For paragraph: select this option to apply the specified language to the paragraph where the cursor is located. • For all text: select this option to apply the specified language to all the document.
The language used for checking spelling is also shown in the status bar, next to the page style in use. You can also configure the language for a paragraph or a group of characters as None. This option is particularly useful in the case where you insert in the document text that you do not want to spellcheck, such as web addresses or programming language snippets. Using AutoCorrect Writer’s AutoCorrect function has a long list of common misspellings and typing errors, which it corrects automatically.
You can customize word completion from the Tools > AutoCorrect > Word Completion page: • Add (append) a space automatically after an accepted word. • Show the suggested word as a tip (hovering over the word) rather than completing the text as you type. • Change the maximum number of words remembered for word completion and the length of the smallest words to be remembered. • Delete specific entries from the word completion list.
Inserting dashes and non-breaking spaces You can insert a dash by using the Special Characters window or by using AutoCorrect. For more about AutoCorrect, see “Controlling OOO’s AutoCorrect functions” in Chapter 2 (Setting up OpenOffice.org) and “Using AutoCorrect” on page 95 in this chapter. – is an en-dash; that is, a dash the width of the letter “n” in the font you are using. It is U+2013 (scroll down to the General Punctuation section in the Special Characters window).
system and the selection of icon size and style in Tools > Options > OpenOffice.org > View. Tip It is highly recommended that you use paragraph styles rather than manually formatting paragraphs, especially for long or standardized documents. For information on the advantages of styles, and how to use them, see Chapter 13 (Working with Styles) in this book and Chapters 6 and 7 in the Writer Guide.
The appearance of the icons may vary with your operating system and the selection of icon size and style in Tools > Options > OpenOffice.org > View.
To turn autoformatting on or off, go to Format > AutoFormat and select or delete the items on the sub menu. Creating numbered or bulleted lists There are several ways to create numbered or bulleted lists: • Use autoformatting, as described above. • Use list (numbering) styles, as described in Chapters 6 (Introduction to Styles) and 7 (Working with Styles) in the Writer Guide. • Use the Numbering and Bullets icons on the paragraph formatting toolbar (see Figure 68). This method is described here.
Hyphenating words To turn automatic hyphenation of words on or off: 1) Press F11 to open the Styles and Formatting window (Figure 72). 2) On the Paragraph Styles page of the Styles and Formatting window, right-click on Default in the list and select Modify. Figure 72: Modifying a style 3) On the Paragraph Style dialog, go to the Text Flow page (see Figure 73). 4) Under Hyphenation, select or deselect the Automatically option. Click OK to save.
You can also set hyphenation choices through Tools > Options > Language Settings > Writing Aids. In Options, near the bottom of the dialog, scroll down to the find the hyphenation settings (Figure 74). Figure 74: Setting hyphenation options Note Hyphenation options set on the Writing Aids dialog are effective only if hyphenation is turned on through paragraph styles.
Figure 76: List of actions that can be undone After changes have been undone, Redo becomes active. To redo a change, select Edit > Redo, or press Control+Y or click on the Redo icon . As with Undo, click on the triangle to the right of the arrow to get a list of the changes that can be reapplied. To modify the number of changes OpenOffice.org remembers, select Tools > Options > OpenOffice.org > Memory and change Undo number of steps.
For a book similar to this user guide, with one column of text, some figures without text beside them, and some other figures with descriptive text, use page styles for basic layout, and tables to place figures beside descriptive text when necessary. For an index or other document with two columns of text, where the text continues from the left-hand column to the right-hand column and then to the next page, all in sequence (also known as “snaking columns” of text), use page styles (with two columns).
For a document with terms and translations to appear side-by-side in what appear to be columns, use a table to keep items lined up, and so you can type in both “columns”. Creating headers and footers A header is an area that appears at the top of a page. A footer appears at the bottom of the page. Information, such as page numbers inserted into a header or footer, displays on every page of the document with that page style.
4) Select Insert > Fields > Title. The title should appear on a gray background (which does not show when printed and can be turned off). 5) To change the title for the whole document, go back to File > Properties > Description. Fields are covered in detail in Chapter 14 (Working with Fields) in the Writer Guide. For more about headers and footers, see Chapter 4 (Formatting Pages) and Chapter 6 (Introduction to Styles) in the Writer Guide.
Method 1: 1) Place the cursor in the first paragraph of the new page. 2) Click Format > Paragraph. 3) On the Text Flow tab of the Paragraph dialog (Figure 73 on page 101), select Breaks. 4) Select Insert and then With Page Style and specify the page style to use. 5) Specify the page number to start from, and then click OK. Tip Method 1 is also useful for numbering the first page of a document with a page number greater than 1. For example, you may be writing a book, with each chapter in a separate file.
• Using the Page Style dialog—can specify margins to two decimal places. Note If you change the margins using the rulers, the new margins affect the page style and will be shown in the Page Style dialog the next time you open it. To change margins using the rulers: 1) The gray sections of the rulers are the margins (see Figure 79). Put the mouse cursor over the line between the gray and white sections. The pointer turns into a double-headed arrow.
To insert a note in the text, place the cursor in the text and select Insert > Note or press Ctrl+Alt+N. The anchor point of the note is connected by a dotted line to a box on the right-hand side of the page where you can type the text of the note. OOo automatically adds at the bottom of the note the name or initials of the author and a time stamp. Figure 80 shows an example of text with notes from two different authors.
Creating a table of contents Writer’s table of contents feature lets you build an automated table of contents from the headings in your document. Before you start, make sure that the headings are styled consistently. For example, you can use the Heading 1 style for chapter titles and the Heading 2 and Heading 3 styles for chapter subheadings. Although tables of contents can be customized extensively in Writer, often the default settings are all you need.
Creating indexes and bibliographies Indexes and bibliographies work in a similar way to tables of contents. Chapter 12 (Creating Tables of Contents, Indexes and Bibliographies) in the Writer Guide describes the process in detail. In addition to alphabetical indexes, other types of indexes supplied with Writer include those for illustrations, tables, and objects, and you can even create a user-defined index.
Controlling printing For more control over printing, use File > Print to display the Print dialog (Figure 81). On the Print dialog, you can choose: • Which printer to use (if more than one are installed on your system) and the properties of the printer—for example, orientation (portrait or landscape), which paper tray to use, and what paper size to print on. The properties available depend on the selected printer; consult the printer’s documentation for details.
Figure 82. Printer Options dialog for Writer Selecting print options for a document Selections on the Printer Options dialog apply to this printing of this document only. To specify default printing options, you need to use two pages in Tools > Options: OpenOffice.org – Print (see Chapter 2) and OpenOffice.org Writer – Print (which looks very similar to the Printer Options dialog.
Printing in black and white on a color printer You may wish to print documents in black and white on a color printer, to save expensive color ink or toner. Common uses are for drafts or documents to be photocopied in black and white. Several choices are available. To print the current document in black and white or grayscale: 1) Click File > Print to open the Print dialog. 2) Click Properties to open the properties dialog for the printer.
The Writer window changes to display the current page and the following page, and shows the Page Preview toolbar in place of the Formatting toolbar. Figure 83. Page Preview toolbar 2) Click the Book Preview icon to display left and right pages in their correct orientation. 3) To print the document from this page view, click the Print page view icon to open the Print dialog. Choose your options and click OK to print as usual.
2) Click Options. In the Pages section of the Printer Options dialog, choose Brochure and Right pages. Click OK twice to print the first side of each page. 3) Flip the pages and put them back into the printer, in the correct orientation to print on the blank side. You may need to experiment a bit to find out what the correct arrangement is for your printer. 4) Click File > Print and check Properties to make sure the printer setup is still correct. 5) Click Options again.
Figure 85. Choosing addressee and sender information Figure 86. Choosing positioning and size of elements 4) In the lower left of this page, choose the envelope format from the drop-down list. The width and height of the selected envelope then show in the boxes below the selected format. If you chose a pre-existing format, just verify these sizes. If you chose User defined in the Format list, then you can edit the sizes.
You can also choose a different printer or alter printer setup (for example, specify the tray that holds envelopes) for this print job. Figure 87. Choosing printer options for an envelope 6) When you have finished formatting and are ready to print, click either the New Doc or Insert button to finish. New Doc makes only an envelope or starts a new document with the envelope. Insert inserts the envelope into an existing document as page 1. To not proceed with this envelope, click Cancel or press the Esc key.
required information, as described in Chapter 11 (Using Mail Merge) in the Writer Guide. Figure 88. Labels dialog, Labels page 3) Select the label stock in the Brand drop-down list. The types for that brand then appear in the Type drop-down list. Select the size and type of labels required. You can also select User in the Type drop-down list and then make specific selections on the Format page.
5) Click Save to save your new format. 6) When you have finished formatting, click New Document to make your sheet of labels or click Cancel (or press the Esc key). You can also click Reset to remove your changes and return to the original settings when the dialog opened. On the Options page, choose to print the entire page of labels or one single label, then select which one by the column and row. You can also change printer setup.
Tracking changes to a document You can use several methods to keep track of changes made to a document. 1) Make your changes to a copy of the document (stored in a different folder, or under a different name, or both), then use Writer to combine the two files and show the differences. Click Edit > Compare Document. This technique is particularly useful if you are the only person working on the document, as it avoids the increase in file size and complexity caused by the other methods.
Using master documents Master documents are typically used for producing long documents such as a book, a thesis, or a long report; or when different people are writing different chapters or other parts of the full document, so you don’t need to share files. A master document joins separate text documents into one larger document, and unifies the formatting, table of contents (ToC), bibliography, index, and other tables or lists. Yes, master documents do work in Writer.
referencing (see below); automatic numbering of figures, tables, headings, and other elements; and a wide range of other functions—far too many to describe here. See Chapter 14 (Working with Fields) in the Writer Guide for details. Using cross-references If you type in references to other parts of the document, those references can easily get out of date if you reword a heading, add or remove figures, or reorganize topics.
You can leave this page open while you insert many crossreferences. 3) Click on the required item in the Selection list, which shows all the items of the selected type. In the Format list, choose the format required.
5 Chapter Getting Started with Calc Using spreadsheets in OpenOffice.
What is Calc? Calc is the spreadsheet component of OpenOffice.org (OOo). A spreadsheet simulates a worksheet on your computer: you can fill the worksheet with data—usually numerical data—and then manipulate the data to produce certain results, organize the data, or display the data in diagrams. Alternatively you can enter data and then use Calc in a ‘What If...’ manner by changing some of the data and observing the results without having to retype the entire spreadsheet or sheet.
Menu Bar Formatting Toolbar Title Bar Standard Toolbar Formula Bar Column Headers Active Cell Active Cell Indicator Row Headers Figure 93. Parts of the Calc window The icons on these toolbars provide a wide range of common commands and functions. The toolbars can be modified, as discussed in Chapter 14 (Customizing OpenOffice.org). Placing the mouse pointer over any of the icons displays a small box, called a tooltip. It gives a brief explanation of the icon’s function.
Formula bar On the left of the Formula bar (see Figure 95) is a small text box, called the Name box, with a letter and number combination in it, such as D7. This is the column letter and row number, called the cell reference, of the current cell. Function Wizard Function Button Name box Sum Button Figure 95. Formula Bar To the right of the Name box are the the Function Wizard, Sum, and Function buttons.
At the top of the columns and at the left-hand end of the rows are a series of gray boxes containing letters and numbers. These are the column and row headers. The columns start at A and go on to the right and the rows start at 1 and go on down. These column and row headers form the cell references that appear in the Sheet Area box on the Formula Bar (Figure 101). These headers can also be turned off by selecting View > Column & Row Headers.
• The zoom level. Double-click to modify the zoom level. • Selection mode. Click to toggle between default mode (STD), extended mode (EXT) and incremental mode (ADD). • Modified flag. When the document has been modified, a star is displayed in this area of the status bar. • Digital signature flag. If you have added a digital signature to the spreadsheet, a small padlock icon is displayed in this area. Double-click to digitally sign the spreadsheet. • Selected cells functions.
From a template Calc documents can also be created from templates, if you have any spreadsheet templates available. Follow the above procedures, but instead of selecting Spreadsheet from the File menu, select Templates and Documents. On the Templates and Documents window, navigate to the appropriate folder and double-click on the required template. A new spreadsheet, based on the selected template, opens. Opening existing spreadsheets An existing spreadsheet can also be opened from any component of OOo.
If the spreadsheet has not been saved previously, then each of these actions will open the Save As dialog. Here you can specify the spreadsheet name and the location in which to save it. Note If the spreadsheet has been previously saved, then saving will overwrite the existing copy without opening the Save As dialog. If you want to save the spreadsheet in a different location or with a different name, then select File > Save As.
Moving from cell to cell In the spreadsheet, one cell, or a group of cells, normally has a darker black border. This black border indicates where the focus is (see Figure 99). Figure 99. (Left) One selected cell and (right) a group of selected cells Using the mouse To move the focus using the mouse, simply move the mouse pointer to the cell where the focus should be and click the left mouse button. This changes the focus to the new cell.
Figure 100: Customizing the effect of the Enter key The four choices for the direction of the Enter key are shown on the right side of Figure 100. Depending on the file being used or on the type of data being entered, different directions can be useful. The Enter key can also be used to switch into and out of editing mode. Use the options under Input settings in Figure 100 to change the Enter key settings.
Using the keyboard Pressing Control+PgDn moves one sheet to the right and pressing Control+PgUp moves one sheet to the left. Using the mouse Clicking one of the Sheet Tabs at the bottom of the spreadsheet selects that sheet. If you have a lot of sheets, then some of the sheet tabs may be hidden behind the horizontal scroll bar at the bottom of the screen. If this is the case, then the four buttons at the left of the sheet tabs can move the tabs into view. Figure 101 shows how to do this.
Range of contiguous cells A range of cells can be selected using the keyboard or the mouse. To select a range of cells by dragging the mouse: 1) Click in a cell. 2) Press and hold down the left mouse button. 3) Move the mouse around the screen. 4) Once the desired block of cells is highlighted, release the left mouse button. To select a range of cells without dragging the mouse: 1) Click in the cell which is to be one corner of the range of cells.
Selecting columns and rows Entire columns and rows can be selected very quickly in OOo. Single column or row To select a single column, click on the column identifier letter (see Figure 95). To select a single row, click on the row identifier number. Multiple columns or rows To select multiple columns or rows that are contiguous: 1) Click on the first column or row in the group. 2) Hold down the Shift key. 3) Click the last column or row in the group.
Single sheet Click on the sheet tab for the sheet you want to select. The active sheet becomes white (see Figure 96). Multiple contiguous sheets To select multiple contiguous sheets: 1) Click on the sheet tab for the first sheet. 2) Move the mouse pointer over the last sheet tab. 3) Hold down the Shift key and click on the sheet tab. All the tabs between these two sheets will turn white. Any actions that you perform will now affect all highlighted sheets.
Note When you insert a single new column, it is inserted to the left of the highlighted column. When you insert a single new row, it is inserted above the highlighted row. A single column or row can also be added using the mouse: 1) Select the column or rows where you want the new column or row inserted. Right-click the header. 2) Select Insert Rows or Insert Columns. Multiple columns or rows Multiple columns or rows can be inserted at once rather than inserting them one at a time.
Working with sheets Like any other Calc element, sheets can be inserted, deleted and renamed. Inserting new sheets There are many ways to insert a new sheet. The first step for all of the methods is to select the sheets that the new sheet will be inserted next to. Then any of the following options can be used. • Click on the Insert menu and select Sheet, or • Right-click on its tab and select Insert Sheet, or • Click into an empty space at the end of the line of sheet tabs (see Figure 103).
Deleting sheets Sheets can be deleted individually or in groups. Single sheet Right-click on the tab of the sheet you want to delete and select Delete Sheet from the pop-up menu, or click Edit > Sheet > Delete. Multiple sheets To delete multiple sheets, select them as described earlier, then either right-click over one of the tabs and select Delete Sheet from the popup menu, or click Edit > Sheet > Delete from the menu bar.
scrolling around within the sheet, any frozen columns and rows remain in view. Figure 105 shows some frozen rows and columns. The heavier horizontal line between rows 3 and 14 and the heavier vertical line between columns C and H denote the frozen areas.. Rows 4 through 13 and columns D through G have been scrolled off the page. Because the first three rows and columns are frozen into place, they remained. Figure 105.
Unfreezing To unfreeze rows or columns, select Window > Freeze. The check mark by Freeze will vanish. Splitting the window Another way to change the view is by splitting the window—also known as splitting the screen. The screen can be split either horizontally or vertically or both. This allows you to have up to four portions of the spreadsheet in view at any one time.
2) Immediately above this button you will see a thick black line (Figure 107). Move the mouse pointer over this line and it turns into a line with two arrows (Figure 108). Figure 108. Split screen bar on vertical scroll bar with cursor 3) Hold down the left mouse button and a gray line appears, running across the page. Drag the mouse downwards and this line follows. 4) Release the mouse button and the screen splits into two views, each with its own vertical scroll bar.
3) Hold down the left mouse button and a gray line appears, running up the page. Drag the mouse to the left and this line follows. 4) Release the mouse button and the screen is split into two views, each with its own horizontal scroll bar. Note Splitting the screen horizontally and vertically at the same time gives four views, each with its own vertical and horizontal scroll bars. Removing split views To remove a split view, do any of the following: • Double-click on each split line.
Entering numbers as text If a number is entered in the format 01481, Calc will drop the leading 0. (Exception: see Tip below.) To preserve the leading zero, for example for telephone area codes, type an apostrophe before the number, like this: '01481. The data is now regarded as text by Calc. Formulas and functions will treat the entry like any other text entry, which typically results in it being a zero in a formula, and being ignored in a function.
Fill tool, selection lists, and the ability to input information into multiple sheets of the same document. Using the Fill tool on cells At its simplest, the Fill tool is a way to duplicate existing content. Start by selecting the cell to copy, then drag the mouse in any direction (or hold down the Shift key and click in the last cell you want to fill), and then choose Edit > Fill and the direction in which you want to copy: Up, Down, Left or Right.
To add a fill series to a spreadsheet, select the cells to fill, choose Edit > Fill > Series. In the Fill Series dialog, select AutoFill as the Series type, and enter as the Start value an item from any defined series. The selected cells then fill in the other items on the list sequentially, repeating from the top of the list when they reach the end of the list.
Figure 113: Predefined fill series Click New. The Entries box is cleared. Type the series for the new list in the Entries box (one entry per line), and then click Add. Figure 114: Defining a new fill series Using selection lists Selection lists are available only for text, and are limited to using only text that has already been entered in the same column. To use a selection list, select a blank cell and press Ctrl+D.
Caution This technique overwrites any information that is already in the cells on the other sheets—without any warning. For this reason, when you are finished, be sure to deselect all the tabs, so that each sheet can be edited without affecting any others. Editing data Editing data is done is in much the same way as it is entered. The first step is selecting the cell containing the data to be edited. Removing data from a cell Data can be removed (deleted) from a cell in several ways.
Replacing all the data in a cell To remove data and insert new data, simply type over the old data. The new data will retain the original formatting. Changing part of the data in a cell Sometimes it is necessary to change the contents of cell without removing all of the contents, for example if the phrase “See Dick run” is in a cell and it needs to be changed to “See Dick run fast.” It is often useful to do this without deleting the old cell contents first.
Formatting multiple lines of text Multiple lines of text can be entered into a single cell using automatic wrapping or manual line breaks. Each method is useful for different situations. Using automatic wrapping To set text to wrap at the end of the cell, right-click on the cell and select Format Cells (or choose Format > Cells from the menu bar, or press Ctrl+1). On the Alignment tab (Figure 116), under Properties, select Wrap text automatically. The results are shown in Figure 117.
Using manual line breaks To insert a manual line break while typing in a cell, press Ctrl+Enter. This method does not work with the cursor in the input line. When editing text, first double-click the cell, then single-click at the position where you want the line break. When a manual line break is entered, the cell width does not change. Figure 118 shows the results of using two manual line breaks after the first line of text.
For more control or to select other number formats, use the Numbers tab (Figure 121). Figure 121: Format Cells > Numbers • Apply any of the data types in the Category list to the data. • Control the number of decimal places and leading zeros. • Enter a custom format code. The Language setting controls the local settings for the different formats such as the date order and the currency marker.
To choose the size of the font, click the arrow next to the Font Size box on the Formatting toolbar. For other formatting, you can use the Bold, Italic, or Underline icons. To choose a font color, click the arrow next to the Font Color icon to display a color palette. Click on the required color. (To define custom colors, use Tools > Options > OpenOffice.org > Colors. Ssee Appendix D of the Calc Guide.
Autoformatting cells and sheets You can use the AutoFormat feature to quickly apply a set of cell formats to a sheet or a selected cell range. 1) Select the cells, including the column and row headers, that you want to format. 2) Choose Format > AutoFormat. 3) To select which properties (number format, font, alignment, borders, pattern, autofit width and height) to include in an AutoFormat, click More. Select or deselect the required options. 4) Click OK.
6) Click OK to save. The new format is now available in the Format list in the AutoFormat dialog. Formatting spreadsheets using themes Calc comes with a predefined set of formatting themes that you can apply to your spreadsheets. It is not possible to add themes to Calc, and they cannot be modified. However, you can modify their styles after you apply them to a spreadsheet. To apply a theme to a spreadsheet: 1) Click the Choose Themes icon in the Tools toolbar.
To hide or show selected cells, choose Format > Cells from the menu bar (or right-click and choose Format Cells). On the Format Cells dialog, go to the Cell Protection tab. Figure 123: Hiding or showing cells Outline group controls If you are continually hiding and showing the same cells, you can simplify the process by creating outline groups, which add a set of controls for hiding and showing the cells in the group that are quick to use and always available.
If you no longer need a group, place the mouse cursor in any cell in it and select Data > Group and Outline > Ungroup. To remove all groups on a sheet, select Data > Group and Outline > Remove. Figure 124: Outline group controls Filtering which cells are visible A filter is a list of conditions that each entry has to meet in order to be displayed. You can set three types of filters from the Data > Filter sub-menu.
Advanced filters are structured similarly to standard filters. The differences are that advanced filters are not limited to three conditions, and their criteria are not entered in a dialog. Instead, advanced filters are entered in a blank area of a sheet, then referenced by the advanced filter tool to apply them. Sorting records Sorting arranges the visible cells on the sheet. In Calc, you can sort by up to three criteria, with each criterion applied one after the other.
Direction Sets whether rows or columns are sorted. The default is to sort by columns unless the selected cells are in a single column. Printing Printing from Calc is the same as printing from other OOo components (see Chapter 10), but some details are different, especially regarding preparation for printing. The Print dialog (Figure 125), reached from File > Print, has some Calc-specific options: which sheets to print. Figure 125.
Selecting sheets to print You can select one or more sheets for printing. This can be useful if you have a large spreadsheet with multiple sheets and only want to print certain sheets. For example, an accountant might record costs over time with one sheet for each month. To print the November and December sheets, follow this procedure: 1) Go to the November sheet. Hold down the Control key and click on the tab of the December sheet. 2) To print all of the sheets, go to File > Print and select Options.
Figure 127. The Sheet tab of the Page Style dialog Print You can specify which details to print.
Scale Use the scale features to control the number of pages the data will print on. This can be useful if a large amount of data needs to be printed more compactly or, if the reader has poor eyesight, text can be enlarged when it prints. • Reduce/Enlarge printout—scales the data in the printout either larger or smaller. For example if a sheet would normally print out as four pages (two high and two wide), a scaling of 50% would print as one page (both width and height are halved).
Printing rows or columns on every page If a sheet is printed on multiple pages, you can set up certain rows or columns to repeat on each printed page. For example, if the top two rows of the sheet as well as column A need to be printed on all pages, do the following: 1) Choose Format > Print Ranges > Edit. On the Edit Print Ranges dialog, type the rows in the text entry box under Rows to repeat. For example, to repeat rows 1 and 2, type $1:$2.
2) Select Insert > Manual Break. 3) Select Row Break or Column Break depending on your need. The break is now set. Row break Selecting Row Break creates a page break above the selected cell. For example, if the active cell is H15, then the break is created between rows 14 and 15. Column break Selecting Column Break creates a page break to the left of the selected cell. For example, if the active cell is H15, then the break is created between columns G and H.
Headers and footers are assigned to a page style. You can define more than one page style for a spreadsheet and assign different page styles to different sheets. For more about page styles, see Chapter 10 of the Calc Guide. To set a header or footer: 1) Navigate to the sheet that you want to set the header or footer for. Select Format > Page. 2) Select the Header (or Footer) tab. See Figure 129. 3) Select the Header on option.
Header or footer appearance To change the appearance of the header or footer, click More. From this dialog (Figure 130) you can set the background and border of the header or footer. See Chapter 10 (Using Styles in Calc) in the Calc Guide for more information. Figure 130: Header/Footer Border/Background Contents of the header or footer The header or footer of a Calc spreadsheet has three columns for text. Each column can have different contents.
Figure 131: Edit contents of header or footer Areas Each area is independent and can have different information in it. Header You can select from several preset choices in the Header drop-down list, or specify a custom header using the buttons below. (If you are formatting a footer, the choices are the same.) Custom header Click in the area (Left, Center, Right) that you want to customize, then use the buttons to add elements or change text attributes. Opens the Text Attributes dialog.
6 Chapter Getting Started with Impress Presentations in OpenOffice.
What is Impress? Impress is OpenOffice.org’s slide show (presentations) program. You can create slides that contain many different elements, including text, bulleted and numbered lists, tables, charts, clip art, and a wide range of graphic objects. Impress also includes a spelling checker, a thesaurus, prepackaged text styles, and attractive background styles. This chapter includes instructions, screenshots, and hints to guide you through the Impress environment while designing the easier presentations.
Figure 132: Main window of Impress Several additional operations can be performed on one or more slides in the Slides pane: • Add new slides at any place within the presentation after the first slide. • Mark a slide as hidden so that it will not be shown as part of the slide show. • Delete a slide from the presentation if it is no longer needed. • Rename a slide. • Copy or move the contents of one slide to another (copy and paste, or cut and paste, respectively).
Tasks pane The Tasks pane has five sections. Master Pages Here you define the page style for your presentation. Impress contains 28 prepackaged Master Pages (slide masters). One of them —Default—is blank, and the rest have a background. Tip Press F11 to open the Styles and Formating window, where you can modify the styles used in any slide master to suit your purpose. This can be done at any time. Layout Twenty prepackaged layouts are shown.
Each view is designed to make completing certain tasks easier. In summary: • Normal view is the main view for creating individual slides. Use this view to format and design slides and to add text, graphics, and animation effects. • Outline view shows topic titles, bulleted lists, and numbered lists for each slide in outline format. Use this view to rearrange the order of slides, edit titles and headings, rearrange the order of items in a list, and add new slides.
Figure 133: Navigator Working with views This section describes the use of the five views. Normal view Normal view is the main view for working with individual slides. Use this view to format and design and to add text, graphics, and animation effects. To place a slide in the Slide Design area of the Normal view, click the slide thumbnail in the Slides pane or use the Navigator. To select a slide in the Navigator, scroll down the list until you find it and then double-click it.
Figure 134: Outline view Outline view serves at least two purposes. 1) Making changes in the text of a slide: • You can add and delete the text in a slide just as you would in the Normal view. • You can move the paragraphs of text in the selected slide up or down by using the up and down arrow buttons (Move Up or Move Down) on the Text Formatting toolbar. • You can change the Outline Level for any of the paragraphs in a slide using the left and right arrow buttons (Promote or Demote).
Notes view Use the Notes view to add notes to a slide. 1) Click the Notes tab in the Workspace (Figure 135). 2) Select the slide to which you want to add notes. • Click the slide in the Slide pane, or • Use the Previous Slide and Next Slide buttons to move to the desired slide in the Navigator. 3) In the text box below the slide, click on the words Click to add notes and begin typing.
Slide Sorter view Slide Sorter view contains all the slide thumbnails (Figure 136). Use this view to work with a group of slides or with only one slide. Figure 136: Slide Sorter view Change the number of slides per row if desired. 1) Check View > Toolbars > Slide View to make the Slide View toolbar (Figure 137) visible. Figure 137: Slide Sorter and Slide View toolbars 2) Adjust the number of slides (up to a maximum of 15).
To select a group of slides, use one of these methods: • Use the Control (Ctrl) key: Click on the first slide and, while pressing Control, select the other desired slides. • Use the Shift key: Click on the first slide, and while pressing the Shift key, click on the final slide in the group. This selects all of the other slides in between the first and the last. • Use the mouse cursor: Click on the first slide to be selected. Hold down the left mouse button. Drag the cursor to the last slide thumbnail.
Handout view Handout view is for setting up the layout of your slide for a printed handout. Click the Handout tab in the workspace, then choose Layouts in the Tasks pane. Layout contains five choices: 1, 2, 3, 4, 6, or 9 slides per page (Figure 138). Figure 138: Handout layouts To print a handout: 1) Select the slides using the Slide Sorter. (Use the steps listed in selecting a group of slides on page 179.) 2) Select File > Print or press Control+P to open the Print dialog.
Who is to see the presentation? How will it be used? What is the subject matter? What should be in its outline? How detailed should the outline be? Will an audio file be played? Is animation desirable? How should the transition between slides be handled? These are some of the many questions that should be asked, answered, and written down before creating the presentation. Sound and animation are more advanced topics and are explained in the Impress Guide.
Figure 139. Choosing the type of presentation 1) Select Empty Presentation under Type. It creates a presentation from scratch. Note From Template uses a template design already created as the basis for a new presentation. The wizard changes to show a list of available templates. Choose the template you want. Open Existing Presentation continues work on a previously created presentation. The wizard changes to show a list of existing presentations. Choose the presentation you want.
Figure 140. Selecting a slide design 3) Choose a design under Select a slide design. The slide design section gives you two main choices: Presentation Backgrounds and Presentations. Each one has a list of choices for slide designs. If you want to use one of these other than , click it to select it. • The types of Presentation Backgrounds are shown in Figure 140. By clicking an item, you will see a preview of the slide design in the Preview window.
5) Click Next. The Presentation Wizard step 3 appears. Figure 141. Selecting a slide design 6) Choose the desired slide transition from the Effect drop-down menu. 7) Select the desired speed for the transition between the different slides in the presentation from the Speed drop-down menu. Medium is a good choice for now. 8) Click Create. A new presentation is created. Tip You might want to accept the default values for both Effect and Speed unless you are skilled at doing this.
Formatting a presentation Now put your presentation together based on your outline. Caution Remember to save frequently while working on the presentation, to prevent any loss of information should something unexpected occur. You might also want to activate the AutoRecovery function (Tools > Options > Load/Save > General). Make sure Save AutoRecovery information every is selected and that you have entered a recovery frequency. Creating the first slide The first slide is normally a title slide.
Inserting additional slides The steps for inserting additional slides are basically the same as for selecting the title page. It is a process that has to be repeated for each slide. Unless you are using more than one slide master, your only concern is the Layouts section of the Tasks pane (Figure 142). Figure 142: Choosing a slide layout First insert all the slides your outline indicates you will need. Only after this should you begin adding special effects such as custom animation and slide transitions.
Caution Changes to any of the pre-packaged layouts can only be made using View > Normal, which is the default. Attempting to do this by modifying a slide master may result in unpredictable results and requires extra care as well as some trials and errors. 1) Remove any element on the slide that is not required. • Click the element to highlight it. (The green squares show it is highlighted.) • Press the Delete key to remove it.
Caution When resizing a graphic, right-click the picture. Select Position and Size from the context menu and make sure that Keep ratio is selected. Then adjust the height or width to the size you need. (As you adjust one dimension both dimensions will change.) Failure to do so will cause the picture to become distorted. Remember also that resizing a bitmap image will reduce its quality; better by far to create an image of the desired size outside of Impress.
2) Would an additional slide make a particular point clearer? If so, another slide needs to be created. 3) Would some custom animations help some of the slides? (Advanced technique.) 4) Should some of the slides have a different slide transition than others? The transition of those slides should be changed. 5) Do some of the slides seem unnecessary? Delete the affected slide or slides after checking if they are indeed unnecessary.
slides based on that slide master; it is, however, possible to modify each individual slide without affecting the slide master. Slide masters have two types of styles associated with them: presentation styles and graphic styles. The pre-packaged presentation styles can be modified, but new presentation styles cannot be created. However, not only can the prepackaged graphic styles be modified, but new graphic styles can also be created.
Creating slide masters You can create a new slide master in a similar way to modifying the default slide master. To start, enable editing of slide masters by View > Master > Slide Master. On the Master View toolbar, click the New Master icon. A second slide master appears in the Slides pane. Modify this slide master to suit your requirements. It is also recommended that you rename this new slide master: right-click on the slide in the Slides pane and select Rename master from the popup menu.
2) Select in the new dialog the template from which to load the slide master. Click OK. 3) Click OK again to close the slide design dialog. The slide masters in the template you selected are now shown also in the Master Pages section of the Tasks pane in the Available for use subsection. Note Tip The slide masters you have loaded will also be available the next time you load the presentation. If you want to delete the unused slide masters, click the corresponding checkbox in the Slide Design dialog.
Caution Any changes made to one slide when in Master View mode will appear on all slides using this slide master. Always make sure you close Master View and return to Normal view before working on any of the presentation slides. Select View > Normal from the menu bar, or click Close Master View in the Master View toolbar to return to the normal slide view. The changes made to one of the slides in Normal view (for example changes to the bullet point style or the color of the title area and so on...
• Author—First and last names listed in the OpenOffice.org user data • Page number (slide number) • File name Tip To change the number format (1,2,3 or a,b,c or i,ii,iii, etc.) for the page number field, choose Format > Page and then select a format from the list in the Layout Settings area. To change the author information, go to Tools > Options > OpenOffice.org > User Data. Adding and formatting text Text in slides is contained in text boxes.
Figure 145: Selected text box showing the green resizing handles and text toolbar You can move, resize, and delete text boxes. For more information, see Chapter 3 in the Impress Guide. Note In addition to the normal text boxes where text is horizontally aligned, it is possible to insert text boxes where the text is aligned vertically. This choice is available only when Asian languages are enabled in Tools > Options > Language Settings > Languages.
Pasting unformatted text It is normally good practice to paste text without formatting and apply the formatting later. To paste without formatting, either press Control+Shift+V and then select Unformatted text from the dialog that appears, or click on the small black triangle next to the paste symbol in the standard toolbar and select Unformatted text.
Creating bulleted and numbered lists The procedure to create a bulleted or numbered list is quite different depending on the type of text box used, although the tools to manage the list and customize the appearance are the same. In text boxes created automatically by Impress (called AutoLayout), the outline styles available are by default bulleted lists, while for normal text boxes an additional step is required to create a bulleted list.
Creating a new outline level 1) If necessary, press Enter to begin a new line. 2) Press Tab. Each time you press Tab the line indents to the next outline level. Pressing Enter creates a new line at the same level as the previous one. To return to the previous level, press Shift+Tab. In the AutoLayout text boxes, promoting or demoting an item in the list corresponds to applying a different outline style, so the second outline level corresponds to Outline 2 style, the third to Outline 3 style, and so on.
If the list was created in an AutoLayout text box, then an alternative way to change the entire list is to modify the Outline styles. Changes made to the outline style will apply to all the slides using them. Sometimes this is what you want; sometimes it is not, so some care must be taken. Creating tables For displaying tabular data, you can insert basic tables directly into your slides in a number of ways: • Use the Insert > Table menu option. • With the Table button on the main toolbar.
After the table is created, you can modify it in much the same ways as you would modify a table in Writer: adding and deleting rows and columns, adjusting width and spacing, adding borders, background colors and so on. Detailed information on working with tables and the Table Properties dialog can be found in Chapter 9 of the Writer Guide.
Alternatively, select Insert > Spreadsheet from the main menu bar. This opens a small spreadsheet in the middle of the slide. When a spreadsheet is inserted using this method, it is already in edit mode. It is also possible to insert a spreadsheet as an OLE object. To add a chart to a slide, select the corresponding layout in the list of predefined layouts in the task pane or use the Insert Chart feature.
Slide transition choices are also found on the Tasks pane. For more information about slide transitions, see Chapter 9 in the Impress Guide. Tip The Slide transition section has a very useful choice: Automatic preview. Select its checkbox. Then when you make any changes in a slide transition, the new slide is previewed in the Slide Design area, including its transition effect. Running the slide show To run the slide show, do one of the following: • Click Slide Show > Slide Show.
7 Chapter Getting Started with Draw Vector drawing in OpenOffice.
What is Draw? Draw is a vector graphics drawing program. It offers a series of powerful tools that enable you to quickly create all sorts of graphics. Vector graphics store and display an image as vectors (two points and a line) rather than a collections of pixels (dots on the screen). Vector graphics allow for easier storage and scaling of the image. Draw is perfectly integrated into the OpenOffice.org suite, and this makes exchanging graphics with all components of the suite very easy.
Figure 148. Initial Draw window Rulers You should see rulers (bars with numbers) on the upper and left-hand side of the workspace. These show the size of a selected object on the page (see the gray double lines, highlighted in Figure 149). When no object is selected, they show the location of the mouse pointer, which helps to accurately position drawing Figure 149: Rulers show the objects.
To modify the units of measurement of the rulers, right-click on one of the rulers. The two rulers can have different units. Figure 150. Ruler units Status bar The Status bar is located at the bottom of the workspace. The middle part of the Status bar shows Draw-specific fields, as identified in Figure 151. For details on the contents and use of these fields, please refer to the Draw Guide. Note The sizes are given in the current measurement unit (not to be confused with the ruler units).
You can also select the buttons that you wish to appear on the corresponding toolbar. On the View > Toolbars menu, select Customize, click on the Toolbars tab, select the toolbar you want to change, and then select the desired buttons for that toolbar. Many toolbar buttons are marked with a small arrow beside the button. The arrow indicates that this button has additional functions. Click the arrow and a submenu or toolbar appears, showing its additional functions (see Figure 152).
The tools available in the various toolbars are explained in the following sections. The appearance of the toolbar icons may vary with your operating system and the selection of icon size and style in Tools > Options > OpenOffice.org > View. Standard toolbar The Standard toolbar looks like this: It is the same for all parts of OpenOffice.org. Line and Filling toolbar The Line and Filling toolbar lets you modify the main properties of a drawing object. See page 227 for details.
Figure 154. Changing the color palette To load another palette, click on the Load Color List button (circled). The file selector dialog asks you to choose one of the standard OOo palettes (files bearing the file extension *.soc). For example, web.soc is a color palette that is adapted to creating drawings that are going to appear in Web pages. The colors will correctly display on workstations with screens displaying at least 256 colors.
Color schemes Figure 155. Defining color schemes Options toolbar The Options toolbar lets you activate or deactivate various drawing aids. The Options toolbar is not displayed by default. To display it, select View > Toolbars > Options. The most important options to learn when starting to work in Draw are enclosed in red. The functions of the various icons are described in Table 2.
Icon Function Snap to object borders Snap to object points Allow quick editing Select text area only Double-click to edit text Simple handles Large handles Create object with attributes Picture placeholders Contour mode Text placeholders Line contour only Exit all groups Positioning objects with snap functions In Draw, objects can be positioned to grid points, to special snap points and lines, to object frames, to single object points, or to page edges. This function is known as Snap.
Snap to grid Use this function to move an object exactly to a grid point (see Figure 157). This function can be switched on and off with View > Grid > Snap to Grid and on the Options toolbar with the icon . Figure 157: With snap to grid, objects align to the grid precisely. Showing the grid Make the grid visible under View > Grid > Display Grid. Alternatively turn the grid on and off with the icon on the Options toolbar.
Figure 158. Setting grid options Changing the color of the grid points The default grid dots are light gray, which can be hard to see. To improve visibility, go to Tools > Options, then OpenOffice.org > Appearance (Figure 159).
In the Drawing / Presentation section, you can change the color of the grid points. On the Color Settings pulldown menu, select a more suitable/visible color, for example black. Positioning objects with helper lines To simplify the positioning of objects it is possible to make visible guiding lines—extensions of the edges of the object—while it is being moved. These guiding lines have no snap function. The guiding lines can be (de-)activated under Tools > Options > OpenOffice.
the selection mode (green for simple selection and blue when in point edit mode). This effect is easily apparent if on the Options toolbar both Simple Handles and Large Handles are switched on. Figure 161: Drawing a straight line Hold down the Shift key while drawing the line to restrict the angle of the line to a multiple of 45 degrees (0, 45, 90, 135, and so on. Hold down the Control key (Ctrl in PCs) to snap the end of the line to the nearest grid point.
Drawing lines and arrows Click on the small black triangle on the Lines and Arrows icon to open a floating toolbar with ten tools for drawing lines and arrows (Figure 162). Alternatively, you can click directly on the symbol to repeat the last-used command chosen from this toolbar. In both cases, the last-used command will be stored on the toolbar to make it quicker to call it up again.
Drawing a circle or ellipse To draw an ellipse (also called an oval) or a circle, use the Ellipse icon from the Drawing Toolbar. (A circle is simply an ellipse where the two axes are the same length.) The ellipse drawn is the largest ellipse that would fit inside the (imaginary) rectangle drawn with the mouse. Starting point Figure 164: Drawing an ellipse There are three other ways to draw an ellipse or circle: • Hold down the Shift key while drawing to force the ellipse to be a circle.
Polygon, Filled Polygon (45°), Filled Freeform Line, Filled Curve, Filled Freeform Line Curve Polygon Polygon (45°) Figure 165: Floating Curves toolbar (incorrectly titled “Lines”) If you move the mouse cursor over one of the icons, a tooltip pops up with a description of the function. For a more detailed description of the handling of Bézier curves (curves and filled curves), see Chapter 10 (Advanced Draw Techniques) in the Draw Guide.
When you type text, the upper toolbar includes the usual paragraph attributes: indents, first line, and tab stops. You can change the style of all or part of the text. The Styles and Formatting window also works here (select Format > Styles and Formatting or press F11 to launch), so you can create Graphics styles that you can reuse for other text frames. Graphics styles affect all of the text within a text frame. To style parts of the text, use direct formating with the toolbar.
the Gluepoints icon on the Drawing toolbar and then move the end of a connector over the object. Connectors are a type of line or arrow whose ends dock to glue points on other objects. When you move the other object, the connector moves with it. Connectors are particularly useful for making organizational charts. You can reorganize the blocks of your chart and all the connected objects stay connected. Figure 167 shows two Draw objects and a connector.
Basic shapes The Basic Shapes icon makes available the range of tools for drawing basic shapes. If you choose the rectangle tool from this toolbar, it looks the same as a rectangle drawn using the Rectangle tool on the Drawing toolbar. The only differences you will see are in the information field in the status bar. Symbol shapes The Symbol Shapes icon brings you to an array of tools for drawing the various symbol shapes. Block arrows The Block Arrows icon toolbar.
Stars and banners These tools are associated with the Stars icon . You can add text to all these shapes. See Chapter 2 (Drawing Basic Shapes) and Chapter 10 (Advanced Draw Techniques) in the Draw Guide for details. Selection modes There are three selection modes: moving and changing size, rotating, and editing points. The default mode for selecting objects depends on whether the Points button on the Drawing toolbar is active (appears lit) (appears dark or dimmed) .
Changing the selection mode To go from one mode to another, you can do one of the following: • Toggle the Points button on the Drawing toolbar to switch from the simple selection mode to the Points mode . You can also use the keyboard shortcut F8 (Points). • Choose the Effects drop-down button from the Drawing toolbar to activate the Rotation mode for a selected object.
Note There may be some variation in the use of the Alt key on different operating systems. In general the Alt key on a Windows computer functions as described above, but on a Linux system it usually does not. If the Alt key on your system does not operate as described above, use the Tab key method described below. To select an object that is covered by another object using the keyboard, press Tab to cycle through the objects, stopping at the object you wish to select.
Moving and dynamically adjusting an object’s size There are several ways of moving or changing the size of an object. The method described here will be called dynamic in the sense that it is carried out using the mouse. When you dynamically change an object, remember to check the central area of the status bar at the bottom of your screen. This area shows detailed information about the ongoing manipulation. For example, during resizing, you will see the following information displayed.
Dynamic size modification of objects To change the size of an object (or group of selected objects) with the mouse, you need to move one of the handles located around the selection. As shown in the following illustration, the outline of the resulting new object appears as a dotted line. The results differ depending on which handle you use. If you choose a corner handle, you will resize the object along two axes at the same time. If you use a side handle, the objects will only be resized along one axis.
Figure 169: Rotating an object Inclination and perspective To slant or shear objects, use the red handles located at the midpoint of an edge of the selected objects. The mouse pointer changes to a when the pointer hovers over one of these midpoint handles. Not every object can be slanted—basic shapes can be rotated but not slanted. The slant axis is the point directly opposite the midpoint handle to be used for shearing the object.
1 Styles and Formatting 2 Line 3 Arrow Style 4 Line Style 5 Line Width 6 Line Color Figure 170: Line and Filling toolbar 7 Area 8–9 Area Style / Filling 10 Shadow When you select text, this toolbar changes to show text formatting options (Figure 171).
Figure 172: The vertical lines have different levels of transparency (0%, 25%, and 50%). Drawing arrows Arrowheads (and other line endings, usually referred to collectively as arrows) are a line property. Select a line and click on the Arrow Style icon. This opens the Arrowheads menu. Several types of arrowheads are available. Each end of the line can have a different arrowhead (or no arrowhead). Arrowheads are only applicable to lines. They have no effect on an object’s border.
In most cases, you will choose one of the standard fill options, which are all available from the Line and Filling toolbar. You can also define your own area fills; see Chapter 4 of the Draw Guide for details. Adding a shadow In Draw, shadows are considered an area property. Click on the Shadow icon on the Line and Filling toolbar. You can customize the position, distance, color, and transparency of shadows.
This dashed line is the axis of symmetry. The object will be reflected about this line. Move one or both ends of the line with your mouse to set the axis. Then, grab any one of the eight green handles and move it across to the other side of the dashed line. The new position of the figure is shown dashed until the mouse is released. Note If you hold down the Shift key while moving the line, the line will rotate in 45-degree increments.
transparency gradient, the direction and degree of an object’s fill color changes from opaque to transparent (in a regular gradient, the fill changes from one color to another, but the degree of transparency remains the same). See Chapter 4 of the Draw Guide for details. Duplication Duplication makes copies of an object while applying a set of changes (such as color or rotation) to the duplicates. The result of a duplication is a new group.
Cross-fading Cross-fading transforms a shape from one form to another, with OpenOffice.org handling all of the intermediate transitions. The result is a new group of objects including the two end points and the intermediate steps. To carry out a cross-fade, select both objects (hold the Shift key while selecting each object in turn) and then choose Edit > Cross-fading The following dialog appears. On the dialog choose the number of increments (transition steps).
Grouping by common selection When several objects are selected, any operations you carry out are applied to all of the objects. For example, you can rotate a group of objects in its entirety. Groups obtained through common selection of several objects are undone as soon as you click outside the group. However, you can group objects and keep those selected objects grouped together. Maintaining groups and undoing groups To group selected objects, right-click and choose Group from the popup menu.
• Distributing the distance and space between objects See Chapter 5 (Combining Multiple Objects) in the Draw Guide for more information. Editing pictures Draw contains a number of functions for editing raster graphics (bitmaps)—for example, photos, scanned pictures, and so on—including import and and export as well as conversion from one format to another. Draw can read in all the usual range of graphic file formats.
Exchanging objects with other programs To save a Draw image in a foreign format, use File > Export. Draw can save to many graphic file formats, as listed in Chapter 3 (File Management). You can also export Draw files to HTML, PDF, or Flash. PDF export is the same as for any part of OpenOffice.org, as described in Chapter 10 (Printing, E-mailing, and Exporting). Flash export creates a .swf file. HTML export uses a conversion wizard that creates as many web pages as there are pages in your Draw document.
8 Chapter Getting Started with Base OpenOffice.
Introduction A data source, or database, is a collection of pieces of information that can be accessed or managed by OpenOffice.org (OOo). For example, a list of names and addresses is a data source that could be used for producing a mail merge letter. A shop stock list could be a data source managed through OOo. Note OpenOffice.org uses the terms “Data Source” and “Database” to refer to the same thing, which could be a database such as MySQL or dBase or a spreadsheet or text document holding data.
Base creates relational databases. This makes it fairly easy to create a database in which the fields of the database have relationships with each other. For example: Consider a database for a library. It will contain a field for the names of the authors and another field for the names of the books. There is an obvious relationship between the authors and the books they have written. The library may contain more than one book by the same author.
the car’s license plate and driver’s license every four years did not fit into any of these. It will be a table of its own: license fees. What fields fit the fuel purchases area? Date purchased, odometer reading, fuel cost, fuel quantity, and payment method fit. (Fuel economy can be calculated with a query.
Creating a new database To create a new database, click the arrow next to the New icon. In the drop-down menu, select Database (Figure 175). This opens the Database Wizard. You can also open the Database Wizard using File > New > Database. Figure 175: Creating a new database The first step of the Database Wizard has one question with two choices: Create a new database or Connect to an existing database. For this example, select Create a new database and then click Next.
Caution As you create a database, you should save your work regularly. This means more than just saving what you have just created. You must save the whole database as well. For example, when you create your first table, you must save it before you can close it. If you look at the Save icon in the Standard toolbar at the top after closing the table, it will be active. Click the Save icon, and this icon will be grayed out again.
Since none of the fields we need for our Automobile database are contained in any of the wizard tables, we will create a simple table using the wizard that has nothing to do with our database. This section is an exercise in explaining how the Wizard works. The Wizard permits the fields of the table to come from more than one suggested table. We will create a table with fields from three different suggested tables in the Wizard. Click Use Wizard to Create Table. This opens the Table Wizard.
Add/Remove Move Figure 177: Order of fields Caution Below the Selected Fields list are two buttons: one with a +, and one with a –. These buttons are used to add or to remove fields from the Selected Fields list. Be careful when using these buttons until well acquainted with how to create tables (Figure 177). Step 2: Set field types and formats. In this step you give the fields their properties. When you click a field, the information on the right changes. You can then make changes to meet your needs.
Note If any of these fields requires an entry, set Entry required to Yes. If Entry required is set to Yes, this field must have something in it. For example if FirstName has Entry required set to Yes, having an entry with the first name missing will not be allowed. In general, only set Entry required to Yes if something must always be put in that field. By default, Entry required is set to No. CollectionID: Change AutoValue from No to Yes.
Note Each field also has a Field Type. In Base the field type must be specified. These types include text, integer, date and decimal. If the field is going to have general information in it (for example a name or a description), then you want to use text. If the field will always contain a number (for example a price), the type should be decimal or another appropriate numerical field.
Creating a table by copying an existing table If you have a large collection of music, you might want to create a table for each type of music you have. Rather than creating each table from the wizard, you can make a copy of the original table. Each table can be named according to the type of music contained in it. Possible names could include Classical, Pop, Country and Western, and Rock, among others. 1) Click on the Tables icon in the Database pane to see the existing tables.
Creating tables in Design View Design View is a more advanced method for creating a new table. It allows you to directly enter information about each field in the table. We will use this method for the tables of our database. Note While the Field type and formatting are different in Design View, the concepts are the same as in the Wizard. The first table to be created is Fuel. Its fields are FuelID, Date, FuelCost, FuelQuantity, Odometer, and PaymentType. FuelCost uses currency and two decimal places.
Figure 180: Primary key field Click Primary Key in the context menu. This places a key icon in front of FuelID. Note The primary key serves only one purpose. Any name can be used for this field. It is not necessary to use FuelID as the name of the primary key field. We have used it so we know to which table it belongs by its name. 3) All other entries: • Enter the next field name in the first column (Field Name column). • Select the Field Type for each field. – For Date use Date[DATE].
Use Currency as the Category and your currency as the Format. My currency has two decimal places. Use what is appropriate for your currency. Figure 182: Field Format options 4) Repeat these steps for each field in the table. 5) To access additional formatting options, click the button to the right of the Format example panel (Format example button in Figure 181). 6) Description can be anything, or can be left blank. (Figure 183 is an example of this.) 7) To save and close the table, select File > Close.
Figure 183: Example of Description entries Creating tables for the list box When the same information can be used in several fields, design a table for each type of information. Each table will contain two fields: the information field, and ID in this order. Caution You must create these tables with the information field listed first and the and the ID field listed last. Failure to do so will produce the wrong results.
Figure 184: Table in Design View Note: If you have several tables to create with the same fields, design one table and produce the other tables by cutting and pasting. (See “Creating a table by copying an existing table” on page 247.) Adding data to the list table List tables do not require a form. Instead, add their data directly to the table. In this example, use the names of the two people with a bank card and Cash for cash purchases.
Figure 185: View of some fields from the Vacations table A View is also a table. Its fields come from the fields of one or more tables of the database. It provides a way to look at a number of fields without regard to the table to which any of the fields belong. A View can consists of some of the fields of one table as in Figure 185. Or, it can consist of fields from more than one field as in Figure 186.
of the other tables which use the entries of the Payment Type table. That will be done when the forms are created. The Fuel and Maintenance tables do not really have a relationship even though they share similar fields: Date, and Odometer. Unless a person is in a habit of regularly getting fuel and having their vehicle serviced, the entries in these tables do not share anything in common. Tip As you create your own databases, you need to also determine where tables are related and how.
• Click and drag the Date field in the Fuel table to the Date field in the Vacations table. When you release the mouse button, a connecting line forms between the two date fields (Figure 189). Figure 189: Designation for a 1:n relationship • Or, click the New Relation icon. This opens the Relations window (Figure 190). Our two tables are listed in the Tables involved section. – In the Fields involved section, click the dropdown list under the Fuel label.
a) Right-click the line connecting the Date fields in the two table lists to open a context menu. b) Select Edit to open the Relation window (Figure 192). c) Select Update cascade. d) Select Delete cascade. Figure 192: Update options and Delete options section While these options are not absolutely necessary, they do help. Having these options selected permits you to update a table that has a relationship defined with another table. It also permits you to delete a field from the table.
made from the same table with a text label (Fuel Purchases), a list box placed in PaymentType, and a graphic background. Using the Wizard to create a form We will use the Form Wizard to create two forms: CD Collection and Vacations. The CD Collection form will be a simple form, while the Vacations form will contain a form and a subform. We will create the Vacations form with its subform and let you modify the CD Collection form using the same process.
Figure 196: Adding a subform Step 3: Add subform fields. This step is exactly the same as step 1. The only difference is that not all of the fields will be used in the subform. 1) 2) 3) 4) 5) Select Fuel under Tables or queries. Use the >> button to move all the fields to the right. Click the FuelID field to highlight it. Use the < button to move the FuelID to the left (Figure 197). Click Next. Figure 197: Selecting fields of a subform Step 4: Get joined fields.
Figure 198: Selection of joined subform and main form fields 1) Select Date from the First joined subform field dropdown list. This is the Date field in the Fuel table. This is not the Primary key for the Fuel table, but it is known as a Foreign key. 2) Select Date from the First joined main form field dropdown list. This is the Date field in the Vacations table. This is the Primary key for the Vacations table. Click Next.
1) Arrangement of the main form: Click Columnar - Labels on top. The labels will be placed above their field. 2) Arrangement of the subform: Click As Data Sheet. (The labels are column headings and the field entries are in spreadsheet format.) Click Next. Figure 199: Control arrangements Step 6: Set data entry. Unless you have a need for any of these entries to be checked, accept the default settings. Click Next. Step 7: Apply styles. 1) Select the color you want in the Apply Styles list.
Modifying a form We will be moving the controls to different places in the form and changing the background to a picture. We will also modify the label for the PaymentType field as well as change the field to a list box. First, we must decide what we want to change and to what. The discussion will follow this ten step outline. 1) The Date field in the main form needs a dropdown capability. It also needs to be lengthened to show the day of the week, month, day, and year.
• Control+click a label or field selects only the label or the field (Figure 201). Figure 200: A selected control Tab key, you can change the selection from the field to the label or the label to the field. • By using the Figure 201: Selecting a field of a control • Moving a group of controls is almost as easy as moving one of them. 1) Click the field of the top left control to be moved, to select it. 2) Move the cursor to just above and to the left of the selected control.
Tip When either changing a size or moving a control, two properties of the Form Design toolbar should be selected: Snap to Grid, and Guides when Moving. Your controls will line up better, and an outline of what you are moving moves as the cursor moves. You should also have both rulers active (Tools > Options > OpenOffice.org Writer > View). Since the form is created in Writer, that is where you have to make sure both horizontal and vertical rulers have a check in the box in front of them.
Click the default No setting to open the list. Click Yes to select it. Tip To see what the Date field will look like, click the Form Mode On/Off icon (the second icon from the left in Figure 205). You can do this any time you want to see the form with the changes you have made. Step 2: Shorten the width of a field. All of the fields whose label contains the word payment are too wide. They need shortening before the controls are moved. 1) Control+click the BPayment field (Figure 206).
1) Click the first control you want to move. A border appears around the control with eight green handles. 2) Move the cursor over the label or field of the control. It becomes a double arrow (Figure 203). 3) Drag and drop the control to where you want it. Caution Do not use Control+click when moving a field. It moves either the field or the label but not both. To move both, use a mouse click and drag to the desired spot. 4) Use the same steps to move the rest of the controls to where they belong.
– – – Use the spacebar to make SnackNo into two words. Place a . (period) after the No. (Figure 209). Close the properties window. Figure 209: Multi-word label • Or, click the Control icon in the Form Control toolbar (Figure 210). The Properties window opens. The rest of the steps are the same. Figure 210: Form Controls toolbar 2) Use the same procedure to change these labels as well: BPayment to Payment, LPayment to Payment, SPayment to Payment, Miscellaneous to Misc.
Step 6: Replace fields with other fields. We want to replace the PaymentType field with a List Box. Then we can choose the type of payment from the Payment Type table rather than having to manually enter the type. In my case, each of my payment types begins with a different letter. If I enter the first letter of the payment type, the rest of the word automatically appears. I can then go to the next field. 1) Control+click the Payment field for Breakfast.
Figure 213: Dropdown list open to reveal choices 5) Click the Data tab. • Type of list contents is a dropdown list. Change it to Sql. Figure 214: Type of list contents dropdown list • Type the following exactly as it is in the List contents box: SELECT "Type", "Type" FROM "Payment Type" Figure 215: List content for payment type fields 268 Getting Started with OpenOffice.
You should be able to copy and paste SELECT "Type", "Type" FROM "Payment Type" from above directly into the List content box. Just make sure you copy from the S in SELECT to the double quotation mark after the phrase Payment Type and no more than this. Tip Note • • What you wrote is called an SQL command. The words SELECT and FROM are written in capital letters because they are commands.
3) Scroll down to the Scrollbars setting. Change the selection from None to Vertical in this dropdown list. Figure 217: Scrollbar selections in the Properties window 4) Close the Properties window. 5) Lengthen the Note field. a) Move the cursor over the middle green handle at the bottom of the Note field. It becomes a vertical single arrow. b) Drag the cursor down until the length is 6 cm (2.4 inches). Step 8: Change labels and fields in a subform. The Date column needs to be widened.
2) Select Replace with, and then select List box from the context menu. 3) Again right-click the label PaymentType to open a context menu. 4) Select Column. This opens the Properties window (Figure 219). 5) In the Label box, change PaymentType to Payment Type. 6) Click the Data tab. 7) From the Type of list contents dropdown list, select sql. 8) Type the following exactly as it is written: SELECT "Type", "Type" FROM "Payment Type" 9) Close the Properties window.
4) Use the spacebar to move the cursor to where you want the heading to start. 5) Type the heading Meals. 6) Use the spacebar to move the cursor to the center of snack area. 7) Type the heading Snacks. 8) Use the Enter key to move the cursor between the Supper control and the subform. 9) Use the spacebar to move the cursor to the center of the subform. 10) Type the heading Fuel Data. Note If you know how to use styles, you can open the Styles and Formatting window using F11.
d) Change the Background selection from Default to Light cyan. (This is a dropdown list.) 2) Select the other labels in the same way and then change their background color. 3) Close the Properties window. 4) Press the F11 key to open the Styles and Formatting window (Figure 223). Notice the left icon has a black outline around it. This is the Paragraph Styles icon. Below it is a list of paragraph styles including headings. Note I have chosen to use Light cyan as the background color for my labels.
Figure 225: Left side of Font Effects tab d) Click OK to close the Paragraph Style: Heading 2 dialog. e) Press the F11 key to close the Formatting and Styles window. Tip Learning how to use styles can be very helpful at times. By using styles, we changed the font color for all three headings at one time. There are other methods of changing the font color, but they require repeating the same steps for each heading. 5) Right-click the background and select Page from the context menu.
d) Select this file and click Open. e) In the Type section, select Area. f) Click OK to close the Page Style: Default window. The form should look like Figure 227. Figure 227: Finished form Step 11: Change the tab order. The Tab key moves the cursor from field to field. This is much easier to do than to click each field to enter data into it. It also permits us to group our expenses into areas before we begin entering data.
Figure 229: Tab Order window • • • Find the txtMPayment listing near the bottom of the list and click it. Click the Move Up button until txtPayment is just below fmtMotel. Use the same two steps to put the fields in the same order as in Figure 230. Click OK. Figure 230: Tab order for the main form 5) Save and close the form. 6) Save the database. 276 Getting Started with OpenOffice.
Creating forms in Design View This method requires using the Form Controls and Form Design toolbars extensively. These techniques are beyond the scope of this document. Instructions for creating forms using Design view will be described in the Database Guide. Creating subforms in Design View Again, this is beyond the scope of this document. Creation of subforms in Design View will be described in the Database Guide. Accessing other data sources OpenOffice.
Accessing a dBase database 1) File > New > Database opens the Database Wizard window. Note Clicking the New icon and Database in the drop-down menu also open the Database Wizard window. (See Figure 175.) 2) Select Connect to an existing database. Pressing the Tab key highlights the Database type drop-down list. Typing D selects dBase. Click Next. Note Clicking the arrows opens a menu from which you can select dBase (Figure 231).
2) Select Connect to an existing database. Select Spreadsheet as the Database type (Figure 231). 3) Click Browse to locate the spreadsheet you want to access. If the spreadsheet is password protected, check the Password required box. Click Next. 4) If the spreadsheet requires a user’s name, enter it. If a password is also required, check its box. Click Next. Caution This method of accessing a spreadsheet does not allow you to change anything in the spreadsheet.
This brings up Tables and Queries. Click on the + next to Tables to view the individual tables created. Now click on a table to see all the records held in it. Figure 232: Databases Editing data sources Some data sources can be edited in the View Data Sources dialog. A spreadsheet can not. A record can be edited, added or deleted. The data is displayed on the right side of the screen. Click in a field to edit the value. Beneath the records are five tiny buttons.
Using data sources in OOo documents Data can be placed into Writer and Calc documents from the tables in the data source window. In Writer, values from individual fields can be inserted. Or, a complete table can be created in the Writer document. One common way to use a data source is to perform a mail merge.
3) Replacing the first name: • Continue typing after : paid by making sure to add a space afterward. • Click the Bpayment field name and drag it to the right of what you just typed. • Place a comma after . • Results so far: On our breakfast cost paid by , 4) Follow these examples to fill in the rest of the fields in the sentence. • • • Use and for the second set of (amount) and (name) in the sentence.
Figure 235: Selected row in data source window 1) Navigate to the place you want to place the table and click the location. 2) Click the gray box to the left of each row of the data source that you want to be a row in your table. 3) Click the Data to text icon to open the Insert Database Columns dialog (Figure 236). (The Data to text icon is circled in red in Figure 235.
5) Select the settings for your table. Use the default settings as in Figure 236. 6) Click OK. 7) Save the document. Calc spreadsheets There are two ways to enter data in a Calc spreadsheet. One enters the data into the spreadsheet cells. The other creates records in the spreadsheet just like they are done in creating a form in a database. While you can directly access the data in the spreadsheet cells, you can only see the data in the records created in the spreadsheet.
4) Close the Data Source window: use F4. 5) Save the spreadsheet and click the Edit File button to make the spreadsheet read only. All of the fields will show the value for the data of the first record you selected. 6) Add the Form Navigation toolbar: View > Toolbars > Form Navigation. Figure 237: Navigation arrows of a form 7) Click the arrows on the Form Navigation toolbar to view the different records of the table. (The arrows are circled in red.
The first step to entering data in a form is to open it from the main database window. 1) Click the Forms icon in the Database list. 2) Find the form’s name in the Forms list (Vacations). 3) Double-click the form’s name. The quickest way to enter a date in the Date field is to click the arrow that opens the dropdown calendar. Then click the day the you want (Figure 239). To change the month use the following steps. Then use the Tab key to go to the Odometer field.
• If two or more elements of the list have the same first letter, repeated typing of the first letter will cycle through the elements with this same first letter. So, if you accidentally go past the the element you wanted, you can keep typing the first letter until it reappears again. • When the selection is correct, use the Tab key to go to the Misc. field. The rest of the fields of the main form are either numerical fields or dropdown lists until we reach the Misc. Notes field. It is a text field.
• Or, click the Tip New Record icon. The number in the Record box is the number of the record whose data is shown in the form. (The data from the second record of the Vacations form was displayed when I took the screenshot for Figure 240.) If you know the number of the record you want, you can enter it into the record box and then use the Enter key to take you to that record. Figure 240 is a record with data inserted in its fields. Note that not all fields have data in them.
from the Fuel table includes what our fuel economy is. We will do this using the Design View. Note Queries blur the differences between a database and a data source. A database is only one type of data source. However, searching for usable information from a data source requires a query. Since the query (one part of a database) does this, the data source appears to become one part of that database: its table or tables. Query results, themselves, are special tables within the database.
Note When working with a query, more than one table can be used. Since different tables may contain the same field names, the format for naming fields in a query is Table name and field name. A period (.) is placed between the table name and the field name. For example, The Lunch field of the Vacation table used in a query has the name Vacation.Lunch. Step 1: Select the fields. 1) Select the CD-Collection table from the dropdown list of tables.
In our query, the artist is most important. The album title is less important, and the date purchased is of least importance. Of course, if we were interested in what music we bought on a given day, the date purchased would be the most important. Figure 243: Sorting order page 1) Click the first Sort by dropdown list. • Click CD-Collection.Artist to select it. • If you want the artists to be listed in alphabetical order (a-z), select Ascending on the right.
Note These conditions apply to numbers, letters (using the alphabetical order), and dates. 1) Since we are only searching for one thing, we will use the default setting of Match all of the following. 2) We are looking for a particular artist, so select is equal to. 3) Enter the name of the artist in the Value box. Click Next. Step 4: Select type of query. We want simple information, so the default setting: Detailed query is what we want. Click Next at the bottom of the window.
Caution The procedures we will be using only work with relational databases. This is because of how relational databases are constructed. The elements of a relational database are unique. (The primary key insures this uniqueness.) That is, there are no two elements which are exactly alike. This allows us to select specific elements to place into our queries. Without the elements of the relational database being unique from all other elements, we could not perform these procedures.
3) Double-click the FuelQuantity field. The table at the bottom of the query window should now have three columns (Figure 246). Figure 246: Query table Step 4: Set the criterion for the query. We want to the query's FuelID to begin with the numeral 1. 1) Type >0 in the Criterion cell under FuelID in the query table 2) Click the Run Query icon in the Query Design toolbar. This icon is circled in red in Figure 247.
2) Add the Fuel table to the query just as you did in step 2: Add tables. But, do not close the Add Tables window. 3) Add the End-Reading query to this query. a) Click the Query radio button to get the list of queries in the database (Figure 249). Figure 249: Selecting queries to add to another query b) Click End-Reading. c) Click Add, and then click Close. Step 7: Add fields to the table at the bottom of the query. We are going to calculate the fuel economy.
Step 8: Enter the FuelID difference field. We want the difference between the FuelID value of the Fuel table and FuelID value of the End-Reading query to equal one (1). 1) Type "End-Reading".FuelID - Fuel.FuelID in the field to the right of the Odometer field of the Fuel Table (Figure 252). Type the numeral 1 (one) in the Criterion cell of this column. Figure 252: Typing in calculation of fields 2) Calculate the distance traveled (Figure 253): • Type "End-Reading".Odometer – Fuel.
Caution When entering fields for these calculations, you must follow this format: table or query name followed by a period follow by the field name. For hyphenated or multiple-word names (table or query), use double quotes around the table or query name. The query will then add the rest of the double quotes as in Figure 252. Use the arithmetical symbol between the two. More than one calculation can be done by using parentheses to group the arithmetical operations.
Figure 258: Making a field invisible in a query run 5) Rerun the query (Figure 259). Figure 259: Query run with aliases Step 10: Close, save, and name the query. My suggestion for a name is Fuel Economy. There are obviously other calculations that can be made in this query such as cost per distance traveled and how much of the cost belongs to each of the payments types.
Caution Dynamic reports update only the data that is changed or added to a table or query. It does not show any modifications made to a table or query. For example, open the fuel economy query you just created. For the "End-Reading".”Odometer – Fuel.”Odometer” column, change the number 1 to the number 3 after creating the report below. The report will be identical before and after you make the change.
from to pay the expenses.) At the present time, using the data from the queries in a spreadsheet is the best way to handle reports like this. In the near future, the report feature will include these abilities. For our purposes, we will create two reports. The first one will list the expenses each day other than fuel. The second report will list the fuel costs each day.
Click the field label you want to change and make your changes as you would in any text box. • Shorten Miscellaneous to Misc. Click Next. 5) Since we are grouping by the date, use the > button to move the Date field to the Grouping list. Click Next. • Figure 261: Selecting fields for grouping data 6) Sort options. We do not want to do any additional sorting. Click Next. 7) Choose layout. We will be using the default settings for the layout. Click Next. 8) Create report.
Figure 262: Setting the criterion for a query 2) Save, name, and close the query. (Suggestion: Vacation Fuel Purchases.) Tip When using dates in a query, enter them in numerical form MM/ DD/YYYY or DD/MM/YYYY depending upon your language's default setting for dates (my default setting is MM/DD/YYYY). All dates must have a # before and after it. Hence, May 25, 2007 is written #05/25/2007# or #25/5/2007depending upon your language's default setting. 3) Open a new report.
Creating a dynamic report We will create a report with some statistics on our fuel consumption. To do this, we have to modify two queries: End-Reading and Fuel Economy. We will be adding the FuelCost field to the End-Reading query. Then we will add the FuelCost field from the End-Reading query to the Fuel Economy query. Tip When opening a query to edit it, it might appear as in Figure 263. If you move your cursor over the black line (circled in red), it becomes a double headed arrow.
3) Add the FuelCost field from the End-Reading query to the Fuel Economy query: • Right-click the Fuel Economy query and select Edit from the context menu. • Double-click the FuelCost field in the End-Reading query list to add it to the query table at the bottom. 4) Add a calculation field to the right of the FuelCost field. • Type the following in an Field cell in the table at the bottom:"End-Reading".FuelCost/("End-Reading".Odometer – Fuel.Odometer) • Type the following in its Alias cell: cost per mile.
Modifying a report At the end of the last section, we left the Fuel Statistics report open in the edit mode (Figure 265). We will be working on that report. These same steps can be used with any report that you open for editing. Figure 265: A report in edit mode The Author is the name you listed in Tools > Options > OpenOffice.org > User Data. The date is not correct. The columns need to be moved to the left to give a better appearance.
Step 2: Change the column widths. The column widths can be changed by moving the cursor over the right border of each column so that it becomes a double-headed arrow. Then drag and drop it to where you want it. This has to be done for each column in each table in the report. This can also be done with the last column on the right even though there is no black border. It should now look something like Figure 267. Figure 267: Realigned columns in a report Step 3: Change the number formating in the cells.
5) Change the Fuel Cost field. a) Right-click in the cell below Cost per mile. b) Select Number Format. c) In the Category list, select Currency. d) In the Option section: • Set the number of decimal places to 3. • Click the green checkmark. e) Click OK. Step 4: Save and close the report. Double-click the report. It should now look like Figure 269.
More ways to create reports An extension is available to assist in report creation. Sun Report Builder creates stylish, complex database reports. You can define group and page headers, group and page footers, and calculation fields. It is available from http://extensions.services.openoffice.org/. To install this extension, follow these steps: 1) Select Tools > Extension Manager from the menu bar. In the Extension Manager dialog, click Get more extensions here....
9 Chapter Getting Started with Math OpenOffice.
What is Math? Math is OpenOffice.org (OOo)’s component for writing mathematical equations. It is most commonly used as an equation editor for text documents, but it can also be used with other types of documents or stand-alone. When used inside Writer, the equation is treated as an object inside the text document. Note The equation editor is for writing equations in symbolic form (as in equation 1). If you want to evaluate a numeric value, see the Calc Guide.
The equation editor uses a markup language to represent formulas. For example, %beta creates the Greek character beta ( ). This markup is designed to read similar to English whenever possible. For example, a a over b produces a fraction: b . Entering a formula There are three ways to enter a formula: • Select a symbol from the Selection window. • Right-click on the equation editor and select the symbol from the context menu. • Type markup in the equation editor.
Tip You can hide (or unhide) the Selection window with View > Selection. Example 1: 5×4 For this example we will enter a simple formula: 5×4 On the Selection window: 1) Select the top-left button of the categories (top) section (Figure 272). 2) Click on the multiplication symbol (shown in Figure 272). Unary/binary operators Multiplication Figure 272.
Figure 274. Result of entering "5" and "4" next to the "times" operator Tip To keep the equation from updating automatically, select View >AutoUpdate display. To update a formula manually, press F9 or select View > Update. Right-click menu Another way to access mathematical symbols is to right-click on the equation editor. This produces a menu as shown in Figure 275. Figure 275. Right-click menu Note The entries in this menu correspond exactly to those in the Selection window.
Markup You can type the markup directly on the equation editor. For example, you can type “5 times 4” to obtain 5×4 . If you know the markup, this can be the fastest way to enter a formula. Tip As a mnemonic, the formula markup resembles the way the formula reads in English. Below is a short list of common equations and their corresponding markup.
Note A complete table of Greek characters is included in Chapter 16 (Math Objects) in the Writer Guide. Another way to enter Greek characters is by using the catalog window. Go to Tools > Catalog. The catalog window is shown in Figure 276. Under “Symbol Set” select “Greek” and double-click on a Greek letter from the list. Figure 276. Catalog - used for entering Greek characters Example 2: ≃ 3.
Figure 277. Tooltip indicates the "Relations" button. Step 4: Delete the > text and add “3.14159” at the end of the equation. Hence we end up with the markup “ %pi simeq 3.14159 ”. The result is shown in Figure 278. Figure 278. Final result Customizations Formula editor as a floating window As seen in Figure 271, the formula editor can cover a large part of the Writer window. To turn the formula editor into a floating window, do this: 1) Hover the mouse over the editor frame, as shown in Figure 279.
Figure 279. Hold down the Control key and double-click on the border of the math editor to turn it into a floating window. Figure 280 shows the result. You can make the floating window back into an embedded frame, using the same steps. Hold down the Control key and double-click the window frame. Figure 280. Equation editor as a floating window How can I make a formula bigger? This is one of the most common questions people ask about OOoMath.
Figure 281. Changing the font size for a formula 2) Select a larger font size under “Base Size” (top-most entry), as shown in Figure 281. Figure 282. Edit "Base size" (top) to make a formula bigger. The result of this change is illustrated in Figure 282. Figure 283. Result of changing the base font size. 318 Getting Started with OpenOffice.
Formula layout The most difficult part of using OOoMath comes when writing complicated equations. This section provides some advice about writing complex formulas. Brackets are your friends OOoMath knows nothing about order of operation. You must use brackets to state the order of operations explicitly. Consider the following example: Markup 2 over Result x + 1 2 over {x + 1} 2 1 x 2 x 1 Equations over more than one line Suppose you want to type an equation covering more than one line.
Common problem areas How do I add limits to my sum/integral? The “sum” and “int” commands can (optionally) take in the parameters “from” and “to”. These are used for lower and upper limits respectively. These parameters can be used singly or together. Limits for integrals are usually treated as subscripts and superscripts.
OOoMath provides “scalable” brackets. That is, the brackets grow in size to match the size of their contents. Use the commands left( and right) to make scalable brackets. Markup left( Tip Result matrix { a # b ## c # d } right) a b c d Use left[ and right] to obtain square brackets. How do I make a derivative? Making derivatives essentially comes down to one trick: Tell OOo it’s a fraction. In other words, you have to use the “over” command.
Now you can double-click on the formula to edit it. For example, here is the Riemann Zeta function: ∞ z = ∑ n= 1 1 z n (3) You can reference an equation (“as shown in Equation (2)”) with these steps: 1) Insert > Cross-reference.. 2) Click on the References tab (Figure 283). 3) Under Type, select Text. 4) Under Selection, pick the equation number. 5) Under Format, choose Reference. 6) Click Insert.
10 Chapter Printing, Exporting, and E-mailing
Introduction This chapter provides general information about printing, exporting, and e-mailing documents from OOo. Quick printing Click the Print File Directly icon to send the entire document to the default printer defined for your computer. Note You can change the action of the Print File Directly icon to send the document to the printer defined for the document instead of the default printer for the computer.
Figure 285. The Print dialog Selections on the Printer Options dialog are different in Writer, Calc, Impress, and Draw, but in all cases they apply to this printing of this document only. For details, see the chapters on the various OOo components. To specify default printing options, see Chapter 2 (Setting up OpenOffice.org) and the chapters on the various OOo components. Exporting to PDF OpenOffice.org can export documents to PDF (Portable Document Format).
Make your selections, and then click Export. Then you are asked to enter the location and file name of the PDF to be created, and click Save to export the file. General page of PDF Options dialog On the General page, you can choose which pages to include in the PDF, the type of compression to use for images (which affects the quality of images in the PDF), and other options. Figure 286: General page of PDF Options dialog Range section • All: Exports the entire document.
Images section • Lossless compression: Images are stored without any loss of quality. Tends to make large files when used with photographs. Recommended for other images. • JPEG compression: Allows for varying degrees of quality. A setting of 90% tends to work well with photographs (small file size, little perceptible loss of quality). • Reduce image resolution: Lower-DPI (dots per inch) images have lower quality. Note EPS images with embedded previews are exported only as previews.
an odd page, OOo inserts a blank page between the two odd pages. This option controls whether to export that blank page. Initial View page of PDF Options dialog On the Initial View page, you can choose how the PDF opens by default in a PDF viewer. The selections should be self-explanatory. Figure 287: Initial View page of PDF Options dialog User Interface page of PDF Options dialog On the User Interface page, you can choose more settings to control how a PDF viewer displays the file.
Figure 288: User Interface page of PDF Options dialog User interface options section • Hide menubar. Causes the PDF viewer to hide the menu bar. • Hide toolbar. Causes the PDF viewer to hide the toolbar. • Hide window controls. Causes the PDF viewer to hide other window controls. Transitions In Impress, displays slide transition effects as their respective PDF effects. Bookmarks Select how many heading levels are displayed as bookmarks, if Export bookmarks is selected on the General page.
Figure 289: Links page of PDF Options dialog Export URLs relative to file system If you have defined relative links in a document, this option exports those links to the PDF. Cross-document links Defines the behavior of links clicked in PDF files. Security page of PDF Options dialog PDF export includes options to encrypt the PDF (so it cannot be opened without a password) and apply some digital rights management (DRM) features.
open password set, the PDF can only be opened with the password. Once opened, there are no restrictions on what the user can do with the document (for example, print, copy, or change it). • With a permissions password set, the PDF can be opened by anyone, but its permissions can be restricted. See Figure 290. • With both the open password and permission password set, the PDF can only be opened with the correct password, and its permissions can be restricted.
In addition, OOo Writer can export to BibTeX (.bib), LaTeX 2e (.tex) and MediaWiki (.txt). OOo Draw and OOo Impress can export to Macromedia Flash (.swf). To export to one of these formats, choose File > Export. On the Export dialog, specify a file name for the exported document, then select the required format in the File format list and click the Export button.
To use the Mail Merge Wizard to send a previously-created Writer document: 1) Click Tools > Mail Merge Wizard. On the first page of the wizard (Figure 292), select Use the current document and click Next. Figure 292: Select starting document 2) On the second page (Figure 293), select E-mail message and click Next. Figure 293: Select document type 3) On the third page (Figure 294), click the Select Address List button. Select the required address list (even if only one is shown) and then click OK.
Figure 294: Selecting an address list 5) In the left-hand list, click 8. Save, print or send. OOo displays a “Creating documents” message and then displays the Save, print or send page of the Wizard. 6) Select Send merged document as E-Mail. The lower part of the page changes to show e-mail settings choices (see Figure 296). 7) Type a subject for your email and click Send documents. OOo sends the e-mails. Figure 295: Deselecting a salutation 334 Getting Started with OpenOffice.
Figure 296: Sending a document as an email message Digital signing of documents To sign a document digitally, you need a personal key, the certificate. A personal key is stored on your computer as a combination of a private key, which must be kept secret, and a public key, which you add to your documents when you sign them. You can get a certificate from a certification authority, which may be a private company or a governmental institution.
On Windows operating systems, the Windows features of validating a signature are used. On Solaris and Linux systems, files that are supplied by Thunderbird, Mozilla or Firefox are used. For a more detailed description of how to get and manage a certificate, and signature validation, see “Using Digital Signatures” in the OOo Help. To sign a document: 1) Choose File > Digital Signatures. 2) If you have not saved the document since the last change, a message box appears. Click Yes to save the file.
11 Chapter Graphics, the Gallery, and Fontwork
Introduction You can add graphic and image files, including photos, drawings, scanned images, and others, to OpenOffice.org documents. OOo can import various vector (line drawing) and raster (bitmap) file formats. The most commonly used graphic formats are GIF, JPG, PNG, and BMP. Inserting an image from a file To insert an image from a file, the file must be already stored in a directory (folder) on the computer. 1) Determine the destination for the image.
image remain as two separate files, and they are merged together only when you open the document again. Linking an image has two advantages and one disadvantage: • Advantage – Linking can reduce the size of the document when it is saved, because the image file itself is not included. File size is usually not a problem on a modern computer with a reasonable amount of memory, unless the document includes many large graphics files; OOo can handle quite large files.
Figure 298: The Edit Links dialog Note Going the other way, from embedded to linked, is not so easy— you must delete and reinsert each image, one at a time, selecting the Link option when you do so. Inserting images from a graphics program You can use many different graphics programs to edit a graphic file. From these programs, you can select, copy, and paste an image or part of a graphic into an OpenOffice.org document. Figure 299 shows an example of this procedure. Figure 299.
1) In the graphics program window, select an area of the image to be copied. 2) Move the cursor over the selected area and press Control+C to copy. 3) Switch to the OpenOffice.org window. 4) Click to place the cursor where the graphic is to be inserted. 5) Press Control+V to paste the image. Inserting images using a scanner If a scanner is connected to your computer, OOo can call the scanning application and inserted the scanned item into the OOo document page as an image.
The box on the left of the gallery window lists the available themes. Click on a theme to see its graphics displayed in the Gallery window. Figures 300 and 301 show two views of one of the themes supplied with OpenOffice.org. You have the option of Icon View or Detailed View for the Gallery, and you can hide or show the Gallery by clicking on the Hide button. Figure 300. Icon view of one theme in the Gallery Figure 301.
Inserting objects as links To insert an object as a link: 1) Choose Tools > Gallery and select a theme. 2) Select an object with a single click, then while pressing the Shift and Ctrl keys, drag and drop the object into the document. Figure 302. Copying a graphic object from the Gallery into a document Inserting an object as a background To insert an object as the background to a page or paragraph: 1) Choose Tools > Gallery and select a theme.
Adding objects to the Gallery You may wish to add to the Gallery any images that you use frequently, for example, a company logo. You can then very easily insert these graphics into a document later. You can add images only to “My Theme” or to any other theme that you have created; these are indicated by a green icon in the list of themes. You cannot add images to the built-in themes, indicated by an icon of another color.
Deleting images from the Gallery To delete an image from a theme: 1) Right-click on the name of the image file or its thumbnail in the Gallery. 2) Click Delete on the pop-up menu. A message appears, asking if you want to delete this object. Click Yes. Note Deleting the name of a file from the list in the Gallery does not delete the file from the hard disk or other location.
The location of the user Gallery is specified in Tools > Options > OpenOffice.org > Paths. You can change this location, and you can copy your gallery files (*.sdv) to other computers. Gallery contents provided with OOo are stored in a different location. You cannot change this location. What is Fontwork? With Fontwork you can create graphical text art objects for making your work more attractive.
Figure 304. The Fontwork Gallery 3) Double-click the object to edit the Fontwork text. Type your own text in place of the black Fontwork text that appears over the object (Figure 305). Figure 305. Editing Fontwork text 4) Click anywhere in a free space or press Esc to apply your changes.
Editing a Fontwork object Now that the Fontwork object is created, you can edit some of its attributes. To do this, you can use the Fontwork toolbar, the Formatting toolbar, or menu options as described in this section. Using the Fontwork toolbar Make sure that the Fontwork toolbar, shown in Figure 303, is visible. If you do not see it, go to View > Toolbars > Fontwork. Click on the different icons to edit Fontwork objects. Fontwork Shape: Edits the shape of the selected object.
Fontwork Alignment: Changes the alignment of characters. Choices are left align, center, right align, word justify, and stretch justify. The effects of the text alignment can only be seen if the text spans over two or more lines. In the stretch justify mode, all the lines are filled completely. Fontwork Character Spacing: Changes the character spacing and kerning in the object.
Note that in this figure the toolbar has been undocked for ease of illustration: unless you have chosen to float the toolbar in this way, it appears in its default, docked position somewhere below the menu bar. On the Formatting toolbar you have a large choice of options for customizing your object. These choices are the same as the ones for other drawing objects. You can read about them in more detail in the Draw Guide.
Area options Area icon: Opens a dialog (Figure 310) with seven tabs: Area, Shadow, Transparency, Colors, Gradients, Hatching, Bitmaps. • Area tab: Choose from the predefined list a color, bitmap, gradient or hatching pattern to fill the selected object. • Shadow tab: Set the shadow properties of the selected object. • Transparency tab: Set the transparency properties of the selected object. • Colors tab: Modify the available colors or add new ones to appear on the Area tab.
Positioning options Rotate icon: Rotate the selected object manually using the mouse to drag the object. To Foreground icon: Moves the selected object in front of the text. To Background icon: Moves the selected object behind the text. Alignment icon: Modifies the alignment of the selected objects. Bring to front icon: Moves the selected object in front of the others. Send to back icon: Moves the selected object behind the others.
On the Position and Size dialog (Figure 311), you can enter precise values concerning size and position. For more information, see the Draw Guide. Figure 311. Position and Size dialog Moving and resizing Fontwork objects When you select a Fontwork object, eight blue squares (known as handles) appear around the edge of the object, as shown below. You can drag these handles to resize the object. A yellow dot also appears on the object.
12 Chapter Creating Web Pages Saving documents as HTML files
Introduction This chapter describes how to save documents as web pages from Writer, Calc, Draw and Impress. Note Cross references do not become hyperlinks in an HTML document. Inserting hyperlinks When you type text (such as a website addresses or URL) that can be used as a hyperlink, OOo formats it automatically, creating the hyperlink and applying to the text a color and underlining. If this does not happen, you can enable this feature using Tools > AutoCorrect > Options and selecting URL Recognition.
Figure 312. Hyperlink dialog showing details for Internet links The top right part of the dialog changes according to the choice made for the hyperlink type. A full description of all the choices, and their interactions, is beyond the scope of this chapter. Here is a summary of the most common choices used in presentations. For an Internet type hyperlink, choose the type of hyperlink (choose between Web, FTP or Telnet), and enter the required web address (URL).
• Set the value of Frame to determine how the hyperlink will open. • • • • This applies to documents that open in a Web browser. Form specifies if the link is to be presented as text or as a button. Text specifies the text that will be visible to the user. Name is applicable to HTML documents. It specifies text that will be added as a NAME attribute in the HTML code behind the hyperlink.
Note Writer does not replace multiple spaces in the original document with the HTML code for non-breaking spaces. If you want to have extra spaces in your HTML file or web page, you need to insert non-breaking spaces in OOo. To do this, press Control+Spacebar instead of just Spacebar. Saving a document as a series of web pages Writer can save a large document as a series of web pages (HTML files) with a table of contents page.
Creating web pages using a Wizard OOo’s Web wizard allows you to create several types of standard web pages. To use it: 1) Select File > Wizards > Web Page. On the first page of the Wizard, choose settings and click Next. Note If this is your first web page, the only settings option is Default. 2) Choose or browse to the document you would like to format. The Title, Summary and Author information is picked up from the document’s properties; if necessary, edit it. Click Next.
3) Chose a layout for the web site by clicking on the layout boxes. Click Next. 4) Chose the information to be listed and the screen resolution. Click Next. 360 Getting Started with OpenOffice.
5) Select a style for the page. Use the drop-down list to choose different styles and color combinations. You can browse to a background image and icon set from the Gallery. Click Next. 6) Enter general information such as Title and HTML Metadata information. Click Next. 7) Chose where to save the file and preview the page if you wish. Click Finish.
To edit or view the document’s underlying HTML code, click View > HTML Source or click the HTML Source icon on the Main toolbar. Saving Calc spreadsheets as web pages Calc can save files as HTML documents. As for Writer, use File > Save As and select HTML Document, or File > Wizards > Web Page. If the file contains more than one sheet, the additional sheets will follow one another in the HTML file. Links to each sheet will be placed at the top of the document.
1) To begin, select File > Export and choose HTML Document as the file type. 2) Create a folder for the files, supply a name for the resulting HTML file, and click Save. The HTML Export Wizard opens. Note Depending on the size of your presentation and the number of graphics it contains, the HTML export function creates many HTML, JPG, and GIF files. If you simply save to your desktop (not in a specific folder), these separate HTML and graphics files will be all over your desktop.
• WebCast: generates an ASP or Perl application to display the slides. Unfortunately OOo has no direct support for PHP as yet. 5) Decide how the images will be saved (PNG, GIF, or JPG) and what resolution to use. When choosing a resolution, consider what the majority of your viewers might have. If you use a high resolution, then a viewer with a medium-resolution monitor will have to scroll sideways to see the entire slide—probably not desirable.
This page of the Wizard does not display if Create title page was not chosen. 7) Choose the navigation button style to use to move from one page to another. If you do not choose any, OOo will create a text navigator. 8) Select the color scheme for the web pages. Available schemes include the document’s existing scheme, one based upon browser colors, and a completely user-defined scheme. You can save a new scheme so that it will appear on the first page of the HTML export wizard.
9) Click Create to generate the HTML files. If this is a new design, a small dialog pops up. If you might want to reuse this design, you can give it a name and save it. Otherwise, click Do Not Save. Saving Draw documents as web pages Exporting drawings from OpenOffice.org’s Draw application is similar to exporting a presentation from Impress. Use File > Export and select HTML Document as the file type. When using the wizard, you can choose to create the web page at any time by clicking the Create button.
13 Chapter Getting Started with Macros Using the macro recorder
Your first macro A macro is a saved sequence of commands or keystrokes that are stored for later use. An example of a simple macro is one that “types” your address. The OpenOffice.org macro language is very flexible, allowing automation of both simple and complex tasks. Macros are especially useful to repeat a task the same way over and over again. OpenOffice.org macros are usually written in a language called StarBasic, or just abbreviated Basic.
Figure 314: OOo Macro Organizer dialog, DBInspection library selected 5) The default module name is Module1; choose a better name. Although it is still not descriptive, I used Recorded. Type a descriptive name and click OK to create the module. The OpenOffice.org Basic Macros dialog is displayed again, showing the new module. Figure 315: Give your module a meaningful name 6) Highlight the newly created module.
Figure 316: Select your macro and click Run There are other methods to run a macro. For example, use Tools > Macros > Organize Macros > OpenOffice.org Basic to open the macro organizer, which contains a Run button as well. The author, an avid macro writer, prefers the macro organizer because the dialog usually opens faster, but the selection process may be slightly slower. Viewing and editing the macro You can view and edit the macro that was just created. Use Tools > Macros > Organize Macros > OpenOffice.
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ------------------------------------------------------------dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "Text" args1(0).Value = "Andrew Pitonyak" dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1()) end sub The macro in Listing 1 is not as complicated as it first appears. Learning a few things helps significantly in understanding the generated macros.
• Another kind of subroutine is called a function. A function is a subroutine that returns a value. The keyword FUNCTION is used rather than SUB to define a function. Generated macros are always of type SUB. Defining variables using DIM You can write information on a piece of paper so that you can look at it later. A variable, like a piece of paper, contains information that can be changed and read. The DIM statement is similar to setting aside a piece of paper to be used to store a message or note.
CreateUnoService accepts the name of a service and it tries to create an instance of that service. On completion, the dispatcher variable contains a reference to a DispatchHelper. dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") Declare an array of properties. Each property has a name and a value. In other words, it is a name/value pair. The created array has one property at index zero. dim args1(0) as new com.sun.star.beans.
first column indicates the constant name. Each name is followed by a space and a tab. DONTKNOW The font weight is not specified/known. THIN specifies a 50% font weight. ULTRALIGHT specifies a 60% font weight. LIGHT specifies a 75% font weight. SEMILIGHT specifies a 90% font weight. NORMAL specifies a normal font weight. SEMIBOLD specifies a 110% font weight. BOLD specifies a 150% font weight. ULTRABOLD specifies a 175% font weight. BLACK specifies a 200% font weight.
10) 11) 12) 13) 14) 15) 16) 17) Press Backspace twice to remove the two trailing spaces. Press Home to move the cursor to the start of the line. Press Ctrl+V to paste the selected number to the start of the line. Pasting the value also pasted an extra space, so press Backspace to remove the extra space. Press Tab to insert a tab between the number and the name. Press Home to move to the start of the line. Press down arrow to move to the next line. Stop recording the macro and save the macro.
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args6()) rem (6) Press Ctrl+Right Arrow twice to move the cursor to the number. dispatcher.executeDispatch(document, ".uno:GoToNextWord", "", 0, Array()) rem ------------------------------------------------------------dispatcher.executeDispatch(document, ".uno:GoToNextWord", "", 0, Array()) rem (7) Press Ctrl+Shift+Right Arrow to select the number. dispatcher.executeDispatch(document, ".
Cursor movements are used for all operations (as opposed to searching). If run on the DONTKNOW line, the word weight is moved to the front of the line, and the first “The” is changed to “She”. This is not perfect, but I should not have run the macro on the lines that did not have the proper format; I need to do these manually. Running the macro quickly It is tedious to repeatedly run the macro using Tools > Macros > Run Macro (see Figure 316). The macro can be run from the IDE.
The dispatch framework can also be used to send “commands” back to the UI (User Interface). For example, after saving the document, the File Save command is disabled. As soon as the document has been changed, the File Save command is enabled. If we see a dispatch command, it is text such as .uno:InsertObject or .uno:GoToStartOfLine. The command is sent to the document’s frame, and the frame passes on the command until an object is found that can handle the command.
as you learn more. Learning to read generated macros is a good place to start. If you record Calc macros, and the recorder can correctly generate a macro, there is an add-in created by Paolo Mantovani, which converts Calc macros when they are recorded. The final code manipulates OpenOffice.org objects rather than generating dispatches. This can be very useful for learning the object model. You can download the macro recorder from Paolo’s web site directly or from the OOo Macros web site.
• A library container contains one or more libraries, and each library is contained in one library container. • A library contains zero or more modules, and each module is contained in one library. • A module contains zero or more macros, and each macro is contained in one module. Figure 318: Macro Library hierarchy Use Tools > Macros > Organize Macros > OpenOffice.org Basic to open the OpenOffice.org Basic Macros dialog (see Figure 319). All available library containers are shown in the Macro from list.
Macros container. The My Macros container is stored in your user area or home directory. If a macro is contained in a document, then a recorded macro will attempt to work on that document; primarily because it uses “ThisComponent” for its actions. Every library container contains a library named Standard. It is better to create your own libraries with meaningful names than to use the Standard library.
example, on one or more of my OpenOffice.org upgrades, all of my macros disappeared. Although the macros were still on disk, the macros were not copied to the new directories. The solution was to import the macros into the new installation. Use Tools > Macros > Organize Dialogs to open the OpenOffice.org Macros organizer dialog. Another common way to open this dialog is to use Tools > Macros > Organize Macros > OpenOffice.org Basic to open the OpenOffice.
Figure 321: Select a macro library to import Navigate to the directory containing the library to import. There are usually two files from which to choose, dialog.xlb and script.xlb. It does not matter which of these two files you select; both will be imported. Select a file and click Open to continue (see Figure 322). Figure 322: Choose library import options If the library already exists, it will not be replaced unless Replace existing libraries is checked.
Downloading macros to import Macros are available for download. Some macros are contained in documents, some as regular files that you must select and import, and some as macro text that should be copied and pasted into the Basic IDE; use Tools > Macros > Organize Macros > OpenOffice.org Basic to open the OpenOffice.org Macros dialog, choose the macro to edit, and then click Edit to open the macro in the Basic IDE. Some macros are available as free downloads on the Internet (see Table 3). Table 3.
Figure 323: Use the Macro Selector dialog to run macros Although you can use Tools > Macros > Run Macro to run all macros, this is not efficient for frequently run macros. A more common technique is to assign a macro to a toolbar button, menu item, keyboard shortcut, or a button embedded in a document.
To add a menu item, keyboard shortcut, or toolbar icon that calls a macro, use the Customize dialog (see Figure 325). Open this dialog in either of these ways: • Choose Tools > Customize from the main menu bar. • Each toolbar has an icon that opens a menu; choose the Customize Toolbar option. Tip Complete coverage of the Customize dialog is beyond the scope of this document. Click the Help button to access the help pages included with OpenOffice.org.
Toolbar Macros can be added to toolbars. For more about modifying toolbars, see Chapter 14 (Customizing OpenOffice.org). Menu item Use Tools > Customize to open the Customize dialog, and select the Menus tab. You can modify an existing menu, or create new menus that call macros. For more about modifying menus, see Chapter 14. Keyboard shortcuts Use Tools > Customize to open the Customize dialog, and select the Keyboard tab. Assigning keyboard shortcuts is discussed in Chapter 14. Event In OpenOffice.
Figure 325: Assign macro to an application level event A common use is to assign the Open Document event to call a specific macro. The macro then performs certain setup tasks for the document. Select the desired event and click the Macro button to open the Macro Selector dialog (see Figure 326). Select the desired macro and click OK to assign the macro to the event. The Events tab shows that the event has been assigned to a macro (see Figure 327). When the document opens, the PrintHello macro is run.
Figure 326: Assign macro to the document open event Figure 327: PrintHello is assigned to the Open Document event Extensions An extension is a package that can be installed into OpenOffice.org to add new functionality. Extensions can be written in almost any programming language and may be simple or sophisticated.
Although individual extensions can be found in different places, there is an extension repository at: http://extensions.services.openoffice.org/. For more about obtaining and installing extensions, see Chapter 14 (Customizing OpenOffice.org). Writing macros without the recorder The examples covered in this chapter are created using the macro recorder and the dispatcher. You can also write macros that directly access the objects that comprise OpenOffice.org.
Finding more information Numerous resources are available that provide help with writing macros. Use Help > OpenOffice.org Help to open the OOo help pages. The upper left corner of the OOo help system contains a dropdown list that determines which help set is displayed. To view the help for Basic, the drop-down must display Help about OpenOffice.org Basic. Included material Many excellent macros are included with OOo. Use Tools > Macros > Organize Macros > OpenOffice.org Basic to open the Macro dialog.
http://documentation.openoffice.org (contains content related to macros) http://ooextras.sourceforge.net/ (examples) http://sourceforge.net/project/showfiles.php?group_id=43716 (examples) http://homepages.paradise.net.nz/hillview/OOo/ (numerous excellent macros, including reveal codes macros, key macros, and information on converting from MS Office) Published material The following published sources contain macro examples. The most obvious example is the documentation from Sun.
14 Chapter Customizing OpenOffice.
Introduction This chapter describes some common customizations that you may wish to do. You can customize menus, toolbars, and keyboard shortcuts in OpenOffice.org, add new menus and toolbars, and assign macros to events. However, you cannot customize context (right-click) menus. Other customizations are made easy by extensions that you can install from the OpenOffice.org website or from other providers. Note Customizations to menus and toolbars can be saved in a template.
Figure 328. The Menus page of the Customize dialog Creating a new menu In the Customize dialog, click New to display the dialog shown in Figure 329. 1) Type a name for your new menu in the Menu name box. 2) Use the up and down arrow buttons to move the new menu into the required position on the menu bar. 3) Click OK to save. The new menu now appears on the list of menus in the Customize dialog. (It will appear on the menu bar itself after you save your customizations.
Figure 329: Adding a new menu Modifying existing menus To modify an existing menu, select it in the Menu list and click the Menu button to drop down a list of modifications: Move, Rename, Delete. Not all of these modifications can be applied to all the entries in the Menu list. For example, Rename and Delete are not available for the supplied menus. To move a menu (such as File), choose Menu > Move. A dialog similar to the one shown in Figure 329 (but without the Menu name box) opens.
3) Add a tilde (~) in front of the letter that you want to use as an accelerator. For example, to select the Save All command by pressing Alt+V, enter Sa~ve All. Adding a command to a menu You can add commands to the supplied menus and to menus you have created. On the Customize dialog, select the menu in the Menu list and click the Add button in the Menu Content section of the dialog. On the Add Commands dialog, select a category and then the command, and click Add.
Menu Content. Click the Modify button and choose the required action from the drop-down list of actions. Most of the actions should be self-explanatory. Begin a group adds a separator line after the highlighted entry. Customizing toolbars You can customize toolbars in several ways, including choosing which icons are visible and locking the position of a docked toolbar, as described in Chapter 1 (Introducing OpenOffice.org).
To customize toolbars: 1) In the Save In drop-down list, choose whether to save this changed toolbar for the application (for example, Writer) or for a selected document. 2) In the section OpenOffice.org Toolbars, select from the Toolbar dropdown list the toolbar that you want to customize.
2) The Add Commands dialog is the same as for adding commands to menus (Figure 330). Select a category and then the command, and click Add. The dialog remains open, so you can select several commands. When you have finished adding commands, click Close. If you insert an item which does not have an associated icon, the toolbar will display the full name of the item: the next section describes how to choose an icon for a toolbar command.
Example: Adding a Fax icon to a toolbar You can customize OpenOffice.org so that a single click on an icon automatically sends the current document as a fax. 1) Be sure the fax driver is installed. Consult the documentation for your fax modem for more information. • Choose Tools > Options > OpenOffice.org Writer > Print. The dialog shown in Figure 333 opens. Figure 333: Setting up OOo for sending faxes Select the fax driver from the Fax list and click OK.
Figure 334: Adding a Send Fax command to a toolbar Assigning shortcut keys In addition to using the built-in keyboard shortcuts (listed in Appendix A), you can define your own. You can assign shortcuts to standard OOo functions or your own macros and save them for use with the entire OpenOffice.org suite. Caution Be careful when reassigning your operating system’s or OOo’s predefined shortcut keys.
Note All existing shortcut keys for the currently selected Function are listed in the Keys selection box. If the Keys list is empty, it indicates that the chosen key combination is free for use. If it were not, and you wanted to reassign a shortcut key combination that is already in use, you must first Delete the existing Key. Shortcut keys that are greyed-out in the listing on the Customize dialog, such as F1 and F10, are not available for reassignment.
2) To have the shortcut key assignment available only with one component (for example, Writer), select that component’s name in the upper right corner of the page; otherwise select OpenOffice.org button to make it available to every component. 3) Choose the shortcut keys you want to assign a style to. In this example, we have chosen Ctrl+9. 4) In the Functions section at the bottom of the dialog, scroll down in the Category list to Styles. Click the + sign to expand the list of styles.
Loading a saved keyboard configuration To load a saved keyboard configuration file and replace your existing configuration, click the Load button near the bottom right of the Customize dialog, and then select the configuration file from the Load Keyboard Configuration dialog. Resetting the shortcut keys To reset all of the keyboard shortcuts to their default values, click the Reset button near the bottom right of the Customize dialog.
2) In OOo, select Tools > Extension Manager from the menu bar. In the Extension Manager dialog (Figure 336), click Add. 3) A file browser window opens. Find and select the extension you want to install and click Open. The extension begins installing. You may be asked to accept a license agreement. 4) When the installation is complete, the extension is listed in the Extension Manager dialog.
PDF Import Enables you to make minor modifications to the text of existing PDF files when the original source files do not exist or you are unable to open the source files. (Whenever possible, modify the source and regenerate the PDF to obtain the best results.) When the extension is installed, PDF is listed as a choice in the File Type drop-down list in the File > Open dialog. PDF documents open in Draw.
Report Builder Creates stylish, complex database reports from Base. You can define group and page headers, group and page footers, and calculation fields. Export your reports into PDF or OpenDocument formats, or send them as email attachments. From Sun Microsystems. Open source. Professional Template Pack II Provides more than 120 templates for Writer, Calc, and Impress. Available in several languages.
A Appendix Keyboard Shortcuts
Introduction You can use OpenOffice.org (OOo) without requiring a pointing device, such as a mouse or trackball, by using its built-in keyboard shortcuts. Tasks as varied and complex as docking and un-docking toolbars and windows, or changing the size or position of objects, can all be accomplished with only a keyboard. OOo has a general set of keyboard shortcuts, available in all components, and a component-specific set directly related to the work of that component (Writer, Calc, Impress, Draw, and Base).
Function key shortcuts Shortcut Keys F1 Result Starts the OpenOffice.org Help. In the OpenOffice.org Help: jumps to main help page. Shift+F1 Activates What’s This? (extended tip) help for the mouse pointer, which turns into a question mark. Move the pointer over an item (command, icon or control) to view the extended tip. Shift+F2 Displays an extended tip for the item (command, icon or control) currently selected by using the keyboard. Ctrl+F4 or Alt+F4 Closes the current document. Closes OpenOffice.
Shortcut Keys Result Backspace When a folder is shown: goes up one level (goes back). Ctrl+Shift+Spacebar Removes direct formatting from selected text or objects (as in Format > Default Formatting). Ctrl+Tab When positioned at the start of a header, a tab is inserted.
Shortcut keys in the Gallery Shortcut Keys Tab Result Moves between areas. Shift+Tab Moves between areas (backwards). In the New Theme area of the Gallery Shortcut keys Up arrow Result Moves the selection up. Down arrow Ctrl+Enter Moves the selection down. Shift+F10 Ctrl+U Opens a context menu. Ctrl+R Ctrl+D Opens the Enter Title dialog. Insert Inserts a new theme. Opens the Properties dialog. Refreshes the selected theme. Deletes the selected theme.
Selecting rows and columns in a database table (opened by F4) Shortcut keys Spacebar Result Toggles row selection, except when the row is in edit mode. Ctrl+spacebar Shift+spacebar Ctrl+PgUp Ctrl+PgDn Toggles row selection. Selects the current column. Moves pointer to the first row. Moves pointer to the last row. Shortcut keys for drawing objects Shortcut keys Select the toolbar with F6. Use the Down Arrow and Right Arrow to select the desired toolbar icon and press Ctrl+Enter.
Shortcut keys Alt+Up/Down/Left/ Right Arrow Result Moves the selected Drawing Object one pixel (in Selection Mode). Re-sizes a Drawing Object (in Handle Selection Mode). Rotates a Drawing Object (in Rotation Mode). Opens the properties dialog for a Drawing Object. Activates the Point Selection mode for the selected drawing object. Spacebar Selects a point of a drawing object (in Point Selection mode) or cancels the selection. The selected point blinks once per second.
B Appendix Background Information History, licensing, and file formats
Introduction OpenOffice.org is both a product and an open-source project. If you are new to OOo, its open source development, and the community that produces and supports it, you should read this appendix. A short history of OpenOffice.org The OpenOffice.org project began when Sun Microsystems released the source code (“blueprints”) for its StarOffice® software to the open source community on October 13, 2000.
on the wrong side of the digital divide. For tens of thousands of community members, this makes the OpenOffice.org community their volunteering opportunity of choice. The OpenOffice.org community invites contributors. Whatever you do best, you can do it for OpenOffice.org. As well as software developers, the Community welcomes translators, artists, technical writers and editors, testers, people offering user support, sales and marketing people, lobbyists, donors... the list is long.
For more information on Free and Open Source software, visit these websites: Open Source Initiative (OSI): http://www.opensource.org Free Software Foundation (FSF): http://www.gnu.org What is OpenDocument? Starting with Version 2.0, OpenOffice.org by default saves documents in Open Document Format (ODF). OpenOffice.org 3 has adopted version 1.2 of the OpenDocument standard.
Unified Office Format text (.uot, .uof) Ichitaro 8/9/10/11 (.jtd and .jtt) Hangul WP 97 (.hwp) T602 Document (.602, .txt) AportisDoc (Palm) (.pdb) Pocket Word (.psw) When opening .htm or .html files (used for web pages), OOo customizes Writer for working with these files. Opening spreadsheets In addition to OpenDocument formats (.ods and .ots), Calc 3 can open the formats used by OOo 1.x (.sxc and .stc) and the following spreadsheet formats: Microsoft Excel 97/2000/XP (.xls, .xlw, and .
Opening graphic files In addition to OpenDocument formats (.odg and .otg), Draw 3 can open the formats used by OOo 1.x (.sxd and .std) and the following graphic formats: BMP DXF EMF EPS GIF JPEG, JPG MET PBM PCD PCT PCX PGM PLT PNG PPM PSD RAS SDA SDD SGF SGV SVM TGA TIF, TIFF VOR WMF XBM XPM Opening formula files In addition to OpenDocument Formula (.odf) files, Math 3 can open the format used by OOo 1.x (.sxm), StarMath, (.smf), and MathML (.mml) files.
Rich Text Format (.rtf) StarWriter 3.0, 4.0, and 5.0 (.sdw) StarWriter 3.0, 4.0, and 5.0 Template (.vor) Text (.txt) Text Encoded (.txt) Unified Office Format text (.uot, .uof) HTML Document (OpenOffice.org Writer) (.html and .htm) DocBook (.xml) AportisDoc (Palm) (.pdb) Pocket Word (.psw) Note The .rtf format is a common format for transferring text files between applications, but you are likely to experience loss of formatting and images. For this reason, other formats should be used.
Saving presentations In addition to OpenDocument formats (.odp, .otp, and .odg), Impress 3 can save in these formats: OpenOffice.org 1.x Presentation (.sxi) OpenOffice.org 1.x Presentation Template (.sti) Microsoft PowerPoint 97/2000/XP (.ppt and .pps) Microsoft PowerPoint 97/2000/XP Template (.pot) StarDraw, StarImpress (.sda, .sdd, and .vor) Unified Office Format presentation (.uop) Impress can also export to MacroMedia Flash (.swf) and any of the graphics formats listed for Draw.
May I use OpenOffice.org in a business? Yes. Is OpenOffice available in my language? OpenOffice.org has been translated (localized) into over 40 languages, so your language probably is supported. Additionally, there are over 70 spelling, hyphenation, and thesaurus dictionaries available for languages, and dialects that do not have a localized program interface. The dictionaries are available from the OpenOffice.org website at: http://lingucomponent.openoffice.org/downlo ad_dictionary.
How can I contribute to OpenOffice.org? You can help with the development of OOo in many ways, and you do not need to be a programmer. To start, check out this webpage: http://www.openoffice.org/contributing.html What’s the catch? There really is none; you can read the licenses here: http://www.openoffice.org/license.
Index A accessibility features 410 accessibility options 44 advantages of OpenOffice.
database form activation order 275 background 272 creating in Design View 277 creating using a Wizard 257 entering data 285 modifying 261 subform 257 tab order 275 database reports creating 298 modifying 305 static 299 database table create using wizard 242 dynamic 303 joined fields 258 relationships 253 dBase database 278 default file format 48 default formatting 193, 196 default template 74 deleting files 26 derivative markup (Math) 321 Design View (Base) creating a new table 248 creating forms 277 creati
extensions 389, 405 extensions and addons sources of 16 F fax icon, adding to toolbar 120, 401 fax sending 120 FDF 327 fields 193 fields bookmark 124 bookmarks 123 cross-reference 123 Fields dialog box References tab 123 file locations 39 file sharing options 42, 43 Fill Format 61 fill, editing 229 Flash export 362 flip an object 230 floating toolbars 22, 23 floating window 23 font history 37 ignore settings when importing HTML 51 options 41 preview 36 replacement table 41 replacements 41 sizes for HTML 50
HTML export 51 HTML Export Wizard 363 hyperlinks editing 357 inserting 355 Layout pane 194 LGPL 424 libraries of macros 379 library containers 379 licensing of OpenOffice.
REM 371 resources 391 running 369, 384 storage 381 subroutines 371, 379 variables 372 viewing 370 writing 390 Mail Merge Wizard e-mailing Writer document 333 Mantovani, Paolo 379 margins 205 margins (Writer) 107 Master Pages 190 master slides 188 Math formulas, inserting 201 mathematical equations 310 mathematical markup 314 mathematical symbols 311 matrix markup (Math) 320 measurement unit 206 memory options 35 menu bar 20 menus adding commands 397 creating 395 customizing 394 modifying 396 modifying entri
EPS images 327 choosing what to print 112, 324 export documents to 325 envelopes 116 form 327 grayscale on color printer 114 image compression and resolution 327 labels 118 initial view selection 328 previewing 114 pages to export 326 print options 113 password-protect 331 printer selection 112, 324 security settings 330 printing changes document status 34 tagged 327 Professional Template Pack extension user interface settings 328 408 PDF import 407 Q PDF Options dialog 326 queries (database) PDF/A-1 327 al
scanner 341 screen font antialiasing 36 security 26 security options 42 selecting objects 223 selection clipboard 38 selection modes 222 send backward 224 send document as e-mail 332 setup options 32 shadows 230 shared extension 406 shortcut keys 410, 411 size optimization 49 slanting an object 227 Slide Design dialog 191 slide master 188 adding text 193 apply 191 author information 194 create 191 description 189 fields 193 loading additional 191 modifying 192 slide show organizing 201 See: presentation 171
update document styles from 73 Template Changer extension 408 Template Management dialog 66 templates importing 78 text bulleted or numbered list 197 default formatting 196 formatting pasted text 196 outline level 198 pasting 195 text boundaries (show/hide) 44 text box AutoLayout 194, 197 creating 194 moving 202 vertical alignment of text 195 text box tool 194 text documents opening 419 Text Formatting toolbar 196 text in Draw 218 theme deleting 345 themes 341 themes (Gallery) 345 three-D view 37 title slid