LibreOffice 3.4入门/图片,画廊和艺术字

跳到导航 跳到搜索


You can add graphic and image files, including photos, drawings, scanned images, and others, to LibreOffice documents. LibreOffice can import various vector (line drawing) and raster (bitmap) file formats. The most commonly used graphic formats are GIF, JPG, PNG, and BMP. See Appendix B for a full list of the graphic formats LibreOffice can import.

Graphics in LibreOffice are of three basic types:

  • Image files, such as photos, drawings, and scanned images
  • Diagrams created using LibreOffice’s drawing tools
  • Charts created using LibreOffice’s Chart component

This chapter covers images and diagrams.

More detailed descriptions on working with drawing tools can be found in the Draw Guide and Impress Guide. Instructions on how to create charts are given in the Calc Guide.

Adding images to a document[编辑]

Images can be added to a document in several ways: by inserting an image file, directly from a graphics program or a scanner, or from the LibreOffice Gallery.

Inserting an image file[编辑]

When the image is in a file stored on the computer, you can insert it into an LibreOffice document using either of the following methods.

Drag and drop[编辑]

  1. Open a file browser window and locate the image you want to insert.
  2. Drag the image into the LibreOffice document and drop it where you want it to appear. A faint vertical line marks where the image will be dropped.

This method embeds (saves a copy of) the image file in the document. To link the file instead of embedding it, hold down the Control+Shift keys while dragging the image.

Insert Picture dialog[编辑]

  1. Click in the LibreOffice document where you want the image to appear.
  2. Choose Insert > Picture > From File from the menu bar.
  3. On the Insert Picture dialog (Figure 282), notice the two options at the bottom left: Preview and Link. Choose Preview to view a thumbnail of the selected image on the right, so you can verify that you have the correct file. See page 285 for the use of Link.
  4. Navigate to the file to be inserted, select it, and click Open.

If you choose the Link option, a message box appears when you click Open. The message states that the picture will not be stored with the document, but only referenced as a link, and asks if you want to embed the graphic instead. Choose Keep Link if you want the link, or Embed Graphic if you do not. To prevent this message from appearing again, deselect the box by Ask when linking a graphic at the bottom of the message.
[[Image:|thumb|Figure 282. Insert picture dialog]]

Linking an image file[编辑]

If the Link option in the Insert picture dialog is selected, LibreOffice creates a link to the file containing the image instead of saving a copy of the image in the document. The result is that the image is displayed in the document, but when the document is saved, it contains only a reference to the image file—not the image itself. The document and the 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; LibreOffice can handle quite large files.
  • Advantage – You can modify the image file separately without changing the document because the link to the file remains valid, and the modified image will appear when you next open the document. This can be a big advantage if you (or someone else, perhaps a graphic artist) is updating images.
  • Disadvantage – If you send the document to someone else, or move it to a different computer, you must also send the image files, or the receiver will not be able to see the linked images. You need to keep track of the location of the images and make sure the recipient knows where to put them on another machine, so that the document can find them. For example, you might keep images in a subfolder named Images (under the folder containing the document); the recipient of the file needs to put the images in a subfolder with the same name and in the same place relative to the document.

When inserting the same image several times in the document, it would appear beneficial to link rather than embed; however, this is not necessary as LibreOffice embeds in the document only one copy of the image file.

Embedding linked images[编辑]

If you originally linked the images, you can easily embed one or more of them later if you wish. To do so:

  1. Open the document in LibreOffice and choose Edit > Links.
  2. The Edit Links dialog (Figure 283) shows all the linked files. In the Source file list, select the files you want to change from linked to embedded.
  3. Click the Break Link button.
  4. Save the document.

Going the other way, from embedded to linked, is not so easy—you must delete and reinsert the images, one at a time, selecting the Link option when you do so.
[[Image:|thumb|Figure 283: The Edit Links dialog]]

Inserting an image from the clipboard[编辑]

Using the clipboard, you can copy images into a LibreOffice document from another LibreOffice document or from other programs. To do this:

  1. Open both the source document and the target document.
  2. In the source document, select the image to be copied.
  3. Move the mouse pointer over the selected image and press Control+C to copy the image to the clipboard.
  4. Switch to the target document.
  5. Click to place the cursor where the graphic is to be inserted.
  6. Press Control+V to insert the image.

If the application from which the graphic was copied is closed before the graphic is pasted into the target, the image stored on the clipboard could be lost.

Inserting an image using a scanner[编辑]

If a scanner is connected to your computer, LibreOffice can call the scanning application and inserted the scanned item into the LibreOffice document as an image. To start this procedure, place the cursor where you want the graphic to be inserted and choose Insert > Picture > Scan > Select Source.

Although this practice is quick and easy, it is unlikely to result in a high-quality image of the correct size. You may get better results by scanned material into a graphics program and cleaning it up there before inserting the resulting image into LibreOffice.

Inserting an image from the Gallery[编辑]

The Gallery provides a convenient way to group reusable objects such as graphics and sounds that you can insert into your documents. The Gallery is available in all components of LibreOffice. See “Managing the LibreOffice Gallery“ on page 288. You can copy or link an object from the Gallery into a document.

To insert an object:

  1. Choose Tools > Gallery or click the Gallery icon [[Image:]] on the Standard toolbar (in Writer and Calc) or the Drawing toolbar (in Impress and Draw).
  2. Select a theme.
  3. Select an object with a single click.
  4. Drag and drop the image into the document. (See Figure 284.)

You can also right-click on the object and choose Insert > Copy.

[[Image:|thumb|Figure 284. Copying a graphic object from the Gallery into a document (oval marks the Hide/Show button for the Gallery)]]

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 Control keys, drag and drop the object into the document.

Inserting an image as a background[编辑]

To insert an image as the background to a page or paragraph:

  1. Choose Tools > Gallery and select a theme.
  2. Select an object with a single click, right-click on the object, and choose Insert > Background > Page or > Paragraph.

Modifying and positioning graphics[编辑]

LibreOffice provides many tools for resizing, modifying, filtering, and positioning graphics; wrapping text around graphics; and using graphics as backgrounds and watermarks. These tools are described in relevant chapters of the other guides. Some sophisticated adjustments of the graphics are best done in an image manipulation program and the results brought into LibreOffice, rather than using LibreOffice’s inbuilt tools.

Managing the LibreOffice Gallery[编辑]

Graphics in the Gallery are grouped by themes, such as Bullets, Rulers, and Backgrounds. You can create other groups or themes and add your own pictures or find extensions containing more graphics.

The box on the left of the gallery window lists the available themes. Click on a theme to see its contents displayed in the Gallery window.

You can display the Gallery in Icon View (Figure 285) or Detailed View, and you can hide or show the Gallery by clicking on the Hide button (similar to the Hide button for the Navigator and the Styles and Formatting window when they are docked).

[[Image:|thumb|Figure 285. Icon view of one theme in the Gallery]]

By default, the Gallery is docked above the workspace. To expand the Gallery, position the pointer over the line that divides it from the top of the workspace. When the pointer changes to parallel lines with arrows, click and drag downward. The workspace resizes in response.

As with other docked windows, you can “float” the Gallery by moving the mouse pointer over an edge of the Gallery window, holding down the Control key, and double-clicking. Repeat this procedure to dock the Gallery again.

The default themes are locked; no items can be added to or deleted from these themes. The locked themes are easily recognizable by right-clicking on them; the only available option in the pop-up menu is Properties.

In a default installation, only the My themes theme is customizable, although new themes can be added as explained in “Adding a new theme to the Gallery” on page 290.

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.

Method 1 (selecting a file)

  1. Right-click on the desired theme and select Properties from the context menu.
  2. In the theme’s Properties dialog, go to the Files page and click the Find Files button.
[[Image:|thumb|Figure 286. Gallery Properties dialog]]
  1. The Select path dialog (not shown) opens. You can enter the path for the file’s directory in the Path text box, or you can navigate to locate the file’s directory.
  2. Click the Select button to start the search. A list of graphic files is then displayed in the Properties dialog. You can use the File type drop-down list to limit the files displayed.
  3. To add all of the files shown in the list, click Add All. Otherwise, select the files to add and then click Add. (Hold down either the Shift key or the Control key while you click on the files.)

Method 2 (drag and drop)

You can drag and drop an image into the Gallery from a document.

  1. Open the document containing an image you want to add to the Gallery, and display the Gallery theme to which you want to add it.
  2. Position the mouse pointer above the image, without clicking.
  3. If the mouse pointer changes to a hand symbol, the image refers to a hyperlink. In this case, press the Alt key while you click the image, to select it without activating the link. If the mouse pointer does not change to a hand symbol, you can simply click the image to select it.
  4. Once the image is selected, evident from the colored selection handles around it, release the mouse button. Click again on the image, keeping the mouse button pressed for more than two seconds. Without releasing the mouse button, drag the image into the Gallery.
  5. Release the mouse button.

Deleting images from the Gallery[编辑]

To delete an image from a theme that you created:

  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.

Deleting the name of a file from the list in the Gallery does not delete the file from the hard disk or other location.

Adding a new theme to the Gallery[编辑]

To add a new theme to the Gallery:

  1. Click the New Theme button above the list of themes (Figure 285).
  2. In the Properties of New Theme dialog, click the General tab and type a name for the new theme.
  3. Click the Files tab and add images to the theme, as described earlier.

Deleting a theme from the Gallery[编辑]

You can delete only themes that you have added to the Gallery; you cannot delete any of the inbuilt themes. To delete a theme from the Gallery:

  1. Go to Tools > Gallery.
  2. In the left part of the Gallery, select in the list the theme you wish to delete.
  3. Right-click on the theme, then click Delete on the pop-up menu.

Location of the Gallery and the objects in it[编辑]

Graphics and other objects shown in the Gallery can be located anywhere on your computer’s hard disk, on a network drive, or on a CD-ROM. Listings in the Gallery refer to the location of each object. When you add graphics to the Gallery, the files are not moved or copied; only the location of each new object is added as a reference.

In a workgroup, you may have access to a shared Gallery (where you cannot change the contents unless authorized to do so) and a user Gallery, where you can add, change, or delete objects.

The location of the user Gallery is specified in Tools > Options > LibreOffice > Paths. You can change this location, and you can copy your gallery files (*.sdv) to other computers.

Gallery contents provided with LibreOffice are stored in a different location. You cannot change this location.

Creating an image map[编辑]

An image map defines areas of an image (called hotspots) with hyperlinks to web addresses, other files on the computer, or parts of the same document. Hotspots are the graphic equivalent of text hyperlinks (described in Chapter 12). Clicking on a hotspot causes LibreOffice to open the linked page in the appropriate program (for example, the default browser for an HTML page; LibreOffice Calc for a .ODS file; a PDF viewer for a PDF file). You can create hotspots of various shapes and include several hotspots in the same image.

To use the image map editor:

  1. In your LibreOffice document, select the picture where you want to define the hotspots.
  2. Choose Edit > ImageMap from the menu bar. The ImageMap Editor (Figure 287) opens.
  3. Use the tools and fields in the dialog (described below) to define the hotspots and links necessary.
  4. Click the Apply icon [[Image:]] to apply the settings.
  5. When done, click the Save icon [[Image:]] to save the image map to a file, then click the X in the upper right corner to close the dialog.
[[Image:|thumb|Figure 287: The dialog to create or edit an image map]]

The main part of the dialog shows the image on which the hotspots are defined. A hotspot is identified by a line indicating its shape.

The toolbar at the top of the dialog contains the following tools:

  • Apply button: click this button to apply the changes.
  • Load, Save, and Select icons.
  • Tools for drawing a hotspot shape: these tools work in exactly the same way as the corresponding tools in the Drawing toolbar.
  • Edit, Move, Insert, Delete Points: advanced editing tools to manipulate the shape of a polygon hotspot. Choose the Edit Points tool to activate the other tools.
  • Active icon: toggles the status of a selected hotspot between active and inactive.
  • Macro: associates a macro with the hotspot instead of just associating an hyperlink.
  • Properties: sets the hyperlink properties and adds the Name attribute to the hyperlink.

Below the toolbar, specify for the selected hotspot:

  • Address: the address pointed to by the hyperlink. You can also point to an anchor in a document; to do this, write the address in this format: file:///<path>/document_name#anchor_name
  • Text: type the text that you want to be displayed when the mouse pointer is moved over the hotspot.
  • Frame: where the target of the hyperlink will open: pick among _blank (opens in a new browser window), _self (opens in the active browser window), _top or _parent.

The value _self for the target frame will usually work just fine. It is therefore not recommended to use the other choices unless absolutely necessary.

Using LibreOffice’s drawing tools[编辑]

You can use LibreOffice’s drawing tools to create graphics such as simple diagrams using rectangles, circles, lines, text, and other predefined shapes. You can also group several drawing objects to make sure they maintain their relative position and proportion.

You can place the drawing objects directly on a page in your document, or you can insert them into a frame.

You can also use the drawing tools to annotate photographs, screen captures, or other illustrations produced by other programs, but this is not recommended because:

  • You cannot include images in a group with drawing objects, so they may get out of alignment in your document.
  • If you convert a document to another format, such as HTML, the drawing objects and the graphics will not remain associated; they are saved separately.

In general, if you need to create complex drawings, it is recommended to use LibreOffice Draw, which includes many more features such as layers, styles, and so on.

Creating drawing objects[编辑]

To begin using the drawing tools, display the Drawing toolbar (Figure 288) by clicking View > Toolbars > Drawing.

If you are planning to use the drawing tools repeatedly, you can tear off this toolbar and move it to a convenient place on the window.

Freeform Line
Symbol Shapes
Block arrows
Fontwork Gallery
Basic Shapes
(Graphic) Callouts
From File
Extrusion On/Off
Figure 288. The Drawing toolbar

To use a drawing tool:

  1. Click in the document where you want the drawing to be anchored. You can change the anchor later, if necessary.
  2. Choose the tool from the Drawing toolbar (Figure 288). The mouse pointer changes to a drawing-functions pointer [[Image:]].
  3. Move the cross-hair pointer to the place in the document where you want the graphic to appear and then click and drag to create the drawing object. Release the mouse button. The selected drawing function remains active, so that you can draw another object of the same type.
  4. To cancel the selected drawing function, press the Esc key or click on the Select icon (the arrow) on the Drawing toolbar.
  5. You can now change the properties (fill color, line type and weight, anchoring, and others) of the drawing object using either the Drawing Object Properties toolbar (Figure 289) or the choices and dialogs reached by right-clicking on the drawing object.

Set or change properties for drawing objects[编辑]

To set the properties for a drawing object before you draw it:

  1. On the Drawing toolbar (Figure 288), click the Select tool.
  2. On the Drawing Object Properties toolbar (Figure 289), click on the icon for each property and select the value you want for that property.
  3. For more control, or to define new attributes, you can click on the Area or Line icons on the toolbar to display detailed dialogs.

Line Color
To Foreground
Arrow Style
To Background
Change Anchor
Line Style
Area Style / Filling
Bring to Front
Line Width
Send to Back
Figure 289. Drawing Object Properties toolbar

The default you set applies to the current document and session. It is not retained when you close the document or close Writer, and it does not apply to any other document you open. The defaults apply to all the drawing objects except text objects.

To change the properties for an existing drawing object:

  1. Select the object.
  2. Continue as described above.

You can also specify the position and size, rotation, and slant and corner radius properties of the drawing object:

  1. Right-click on the drawing object and then choose Position and Size from the pop-up menu. The Position and Size dialog is displayed.
  2. Choose any properties, as required.

Resizing a drawing object[编辑]

An object is resized in a similar way to an image. Select the object, click on one of the eight handles around it and drag it to its new position. For a scaled resizing, select one of the corner handles and keep the Shift key pressed while dragging the handle to its new position.

For more sophisticated control of the size of the object, choose Format > Object > Position and Size from the menu bar. Use the Position and Size dialog to set the width and height independently. If the Keep ratio option is selected, then the two dimensions change so that the proportion is maintained, allowing for a scaled resizing.

Grouping drawing objects[编辑]

To group drawing objects:

  1. Select one object, then hold down the Shift key and select the others you want to include in the group. The bounding box expands to include all the selected objects.
  2. With the objects selected, hover the mouse pointer over one of the objects and choose Format > Group > Group from the menu bar or right-click and choose Group > Group from the pop-up menu.

You cannot include an embedded or linked graphic in a group with drawing objects.

Using Fontwork[编辑]

With Fontwork you can create graphical text art objects to make your work more attractive. There are many different settings for text art objects (line, area, position, size, and more), so you have a large choice. You will surely find one that fits your document.

Fontwork is available with each component of LibreOffice, but you will notice small differences in the way that each component displays it.

The Fontwork toolbars[编辑]

You can use two different toolbars for creating and editing a Fontwork object.

  • Go to View > Toolbars > Fontwork.
Figure 290. The floating Fontwork toolbar
  • If you click on an existing Fontwork object, the Formatting toolbar changes to display the Fontwork options as shown in Figure 295 on page 297. The contents of this toolbar vary depending on the LibreOffice component with which it is being used.

Creating a Fontwork object[编辑]

  1. On the Drawing or Fontwork toolbar, click the Fontwork Gallery icon [[Image:]]. If the Drawing toolbar is not visible, go to View > Toolbars > Drawing to display it.
[[Image:|thumb|Figure 291. The Fontwork Gallery]]
  1. In the Fontwork Gallery, select a Fontwork style, then click OK. The Fontwork object will appear in your document. Notice the colored squares around the edge (indicating that the object is selected) and the yellow dot; these are discussed in “Moving and resizing Fontwork objects” on page 299.
  2. Double-click the object to edit the Fontwork text (see Figure 292). Type your own text in place of the black Fontwork text that appears over the object.
  3. Click anywhere in a free space or press Esc to apply your changes.
[[Image:|thumb|Figure 292. Editing Fontwork text]]

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. If the selected Fontwork object is a 3-D object, you can also use the 3D-Settings toolbar.

Using the Fontwork toolbar[编辑]

Make sure that the Fontwork toolbar, shown in Figure 290, is visible. If you do not see it, go to View > Toolbars > Fontwork. Click on the different icons to edit Fontwork objects.

[[Image:]] Fontwork Shape: Edits the shape of the selected object. You can choose from a palette of shapes.
Figure 293. Fontwork toolbar showing palette of shapes]]
[[Image:]] Fontwork Same Letter Heights: Changes the height of characters in the object. Toggles between normal height (some characters taller than others, for example capital letters, d, h, l and others) and all letters the same height.
[[Image:|thumb|Figure 294. Left: normal letters; right: same letter heights]]

[[Image:]] 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.
[[Image:]] Fontwork Character Spacing: Changes the character spacing and kerning in the object. For custom spacing, input a percentage value: 100% is normal spacing; less than 100% is tight spacing; more than 100% is expanded spacing.

Using the Formatting toolbar[编辑]

Now let us go further and customize the Fontwork object with several more attributes.

Click on the Fontwork object. The Formatting toolbar changes to show the options for editing the object. (The toolbar shown in Figure 295 appears when you use Fontwork in Writer.)

[[Image:|thumb|Figure 295. Formatting toolbar for a Fontwork object in Writer]]

This figure shows the toolbar floating. In its default, docked position it is one of the toolbars located below the menu bar. The example toolbar has also been customized to show all of the available options; by default only a subset of these options is shown.

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. For more information, see the Draw Guide.

Line options

Line icon: Opens a dialog with three tabs: Line, Line Styles, Arrow Styles. Use the Line tab to edit the most common properties of the line around the selected Fontwork object, by choosing from previously-defined attributes including line style, line color, and arrow styles. Use the Lines Styles and Arrow Styles tabs to edit the properties of line and arrow styles, and define new styles.

Arrow Style icon: Choose from the different arrow styles.

Line Style box: Choose from the available line styles.

Line Width box: Set the width of the line.

Line Color box: Select the color of the line.

Area options

Area icon: Opens a dialog 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.
  • Gradients tab: Modify the available gradients or add new ones to appear on the Area tab.
  • Hatching tab: Modify the available hatching patterns or add new ones to appear on the Area tab.
  • Bitmaps tab: Create simple bitmap patterns and import bitmaps, to make them available on the Area tab.

Area Style / Filling boxes: Select the type of the fill of the selected object. For more detailed settings, use the Area icon.

Positioning options

Rotate icon: Rotate the selected object manually using the mouse to drag the object.

To Foreground icon: Move the selected object in front of the text.

To Background icon: Move the selected object behind the text.

Alignment icon: Modify the alignment of the selected objects.

Bring to front icon: Move the selected object in front of the others.

Send to back icon: Move the selected object behind the others.

Change Anchor icon: Choose between anchoring options:

  • To Page—The object keeps the same position in relation to the page margins. It does not move as you add or delete text.
  • To Paragraph—The object is associated with a paragraph and moves with the paragraph. It may be placed in the margin or another location.
  • To Character—The object is associated with a character but is not in the text sequence. It moves with the paragraph but may be placed in the margin or another location. This method resembles anchoring to a paragraph.
  • As Character—The object is placed in the document like any character and moves with the paragraph as you add or delete text before the object.

Ungroup icon: Ungroup the selected objects, so you can manage them individually.

Group icon: Group the selected objects, so you can manage them as a single object.

Using menu options[编辑]

You can use some the choices on the Format menu to anchor, align, arrange and group selected Fontwork objects, wrap text around them, and flip them horizontally and vertically.

You can also right-click on a Fontwork object and choose many of the same options from the pop-up menu. The pop-up menu also provides quick access to the Line, Area, Text, and Position and Size dialogs. The Text dialog offers only a few options for Fontwork objects and is not discussed here. On the Position and Size dialog, you can enter precise values concerning size and position. For more information on all of these menu options, see the Draw Guide.

Using the 3D-Settings toolbar[编辑]

If the selected Fontwork object is a 3-D object, you can also use the options on the 3D-Settings toolbar. You can also change a 2-D Fontwork object into a 3-D object (or change a 3-D object into a 2-D object) by clicking the Extrusion On/Off icon on the 3D-Settings toolbar. For more information, see the Draw Guide.

Figure 296: 3D-Settings toolbar]]

Moving and resizing Fontwork objects[编辑]

When you select a Fontwork object, eight colored 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. This dot may be along an edge of the object, or it may be somewhere else; see figure to right for an example. If you hover the pointer over this yellow dot, the pointer turns into a hand symbol. You can drag the dot in different directions to distort the object.

Hovering the pointer over other parts of the object turns the pointer into the usual symbol for dragging the object to another part of the page.


For precise control of the location and size of the object, use the Position and Size dialog.