Copyright

This document is Copyright © 2023 by the LibreOffice Documentation Team. Contributors are listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (https://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), version 4.0 or later.

All trademarks within this guide belong to their legitimate owners.

Book 1

Contributors

To this edition

Peter Schofield	Jean Hollis Weber	Nay Catina Dia-Schneebeli
flywire	Olivier Hallot

To previous editions

Skip Masonsmith	flywire
Mitchell Camfield	Rafael Lima	Felipe Viggiano
Rafael Lima	Steve Fanning	Jean Hollis Weber
Andrew Jensen	Amanda Labby	Cathy Crumbley
Dan Lewis	Dave Barton	Pulkit Krishna
Jorge Rodriguez	Olivier Hallot	Paul Figueiredo
Peter Schofield	Kees Kriek	Martin Saffron
Steve Schwettman	Dave Barton	Hazel Russman
Ron Faile Jr.	Kevin O’Brien	Magnus Adielsson
Iain Roberts	JiHui Choi	Regina Henschel
Laurent Balland-Poirier	Christian Kühl	Florian Reisinger
Gisbert Friege (Dmaths)	Jochen Schiffers	Frédéric Parrenin
Bernard Siaud	Miklos Vajna	Valerii Goncharuk
Andrew Pitonyak	Claire Wood	John A Smith
Roman Kuznetsov	Vasudev Narayanan

Feedback

Please direct any comments or suggestions about this document to the Documentation Team’s forum at https://community.documentfoundation.org/c/documentation/loguides/ (registration is required) or send an email to: loguides@community.documentfoundation.org.

Note

Everything you send to a mailing list or forum, including your email address and any other personal information that is written in the message, is publicly archived and cannot be deleted.

Publication date and software version

Published July 2023. Based on LibreOffice 7.5 Community.
Other versions of LibreOffice may differ in appearance and functionality.

Contents

Copyright	2

Preface	9

Who is this user guide for?	10

What is in this user guide?	10

What is LibreOffice?	10

Advantages of LibreOffice	11

Minimum requirements for using LibreOffice	12

Java software	12

How to get LibreOffice	13

Installing LibreOffice	13

Setting up and customizing LibreOffice	13

Extensions and add-ons	13

Where to get more help	14

What you see may be different	16

Using LibreOffice on macOS	18

What are all these things called?	18

Who wrote this user guide?	19

Frequently asked questions	19

What is new in LibreOffice ?	20

Chapter 1, LibreOffice Basics	23

Installation and starting LibreOffice	24

Main LibreOffice window	25

Working with documents	33

Printing	38

Using Safe Mode	50

Chapter 2, Getting Started with Writer	53

What is Writer?	54

The Writer interface	54

Changing document views	59

Working with documents	59

Working with text	61

Formatting text	72

Formatting pages	80

Adding comments to a document	86

Using built-in language tools	87

Creating a table of contents	88

Creating indexes and bibliographies	89

Using footnotes and endnotes	89

Inserting material from other documents	89

Working with images (graphics)	90

Working with tables	90

Printing and exporting to PDF or EPUB	90

Using mail merge	90

Tracking changes to a document	91

Using fields	92

Linking and cross-referencing within a document	92

Using master documents	94

Creating fill-in forms	94

Using content controls	94

Chapter 3, Getting Started with Calc	95

What is Calc?	96

Compatibility with other spreadsheet applications	96

Spreadsheets, sheets, and cells	97

Calc main window	97

Opening a CSV file	101

Saving spreadsheets	103

Importing external data – Web Query	106

Navigating within spreadsheets	107

Selecting items in a spreadsheet	109

Working with columns and rows	112

Working with sheets	113

Viewing a spreadsheet	116

Entering data using the keyboard	118

Speeding up data entry	123

Sharing content between sheets	126

Validating cell contents	126

Editing data	126

Formatting data	129

AutoFormatting of cells	133

Using themes	134

Using conditional formatting	135

Filtering data	136

Cell protection	136

Sorting records	137

Cell comments	138

Using formulas and functions	138

Analyzing data	140

Pivot tables and pivot charts	140

Printing	141

Chapter 4, Working with Styles, Templates, and Hyperlinks	145

Introduction	146

Styles	146

Templates	158

Hyperlinks	165

Chapter 5, Working with Images and Graphics	169

Introduction	170

Images and graphics	170

Editing images or graphics	175

LibreOffice Gallery	181

Creating image maps	186

LibreOffice drawing tools	188

Grouping objects	190

Fontwork	192

Barcodes and QR codes	195

Chapter 6, Getting Started with Impress	197

What is Impress?	198

Starting Impress	198

Main Impress window	199

Workspace views	205

Creating presentations	209

Adding and formatting text	215

Inserting images, tables, charts, or media	225

Working with master slides	230

Adding comments	238

Printing handouts	239

Creating a photo album	241

Presentations (slide shows)	243

Chapter 7, Getting Started with Draw	251

Introduction	252

Draw main window	252

Drawing basic shapes	256

Glue points and connectors	265

Geometric shapes	267

Adding and formatting text	270

Selecting objects	273

Positioning and adjusting objects	274

Grouping and combining multiple objects	280

Inserting and exporting images	283

Working with 3D objects	283

Working with layers	284

Selecting colors	285

Adding comments to a drawing	288

Chapter 8, Getting Started with Base	289

Introduction	290

Planning a database	291

Creating a new database	292

Creating database tables	294

Creating a database form	305

Modifying a form	310

Entering data in a form	322

Creating queries	325

Creating reports	334

Accessing other data sources	338

Using data sources in LibreOffice	339

Chapter 9, Getting Started with Math	345

Introduction	346

Getting started	346

Creating formulas	348

Editing formulas	353

Formula layout	353

Changing formula appearance	359

Formula library	367

Formulas in Writer	368

Formulas in Calc, Draw, and Impress	374

Customization	376

Exporting and Importing	380

Chapter 10 Working with File Formats, Security, and Exporting	381

File formats	382

File formats for saving	384

Exporting files	385

EPUB format export (Writer only)	395

Creating HTML files	398

HTML files using Writer/Web	406

Emailing documents	409

Files on remote servers	410

Digital signatures	411

Document properties	414

Document classification	418

User and personal data	419

Redaction	421

Password protection and OpenPGP encryption	424

Chapter 11, Getting Started with Macros	429

Introduction	430

Your first macros	430

Creating a macro	439

Limitations of the macro recorder	443

Macro organization	444

How to run a macro	448

Using extensions	450

Writing macros without the recorder	451

The ScriptForge library	453

UNO Object Inspector	454

Overview of Python, BeanShell, and JavaScript macros	455

Finding more information	461

Chapter 12, Configuring LibreOffice	463

Introduction	464

LibreOffice options	464

Loading and saving documents	480

Language settings	486

Chart color options	495

Internet options	495

AutoCorrect functions	496

Chapter 13, Customizing LibreOffice	497

Introduction	498

Menu customization	498

Toolbar customization	502

Keyboard shortcuts	505

Assigning macros	508

Adding extensions	508

Creating custom colors	511

Adding fonts	513

User interface variants	514

Appendix A, Keyboard Shortcuts	515

Introduction	516

LibreOffice assistive tools	517

macOS keyboard shortcuts	517

Keyboard shortcuts	518

Sidebar keyboard shortcuts	524

Database table keyboard shortcuts	525

Controlling macros	525

Entering Unicode numbers	525

Defining keyboard shortcuts	526

Further reading	526

Appendix B, Open Source, Open Standards, Open Document	527

Introduction	528

A short history of LibreOffice	528

The LibreOffice community	528

How is LibreOffice licensed?	529

What is open source?	529

What are open standards?	529

What is OpenDocument?	530

Getting Started Guide 7.5

Preface

Who is this user guide for?

Anyone who wants to quickly acquire knowledge on LibreOffice and is new to office software, or may be familiar with another office suite, will find this Getting Started Guide very useful.

LibreOffice is an open-source office productivity software suite containing capabilities for word processing, spreadsheets, presentations, graphics, databases, and formula editing.

What is in this user guide?

This user guide introduces the main modules of LibreOffice.

Writer (word processing)

Calc (spreadsheets)

Impress (presentations)

Draw (vector graphics)

Base (database)

Math (equation editor)

It also covers some of the features common to all modules, including setup and customization, styles and templates, macro recording, and printing. For more detail, see the user guides for the individual modules.

What is LibreOffice?

LibreOffice is a freely available, fully-featured, open source office productivity suite that is compatible with other major office suites and is available on a variety of platforms. The native file format used is Open Document Format (ODF). However, LibreOffice can also open and save documents in many other formats, including those used by several versions of Microsoft Office. For more information, see Appendix B, Open Source, Open Standards, OpenDocument.

Writer (word processor)

Writer is a feature-rich tool for creating letters, books, reports, newsletters, brochures, and other documents. Graphics and objects from other LibreOffice modules can be inserted into Writer documents. Writer can export files to HTML, XHTML, XML, Portable Document Format (PDF), and EPUB. Also, Writer can save files in many formats, including several versions of Microsoft Word files and connect to the email application being used.

Calc (spreadsheet)

Calc has all of the advanced analysis, charting, and decision making features expected from a high-end spreadsheet. It includes over 500 functions for financial, statistical, and mathematical operations, among others. The Scenario Manager provides “what if” analysis. Calc generates 2D and 3D charts, which can be integrated into other LibreOffice documents. Also, Microsoft Excel workbooks can be opened and worked on, then saved in Excel format. Calc can also export spreadsheets in several formats, including, for example, Comma Separated Value (CSV), Adobe PDF and HTML formats.

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 LibreOffice Draw and Math modules. Slideshows can be further enhanced using Fontwork special effects text, as well as sound and video clips. Impress can open, edit, and save Microsoft PowerPoint presentations and save presentations in numerous graphics formats.

Draw (vector graphics)

Draw is a vector drawing tool that can produce everything from simple diagrams, flowcharts, or 3D artwork. Its Smart Connectors feature allows definition connection points. Draw creates drawings for use in any of the LibreOffice modules, and clip art can be created and added to the Gallery. Draw can import graphics from many common formats and save them in many formats, including PNG, GIF, JPEG, BMP, TIFF, SVG, HTML and PDF.

Base (database)

Base provides tools for day-to-day database work within a simple interface. Base can create and edit forms, reports, queries, tables, views, and relations, so that managing a relational database is much the same as in other popular database applications. Base provides many new features, such as the ability to analyze and edit relationships from a diagram view. Base incorporates two relational database engines, HSQLDB and Firebird. It can also use PostgreSQL, dBASE, Microsoft Access, MySQL, Oracle, or any ODBC compliant or JDBC compliant database. Base also provides support for a subset of ANSI-92 SQL.

Math (formula editor)

Math is a formula, or equation editor. Math can create complex equations that include symbols or characters not available in standard font sets. While Math is most commonly used to create formulas in other documents, such as Writer and Impress files, Math can also work as a standalone tool. Formulas can be saved in the standard Mathematical Markup Language (MathML) format for inclusion in web pages and other documents not created with LibreOffice.

Advantages of LibreOffice

The following explains some of the advantages of LibreOffice has over other office suites:

No licensing fees

LibreOffice 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 LibreOffice. There are no hidden charges now or in the future.

Open source

Distribute, copy, and modify the software as required, in accordance with the LibreOffice Open Source licenses.

Cross-platform

LibreOffice runs on several hardware architectures and under multiple operating systems, such as Microsoft Windows, macOS, and Linux.

Extensive language support

The LibreOffice user interface, including spelling, hyphenation, and thesaurus dictionaries, is available in over 100 languages and dialects. LibreOffice also provides support for both Complex Text Layout (CTL) and Right to Left (RTL) layout languages (such as Urdu, Hebrew, and Arabic).

Consistent user interface

All the modules have a similar “look and feel”, making them easy to use and master.

Integration

The individual modules of LibreOffice are well integrated with the other LibreOffice modules.

All modules share a common spelling checker and other tools, which are used consistently across the suite. For example, the drawing tools available in Writer are also found in Calc with similar, but enhanced versions in Impress and Draw.

There is no need to know which application was used to create a particular file. For example, open a Draw file from Writer and this will open Draw automatically.

Granularity

Usually, if you change an option, it affects all modules. However, LibreOffice options can be set at a module level or even at document level.

File compatibility

In addition to its native Open Document Formats, LibreOffice includes support for opening and saving files in many common formats including Microsoft Office, HTML, XML, WordPerfect, Lotus 1-2-3, and PDF. See Appendix B for a list.

No vendor lock-in

LibreOffice 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.

All LO users have a voice

Enhancements, software fixes, and release dates are community-driven. Join the community and affect the course of LibreOffice.

Read more about LibreOffice and The Document Foundation on their websites at https://www.libreoffice.org/ and https://www.documentfoundation.org/.

Minimum requirements for using LibreOffice

LibreOffice 7.5 requires one of the following operating systems:

Linux x64 (deb) and Linux x64 (rpm)

Mac OS X (Aarch64/Apple Silicon)

macOS x86_64 (10.14 (Mojave or higher)

Windows x86_64 (Windows 7 or newer required)

For a detailed list of requirements and operating systems supported, see the LibreOffice website, https://www.libreoffice.org/get-help/system-requirements/.

Java software

Some LibreOffice features (wizards and the HSQLDB database engine) require that the Java Runtime Environment (JRE) or, for macOS, the Java Development Kit (JDK) is installed on a computer. If Java is not going to be used, nearly all of the LibreOffice features can still be used.

Java is available at no cost. More information and download links to the appropriate edition for your operating system can be found at: https://java.com/en/download/manual.jsp.

For macOS, the Oracle Java Development Kit (JDK) has to be installed, not just the Java Runtime Environment (JRE). Download links can be found at: https://www.oracle.com/java/technologies/downloads/.

If LibreOffice features that require Java are to be used, it is important that the correct 32-bit or 64-bit edition matches the installed version of LibreOffice. See the Advanced Options in Chapter 12, Configuring LibreOffice.

How to get LibreOffice

Versions of LibreOffice for Windows, Linux, and macOS are freely available and can be downloaded from https://www.libreoffice.org/download. Linux users will also find LibreOffice included free in many of the latest distributions.

Linux, Vanilla, and other versions may differ in a few features from the descriptions in this user guide. Also, LibreOffice is included in many of the latest Linux distributions, for example Ubuntu. Portable and other versions of LibreOffice are listed on the download page. LibreOffice is also available in the Microsoft Store and Apple Mac App Store at a low and attractive price. The profits from the sale of LibreOffice are invested to support the development of the LibreOffice project.

Installing LibreOffice

Information on installing LibreOffice on the various supported operating systems can be found at this web page: https://www.libreoffice.org/get-help/install-howto/. When LibreOffice is acquired through official app stores, follow the installation instructions provided by the store.

Setting up and customizing LibreOffice

After installation, to change the default settings (options) in LibreOffice to suit working requirements and preferences, go to Tools > Options on the Menu bar (LibreOffice > Preferences in macOS).. For more information, see Chapter 12, Configuring LibreOffice.

Tip

Some settings are intended for power users and programmers. If it is difficult to understand what an option does, LibreOffice recommends leaving the option on its default setting unless instructions in this user guide recommend changing the setting.

Extensions and add-ons

Functionality can be added to LibreOffice with extensions and add-ons. Several extensions are installed with the program and other extensions from the official extensions repository, https://extensions.libreoffice.org/ or from other sources. See Chapter 13, Customizing LibreOffice, for more information on installing extensions and add-ons.

Where to get more help

This user guide, the LibreOffice module user guides, Help system, and user support systems assume that users are familiar with computers and basic functions such as starting a program, opening and saving files.

Help system

LibreOffice comes with an extensive Help system and this can be used as the first line of support. Windows and Linux users can choose to download and install the offline Help for use when not connected to the Internet. Offline Help is installed with the MacOS version of LibreOffice.

To display the LibreOffice Help, press F1 or go to Help > LibreOffice Help on the Menu bar. If the offline help is not installed on a computer, but connected to the Internet, a dialog opens giving the option to Read Help Online. Select this option and the default web browser opens at the LibreOffice online help pages in the LibreOffice website.

The Help menu also includes links to other LibreOffice information and support resources. The options marked by a ‡ sign in the list below are only accessible if the computer is connected to the Internet.

What's This?

For quick tips when a toolbar is visible, place the cursor over any of the tool icons to see a small tooltip box with a brief explanation of the tool function. For a more detailed explanation, select Help > What's This? Also Extended Tips can be activated by going to Tools > Options > LibreOffice > General (macOS LibreOffice > Preferences > LibreOffice > General) on the Menu bar. Extended Tips provide a brief description about tools and commands.

User Guides

Opens the default browser at the Documentation page of the LibreOffice website https://documentation.libreoffice.org/en/english-documentation/. This page gives access to the LibreOffice User Guides and other useful information that can be opened in the default browser. Also, the User Guides are available in PDF format as a free download or to buy as printed copies.

Show Tip of the Day

Opens a small window with a random tip on how to use LibreOffice.

Search Commands

Opens a window where typing a few letters, or the name of a Menu bar command, for example, quickly finds where the command is located. Clicking on a command in the resulting list may open a relevant dialog or have other effects.

Get Help Online

Opens the default browser at the Ask LibreOffice forum of questions and answers from the LibreOffice community, https://ask.libreoffice.org/en/questions/.

Send Feedback

Opens the default browser at the Feedback page of the LibreOffice website https://www.libreoffice.org/get-help/feedback/. From this page, bugs can be reported, new features suggested and communicated with other users in the LibreOffice community.

Restart in Safe Mode

Opens a dialog window giving options to restart LibreOffice and reset the software to its default settings. Restarting in safe mode also provides an opportunity to restore LibreOffice from a backup.

Get Involved

Opens the default browser at the Get Involved page of the LibreOffice website, https://www.libreoffice.org/community/get-involved/. Choose a topic of interest to help improve the program.

Donate to LibreOffice

Opens the default browser at the Donation page of the LibreOffice website, https://donate.libreoffice.org/ providing an opportunity to make a donation to support LibreOffice.

License Information

Outlines the licenses under which LibreOffice is made available.

Check for Updates

Opens a dialog and checks the LibreOffice website for updates to version of the software. The dialog provides an opportunity to download and install any updates to LibreOffice.

About LibreOffice

Opens a dialog and displays information about the version of LibreOffice and the operating system being used. This information is often requested if the community is asked for help or assistance with the software (on macOS, this option is found under LibreOffice on the Menu bar).

Other free online support

The LibreOffice community not only develops software, but provides free, volunteer-based support. See Table 1 and the web page https://www.libreoffice.org/get-help/. For comprehensive online support from the community, look at mailing lists and the Ask LibreOffice website, https://ask.libreoffice.org/en/questions/. Other user websites also offer free tips and tutorials.

Table 1: Free support for LibreOffice users

Free LibreOffice support
FAQs	Answers to frequently asked questions https://wiki.documentfoundation.org/Faq
Mailing lists	Free community support is provided by a network of experienced users https://www.libreoffice.org/get-help/mailing-lists/
Questions & Answers and Knowledge Base	Free community assistance is provided in a Question & Answer formatted web service. Search similar topics or open a new one in https://ask.libreoffice.org/en/questions The service is available in several other languages; just replace /en/ with de, es, fr, ja, ko, nl, pt, tr, and so on in the web address above.
Native language support	The LibreOffice website in various languages https://www.libreoffice.org/community/nlc/ Mailing lists for native languages https://wiki.documentfoundation.org/Local_Mailing_Lists Information about social networking https://wiki.documentfoundation.org/Website/Web_Sites_services
Accessibility options	Information about available accessibility options. https://www.libreoffice.org/get-help/accessibility/
OpenOffice Forum	Another forum that provides support for LibreOffice, among other open source office suites. https://forum.openoffice.org/en/forum/

Paid support and training

Support and training is available through service contracts from a vendor or consulting firm specializing in LibreOffice. For information about certified professional support, see The Document Foundation website: https://www.documentfoundation.org/gethelp/support/.

For schools, educational and research institutions, and large organizations, see https://www.libreoffice.org/download/libreoffice-in-business/.

Figure 1: Options LibreOffice General dialog

What you see may be different

Illustrations

LibreOffice runs on Windows, Linux, and macOS operating systems, each of which has several versions and can be customized by users (fonts, colors, themes, window managers). The illustrations in this guide were taken from a variety of computers and operating systems. Therefore, some illustrations will not look exactly like what is seen on a computer display.

Also, some of the dialogs may differ because of the settings selected in LibreOffice. Either use dialogs from the computer system (default), or dialogs provided by LibreOffice.

To change to using LibreOffice dialogs:

On Linux and Windows operating systems, go to Tools > Options > LibreOffice > General on the Menu bar to open the dialog for general options.

On a Mac operating system, go to LibreOffice > Preferences > LibreOffice > General on the Menu bar to open the dialog for general options.

Select Use LibreOffice dialogs in Open/Save dialogs to display the LibreOffice dialogs on a computer display, as shown in Figure 1.

Click OK to save the settings and close the dialog.

Figure 2: Options LibreOffice View dialog

Icons

The LibreOffice community has created icons for several icon sets, including Breeze, Colibre, Elementary, and Sifr. Each user can select a preferred set of fonts to use. The icons used to illustrate some of the many tools available in LibreOffice may differ from the ones used in this guide. The icons in this user guide have been taken from a LibreOffice installation that has been set to display the Colibre set of icons.

Change the icon set used in a LibreOffice installation as follows:

On Linux and Windows operating systems, go to Tools > Options > LibreOffice > View on the Menu bar to open the dialog for view options.

On a Mac operating system, go to LibreOffice > Preferences > LibreOffice > View on the Menu bar to open the dialog for view options.

In Icon Style, select a font from the options available in the drop-down list as shown in Figure 2.

In Icon Size, select the required size from the drop-down lists for Toolbar, Notebookbar and Sidebar, as shown in Figure 2.

Click OK to save the settings and close the dialog.

Notes

Some Linux operating systems, for example Ubuntu, include LibreOffice as part of the installation and may not include the required icon set. This icon set can be downloaded from the software repository for the Linux operating system being used.

Some of the previously included icon sets are now available only as extensions; see https://extensions.libreoffice.org/?Tags%5B%5D=49 or search for specific ones. For example, the People Gallery is available from https://extensions.libreoffice.org/en/extensions/show/people-gallery

Using LibreOffice on macOS

Some keystrokes and menu items are different on macOS from those used in Windows and Linux. Table 2 below gives some common substitutions for the instructions in this user guide. For a more detailed list, see the application help.

Table 2: Example of macOS keyboard shortcuts

Windows or Linux	macOS equivalent	Effect
Tools > Options on Menu bar	LibreOffice > Preferences on Menu bar	Access to setup options
Right-click	Ctrl+click and/or right-click depending on computer setup	Opens a context menu
Ctrl or Control	⌘ and/or Cmd or Command, depending on keyboard	Used with other keys
Alt	⌥ and/or Alt or Option depending on keyboard	Used with other keys

What are all these things called?

The terms used in LibreOffice for most parts of the user interface (the parts of the program seen and used, in contrast to the behind-the-scenes code that actually makes it work) are the same as for most other programs.

A dialog is a special type of window. Its purpose is to inform, or request input, or both. The technical names for common controls are shown in Figure 3. In most cases, these technical terms are not used in this user guide, but are useful to know because the Help and other sources of information often use these terms.

Tabbed page (not strictly speaking a control).

Radio buttons (only one can be selected at a time).

Checkbox (more than one can be selected at a time).

Spin box (click the up and down arrows to change the number shown in the adjacent text box, or type in the text box).

Thumbnail or preview.

Drop-down list from which to select an item.

Push buttons.

In most cases, you can interact only with the dialog (not the document itself) as long as the dialog remains open. When you close the dialog after use (usually, clicking OK or another button saves your changes and closes the dialog), then you can again work with the document.

Some dialogs can be left open as you work, so you can switch back and forth between the dialog and the document. An example of this type is the Find & Replace dialog.

Figure 3: Dialog showing an example of common controls

Who wrote this user guide?

This user guide was written by volunteers from the LibreOffice community. Profits from sales of the printed edition will be used to benefit the community.

Frequently asked questions

How is LibreOffice licensed?

LibreOffice is distributed under the Open Source Initiative (OSI) approved Mozilla Public License (MPL). See https://www.libreoffice.org/about-us/licenses/.

It is based on code from Apache OpenOffice made available under the Apache License 2.0 but also includes software that differs from version to version under a variety of other Open Source licenses. New code is available under LGPL 3.0 and MPL 2.0.

Can LibreOffice be distributed to anyone?

Yes.

Can LibreOffice be sold?

Yes.

Can LibreOffice be used in a business?

Yes.

How many computers can LibreOffice be installed on?

As many as you like.

Is LibreOffice available in different languages?

LibreOffice has been translated (localized for more than 80%, both UI and Help) into over 46 languages, so the language required is probably supported. Localization is well under way for another 30+ languages (50-80%) and for another 50+ languages help is more than welcome. In addition, over 70 spelling, hyphenation, and thesaurus dictionaries are available for languages and dialects that do not have a localized program interface. The dictionaries are available from the LibreOffice website at: www.libreoffice.org.

How can LibreOffice be freely available?

LibreOffice is developed and maintained by volunteers and has the backing of several organizations. LibreOffice also relies upon donations from its users. To make a donation, go to the following web page: https://www.libreoffice.org/donate/.

Can the programming code from LibreOffice be used when developing a software application?

Yes, but follow the parameters set in the MPL and/or LGPL. Read the licenses: https://www.mozilla.org/MPL/2.0/.

Why is Java required to run LibreOffice? Is it written in Java?

LibreOffice is not written in Java; it is written in the C++ language. Java is one of several languages that can be used to extend the software. The Java JDK/JRE is only required for some features. The most notable one is the HSQLDB relational database engine.

Java is available at no cost. More information and download links to the appropriate edition for an operating system can be found at: https://java.com/en/download/manual.jsp

Note

If the LibreOffice features that require Java are to be used, it is important that the correct 32-bit or 64-bit edition matches the installed version of LibreOffice. If Java is not to be used, nearly all of the LibreOffice features can still be used.

How can users contribute to LibreOffice?

Users can help with the development and user support of LibreOffice in many ways, and there is no need to be a programmer. To start, check out this webpage: https://www.libreoffice.org/community/get-involved/. An interactive web page that guides users in contributing with their best skills available at https://whatcanidoforlibreoffice.org.

Can the PDF copy of this user guide be distributed, or printed and copies sold?

Yes, as long as requirements are met for one of the licenses in the copyright statement at the beginning of this user guide. There is no need to request special permission. LibreOffice requests that users share with the LibreOffice project some of the profits made from sales of user guides, in consideration of all the work that LibreOffice volunteers have put into producing user guides.

What is new in LibreOffice ?

The LibreOffice Release Notes are available at this link https://wiki.documentfoundation.org/ReleaseNotes/7.5.

Also at this link, the release notes for earlier versions of LibreOffice are located giving more information on the features that are included in LibreOffice.

Noticeable improvements or enhancements to this version include the following:

A new set of application and mime types icons as shown in Figure 4. The icon groups are, from left to right, standard (apps), standard (mime types), macOS specific.

Support for dark and high contrast operating system themes on Windows, macOS and Linux is improved.

The Start Center can now filter recent documents by type.

Figure 4: New LibreOffice icons

Getting Started Guide 7.5

Chapter 1,
LibreOffice Basics

Installation and starting LibreOffice

Installation

Installing LibreOffice onto a computer depends on the computer operating system. Refer to the computer user guide and operating instructions for information on how to install a software application. During installation of LibreOffice, the following happens depending on the computer operating system:

Windows — a desktop icon is created during the installation of LibreOffice.

Linux — entries for LibreOffice and each of the LibreOffice modules appear in Applications. Desktop icons can be created for LibreOffice and each of its modules. Refer to the operating system help or user guide for more information on how to create a desktop icon.

macOS — an entry for LibreOffice is added to Applications. A desktop icon can be created for LibreOffice. Refer to the operating system help or user guide for more information on how to create a desktop icon.

Starting

Clicking on LibreOffice in Applications, or a desktop icon, opens the LibreOffice Start Center (Figure 5) where individual modules of LibreOffice can be selected and opened. Also, a LibreOffice module can be opened using one of the following methods:

Click on the name of a LibreOffice module listed in the Start Center to open the module and create a new file. For example, click on Impress Presentation and a new presentation opens.

Figure 5: LibreOffice Start Center

Click on a file displayed in the Start Center to open an existing file and the applicable LibreOffice module also opens.

Click on Templates in the Start Center and the available LibreOffice templates are displayed. Click on the required template to create a new file and the applicable LibreOffice module opens.

Click on Open File to open the Open file browser. Navigate to the file location, select it, then click on Open. This also opens the applicable LibreOffice module.

Click on Remote File to open the Remote Files file browser. Navigate to the file location, select it, then click on Open. This also opens the applicable LibreOffice module.

To reduce the number of files displayed in the Start Center, select a LibreOffice module from the Filter drop-down list. Only files that can be opened by the selected LibreOffice module are displayed in the Start Center.

Note

LibreOffice can also be started by double-clicking the filename of an ODF document in a folder, or file browser. The document opens and the applicable LibreOffice module also opens. For more information on opening files, see “Opening existing documents” on page 37.

Closing LibreOffice

To close LibreOffice completely depends on the computer operating system:

Windows and Linux — go to File > Exit LibreOffice on the Menu bar.

Windows and Linux — use the keyboard shortcut Ctrl+Q.

Windows and Linux — with the last LibreOffice document open, click on the X on the right of the title bar.

macOS — go to LibreOffice > Quit LibreOffice on the Menu bar.

macOS — use the keyboard shortcut ⌘+Q

Note

If any documents have not been saved since the last change, a warning message is displayed. Select whether to save or discard the changes.

Main LibreOffice window

The main window is similar in each LibreOffice module with some details varying between the modules. For more information, see the relevant chapters in this user guide for Writer, Calc, Draw, Impress, Base, and Math.

The common features included in each LibreOffice module are Title bar, Menu bar, and Standard toolbar at the top of the window and the Status bar at the bottom of the window. The tools and information available on each Standard toolbar and Status bar do vary between each LibreOffice module.

Note

By default, LibreOffice commands are grouped in menus and toolbars called the Standard Toolbar user interface. Other user interface variants are available, displaying contextual groups of commands and contents. Go to View > User Interface on the Menu bar to change the user interface. For more information, see Chapter 13, Customizing LibreOffice.

Title bar

The Title bar is located at the top of the LibreOffice window. It shows the file name of the current document. If the document has not been saved and named, the document name will be Untitled X, where X is a number. Untitled documents are numbered in the order in which they are created.

Menu bar

The Menu bar is located below the Standard toolbar in Windows and Linux operating systems, and at the top of the window in macOS. When selecting one of the menus, a submenu drops down to show further options, including:

Commands that directly cause an action, for example File > Close or Save.

Commands that open dialogs. These are indicated by three dots following a command, for example Edit > Find and Replace… on the Menu bar.

Commands that open submenus are indicated by a right-pointing chevron ˃ following a command. Moving the cursor onto one of these commands opens a submenu containing further commands, for example View > Rulers > Rulers, or Vertical Rulers.

Keyboard shortcuts that can be used for some commands.

For example, the default Menu bar for Writer contains the following:

File

Commands that apply to the entire document, for example Open, Save, and Print.

Edit

Commands for editing a document, for example Undo, Find and Replace, Cut, Copy, Paste, and Track Changes.

View

Commands for controlling the display of a document, for example User Interface, Toolbars, Text Boundaries, Rulers, and Zoom.

Insert

Commands for inserting elements into a document, for example Image, Comment, Header and Footer, and Table of Contents and Index.

Format

Commands for formatting the layout of a document.

Styles

Commands for quickly applying common styles; for editing, loading, and creating styles; and for managing styles.

Table

Commands to insert and edit a table in a text document.

Form

Commands to create fill-in forms.

Tools

Functions, for example Spelling, AutoCorrect, Customize, and Options.

Window

Commands for the display window.

Help

Links to the LibreOffice Help, What’s This?, and information about LibreOffice.

Toolbars

LibreOffice has two types of toolbars: docked and floating. Docked toolbars can be moved to different locations, or made into a floating toolbar. All floating toolbars can be docked. In a default LibreOffice installation, the Standard toolbar is docked at the top of the window and this docking position is consistent across all of the LibreOffice modules.

In a default LibreOffice installation, the second toolbar in a docked position at the top of the window depends on which LibreOffice module has been opened. For example, when Writer or Calc are opened, the second docked toolbar is the Formatting toolbar.

The second toolbar can also be context-sensitive and changes to provide the relevant tools for the object selected. For example, when a graphic object is selected in Writer, the Formatting toolbar is replaced by the Drawing Object Properties toolbar, providing tools for formatting graphics. When the graphic object is deselected, the Drawing Object Properties toolbar closes and the Formatting toolbar reopens.

Note

When it is necessary to reduce the number of toolbars displayed and provide more space for a document, the user interface can be changed to a single-toolbar as an alternative to the default double-toolbar user interface. This single-toolbar user interface contains the most-used commands. To activate a single toolbar user interface, go to View > User Interface and select Single Toolbar from the Select Your Preferred User Interface dialog. For more information, see Chapter 13, Customizing LibreOffice.

Displaying or closing toolbars

To display a toolbar, go to View > Toolbars on the Menu bar, and select the name of a toolbar from the submenu. An active toolbar displays a check mark next to its name.

To close a toolbar, use one of the following methods:

Go to View > Toolbars on the Menu bar and deselect the toolbar.

Right-click in an empty space between the icons on a toolbar and select Close Toolbar from the context menu.

Note

Floating toolbars created from tool palettes are not listed in the View menu, but are displayed in the LibreOffice window.

Submenus and tool palettes

Clicking on the small triangle ▼ to the right of a tool icon displays submenus containing further commands, tool palettes, or alternative methods of selecting items.

A tool palette is a pop-up collection of tools attached to a single tool on a toolbar. Tool palettes can be made into floating sub-toolbars using the following example.

Figure 6: Example of creating floating sub-toolbar from a tool palette

Click on Basic Shapes on the Drawing toolbar to open the tool palette.

Click on the toolbar handle (highlighted in Figure 6) and drag the tool palette onto the open document.

Release the toolbar handle and the tool palette becomes a floating toolbar.

Note

If the toolbar handle is not visible, the tool palette, or toolbar, is locked into its docked position and has to be unlocked. See “Locking and unlocking toolbars” below for more information.

Locking and unlocking toolbars

To lock ALL toolbars into place preventing all toolbars from being moved, go to View > Toolbars on the Menu bar and select Lock Toolbars on the submenu. LibreOffice has to be restarted to lock all toolbars. The command Lock Toolbars has a check mark next to it, indicating that all toolbars are locked.

To unlock ALL toolbars allowing all toolbars to be repositioned, or turned into a floating toolbar, go to View > Toolbars on the Menu bar and select Lock Toolbars on the submenu. LibreOffice has to be restarted to unlock all toolbars. The check mark is removed from the command Lock Toolbars indicating that all toolbars are now unlocked.

To lock a single toolbar to prevent it from being repositioned, or turned into a floating toolbar, right‑click in an empty space on the toolbar and select Lock Toolbar Position from the submenu that opens. A check mark appears against Lock Toolbar Position.

To unlock a single toolbar so that it can be repositioned, or used as a floating toolbar, right‑click in an empty space on the toolbar and select Lock Toolbar Position from the submenu that opens. The check mark next to Lock Toolbar Position is removed.

Moving, docking and floating toolbars

Toolbars that are not locked and in a docked position have a toolbar handle at the left end of the toolbar. This dotted toolbar handle is highlighted in the example shown in Figure 7.

Figure 7: Example of toolbar handles

Move the cursor over the toolbar handle, which is the small vertical bar of dots to the left of a docked toolbar. The cursor changes shape to the moving shape used by the computer system.

Click on the toolbar handle and drag the toolbar to a new docked position, or create a floating toolbar, then release the toolbar. The toolbar handles disappear when the toolbar becomes a floating toolbar.

A floating toolbar is moved using one of the following methods:

Click in the toolbar title bar and drag the toolbar to a new floating position in the main window, then release the toolbar.

To dock a floating toolbar, click in the toolbar title bar and drag the toolbar into a docking position. The docking position can be at the top, left side, bottom of the main window.

To dock a floating toolbar, click on the downward triangle ▼ on the toolbar title bar and select Dock Toolbar from the available options. The toolbar is docked in its default position. For example, the docked position for the Bullets and Numbering toolbar is at the bottom of the main window.

Note

A docking position is indicated by a hashed border around the toolbar. When this hashed border appears, release the toolbar and the toolbar is docked.

Context sensitive toolbars

Some toolbars in LibreOffice are context sensitive and only open when an object is selected, or the cursor has been positioned in text. The following are examples of toolbars being context sensitive:

The cursor is positioned in a table and the Table toolbar opens.

The cursor is positioned in an ordered or unordered list, and the Bullets and Numbering toolbar opens.

An image is selected and the Image toolbar opens.

Customizing toolbars

Toolbars can be customized by adding tools listed in Visible Buttons, or by adding new tools to a toolbar. To access the customization options for a toolbar, right-click in an empty space on a docked toolbar, or click on the downward triangle ▼ on the title bar of a floating toolbar to open a context menu.

Select Customize Toolbar to open the Customize dialog to add more tools to the toolbar. For more information on customization, see Chapter 13, Customizing LibreOffice.

Select Dock Toolbar to dock the selected floating toolbar in its default position. The toolbar can be moved to a different docked position.

Select Dock All Toolbars to dock all floating toolbars in their default positions. The toolbars can be moved to different docked positions.

Select Lock Toolbar Position to lock a docked toolbar into its docked position.

Select Close Toolbar to close the selected toolbar, or click on the X on the right of the toolbar title bar.

Select Visible Buttons and select the required tool from the options in the context menu. Tools already installed on a toolbar are indicated by a check mark next to the tool icon. The tools are added to the toolbar in the same order as the tools appear in the context menu. That is, the top tool in the Visible Buttons list is positioned at the left end of the toolbar. The remaining tools are positioned on the toolbar in a position that matches its list position.

Context menus

Context menus provide quick access to many menu functions and are opened by right-clicking on a paragraph, graphic, or other object. When a context menu opens, the available functions or options depend on the object that has been selected. A context menu is the easiest way to use a function or option, especially if its location in the menus or toolbars is not known.

Context menus can also display applicable keyboard shortcuts if one has been created, or tool icons if available. To use these options, go to Tools > Options > LibreOffice > View (macOS LibreOffice > Preferences LibreOffice > View) and select the options available in Visibility.

Status bar

The Status bar is located at the bottom of the workspace. It provides information about the document and convenient ways to change some features quickly. It is similar in Writer, Calc, Impress, and Draw, but each LibreOffice module includes some module-specific items. To hide the Status bar, go to View on the Menu bar and deselect Status Bar.

An example of the Impress Status bar is shown in Figure 8. The various areas in the Impress Status bar are as follows:

Slide number

The slide number currently displayed in the Workspace and the total number of slides in the presentation.

Information area

Changes depending on the object selected on the slide. Examples shown in Table 3.

Table 3: Examples of information

Example selection	Examples of information shown
Text area	Text Edit: Paragraph x, Row y, Column z
Charts, spreadsheets	Embedded object (OLE) “ObjectName” selected

Figure 8: Example of Impress Status bar Slide number Information area Master slide Cursor position Object size Unsaved changes Digital signature Text language Fit slide Zoom slide Zoom percentage

Master slide

The master slide associated with the slide or notes page displayed in the Workspace. Right-click to pop up a list of available master slides and select one to apply it to the selected slide. Double-click to open the Available Master Slides dialog.

Cursor position/Object size

Shows different information depending on whether objects are selected or not as follows:

When no object is selected, the position numbers show the current position (X and Y coordinates) of the cursor.

When an object is selected and being resized, the object size numbers show the size of the object (width and height).

If an object is selected, the position numbers shows X and Y coordinates of the upper‑left corner and the object size number pair displays the size of the object. These numbers do not relate to the object itself, but to the selection outline, which is the smallest possible rectangle that can contain the visible parts of the object.

When an object is selected, clicking in either of these areas opens the Position and Size dialog.

Unsaved changes

Indicates if there are any unsaved changes in the presentation. Clicking on this icon saves the document. If the presentation has not been saved before, the Save As dialog opens giving the opportunity to save the presentation.

Digital signatures

Indicates if the presentation has a digital signature.

Text language

Indicates the language used for any text on a presentation.

Fit slide

When this icon is clicked on, the displayed slide in the Workspace zooms to fit in the Workspace.

Zoom slider

When moved, the slide displayed in the Workspace adjusts its viewing zoom in the Workspace.

Zoom percentage

Indicates the zoom level of the slide displayed in the Workspace. Clicking on zoom percentage opens the Zoom & View Layout dialog where the settings for zoom factor and view layout are adjusted.

Sidebar

The Sidebar is normally open by default on the right side of the Workspace in a LibreOffice module. An example of the Writer Sidebar is shown in Figure 9. Go to View > Sidebar on the Menu bar to display or hide the Sidebar.

The Sidebar has decks containing tools and options to format a document. The number and type of decks used in the Sidebar depend on the type of document and the LibreOffice module that is open. Decks are organized into panels and an icon bar on the right side of the Sidebar allows switching between the different decks.

Figure 9: Example of Properties deck in Writer Sidebar

The Sidebar for all LibreOffice modules contains Properties, Styles, Gallery, and Navigator decks. Some LibreOffice modules also have additional decks, for example:

Page and Style Inspector for Writer

Master Slides, Animation, Shapes, and Slide Transition for Impress

Shapes for Draw

Functions for Calc

Menus, toolbars, and Sidebar panels share many functions. For example, making text bold or italic can be done using the Format menu, the Formatting toolbar, or the Properties deck. Some Sidebar panels also have a More Options button, which opens a dialog with additional editing controls. For more detail on the functions and options available on the Sidebar, see the relevant user guide for each of the LibreOffice modules.

To hide the Sidebar, click on Hide/Show button on the left of the Sidebar (highlighted in Figure 9). To show the Sidebar, click on the Hide/Show button again.

Undocking the Sidebar to make it floating is as follows:

Click on Sidebar Settings at the top right of the Sidebar.

Select Undock from the options available, or use the keyboard shortcut Ctrl+Shift+F10 (macOS ⌘+Shift+F10).

Docking the Sidebar into its position on the main window is as follows:

Click on Sidebar Settings at the top right of the Sidebar.

Select Dock from the options available, or use the keyboard shortcut Ctrl+Shift+F10 (macOS ⌘+Shift+F10).

Working with documents

New documents

A new LibreOffice document can be created using one of the following methods:

With the LibreOffice Start Center open, click on the name of a LibreOffice module to open a new document of that type. For example, click on Impress Presentation and a new presentation is created.

Click on Templates in the Start Center and the available LibreOffice templates are displayed. Click on the required template to create a new file and the applicable LibreOffice module opens.

Go to File > New on the Menu bar and select the type of document from the submenu that opens. The applicable LibreOffice module also opens.

Click on the downward triangle ▼ next to New on the Standard toolbar and select the type of document from the context menu that opens. For example, click on Drawing and a new drawing is created. The applicable LibreOffice module also opens.

Click on New on the Standard toolbar and a new document is created matching the LibreOffice module that is open. For example, if Writer is open and active, a new text document is created.

Use the keyboard shortcut Ctrl+N (macOS ⌘+N) to create a new document. The type of document created depends on which LibreOffice module is open and active. For example, if Calc is open and active, a new spreadsheet is created.

Go to File > Wizards on the Menu bar and select the type of document from the options available in the submenu.

Opening existing documents

An existing document can be opened using one of the following methods. The applicable LibreOffice module also opens matching the type of document that has been opened.

Click Open File in the Start Center and select the file required from the file browser window that opens.

Go to File > Open on the Menu bar and select the file required from the file browser window that opens.

Click on Open on the Standard toolbar and select the file required from the file browser window that opens.

Use the keyboard shortcut Ctrl+O (macOS ⌘+O) and select the file required from the file browser window that opens.

Click Recent Documents in the Start Center and select the file required from the files displayed in the Start Center.

Go to File > Recent Documents on the Menu bar and select the file required from the list of files displayed in the context menu.

Notes

Renamed or relocated documents may still be listed in the Start Center. Selecting one of these files opens an error message that the file does not exist. To remove the file from the Start Center, hover the cursor over the thumbnail until an X appears in the upper right corner, and then click on the X.

In the Start Center, Open dialog, or file browser the list, or preview, of files displayed can be reduced by selecting the type of file required. For example, to select Text Documents as the file type, only documents that Writer can open are displayed.

For more information on working with files on remote servers, see Chapter 10, Working with File Formats, Security, and Exporting.

LibreOffice will open files compatible with the Open Document Format (ODF) that LibreOffice uses. For example: MS Word (*.doc or *.docx) are opened in Writer; MS Excel (*.xls or *.xlsx) are opened in Calc; MS PowerPoint (*.ppt or *.pptx) are opened in Impress, and so on. See Chapter 10, Working with File Formats, Security and Exporting for more information about working with different file types.

Saving documents

Documents can be saved using one of the following methods:

Save — used to save all changes made, keeping the current filename and location of the file.

Go to File > Save on the Menu bar.

Use the keyboard shortcut Ctrl+S (macOS ⌘+S).

Click on Save on the Standard toolbar.

Save As — used to create a new document, change the filename or file format, or save the file in a different location on a computer system.

Go to File > Save As on the Menu bar.

Use the keyboard shortcut Ctrl+Shift+S (macOS ⌘+Shift+S).

Click on the downward triangle ▼ next to Save on the Standard toolbar and select Save As from the context menu.

Save a Copy — used to save a copy of the current document, for example, in a different location on the computer system. The current document remains open for more editing.

Go to File > Save a Copy on the Menu bar.

Click on the downward triangle ▼ next to Save on the Standard toolbar and select Save a Copy from the context menu.

Save All — used to save all the files that are open in LibreOffice. Go to File > Save All on the Menu bar. This option is only available when more than one LibreOffice document is open.

Saving documents automatically

LibreOffice can save files automatically as part of the AutoRecovery function. Automatic saving automatically overwrites the last saved state of the file. Set up automatic file saving as follows:

Go to Tools > Options > Load/Save > General (macOS LibreOffice > Preferences > Load/Save > General) on the Menu bar.

In Save, select the option AutoRecovery information every and set the time interval in the box, for example 10 minutes.

Click OK to save the selection and close the dialog.

Using the Navigator

The Navigator lists all objects contained in a document in categories, as shown by the examples from Impress and Writer in Figure 10 and Figure 11, respectively. The Navigator is available as a dialog or Sidebar deck and is opened using one of the following methods:

Navigator dialog, go to View > Navigator on the Menu bar, or use the keyboard shortcut F5 for Windows and macOS, or Ctrl+Shift+F5 for Linux.

Navigator deck on the Sidebar, click on the Navigator icon on the right of the Sidebar, or use the keyboard shortcut Alt+Ctrl+4 for Windows and Linux, or ⌥+⌘+4 for macOS.

To close the Navigator, click on the X on the right of the title bar, or use the keyboard shortcut.

The categories are specific to each LibreOffice module. Click on the right chevron > next to each category name to open the list of objects contained in each category. Also, the Navigator provides some functions that are specific to each LibreOffice module.

Using the Navigator provides an easy method of locating and selecting objects in a document. However, it is recommended to give each object an easily identified name to assist in locating an object, instead of using the default names such as Sheet1, Table1, or Image2, and so on. Right‑click on an object in the Navigator dialog, or Sidebar deck and select Rename from the context menu.

Figure 10: Example of Impress Navigator dialog

Figure 11: Example of Navigator deck in Writer Sidebar

Figure 12: Example of separate windows list

Displaying multiple view of a document

Several views of the same document in LibreOffice can open at the same time. These views are displayed in their own windows and can show different pages, use different zoom levels, or other settings. A change to the document in one window is immediately reflected in the other windows. For example, when using Writer, separate views of a document can be used for copying or moving information from one page to another.

To open a new document window, go to Window > New Window on the Menu bar. In each window opened, the filename of the document is displayed in the title bar. Figure 12 shows an example of separate views of one document being open at the same time. If other LibreOffice documents are open at the same time, this windows list also includes these other documents. The active window has a check mark by its filename in the list. Switch between windows by clicking on a name in the list, or by clicking on the window itself if it is visible on the display.

To close a window, go to Window > Close Window on the Menu bar, use the keyboard shortcut Ctrl+W (macOS ⌘+W).

Undoing and redoing changes

Undoing

To undo the most recent change in a document, use one of the following methods:

Use the keyboard shortcut Ctrl+Z (macOS ⌘+Z).

Click on Undo in the Standard toolbar.

Go to Edit > Undo on the Menu bar.

Click the small triangle ▼ to the right of Undo on the Standard toolbar to open a list of changes that can be undone. Multiple consecutive changes can be selected and deleted at the same time.

Redoing

After changes have been undone, changes can be redone using one of the following methods:

Use the keyboard shortcut Ctrl+Y (macOS ⌘+Y).

Click on Redo in the Standard toolbar.

Go to Edit > Redo on the Menu bar.

Click the small triangle ▼ to the right of Redo on the Standard toolbar to open a list of undo commands that can be redone. Multiple consecutive undo commands can be selected and redone at the same time.

Repeating undo and redo commands

Repeating undo and redo commands can save several repetitive menu navigation clicks, or keyboard shortcuts, especially when a command is taken from a context menu or submenu. To repeat the last undo or redo command applied to a document, use one of the following methods:

Use the keyboard shortcut Ctrl+Shift+Y (macOS ⌘+Shift+Y).

Go to Edit > Repeat on the Menu bar.

Reloading documents

Reloading documents discards all the changes made in an editing session after the last document save. To reload a document, go to File > Reload on the Menu bar.

Note

If any changes have been made since the last save, a confirmation dialog opens with a warning message that reloading discards the last changes. Select whether to save, or discard, the changes.

Closing documents

Close a document using one of the following methods:

Go to File > Close on the Menu bar.

In Windows or Linux — click on the X at the right end of the Menu bar.

In macOS — click on the red button at the left end of the title bar.

If the document was the only document open, the following happens:

In Windows or Linux — the document closes and the LibreOffice Start Center opens.

In macOS — the document closes and the Menu bar remains at the top of the screen.

Note

If the document has not been saved since the last change, a confirmation dialog opens with a warning message. Select whether to save, or discard, the changes before closing.

Printing

Default printer

Setting up a default printer depends on the computer and the computer operating system being used. The following are examples of how to setup a default printer on a computer.

Notes

When printing, the name of the default printer installed on a computer appears in the Print tool name, Print Directly tool name, Print dialog, and Printer Settings dialog.

For more information about printing the different types of documents that LibreOffice can create, see the user guides for each LibreOffice module.

Printing options are not available when viewing a LibreOffice Base table or query.

Windows

Open Settings, then go to Devices > Printers & scanners.

Select a printer from the displayed list.

Select Manage > Set as default and then close Settings.

Linux

Open Settings, then go to Printers.

Select a printer from the displayed list.

Click on the settings icon on the right of the printer name.

Select Use Printer by Default from the drop-down list and close Settings.

macOS

Open System Settings, then open Printers & Scanners.

In Default printer select the printer to use as default printer from the drop-down list, then close Settings.

Figure 13: Draw Standard toolbar with Print Directly installed

Quick printing

Quick printing is when an entire document is printed using the default printer settings that is connected to the computer. To quick print the entire document that is open, click on Print Directly on the Standard toolbar.

If Print Directly is not visible on the Standard toolbar, it can be installed as follows:

Right-click in a blank area on the Standard toolbar to open a context menu.

Select Visible Buttons from the context menu.

Select Print Directly from the list of available tools to install it on the Standard toolbar, as shown by the highlighted example in Figure 13.

Printer setup

The options available in the Printer Setup dialog for a printer are as follows:

Printer

Lists information that applies to the selected printer. If the list is empty, install a default printer for the computer. Refer to the printer and computer user guides for more information on connecting printers.

Name

Lists the installed printers on the computer. To change the default printer, select a printer name from the drop-down list.

Status

Describes the current status of the selected printer.

Type

Displays the type of printer that is selected.

Location

Displays the computer connection for the selected printer.

Comments

Displays additional information for the printer.

Properties

Changes the printer settings of the computer operating system for the current document. Make sure that the layout orientation (Landscape or Portrait) matches the page format set in Format > Page on the Menu bar.

Options

Opens the Printer Options dialog box allowing the global printer options set in Tools > Options > LibreOffice Writer or LibreOffice Calc > Print (macOS LibreOffice > Preferences > LibreOffice Writer or LibreOffice Calc > Print) to be overridden when printing the current document.

Note

Options in the Printer Settings dialog is only available in LibreOffice Writer and Calc.

Figure 14: Example of a Printer Setup dialog

Figure 15: Example of Printer Options dialog

An example of setting up a printer on a computer is as follows:

Connect the printer to the computer. Refer to the printer and computer user guides for more information on connecting printers.

Go to File > Printer Settings on the Menu bar to open a Printer Setup dialog. Figure 14 shows an example of a Printer Setup dialog.

Click on Options in Printer Setup dialog to open the Printer Options dialog. Figure 15 shows an example of a Printer Options dialog.

Select the required printer options, then click on OK to save the selection and close the Printer Options dialog.

If necessary, click on Properties in the Printer Setup dialog to open a properties dialog for the default printer.

Select the required properties, then click on OK to save the selection and close the properties dialog.

Click OK to save the printer setup and close the Printer Setup Dialog.

LibreOffice printing options

General printing options

After installing a printer on a computer, the general printing options for LibreOffice can be selected to suit the most common printing method that is going to be used. Go to Tools > Options > LibreOffice > Print (macOS LibreOffice > Preferences > LibreOffice > Print) to open the Options LibreOffice Print dialog (Figure 16). The general print options for LibreOffice are as follows:

Settings for

Specifies whether the print settings apply to direct printing or to printing to a file.

Defaults

Convert colors to grayscale

Specifies that all colors in a document are printed only as greyscale.

Include transparent objects

If selected, the reduction in print quality for bitmaps also applies to the transparent areas of objects.

Figure 16: Options LibreOffice Print dialog

Reduce bitmaps

Specifies that bitmaps are printed with reduced quality. The resolution can only be reduced and not increased.

Resolution

Specifies the maximum print quality in DPI. The resolution can only be reduced and not increased.

High print quality

High print quality corresponds to a resolution of 300dpi.

Normal print quality

Normal print quality corresponds to a resolution of 200dpi.

Note

Reducing the amount of data sent to the printer increases the print speed because the print files are smaller. This makes it easier for printers with a smaller memory when printing large files. However, reducing print data can result in slightly lower print quality.

Reduce transparency

If selected, transparent objects are printed like normal, non-transparent objects, depending on your selection in the following two option buttons.

Automatically

Specifies that the transparency is only printed if the transparent area covers less than a quarter of the entire page.

No transparency

When selected, a transparency does not print.

Note

Transparencies cannot be sent directly to a printer. Transparencies must be visible to be calculated as bitmaps and sent to the printer. Depending on bitmap size and the print resolution, a large amount of data may result.

Warnings

Defines which warnings appear before printing begins.

Paper size

Select this option if a certain paper size is required for printing the current document. If the paper size used in the document is not provided by the current printer, an error message opens.

Paper orientation

Select this option if a certain paper orientation is required for printing the current document. If the format used by the current document is not available from the printer, an error message opens.

Transparency

Select this option if a warning is required if transparent objects are contained in the document. When printing a document with transparencies, a dialogue box opens to enable selection if the transparency is to be printed.

Reduce gradient

If selected, gradients are printed with reduced quality.

Gradient stripes

Specifies the maximum number of gradient stripes for printing.

Intermediate color

Specifies that gradients are only printed in a single intermediate color.

LibreOffice modules printing options

Go to Tools > Options > LibreOffice module name > Print (macOS LibreOffice > Preferences > LibreOffice module name > Print) to open the printing options dialog for each LibreOffice module. The different print settings for each LibreOffice module are summarized in Table 4. For more information, refer to the specific user guide for each module.

Table 4: Print options in LibreOffice modules

Feature	Writer	Calc	Impress	Draw	Math
Select pages, sheets, or slides to print	Yes	Yes	Yes	Yes	Yes
Print multiple pages, sheets, or slides on one page	Yes	Yes	Yes	Yes	No
Print a brochure	Yes	No	Yes	Yes	No
Print envelopes	Yes	No	No	No	No
Print labels or business cards	Yes	No	No	No	No
Preview pages or sheets before printing	Yes	Yes	No	No	No

Controlling printing

For more control over printing, open the Print dialog using one of the following methods:

Go to File > Print on the Menu bar.

Use the keyboard shortcut Ctrl+P (macOS ⌘+P).

Click on Print on the Standard toolbar.

General printing options — Windows or Linux

The following general options are an example of the options available on the General page of the Impress Print dialog in Windows or Linux (Figure 17).

Printer

Select the printer to use from the printers available in the drop-down list.

Properties

Click on Properties to open the properties dialog for the printer being used. The options available in this dialog depends on the type of printer connected to the computer and the computer operating system being used.

Range and Copies

All Slides

Prints all the slides in the presentation.

Selection

Prints the slides selected in LibreOffice Impress.

Slides

Select the page number(s) to print. For multiple pages, use the format 1, 3, 7 or 1 – 5, 7, 9 for page number selection.

Include

Select from the drop-down list Odd and Even Pages, Odd Pages, or Even Pages.

Figure 17: Impress Print dialog — Impress General page — Windows or Linux

More > Paper sides

Select from the drop-down list Print on one side (simplex), Print on both sides (duplex long edge), or Print on both sides (duplex short edge).

More > Number of copies

Enter number of printed copies required for the document.

More > Collate

Collates multiple printed copies into separate documents.

More > Order

Select from Create separate print jobs for collated output (only available when more than one copy is being printed) or Print in reverse order.

Page Layout

Paper size

Select the paper size to use from drop‑down list

Orientation

Select from the drop-down list Automatic, Portrait, or Landscape.

More > Pages per sheet

Select from the drop-down list how many pages are printed on one sheet of paper.

More > Order

Select from the drop-down list the printing order of multiple pages on one sheet of paper.

More > Draw a border around each page

When multiple slides are printed on one sheet of paper, a border is drawn around each slide.

More > Brochure

Prints the document so the pages can be folded into a brochure or booklet.

General printing options — macOS

The following general options are an example of the options available on the General page of the Impress Print dialog in macOS (Figure 18).

Printer

Select the printer to be used from the drop-down list. If the default printer is being used, then this printer will already be selected.

Presets

Select from the drop-down list a printing preset. The presets available depend on the type of printer connected to the computer. This also includes any custom presets that have been created.

Copies

Enter the number of copies to be printed.

Pages

All

Prints all the pages in the document.

From: to:

Select the page number(s) to print. For multiple pages, use the format 1, 3, 7 or 1–5, 7, 9 for page number selection.

Print in Color

De-select this option to print the presentation in monochrome if the printer selected is capable of color printing.

Double-Sided

Select this option to print the presentation double sided if the printer selected is capable of double sided printing.

Media & Quality

Feed from

Select from the drop-down list the paper tray to use if the printer has more than one paper tray.

Media Type

Select from the drop-down list the paper type that has been loaded into the paper tray being used, for example Envelope, Photo, Plain Paper.

Quality

Select the level of printing quality required.

Layout

Pages per sheet

Select from the drop-down list how many slides are printed on one sheet of paper.

Figure 18: Print dialog — Impress General page — macOS

Layout Direction

Select the printing order of multiple slides on one sheet of paper.

Border

When multiple slides are printed on one sheet of paper, a border is drawn around each slide.

Two-Sided

Select from the drop-down list how a multi-page document is going to be bound: Off; Long-Edge binding; Short-Edge binding, Booklet.

Reverse page orientation

If LibreOffice prints the slides in the wrong order, select this option and print the document again.

Flip horizontally

If LibreOffice prints the pages in the wrong orientation, select this option and print the document again.

Paper Handling

Collate sheets

When selected multiple printed copies are collated into separate documents.

Sheets to Print

Select which slides in the document to print from the drop-down list: All pages; Odd only; Even only.

Sheet Order

Select the page printing order from the drop-down list: Automatic; Normal; Reverse.

Scale to fit paper size

Adjusts the printed slide to fit the paper size.

Destination Paper Size

Select a paper size from the options available in the drop‑down list. Only available if Scale to fit paper size has been selected.

Scale down only

Select this option to reduce slide size to fit the paper. Only available if the paper size is smaller than the slide size.

Watermark

Provides options to print watermark text on the slides, for example Confidential if the presentation is of a sensitive nature.

Printer info

Shows the details of the selected printer.

LibreOffice module printing options

For more information on using specific printing options available in each LibreOffice module, see the User Guide for each LibreOffice module. For example, specific printing could be as follows:

Individual pages, slides, or drawings.

Range of pages, slides, or drawings.

Selection of text, or graphics (Writer).

Individual sheets, range of sheets, or selected cells (Calc).

Handouts, outlines, or notes (Impress).

Envelopes, labels, or business cards (Writer).

Brochure printing

In Writer, Impress, and Draw, documents can be printed so that, when printed, the pages are in the correct order to form a booklet or brochure. The printer procedures below are only examples. Actual brochure printing procedure depends on the computer operating system and type of printer being used. It is best to experiment to find the correct method for brochure printing.

Single sided printing

The following procedure is an example of how to create a brochure or booklet using a printer that is only capable of printing single sided.

Open the Print dialog using one of the following methods:

Go to File > Print on the Menu bar.

Use the keyboard shortcut Ctrl+P (macOS ⌘+P).

Click on Print on the Standard toolbar.

Click on General to open the page for general print options and, if necessary, select a printer from the Printer drop-down list of printers available.

Click on Properties to open the printer properties dialog for the printer being used and check the printer is set to the same page orientation as specified for the page setup for the pages. Usually page orientation does not matter, but it is important for brochures.

Click OK to close the properties dialog and return to the Print dialog.

In Range and Copies, select All Slides. A minimum of four slides is required to create a brochure.

In Range and Copies, select the Number of copies required to match the required number of brochures.

In Layout, select Brochure.

In Range and Copies, select Even slides option in Include.

Click OK to print the even slides in the presentation.

Take the printed pages out of the printer and put them back into the printer in the correct orientation to print on the other side of the paper. It may be necessary to experiment to find out the correct arrangement for the printer being used.

In Range and Copies, select Odd slides option in Include.

In Range and Copies, select the same Number of copies used for printing the even slides.

Click OK to print the odd slides in the presentation and close the Print dialog.

Assemble the brochures and bind them, if necessary.

Double sided or duplex printing

Printing a brochure on a printer that is capable of double sided, or duplex printing, makes the task of creating brochures a lot simpler.

Open the Print dialog using one of the following methods:

Go to File > Print on the Menu bar.

Use the keyboard shortcut Ctrl+P (macOS ⌘+P).

Click on Print on the Standard toolbar.

Click on General to open the page for general print options and, if necessary, select a printer from the Printer drop-down list of printers available.

Click on Properties to open the printer properties dialog for the printer being used and check the printer is set to the same page orientation as specified for the page setup for the slides. Usually page orientation does not matter, but it is important for brochures.

Click OK to close the properties dialog and return to the Print dialog.

In Range and Copies, select All Slides. A minimum of four slides is required to create a brochure.

In Range and Copies, select Print on both sides (duplex long edge) or Print on both sides (duplex short edge) option. Normally, long edge binding is used for portrait printing and short edge binding is used for landscape printing.

In Range and Copies, select the Number of copies required to match the required number of brochures.

In Range and Copies, select the Collate option. This option is only active when printing multiple copies of the same document.

In Layout, select Brochure.

Click OK to close to the Print dialog and print the required number of pages for the brochures.

If necessary, bind the brochures to match either long edge or short edge binding.

Figure 19: Print Preview toolbar

Print previewing

In Writer and Calc only, a document can be previewed before it is printed. Print previewing is useful, especially when printing a document double-sided making sure there are no errors before the document is printed. Print previewing is opened as follows:

Open Print Preview using one of the following methods. The Print Preview toolbar (Figure 19) opens and the Formatting toolbar closes:

Go to File > Print Preview on the Menu bar.

Click on Toggle Print Preview on the Standard toolbar.

Use the keyboard shortcut Ctrl+Shift+O (macOS ⌘+Shift+O).

Select the required preview from Single Page Preview, Two Pages Preview, Book Preview, or Multiple Pages Preview.

To print the document from Print Preview, click Print on the Print Preview toolbar to open the Print dialog, then select the printing options and click OK (macOS Print).

To close the preview, click on Close Preview on the Print Preview toolbar. The document switches back to normal view and the Formatting toolbar reopens replacing the Print Preview toolbar.

Note

When a document is in Print Preview, the document cannot be edited. If required, click on Book view in the Status Bar to display the document in book format. The document can be edited when using Book view on the Status bar. Click on Single page view to return the document to normal view.

Using Safe Mode

Safe Mode is used to temporarily start LibreOffice with a fresh user profile and disables hardware acceleration. This helps in restoring LibreOffice after it has stopped working, fails to launch correctly, or a file has become corrupted.

Go to Help > Restart in Safe Mode on the Menu bar to open the Safe Mode dialog (Figure 20) providing the following options.

Note

It is recommended to use Safe Mode options successively from the top down because the options get more extreme from the top down.

Restore from backup

LibreOffice keeps backups of previous configurations and activated extensions. Use this option to restore the user configuration, installed extensions, or both, to a previous known working state if is suspected that the problems were caused by recent changes to either.

Figure 20: Safe Mode dialog

Configure

Use this option to disable all user extensions, hardware acceleration, or both. This is a good choice if there are crashes on startup, or visual glitches that are often related to hardware acceleration.

Extensions

If it is suspected that a corrupted extension is blocking or causing LibreOffice to crash, use this option to uninstall all user extensions and reset the state of any shared or bundled extensions. In the case of shared, or bundled extensions, the option only works if a user has the proper system access rights. It should be used with caution.

Reset to factory settings

If all of the above fails, reset the settings and user interface modifications, or the entire user profile, back to factory defaults.

Reset settings and user interface modifications

Resets any user interface and configuration changes, but keeps items such as personal dictionary, templates, and so on.

Reset entire user profile

Erases all customized options and returns a user profile to the factory default state.

Continue in Safe Mode

Continuing in Safe Mode allows working in LibreOffice using a temporary profile that was created on startup. Any extensions or configuration options set up previously have to be reconfigured before using, bearing in mind that any changes made to the temporary user profile are lost after any restart.

Restart in Normal Mode

If Safe Mode has been started accidentally, this option discards any changes, terminating Safe Mode, and restarting LibreOffice normally.

Apply Changes and Restart

Select this option to apply any of the above changes and restart LibreOffice.

Note

If problems are not solved using Safe Mode, selecting Advanced provides instructions on receiving further aid.

Using Advanced a zip file can be created of a corrupted user profile. This zip file can be uploaded to the bug tracking system where it can be investigated further by the developers.

However, be aware that an uploaded user profile may contain sensitive information such as installed extensions, personal dictionaries, and settings.

Getting Started Guide 7.5

Chapter 2,
Getting Started with Writer

Word processing with LibreOffice

What is Writer?

Writer is the word processor component of LibreOffice. In addition to the usual features of a word processor (spelling check, thesaurus, hyphenation, autocorrect, find and replace, automatic generation of tables of contents and indexes, mail merge, and others), Writer provides these important features, which are covered in detail in the Writer Guide:

Templates and styles (see Chapter 4)

Page layout methods, including styles, frames, columns, and tables

Automated tables of contents and indexes

Embedding or linking of images, equations, spreadsheets, and other objects

Built-in drawing tools

Master documents, to group a collection of documents into a single document

Change tracking during revisions

Lists

Tables of data

Database integration, including a bibliography database

Mail merge

Export to PDF and EPUB (see Chapter 10)

Document digital signatures

Form design and filling

And many more

The Writer interface

The main Writer workspace is shown in Figure 21. The default menus and toolbars are described in Chapter 1, Introducing LibreOffice. Some other features of the Writer interface are covered in this chapter. Other user interface variants are described in Chapter 13, Customizing LibreOffice.

Figure 21: The main Writer workspace

Status bar

The Writer Status bar provides information about the document and convenient ways to change some document features quickly.

Figure 22: Writer Status bar, left end

Figure 23: Writer Status bar, right end

Document changes status

The icon changes color to indicate whether the document has no unsaved changes or it has been edited and the changes have not been saved. When there are unsaved changes, you can click on this icon to save the document.

Page number

Shows the sequence number of the current page, and the total number of pages in the document, and the current page number (if different from the sequence number). For example, if you restarted page numbering at 1 on the third page, its page number is 1 and its sequence number is 3.

If any bookmarks have been defined in the document, a right-click on this field pops up a list of bookmarks; click on one to go to that location.

To jump to a specific page in the document, click on this field. A small Go to Page dialog pops up. Type the required page number and click OK or press Enter.

Word and character count

The word and character counts of the document are kept up to date as you edit. When text is selected, the word and character counts for the selection will appear here.

The character count includes spaces. To display the character count excluding spaces, click on the word count in the Status bar, or choose Tools > Word Count.

You can also see the number of words and characters (and other information including the number of pages, tables, and graphics) in the entire document in File > Properties, Statistics tab.

Page style

Shows the style of the current page. To select a different page style, right-click on this field. A list of page styles pops up; click on one to select it. To edit the attributes of the current page style, left-click on this field. The Page Style dialog opens.

Caution

Changing the page style here may affect the styles of subsequent pages, depending on how the page styles are set up. See the Writer Guide for details.

Text language

Shows the language and localization at the cursor position, or for the selected text, that is used for checking spelling, grammar, hyphenation, and the thesaurus.

Click to open a menu where you can choose another language or localization for the selected text or for the paragraph where the cursor is located. You can also choose None (Do not check spelling) to exclude the text from a spelling check or choose More to open the Character dialog. Any directly formatted language settings can be reset to the default language from this menu.

Insert mode

Click to change to Overwrite mode; click again to return to Insert mode. In Insert mode, any text after the cursor position moves forward to make room for the text you type; in Overwrite mode, text after the cursor position is replaced by the text you type. This feature is disabled when in Record Changes mode.

Selection mode

Click to cycle between the selection modes; right-click to select the required mode from a context menu. The icon does not change, but when you hover the mouse pointer over this field, a tooltip indicates which mode is active.

Mode	Effect
Standard selection	Click in the text where you want to position the cursor and drag to where you want the selection to end. Any previous selection is deselected.
Extending selection (F8)	Clicking in the text extends or crops the current selection.
Adding selection (Shift+F8)	A new, separate selection is added to an existing selection. The result is a multiple selection.
Block selection (Alt+Shift+F8)	A block of text can be selected.

On Windows systems, you can hold down the Alt key while dragging to select a block of text. You do not need to enter the block selection mode.

Digital signature

If the document has been digitally signed, an icon is displayed here; otherwise, it is blank. To sign the document, or to view the certificate, click the area or icon. See Chapter 10, Working with File Formats, Security, and Exporting, for more information.

Section or object information

When the cursor is in a section, heading, or list item, or when an object (such as a picture or table) is selected, information about that item appears in this field. Clicking in this area opens a relevant dialog. For details, consult the Help or the Writer Guide.

View layout

Click an icon to change between single page, multiple pages, and book layout views (Figure 24). You can edit the document in any view. Zoom settings interact with the selected view layout and the window width to determine how many pages are visible in the window.

Zoom

To change the view magnification, drag the Zoom slider, or click on the + and – signs, or right-click on the zoom level percent (Zoom factor) to pop up a menu of magnification values from which to choose, or click on the zoom level percent to pop up the Zoom & View Layout dialog where you can specify other magnification values.

Figure 24: View layouts: single page, multiple pages, book

Sidebar

The Sidebar is normally open by default on the right side of the Writer window. If necessary, select View > Sidebar on the Menu bar, or press Ctrl+F5, to display it. An example is shown in Chapter 1, LibreOffice Basics.

The Writer Sidebar contains seven decks by default: Properties, Styles, Gallery, Navigator, Page, Style Inspector, and Manage Changes. Each deck has a corresponding icon on the Tab bar on the right of the Sidebar, allowing you to switch between them. The decks are described below.

Each deck consists of a title bar and one or more content panels. Some panels contain a small More Options button, which opens a dialog to give greater choice of editing controls. When the dialog is open, the document is locked for other editing.

Properties deck: Contains tools for direct formatting of content.

When text is selected, these panels appear:

Style: Apply a paragraph style at the cursor position. Create or update a style.

Character: Modify text by the font type, size, color, weight, style, and spacing.

Paragraph: Modify the paragraph by alignment, lists or bullets, background color, indent, and spacing.

When the cursor is in a table, this panel appears in addition to the panels for text:

Table: Modify table properties, such as insert, select, delete rows and columns; split or merge cells; set row height and column width; others.

When a graphic or image is selected, these panels appear:

Area: Modify the image background fill and transparency. Further colors, gradients, hatching, patterns, and image selection and importing are available in More Options.

Wrap: Modify wrap and spacing where these are available.

Image: Modify the image brightness, contrast, color mode, and transparency.

Position and Size: Modify width, height, rotation, and flip attributes.

When a drawing object is selected, these panels appear:

Area: Modify fill and transparency.

Wrap: Modify wrap and spacing where these are available.

Position and Size: Modify width, height, rotation, and flip attributes.

Line: Modify style, width, color, and transparency.

Effect: Add and adjust a Glow or Soft Edge effect to the object.

When a frame is selected, then the Area and Wrap panels appear.

When a video or audio clip is selected, these panels appear:

Media Playback: Control for play, pause, stop, seek, loop, and volume.

Position and Size: Modify width and height.

Styles deck: Manages the styles used in the document. This includes applying existing styles, modifying them, or creating new ones. See Chapter 4, Working with Styles, Templates, and Hyperlinks, for more information.

Gallery deck: Contains images and diagrams included in the Gallery themes. The Gallery has two sections. The first lists the themes by name (Arrows, Bullets, Diagrams, etc.) and the second displays the images in the selected category. Select the New button to create new categories. To insert an image into a file, or add a new image to the new category, drag and drop the selected image. See Chapter 5, Working with Images and Graphics, for more information.

Navigator deck: Makes it easy to navigate to specific types of content and to reorganize contents based on categories, such as headings, tables, frames, images, and so on. See “Using the Navigator” on page 68 for more information.

Page deck: Modifies the page style to change the most commonly used page properties. It has four panels:

Format modifies the size, width, height, orientation, and page margins.

Styles modifies the numbering scheme, background, page layout (specifies whether the page style should apply to odd or even pages or to both), and columns.

Header and Footer activate/deactivate and modify the respective margins, spacing, and content.

Caution

Changing the options on the Page deck modifies the page style in use, affecting not only the current page but all pages in the document using the same page style.

Style Inspector deck: Displays all the attributes of paragraph styles, character styles, and manual (direct) formatting for selected text. For more information, see the Writer Guide.

Manage Changes deck: Lists tracked changes that have not yet been accepted or rejected. You can accept or reject them here as well as in the Manage Changes dialog or the Track Changes toolbar.

Changing document views

Writer has three ways to view a document: Normal, Web, and Full Screen. To change the view, go to the View menu and select the desired view.

Normal view

Normal view is the default view in Writer. It shows how the document will look when you print it or create a PDF. In this view, you can hide or show the headers and footers and the gap between pages by choosing View > Show Whitespace on the Menu bar. This works only when single-page view is activated on the Status Bar. Hiding whitespace also works in Full Screen view.

Web view

Web view shows how the document will look if viewed in a Web browser; this is useful when you create HTML documents. In Web view, you can use only the Zoom slider; the View Layout buttons on the Status Bar are disabled, and most of the choices on the Zoom & View Layout dialog are not available. There is no visual indication of page boundaries.

Full Screen view

In Full Screen view, no toolbars or sidebar are displayed; the document takes up the full area available, using the zoom and layout settings previously selected. To exit Full Screen view and return to the previous view, press the Esc key or click the Full Screen button on the floating toolbar in the top left-hand corner. You can also use Ctrl+Shift+J to toggle between Full Screen and the previous views.

Working with documents

Chapter 1, LibreOffice Basics, includes instructions on creating new documents, opening existing documents, and saving documents. Chapter 4, Working with Styles, Templates, and Hyperlinks, covers how to create a document from a template.

By default, LibreOffice creates and saves files in the OpenDocument format (ODF). Writer documents have the extension .ODT.

Tip

Whenever it is possible to choose the document file format, you should choose to work with the default ODF format. This reduces the likelihood of errors and compatibility issues.

Saving as a Microsoft Word file

You may need to open, edit, and save documents in Microsoft Word formats. You can also create and edit .ODT files and then save them as .DOCX or .DOC files. To do this:

Important — First save your document in the file format used by LibreOffice Writer (.ODT). If you do not, any changes you made since the last time you saved will appear only in the Microsoft Word version of the document. Also, saving in ODF format enables you to re-save or modify the document if the recipient of your document experiences trouble with the Microsoft format.

Then choose File > Save As.

On the Save As dialog, in the File type drop-down menu, select the Word format you need. You may also choose to change the file name.

Click Save.

This creates a separate document with a different file extension (such as .DOCX). From this point on, all changes you make to the document will occur only in the new document. If you want to go back to working with the .ODT version of your document, you must open it again.

Tip

To have Writer save documents by default in a Microsoft Word file format, go to Tools > Options > Load/Save > General. In the section named Default File Format and ODF Settings, under Document type, select Text document, then under Always save as, select your preferred file format.

Exchanging documents with users of Apple Pages

Although Writer can open and edit files in Apple Pages format (*.pages), it cannot save in that format or export to that format. Apple Pages cannot open files in OpenDocument format, so if you need to share files with users of Pages, save your .odt file in a compatible format, such as .rtf or .docx. If you attempt to save an edited .pages file, the Save As dialog opens.

Pages users can also export (not save) a copy of a Pages document in a format compatible with Writer, such as .docx or .rtf, which Writer can then open, edit, and save to.

Note

More information about different file formats can be found in Chapter 10, Working with File Formats, Security and Exporting

Moving quickly through a document

Using the Navigator

The Navigator provides several convenient ways to move around a document and find items in it. It lists the headings, tables, text frames, graphics, bookmarks, and other objects in the document.

When a category is showing the list of objects in it, double-click on an object to jump directly to that object’s location in the document.

In the top left of the Navigator is a Navigate By drop-down list. You can pick a type of object (such as a bookmark, table, or index entry) and then use the Previous (^) and Next (v) buttons to jump from one to the next (Figure 25).

On the top right of the Navigator is a Go to Page field, which you can use to jump directly to a specific page.

For more uses of the Navigator in Writer, see the Writer Guide.

Figure 25: Navigate By list on Navigator

Using the Go to Page dialog

To jump to a specific page in the document:

Use the Go to Page field on the top right of the Navigator (see above).

Use the Go to Page dialog (Figure 26), which shows the current page number and the number of pages in the document. Type the number of the destination page in the text box and click OK. To open this dialog, do any of the following:

Click on the page number field in the Status bar.

Choose Edit > Go to Page on the Menu bar.

Press Ctrl+G on the keyboard.

Figure 26: Go to Page dialog

Working with text

Selecting, copying, pasting, or moving text in Writer is similar to working with text in other programs. LibreOffice also has some convenient ways to select items that are not next to each other, select a vertical block of text, and paste unformatted text.

Selecting items that are not consecutive

To select non-consecutive items (as shown in Figure 27) using the mouse:

Select the first piece of text.

Hold down the Ctrl key and use the mouse to select the next piece of text.

Repeat as often as needed.

To select non-consecutive items using the keyboard:

Select the first piece of text.

Press Shift+F8. This puts Writer in “Adding selection” mode.

Use the arrow keys to move to the start of the next piece of text to be selected. Hold down the Shift key and select the next piece of text.

Repeat as often as required.

Now you can work with the selected text (copy it, delete it, change the style, and so on).

Press Esc to exit from this mode.

Figure 27: Selecting items that are not next to each other

For more information about keyboard selection of text, see the topic “Navigating and selecting with the keyboard” in LibreOffice Help (F1).

Selecting a vertical block of text

You can select a vertical block or “column” of text that is separated by spaces or tabs (as you might see in text pasted from e-mails, program listings, or other sources), using Block selection mode. To change to Block selection mode, use Edit > Selection Mode > Block Area, or press Alt+Shift+F8, or right-click on the Selection icon on the Status bar and select Block selection in the pop-up menu.

Figure 28: Selection icon

Now highlight the selection, using mouse or keyboard, as shown below.

Figure 29: Selecting a vertical block of text

Cutting, copying, and moving 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. You can copy or move text within a document, or between documents, by dragging or by using menu selections, toolbar buttons, or keyboard shortcuts. You can also copy text from other sources such as Web pages and paste it into a Writer document.

To move (drag and drop) selected text using the mouse, drag it to the new location and release it. To copy selected text, hold down the Ctrl key while dragging. The text retains the formatting it had before dragging.

To move (cut and paste) selected text, use Ctrl+X to cut the text, insert the cursor at the paste-in point and use Ctrl+V to paste. Alternatively, use the Copy / Paste buttons on the Standard toolbar, or the options under Edit on the Menu bar.

Pasting text

When you paste text, the result depends on the source of the text and how you paste it. If you click on the Paste button on the Standard toolbar or use Ctrl+V, any formatting the text has (such as bold or italics) is retained. Text pasted from websites and other sources may also be placed into frames or tables. If you do not like the results, click the Undo button or press Ctrl+Z.

To make the pasted text inherit the paragraph style at the insertion point, do any of the following:

Choose Edit > Paste Special.

Click the arrow on the Paste button on the Standard toolbar.

Double-click the Paste button without releasing the left mouse button.

Press Ctrl+Shift+V.

Then select Paste Unformatted Text or Unformatted text in the resulting menu. Unformatted text can also be pasted directly by pressing Ctrl+Alt+Shift+V on the keyboard.

Finding and replacing text and formatting

Writer has two ways to find text and formatting within a document: the Find toolbar for fast searching and the Find and Replace dialog. In the dialog, you can:

Find and replace words and phrases

Use wildcards and regular expressions to fine-tune a search

Find and replace specific attributes or formatting

Find and replace paragraph styles

Using the Find toolbar

By default, the Find toolbar is docked at the bottom of the LibreOffice window (just above the Status bar) as shown in Figure 30, but you can float it or dock it in another location. If the Find toolbar is not visible, you can display it by choosing View > Toolbars > Find on the Menu bar, selecting Edit > Find on the Menu bar, or by pressing Ctrl+F. For more information on floating and docking toolbars, see Chapter 1, LibreOffice Basics.

Figure 30: Docked position of Find toolbar

To use the Find toolbar, click in the box and type your search text, then press Enter to find the next occurrence of that term. Click the Find Next or Find Previous (arrow) buttons as needed.

Click the Find All button to select all instances of the search term within the document. Select Match Case to find only the instances that also match the case (capitalization). To open the Find and Replace dialog, click the icon to the right of Match Case.

To close the Find toolbar, click the X button on the left, or press Esc on the keyboard when the cursor is in the search box.

Using the Find and Replace dialog

To display the Find & Replace dialog (Figure 31), use any of the following methods:

Press Ctrl+H on the keyboard.

Choose Edit > Find and Replace on the Menu bar.

Click the Find and Replace icon on the Find toolbar.

When the Find and Replace dialog is open, optionally click Other options to expand it.

Type the text you want to find in the Find box.

To replace the text with different text, type the new text in the Replace box.

You can select various options such as matching the case or matching whole words only.

The other options include searching only in selected text, searching from the current cursor position backwards toward the beginning of the file, searching for similar words, searching in comments, and using regular expressions (wildcards). The exact options may vary with your language settings (Tools > Options > Language Settings > Languages).

When you have set up the search, click Find Next. To replace the found text, click Replace. If you click Find All, LibreOffice selects all instances of the search text in the document. Similarly, if you click Replace All, LibreOffice replaces all matches, without stopping for you to accept each instance.

Caution

Use Replace All with caution; otherwise, you may end up with mistakes that you won’t be able to undo later if you save and close the file. (Ctrl+Z works only before the file is saved.) A mistake with Replace All might require a manual, word-by-word, search to fix.

Tip

Regular expressions offer powerful ways to search and replace text. For example, they can find all instances where any number is followed by specific letters. However, they can be challenging to understand. Refer to the Help files for guidance.

For more information on using Find and Replace, see the Writer Guide.

Figure 31: Expanded Find & Replace dialog

Inserting special characters

A special character is one not found on a standard user’s keyboard. For example, © ¾ æ ç ñ ö ø ¢ are all special characters not available on an English keyboard.

To insert one or more special characters, place the cursor where you want the character to appear. Then do one of the following:

Click the Special Character icon on the Standard toolbar to open a list of favorite and recently used characters and click on the one you wish to insert (Figure 32). You can also open the Special Characters dialog (Figure 33) by clicking the More Characters button.

Figure 32: Insert Special Characters icon in the standard toolbar

Choose Insert > Special Character on the Menu bar, to open the Special Characters dialog (Figure 33). Double-click the characters (from any font or mixture of fonts) you wish to insert, in order, then click Insert.

Figure 33: The Special Characters dialog

The Special Characters dialog (Figure 33) includes areas to select Recent Characters and Favorite Characters. To add a new character to the Favorite Characters list, click on a character and click the Add to Favorites button.

Tip

Different fonts have their own distinct special characters. If you do not find a particular special character, try changing the Font selection.

Inserting non-breaking spaces and hyphens

Non-breaking spaces

To prevent two words from being separated at the end of a line, press Ctrl+Shift when you type the space between the two words. This inserts a non-breaking space. You can also use Insert > Formatting Mark > Insert non-breaking space on the Menu bar.

Non-breaking hyphens

In cases where you do not want the hyphen to appear at the end of a line, for example in a number such as 123‑4567, you can press Ctrl+Shift+minus sign or use Insert > Formatting Mark > Insert non-breaking hyphen.

Inserting en and em dashes

To enter en and em dashes as you type, you can use Replace dashes on the Options tab in the AutoCorrect dialog (Tools > AutoCorrect > AutoCorrect Options). This option replaces one or two hyphens, under certain conditions, with the corresponding dash. See the Help or the Writer Guide for more details and other methods of inserting dashes.

–	An en-dash is a dash the width of the letter “n” in the font you are using. Type at least one character, a space, a hyphen, another space, and at least one more letter. The hyphen will be replaced by an en-dash.
—	An em-dash is a dash the width of the letter “m” in the font you are using. Type at least one character, two hyphens, and at least one more character. The two hyphens will be replaced by an em-dash. Exception: if the characters are numbers, as in a date or time range, the two hyphens are replaced by an en-dash.

Checking spelling and grammar

By default, four dictionaries are installed for each language, if they are available for that language: a spelling checker, a grammar checker, a hyphenation dictionary, and a thesaurus. The spelling checker determines if each word in the document is in the installed dictionary. The grammar checker works in combination with the spelling checker. You can choose to check spelling and grammar automatically as you type, or at any other time, or both.

Checking spelling and grammar automatically

When Automatic Spell Checking is selected in the Tools menu, Standard toolbar, or Options dialog, each word is checked as it is typed and a wavy red line appears under any unrecognized words. If Check grammar as you type has also been enabled, errors are marked with a wavy blue underline. See “Checking grammar” on page 77.

At any time, you can right-click on an unrecognized word to open a context menu (Figure 34), where you can choose one of the suggested words to replace it. When the word is corrected, the line disappears. If the word is correct but not in the dictionary, you can chose Add to dictionary. If the list does not contain the word you want, click Spelling to open the Spelling dialog (Figure 35).

Figure 34: Spelling context menu

Using the Spelling dialog

In addition to automatic checking, or in place of it, you can perform a combined spelling and grammar check on the document (or a text selection). Click the Check Spelling button on the Standard toolbar, or choose Tools > Spelling, or press F7 on the keyboard. This checks the document or selection and opens the Spelling dialog if any unrecognized words are found. To also identify potential grammar problems, select the Check grammar checkbox.

Figure 35: Spelling dialog

Here are some more features of the spelling checker:

Text language

The language to be used for checking spelling can be selected in this drop-down list.

Add a word to the dictionary

Add a word to the dictionary by clicking Add to Dictionary in the Spelling dialog or in the context menu. The word will be added to the Standard dictionary, unless you have created another dictionary in the same language. If you have created a new dictionary, you will be given a choice of dictionaries to add the word to.

Choose text for spell checking

Choose whether to check uppercase words or words that contain numbers, by clicking the Options button on the Spelling dialog to open a dialog similar to the one in Tools > Options > Language Settings > Writing Aids, described in Chapter 12, Configuring LibreOffice.

Manage custom dictionaries

Create, edit, or delete dictionaries and edit words in the dictionary in the same Options dialog.

Specify language for specific paragraphs

Set paragraphs to be checked in a language (different from the rest of the document) using several methods—for example, by clicking on the Text Language field on the Status Bar or by creating paragraph styles for specific languages. See “Using built-in language tools” on page 95 or refer to the Writer Guide for more information.

See the Writer Guide for more information about the spelling and grammar checking options.

Checking grammar

If any grammar errors are detected, they are shown underlined by a wavy blue line. Right-click on this line to open a context menu.

The first entry in the context menu describes the suspected broken grammatical rule.

Figure 36: Context menu for grammar errors

The second menu item may be Explanations, which opens your browser to a web page offering more information about the error. Next may be the suggested correction. Clicking this changes the text to the suggestion.

In the third section of the context menu, you can choose to ignore the indicated error, or open the Spelling dialog (Figure 35). In the final section of the menu, you can set the language for the selection or the paragraph.

You can select additional grammar checking rules through Tools > Options > Language Settings > English Sentence Checking, or add remote LanguageTool grammar checking through Tools > Options > Language Settings > LanguageTool Server Settings. See Chapter 12, Configuring LibreOffice, for details.

Using synonyms and the thesaurus

To access a short list of synonyms, right-click on a word and point to Synonyms in the context menu. A submenu of alternative words and phrases is displayed. Click on a word or phrase in the submenu to have it replace the highlighted word or phrase in the document.

The thesaurus gives a more extensive list of alternative words and phrases. To use the thesaurus, click on Thesaurus in the Synonyms submenu. If the current language does not have a thesaurus installed, this feature is disabled.

Using AutoCorrect

Writer’s AutoCorrect function has a long list of common misspellings and typing errors, which it corrects automatically. It also includes codes for inserting special characters, emoji, and other symbols.

AutoCorrect is turned on by default. You may wish to disable some of its features, modify others, or turn it off completely. To turn AutoCorrect off, uncheck Tools > AutoCorrect > While Typing.

You can add your own corrections or special characters or change those supplied with LibreOffice. Choose Tools > AutoCorrect > AutoCorrect Options to open the AutoCorrect dialog. On the Replace tab, you can define which strings of text are corrected and how. In most cases, the defaults are fine.

To stop Writer replacing a specific spelling, go to the Replace tab, highlight the word pair, and click Delete. To add a new spelling to the list, type it into the Replace and With boxes on the Replace tab, and click New.

See the different tabs of the dialog for the other options available to fine-tune AutoCorrect.

Tip

LibreOffice has an extensive list of special characters accessible with AutoCorrect. For example, type :smiling: and AutoCorrect will replace it with ☺. Or, (c) will be changed to ©. You can add your own special characters.

Using Word Completion

If Word Completion is enabled, Writer tries to guess which word you are typing and offers to complete the word for you. To accept the suggestion, press Enter. Otherwise, continue typing.

To turn off Word Completion, select Tools > AutoCorrect > AutoCorrect Options and deselect Enable word completion on the Word Completion tab.

Options for customizing word completion from the AutoCorrect dialog include:

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.

As you add words when working on documents, you can either save them for later use in other documents or select the option to remove them from the list when closing documents.

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.

Change the key that accepts a suggested entry—the options are right arrow, End key, Return (Enter), Space bar, and Tab.

Note

Automatic word completion only occurs after you type a word for the second time in a document.

Using AutoText

Use AutoText to store text, tables, fields, and other items for reuse and assign them to a key combination for easy retrieval. For example, rather than typing “Senior Management” every time you use that phrase, you can set up an AutoText entry to insert those words when you type “sm” and press F3.

To store some text as AutoText:

Type the text into your document, then select the text.

Choose Tools > AutoText on the Menu bar (or press Ctrl+F3).

In the AutoText dialog (Figure 37), type a name for the AutoText in the Name box. Writer will suggest a one-letter shortcut, which you can change.

Choose the category for the AutoText entry, for example My AutoText.

Click the AutoText button at the bottom of the dialog and select in the menu either New, to have the AutoText retain specific formatting, no matter where it is inserted, or New (text only), to have the AutoText take on the existing formatting around the insertion point.

Click Close to return to your document.

To insert AutoText, type the shortcut and press F3.

Tip

If the only option under the AutoText button is Import, either you have not entered a name for your AutoText or there is no text selected in the document.

Figure 37: Creating an AutoText entry

AutoText is especially powerful when assigned to fields. See the Writer Guide for more information.

Changing the case of selected text

To quickly change the case of text, select it, choose Format > Text on the Menu bar, and then choose one of the items on the submenu. The most common are:

UPPERCASE, where all letters are capitalized.

lowercase, where no words (except proper nouns) are capitalized.

Sentence case, where only the first word is capitalized (together with any proper nouns).

Capitalize Every Word, where every word is capitalized.

Small capitals, which capitalizes all letters in a reduced font size.

Writer does not have an automated way to do Title Case, where all words are capitalized except for certain subsets defined by rules that are not universally standardized. However, you can use Capitalize Every Word and then restore those words that you do not want capitalized.

Formatting text

You can format text in two ways. See the Writer Guide for details.

Direct (or Manual) formatting

Applies formatting directly to specific paragraphs, characters, pages, frames, lists, or tables. For example, you can select a word, then click on a button on the Formatting toolbar to format the text as bold or italics.

Styles

Bundles formatting options. For example, a paragraph style defines numerous settings for options such as font type and size, whether paragraphs should be indented, the space between lines, how paragraphs should be aligned on the page, and many others.

Using styles is highly recommended

Writer is a style-based program. Because styles apply whole groups of formats at the same time, you can easily format a document consistently and change the formatting of an entire document with minimal effort. In addition, LibreOffice uses styles 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.

Writer defines six types of styles: paragraph, character, frame, page, list, and table. See Chapter 4, Working with Styles, Templates and Hyperlinks, in this book and also refer to the Writer Guide.

Formatting paragraphs using styles

Styles can be applied to paragraphs in several ways:

Styles drop-down selection list at the left end of the Formatting toolbar

Styles deck of the Sidebar

Styles menu on the Menu bar (limited to common styles)

Keyboard shortcuts Ctrl+1 to Ctrl+5 (paragraph styles Heading 1 to Heading 5)

You can also open a Formatting (Styles) toolbar using View > Toolbars > Formatting (Styles); see Figure 38.

Figure 38: Formatting (Styles) toolbar

Formatting paragraphs directly

You can manually apply many direct formats to paragraphs using the buttons on the Formatting toolbar and by using the Paragraph panel of the Sidebar’s Properties deck. Not all buttons are visible in a standard installation, but you can customize the toolbar to include those you use regularly. These buttons and formats include:

Set Paragraph Style

Toggle Unordered List (with a palette of bullet styles)

Toggle Ordered List (with a palette of numbering styles)

Align Left, Align Center, Align Right, Justified

Align Top, Center Vertically, Align Bottom

Line Spacing (choose from 1, 1.15, 1.5, 2, or custom spacing)

Increase Paragraph Spacing, Decrease Paragraph Spacing

Increase Indent, Decrease Indent, Hanging Indent

Paragraph (to open the Paragraph dialog)

Set Line Spacing

Note

Direct formatting (also called manual formatting) overrides styles. This means that when a new style is applied, direct formatting is not removed and still determines the displayed format.

Removing direct formatting

To remove direct formatting, select the text and choose Format > Clear Direct Formatting on the Menu bar, or right-click and choose Clear Direct Formatting in the context menu, or press Ctrl+M on the keyboard, or select the Clear Direct Formatting icon on the Formatting toolbar.

Note

When clearing direct formatting, the text formatting will return to the applied paragraph and character style and not the default paragraph style or default character style (unless these styles are actually applied to the text).

Formatting characters using styles

To apply a character style, highlight the characters or words and apply the selected character style from the Character Styles tab of the Styles deck on the Sidebar, in the Styles menu on the Menu bar (limited), or from the right-click context menu (limited).

Formatting characters directly

It is recommended that you use styles to format characters as much as possible rather than formatting characters directly, as described in this section.

You can directly apply many formats to characters using the buttons on the Formatting toolbar and by using the Character panel of the Sidebar’s Properties deck. Not all buttons are visible in a standard installation, but you can customize the toolbar to include those you use regularly. These buttons and formats include:

Font Name, Font Size

Bold, Italic, Underline, Overline, Strikethrough, Outline Font Effect, Shadow

Superscript, Subscript

Uppercase, Lowercase

Increase Font Size, Decrease Font Size

Font Color (with a palette of colors)

Background Color (with a palette of colors)

Character Highlighting Color (with a palette of colors)

Note

Just as direct paragraph formatting overrides the current paragraph style, applying direct character formatting to characters overrides the current character style formatting.

Formatting tables

Tables in a Writer document share the same sets of formatting elements as spreadsheets in LibreOffice Calc. You can format tables manually or using table styles. Writer has predefined table styles and you can also define your own using the AutoFormat Styles dialog.

To apply a table style, click in the table to be formatted and double-click on a style listed in the Table Styles tab of the Sidebar’s Styles deck. Alternatively, click in the table to be formatted, choose Table > AutoFormat Styles on the Menu bar and select a style from the dialog that opens. For more information, refer to the Writer Guide.

Autoformatting

You can set Writer to format or correct parts of a document automatically as you type, according to the choices made on the Options and Localized Options tabs of the AutoCorrect dialog (Tools > AutoCorrect > AutoCorrect Options).

Autoformatting on the Options tab includes URL recognition, bulleted and numbered lists, capitalizing the first letter of every sentence, and correcting two initial capitals on words.

A bulleted (unordered) list is created when you type a hyphen (-), star (*), or plus sign (+), followed by a space or tab at the beginning of a paragraph. A numbered (ordered) list is created when you type a number followed by a period (.), followed by a space or tab at the beginning of a paragraph.

The Localized Options tab controls the formatting of quotation marks and apostrophes (which look like a closing single quote). Most fonts include curly quotation marks (also known as “smart quotes”), but for some purposes (such as marking minutes and seconds of latitude and longitude) you may wish to format them as straight quotes.

Straight quotes	Smart quotes
' ' " "	‘ ’ “ ”

Tip

If you notice unexpected formatting changes occurring in your document, this is the first place to look for the cause. In most cases Edit > Undo (Ctrl+Z) fixes the issue.

Creating lists with styles

For more about creating lists using styles, see the Writer Guide.

Creating unordered (bulleted) and ordered (numbered) lists

Whenever possible, use paragraph styles for creating unordered (bulleted) and ordered (numbered) lists. Writer comes with two sets of paragraph styles for this purpose.

However, these styles do not include options for settings such as the type of bullet or position of numbers. Those settings come from list styles, which are a different type of style. Writer’s separate list styles have two major advantages: the same list style can be used with multiple paragraph styles, and a paragraph’s associated list style can be changed with a single selection.

It is recommended to use paragraph and list styles together in these ways:

Use paragraph styles List 1, List 2, List 3, and so on for creating unordered lists. Use any of the Bullet list styles with these paragraph styles.

Use paragraph styles Numbering 1, Numbering 2, Numbering 3, etc, for creating ordered lists. Use any of the Numbering list styles with these paragraph styles.

You can use the predefined paragraph and list styles or define your own.

To assign a list style to a paragraph style, go to the Styles deck in the Sidebar, right-click on the paragraph style you want to use, then choose Modify. On the Outline & List tab on the Paragraph Style dialog, in the List style drop-down list, choose the required list style (Figure 39).

Paragraph styles such as List 1 Start and List 1 End enable you to adjust specific properties (such as the space between paragraphs) for items at the beginning or end of the list.

Note

List styles are not meant to be used on their own. Rather, they are designed to be attached to paragraph styles.

Figure 39: Assigning a list style to a paragraph style

Creating nested lists using styles

With paragraph styles, you can easily create nested lists, in which list items have sub-items under them, as in an outline. This requires specifying the settings for the additional levels. To do this, right-click on the list style (not the paragraph style) in the Styles deck on the Sidebar, select Modify, and specify how each level will be labeled, using the Customize tab. Also specify the position and spacing for each level on the Position tab. Refer to the Writer Guide for details.

Once you have set up nested lists, you can readily change the hierarchy of an item. To demote an item one level, position the cursor at the beginning of the line (after the bullet or number) and press the Tab key. To promote an item one level, press Shift+Tab.

Creating lists with direct formatting

Creating unordered and ordered lists

Bullets and numbers can be manually applied in three ways:

Use AutoCorrect to autoformat text, as described above

Use the Toggle Unordered List and Toggle Ordered List buttons on the Formatting toolbar

Use the Paragraph panel of the Sidebar’s Properties deck

Bullets and numbering can be applied to already selected text or they can be applied as you type.

Tip

Bullets and numbering applied in these ways cannot be removed with Format > Clear Direct Formatting on the Menu bar, or with the Clear Direct Formatting icon on the Formatting toolbar, or by using Ctrl+M. Rather, they are turned off or removed from selected text by toggling the relevant buttons on the Formatting toolbar, or on the Sidebar’s Properties deck.

Creating nested lists

Use the buttons on the Bullets and Numbering toolbar to move items up or down the list, create sub-items, change the style of bullets, and access the Bullets and Numbering dialog, which contains more detailed controls. Use View > Toolbars > Bullets and Numbering to see the toolbar.

Tip

If numbering or bullets are being applied automatically in a way that you do not want, you can disable them by going to Tools > AutoCorrect > AutoCorrect Options and deselecting Bulleted and Numbered List on the Options tab.

The Toggle Unordered List and Toggle Ordered List buttons on the Sidebar’s Properties deck can also be used to create nested lists. Click the down arrow next to the relevant button, then click More Bullets/Numbering to access the Bullets and Numbering dialog. However, the Sidebar does not include tools for promoting and demoting items in the list, as found on the Bullets and Numbering toolbar.

Setting tab stops and indents

The horizontal ruler shows the tab stops. Any tab stops that you have defined will overwrite the default tab stops. Tab settings affect indentation of full paragraphs (using the Increase Indent and Decrease Indent buttons on the Formatting toolbar) as well as indentation of parts of a paragraph (by pressing the Tab key on the keyboard).

Using the default tab spacing can cause formatting problems if you share documents with other people. If you use the default tab spacing and then send the document to someone else who has chosen a different default tab spacing, tabbed material will change to use the other person’s settings. Instead of using the defaults, define your own tab settings, as described in this section.

To define indents and tab settings for one or more selected paragraphs, right-click and choose Paragraph > Paragraph. On the Paragraph dialog, go to the Tabs tab.

A better strategy is to define tabs for the paragraph style. This is done on the Tabs tab of the Paragraph Style dialog.

Tip

Using tabs to space out material on a page is not recommended. Depending on what you are trying to accomplish, a table or frame might be a better choice.

Changing the default tab stop interval

Caution

Any changes to the default tab setting will affect the existing default tab stops in any document you open afterward, as well as tab stops you insert after making the change.

To set the spacing of default tab stop intervals, go to Tools > Options > LibreOffice Writer > General.

Figure 40: Selecting a default tab stop interval

Changing measurement units for tab stops and rulers

Change the measurement unit for rulers in the current document by right-clicking on the ruler to open a list of units. Click on one of them to change the ruler to that unit. The selected setting applies only to that ruler.

Figure 41: Changing the measurement unit for a ruler

Hyphenating words

You can hyphenate words at the end of a line in two ways: let Writer do it automatically (using styles and its hyphenation dictionaries), or insert soft hyphens manually where needed. Or, you can choose to not hyphenate at all.

Automatic hyphenation using styles

To turn automatic hyphenation of words on or off:

On the Styles deck on the Sidebar, go to Paragraph Styles, right-click on Default Paragraph Style (or another style you want to use) and select Modify.

On the Paragraph Style dialog (Figure 42), go to the Text Flow tab.

Under Hyphenation, select or deselect Automatically. When automatic hyphenation is on, you can also set the criteria for when it should occur. Click OK to save.

Note

Turning on hyphenation for the Default Paragraph Style affects all other paragraph styles that are based on Default Paragraph Style. You can individually change other styles so that hyphenation is not active; for example, you might not want headings to be hyphenated.

Any styles not based on Default Paragraph Style are not affected. See Chapter 4, Working with Styles, Templates, and Hyperlinks, for more about styles based on styles other than Default Paragraph Style.

Figure 42: Turning on automatic hyphenation in a paragraph style

Setting hyphenation with Writing Aids

You can also set hyphenation options through Tools > Options > Language Settings > Writing Aids. These choices apply when there is no specific setting in a paragraph style.

In Options, near the bottom of the dialog, scroll down to find the hyphenation settings.

Figure 43: Setting hyphenation options

To change the minimum number of characters for hyphenation, or the minimum number of characters before or after a line break, select the item, and then click the Edit button in the Options section.

Note

Hyphenation options set in Writing Aids are effective only if hyphenation is turned on through paragraph styles.

Manual hyphenation

Manually hyphenate words when you want only a specific word hyphenated at the end of a line. Do not use a normal hyphen, which will remain visible even if the word is no longer at the end of a line when you add or delete text, or change margins or font size. Instead, use a soft hyphen, which is visible only when required.

To insert a soft hyphen inside a word, click where you want the hyphen to appear (when needed) and press Ctrl+hyphen or use Insert > Formatting Mark > Insert soft Hyphen. When the word is at the end of the line it will be hyphenated at this position, even if automatic hyphenation for this paragraph is switched off.

Formatting pages

Every page in Writer is based on a page style. Page styles define basic layout, including page size, margins, headers and footers, borders, backgrounds, and so on. Changes to these settings automatically change the page style. This means that, in contrast to paragraph styles, these settings cannot be used to directly format individual pages.

As with other styles, Writer comes with a number of page styles. You can modify these styles or create new ones. The Default Page Style is used when no other page style has been specified.

In addition to page styles, several features enable you to further control page layouts, including columns, frames, tables, and sections. For more information, see the Writer Guide.

Tip

Page layout is usually easier if you show text, object, table, and section boundaries in Tools > Options > LibreOffice > Application Colors, and paragraph ends, tabs, breaks, and other items in Tools > Options > LibreOffice Writer > Formatting Aids.

Creating headers and footers

A header is an area that appears at the top of a page above the margin. A footer appears at the bottom of the page below the margin. Information such as a page number is placed in the header or footer of a page style. That information is then displayed on every page with the same page style (unless the page style specifies separate settings for the first page or for left and right pages).

Inserting a header or footer

You can insert a header in several ways. Here is the easiest:

Click above the top margin (or below the bottom margin) to make the Header or Footer marker appear (Figure 44), and then click on the + sign.

Figure 44: Header marker at top of text area

After a header/footer has been created, a down-arrow appears on the marker. Click on this arrow to drop down a menu of choices for working with the header (Figure 45).

Alternatively, you can choose Insert > Header and Footer > Header > Default Page Style (or some other page style, if not Default Page Style).

Figure 45: Header menu

Displaying 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. When you insert a header on a page style set up for mirrored pages or right-and-left pages, you can have the contents of the header be the same on all pages or be different on the right and left pages. For example, you can put the page number on the left-hand edge of the left pages and on the right-hand edge of the right pages, put the document title on the right-hand page only, or make other changes.

Determining header and footer appearance

To format a header (use similar settings for a footer), you can either click on Format Header in the menu shown in Figure 45 or go to Format > Page Style, Header tab. Both methods take you to the same tab on the Page Style dialog.

Here you can specify if headings on the left and right pages should be the same or different. You can also specify whether the first page will have no header or a different header than other pages.

In this dialog, you can also turn the header on or off, set the margins, and set the spacing between the header and document text.

Figure 46: Page Style dialog, Header tab

Inserting document title in headers and footers

Information such as a document title is often put into the header or footer. These items are best added as fields. That way, if something (such as the name) changes, the headers and footers are updated automatically. Here is one common way to use fields to insert the document title into the header:

Choose File > Properties. On the Description tab, type a title for your document, and click the OK button.

Place the cursor in the header area at the top of the page.

Choose Insert > Field > Title. The title may appear on a gray background. The background does not show when printed and can be turned off in Tools > Options > LibreOffice > Application Colors.

For more about headers, footers, and fields, see the Writer Guide.

Numbering pages

Displaying the page number

To display page numbers automatically:

Insert a header or footer as described in “Creating headers and footers” on page 88.

Place the cursor in the header or footer where you want the page number to appear and choose Insert > Page Number.

Change the alignment of the number if you wish (left, right, or center).

Including the total number of pages

To include the total number of pages (as in “page 1 of 12”):

Type the word “page” and a space, then insert the page number as above.

Press the space bar once, type the word “of” and a space, then choose Insert > Field > Page Count.

Note

The Page Count field inserts the total number of pages in the document, as shown on the Statistics tab of the document’s Properties dialog (File > Properties). If you restart page numbering anywhere in the document, then the total page count may not be what you want. See the Writer Guide for more information.

Restarting page numbering

Often you will want to restart the page numbering at 1, for example on the page following a title page or a table of contents. In addition, many documents have the “front matter” (such as the table of contents) numbered with Roman numerals and the main body of the document numbered in Arabic numerals, starting with 1. To restart page numbering:

Place the cursor in the first paragraph of the new page.

Choose Format > Paragraph.

On the Text Flow tab of the Paragraph dialog (Figure 42 on page 87), select Insert in the Breaks area, and then select With page style and specify the page style to use.

Specify the page number to start from, and then click OK.

Tip

This is also useful for numbering the first page of a document with a page number greater than 1.

Line numbering

Line numbers in the margin are often used in legal documents, poetry, and lists of programming code. Writer can insert line numbers in an entire document or for selected paragraphs. Line numbers are included when you print the document.

You can choose how many lines are numbered (for example, every line or every tenth line), the numbering type, and whether numbers restart on each page.

To add line numbers to a document, choose Tools > Line Numbering and select the Show numbering option in the top left corner of the Line Numbering dialog. Then select any options you want and click OK.

You can also create a paragraph style that includes line numbering, and apply it to the paragraphs that you want to add line numbers to. For example, to number the lines of example code in a document, you will probably want to use a font or indentation that is different from normal text.

Changing page margins

You can change page margins in three ways:

Using the page rulers — quick and easy, but does not allow fine control.

Using the Page Style dialog — you can specify margins with precision of up to two decimal places.

Using the Page deck of the Sidebar.

Caution

When you change the margins, the page style is also changed and the changed margins apply to all pages using that style.

To change margins using the rulers:

The gray sections of the rulers are the margins. Put the mouse pointer over the line between the gray and white sections. The pointer turns into a double-headed arrow and displays the current setting in a tool-tip.

Hold down the left mouse button and drag the mouse to move the margin.

Caution

The two small gray triangles on the ruler are used for indenting paragraphs. The double-headed arrows shown in Figure 47 are mouse pointers shown in the correct position for moving the margin markers. Because the triangles and arrows are often in the same place, when changing page margins you need to be careful to move the arrows, not the gray triangles.

Figure 47: Moving the margins

To change margins using the Page Style dialog:

Right-click anywhere in the text area on the page and select Page Style in the context menu.

On the Page tab of the dialog, type the required distances in the boxes in the Margins area.

To change margins using the Page deck of the Sidebar:

On the Sidebar, open the Page deck.

On the Format panel, use the Margins drop-down list to select the desired margins from the defaults provided. Click the More Options button to open the Page Style dialog where you can enter exact margin distances.

Note

The margin selections on the Sidebar change all four margins to be the same. If you require different margins, you need to use the Page Style dialog.

Choosing a page background

You can apply backgrounds to many elements in Writer, including pages. On the Area tab of the Page Style dialog, choose a background type (color, gradient, bitmap, pattern, or hatch). On the Page tab of the dialog, you can choose whether the background covers only the text area (the area inside the margins) or the entire page. For more about backgrounds, see the Writer Guide.

Adding a custom watermark to the page background

To add a watermark to a page background:

Choose Format > Watermark.

In the Watermark dialog (Figure 48), type the text and select the font, angle, transparency and color of the watermark. Then click OK.

Note

The watermark will automatically become part of the page style where it is inserted and all other pages of the same style will have the watermark. Pages with different or no watermarks need different Page Styles for those pages.

Figure 48: The Watermark dialog

Defining a different first page for a document

Many documents, such as letters and memos, have a first page that is different from the other pages in the document. For example, the first page of a letterhead typically has a different header, or the first page of a report might have no header or footer, while the other pages do.

You can do this in several ways, as described in the Writer Guide:

Use the Default Page Style (or any other page style) for your document. Deselect the Same content on first page option on the Header/Footer tabs in the Page Style dialog, and then add different headers/footers to the first page and to the other pages of the document.

Use different page styles for the first page and for the following pages. Set the Next Page attribute for the first page so the next page automatically becomes the style for following pages.

Add a title page at the beginning of the document. Writer provides a fast and convenient way to add one or more title pages to a document and optionally to restart the page number at 1 for the body of the document, using Format > Title Page on the Menu bar.

Adding comments to a document

Authors and reviewers often use comments to exchange ideas, ask for suggestions, or mark items needing attention.

You can connect a comment to multiple paragraphs or a single point. To insert a comment, select the text, or place the cursor in the place the comment refers to, and choose Insert > Comment on the menu bar, click the Insert Comment icon on the Standard toolbar, or press Ctrl+Alt+C. The anchor point of the comment 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 comment. A Comments button is also added to the right of the horizontal ruler at the top of the page; you can click this button to toggle the display of the comments.

Formatting comments

At the bottom of the comment, Writer automatically adds the author’s name and a time stamp indicating when the comment was created. If more than one person edits the document, each author is automatically allocated a different background color. Figure 49 shows an example of text with comments from two different authors.

Figure 49: Example of comments

Choose Tools > Options > LibreOffice > User Data to provide the name you want to appear in the Author field of comments.

Right-click on a comment to open a context menu where you can delete the current comment or whore current commend thread, all the comments from the same author, or all the comments in the document. On this menu, you can also reply to a comment, open a dialog to apply some basic formatting to the text, and mark comments as Resolved. These options are also available on a drop-down menu accessed by clicking the down arrow icon at the bottom right of the comment.

Navigating through comments

To navigate from one comment to another, open the sidebar Navigator, expand the Comments section, and click on the comment text to move the cursor to the anchor point of the comment in the document. Click the comment directly to edit it and right-click on the comment to delete it.

You can also navigate through the comments using the keyboard. Use Ctrl+Alt+Page Down to move to the next comment and Ctrl+Alt+Page Up to move to the previous comment.

Printing comments

When a document contains comments, the print dialog has an option for comments to be printed next to the text in the right margin, as they appear on the screen. In that case, the text on each page is scaled down to make space for the comments. The Print dialog also has options for placing comments at the end of the page or at the end of the document, or for printing only the comments.

Using built-in language tools

Writer provides some tools that make work easier if you use more than one language in the same document or if you write documents in various languages. Changing the language for specific text enables you to use the correct dictionaries and rules to check spelling, grammar, and hyphenation. It also applies the localized versions of AutoCorrect replacement options and uses the appropriate thesaurus.

Options for applying languages

Tip

The language used at the location of the cursor is shown in the Status bar, next to the page style in use.

Using styles

Languages can be set on the Font tab of the Paragraph Style dialog or the Character Style dialog. See the Writer Guide for information on how to manage the language settings of a style.

Caution

Be careful when changing a language in character or paragraph styles, as this will change the language for all characters or paragraphs using that style. It may be useful to include the language in the name of the style.

Languages set with direct formatting will override languages set using styles.

Using direct formatting

The language of a whole document can be set by using Tools > Options > Language Settings > Languages. In the Default Languages for Documents section, you can choose the language for all the text that is not explicitly marked as a different language.

Set the language for the whole document, for individual paragraphs, or even for individual words and characters, in Tools > Language on the Menu bar, and select For Selection, For Paragraph or For All Text. If the required language is not available in the submenu, click More. The Tools > Options > Language Settings > Languages menu opens, where you can select the language as described above.

Alternatively, you can set the language for individual paragraphs and characters by selecting text or putting the cursor in a paragraph and changing the language on the Status bar. There is also an option More, in case the text is not directly available.

Note

Although these methods are a type of direct formatting, they cannot be cleared by using Format > Clear Direct Formatting on the Menu bar, clicking the Clear Direct Formatting icon on the Formatting toolbar, selecting Clear Direct Formatting in the context menu, or using Ctrl+M.

Preventing text from being checked for spelling

You can set the language for a paragraph or a group of characters as None (Do not check spelling) using any of the methods described above. This option is especially useful for text such as web addresses or programming language snippets that you do not want to check for spelling.

Obtaining resources for additional languages

The spelling checker works only for those languages in the Spelling dialog list that have a dictionary installed. You can install additional dictionaries using Tools > Language > Writing Aids > More Dictionaries Online.

Creating a table of contents

Writer can generate a 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 a quick table of contents is simple:

When you create your document, use the following paragraph styles for hierarchical heading levels (such as chapter and section headings): Heading 1, Heading 2, Heading 3, and so on. These headings are what will appear in your table of contents.

Place the cursor where you want the table of contents to appear.

Choose Insert > Table of Contents and Index > Table of Contents, Index or Bibliography.

Change nothing in the Table of Contents, Index, or Bibliography dialog (unless you want to change the number of levels shown). Click OK.

If you add or delete text (so that headings move to different pages) or you add, delete, or change headings, you need to update the table of contents. To do this, right-click anywhere within the table of contents and choose Update index in the context menu.

You can define your own heading styles and set them up in Tools > Chapter Numbering. You can also include other paragraph styles in the table of contents by assigning outline levels to those styles on the Outline & Numbering tab of the paragraph style dialog.

You can customize an existing table of contents at any time. Right-click anywhere in it and choose Edit Index in the context menu. The Writer Guide describes in detail all the customization options you can choose.

Creating indexes and bibliographies

Indexes and bibliographies work in a similar way to tables of contents. In addition to alphabetical indexes, other types of index supplied with Writer include those for illustrations, tables, and objects.

You can also create a user-defined index. For example, you might want an index containing only the scientific names of species mentioned in the text, and a separate index containing only the common names of species.

Before creating an index, you first need to create index entries in your Writer document. The Writer Guide describes how to do this.

Using footnotes and endnotes

Footnotes appear at the bottom of the page on which they are referenced. Endnotes are collected at the end of a document.

To work effectively with footnotes and endnotes, you need to:

Insert footnotes and define their format.

To insert a footnote or an endnote, put the cursor where you want the footnote or endnote marker to appear. Then select Insert > Footnote and Endnote on the Menu bar and choose Footnote or Endnote, or click the Insert Footnote or Insert Endnote button on the Standard toolbar.

A footnote or endnote marker is inserted in the text and, depending on your choice, the cursor is relocated either to the footnote area at the bottom of the page or to the endnote area at the end of the document. Type the footnote or endnote content in this area.

To format the footnotes themselves, click Tools > Footnotes and Endnotes. On the Settings of Footnotes and Endnotes dialog, choose settings as required.

See the Writer Guide for more details.

Define the location of footnotes on the page, and the color and line styles for separator lines, if the defaults do not meet your needs. These are found on the Footnote tab of the Page Style dialog; see the Writer Guide.

Inserting material from other documents

You may wish to reuse material from other files in the document you are writing. For example, you might be writing a set of instructions that include some common paragraphs. You could, of course, retype or copy and paste the common paragraphs into each document. However, if the common paragraphs are edited, you may need to update that information in every document where it occurs.

Writer provides some tools for making these tasks easier. For details, see the Writer Guide.

The Section dialog.

Two items in the Navigator’s drag modes: Insert as Link and Insert as Copy.

Working with images (graphics)

Images in Writer are of these basic types:

Image files, including photos, drawings, and scanned images

Diagrams created using LibreOffice’s drawing tools

Artwork created using clip art or Fontwork

Charts created using LibreOffice’s Chart facility

See Chapter 5, Working with Images and Graphics, in this book and the Writer Guide.

Working with tables

Tables are a useful way to organize and present large amounts of information. A well-designed table can often help readers understand better what you are saying. In addition to using tables for text or numbers, you could put other objects, such as pictures, in cells. Writer’s tables can often be used as an alternative to spreadsheets, and they provide limited spreadsheet functions.

To directly insert a table with the default properties, click the Insert Table icon on the Standard toolbar. On the drop-down graphic, choose the size of the table.

To insert a new table using the Insert Table dialog, where you can specify the properties for the table, position the cursor where you want the table to appear, then use any of the following methods to open the dialog:

Choose Table > Insert Table on the Menu bar.

Press Ctrl+F12.

On the Standard toolbar, click the Insert Table icon and select More Options at the bottom of the drop-down graphic.

Writer provides many methods to format tables and the contents of cells. Refer to the Writer Guide.

Printing and exporting to PDF or EPUB

See Chapter 10, Working with File Formats, Security, and Exporting, in this book and the Writer Guide for details on:

Previewing pages before printing, selecting print options, printing in black and white on a color printer, printing brochures, and other printing features.

Exporting a Writer document to PDF (Portable Document Format) or EPUB (a popular ebook format).

Using mail merge

Writer provides very useful features to create and print:

Multiple copies of a document to send to a list of different recipients (form letters)

Mailing labels

Envelopes

All these features use data from a registered data source (a spreadsheet or database containing name and address records or other information). The Writer Guide describes the merge processes.

Tracking changes to a document

You can use several methods to keep track of changes made to a document. Details are in the Writer Guide.

Method 1 (Recommended)

Use Writer’s change marks (often called “redlines” or “revision marks”) to show added or deleted material or changed formatting. Comments can be recorded to explain the changes; these are handled a bit differently from the comments discussed in “Adding comments to a document” on page 94.

Open the document and choose Edit > Track Changes > Record before starting to edit.

Later, you or another person can review and accept or reject each change. Choose Edit > Track Changes > Show. Right-click on an individual change and choose Accept Change or Reject Change in the context menu, or choose Edit > Track Changes > Manage to view the list of changes and accept or reject them. You can also use the icons on the Track Changes toolbar.

Method 2

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. Choose Edit > Track Changes > Compare Document or Edit > Track Changes > Merge Document.

Method 3

Save versions that are stored as part of the original file. However, this method can cause problems with documents of non-trivial size or complexity, especially if you save a lot of versions.

Note

Not all changes are recorded. For example, changing a tab stop from align left to align right, and changes in formulas (equations) or linked graphics are not recorded.

Tip

In addition to the Edit > Track Changes menu, Writer provides the same commands on the Track Changes toolbar (View > Toolbars > Track Changes).

Caution

A document with track changes activated but with the changes not shown carries an invisible history of document editing that the current user may not be aware of. Contents deleted or modified can be recovered. While this is a feature, it is also a potential privacy risk.

Using fields

Fields are extremely useful features of Writer. You can use them for data that changes (such as the current date or the total number of pages) and for inserting document properties such as name, author, and date of last update. Fields are the basis of cross-referencing (see below); automatic numbering of figures, tables, headings, and other elements; and a wide range of other functions. See the Writer Guide for details.

Linking and cross-referencing within a document

If you manually type in cross-references to other parts of a document, those references can easily get out of date if you reorganize the order of topics, add or remove material, or reword a heading. Writer provides two ways to ensure that your references are up to date: hyperlinks and cross-references.

Both methods insert links to other parts of the same document or to an external source, taking you directly to the cross-referenced item. However, they have major differences:

The text in a hyperlink does not automatically update if you change the text of the linked item (although you can change it manually), but changed text does automatically update in a cross-reference.

When using a hyperlink, you do not have a choice about the type of content linked to (such as text or page number), but when using a cross-reference, you have several choices, including bookmarks.

To hyperlink to an object such as an image, and have the hyperlink show useful text such as Figure 6, you need to give such an object a useful name (instead of a name like Image6), or use the Hyperlink dialog to modify the visible text. In contrast, cross-references to figures with captions can automatically show useful text, and you have a choice of several variations of the name.

If you save a Writer document to HTML, hyperlinks remain active but cross-references do not. Both remain active when the document is exported to PDF.

Using hyperlinks

See Chapter 4, Working with Styles, Templates, and Hyperlinks, for details on creating hyperlinks within a document and to other documents and websites.

Creating and using cross-references

The Cross-references tab of the Fields dialog lists some items, such as headings, bookmarks, figures, tables, or numbered items such as steps in a procedure. You can also create your own reference items; see the Writer Guide.

To insert a cross-reference:

In the document, place the cursor where you want the cross-reference to appear.

If the Fields dialog is not open, click Insert > Cross-reference. On the Cross-references tab (Figure 50), in the Type list, select the type of item to be referenced (for example, Headings or Figure).

Click on the required item in the Selection list, which shows all the items of the selected type. You can type some characters in the top box under Selection to filter the list in the selection box.

Figure 50: The Cross-references tab of the Fields dialog

In the Refer using: list, select the option needed. The options determine the text inserted for the hyperlink and how it is formatted. The list varies according to the Type chosen. The most commonly used options are Referenced text (the full text of a heading or caption), Category and Number (a figure or table number preceded by the word Figure or Table, but without the caption text), Numbering (the figure or table number, without the word Figure or Table), or Page number (unstyled) (to insert the number of the page the referenced text is on).

Click Insert.

You can leave this dialog open while you insert many cross-references.

Using bookmarks

You can use bookmarks to rapidly navigate or link to specific locations in a document. They are listed in the Navigator and can be accessed directly from there with a single mouse click. You can cross-reference to bookmarks and create hyperlinks to bookmarks, as described above.

To create a bookmark:

Select the text you want to bookmark. Click Insert > Bookmark.

On the Insert Bookmark dialog, the larger box lists any previously defined bookmarks. Type a name for this new bookmark in the top box, and then click Insert.

Bookmarks have been enhanced in LibreOffice 7.5. In previous versions, bookmarks could be used only for location references. Now they also can be used for text references.

Text enclosed by a bookmark can be edited in the Bookmark dialog as well as in the document itself. When you edit text in the dialog, it is also edited in the document. If you have change tracking on, the change is tracked in the document.

Using master documents

A master document joins separate text documents into one larger document, and unifies the formatting, table of contents, bibliography, index, and other tables or lists. Master documents are typically used for producing long documents such as a book, thesis, or long report. They are especially handy when different people are writing different sections of a document, eliminating the need to continually share the full document. For details on using master documents, see the Writer Guide.

Creating fill-in forms

In a standard text document, such as a report, any text can be edited. By contrast, a form has sections that are not to be edited, and other sections that are designed for the reader to fill in information or make selections. For example, a questionnaire has an introduction and questions (which do not change) and spaces for the reader to enter answers.

Forms are used in three ways:

To create a simple document for the recipient to complete, such as a questionnaire sent out to a group of people who fill it in and return it.

To enter information directly into a database or data source. Someone taking orders might enter the information for each order into a database using a form.

To view information held in a database or data source. A librarian might call up information about books.

Writer offers several ways to organize information fields in a form, including check boxes, option buttons, text boxes, pull-down lists, and spinners. Two toolbars are used to create forms: Form Controls and Form Design. See the Writer Guide for more information.

Using content controls

Content controls are placeholders. You can add and customize content controls for use in templates, forms, and documents. Content controls can provide instructions on their use. Some are similar to the older form controls, but can be easier to work with and format. However, unlike form fields, content controls do not connect to any data in a database. See the Writer Guide for more information.

Getting Started Guide 7.5

Chapter 3,
Getting Started with Calc

Using spreadsheets in LibreOffice

What is Calc?

Calc is the spreadsheet component of LibreOffice. You can enter data (usually numerical) in a spreadsheet and then manipulate this data to produce certain results.

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.

Other features provided by Calc include:

Functions, which can be used to create formulas to perform complex calculations on data.

Database functions, to arrange, store, and filter data.

Dynamic charts, including a wide range of 2D and 3D charts.

Macros, for recording and executing repetitive tasks; scripting languages supported include LibreOffice Basic, Python, BeanShell, and JavaScript.

Ability to open, edit, and save Microsoft Excel spreadsheets.

Import and export of spreadsheets in multiple formats, including HTML, CSV (without or with formulas), dBase, PDF, and PostScript.

Collaborate with others seamlessly by sharing the spreadsheet.

Compatibility with other spreadsheet applications

Wildcards

Simple wildcards such as the asterisk (*), question mark (?), and tilde (~) from other spreadsheet applications are recognized by LibreOffice in formula expressions.

Formula syntax

By default, LibreOffice Calc uses its own formula syntax, referred to as Calc A1, rather than the Excel A1 syntax used by Microsoft Excel. LibreOffice will translate seamlessly between the two. However, if you are familiar with Excel you may wish to change the default syntax in Calc by going to Tools > Options > LibreOffice Calc > Formula and choosing Excel A1 or Excel R1C1 in the Formula syntax drop-down menu.

For more information on formula syntax, see Chapter 8, Using Formulas and Functions, in the Calc Guide.

Macros

Microsoft Office uses Visual Basic for Applications (VBA) code, and LibreOffice uses Basic code based on the LibreOffice API. Although the programming languages are the same, the objects and methods are different and therefore not entirely compatible.

LibreOffice can run some Excel Visual Basic scripts if you enable this feature at Tools > Options > Load/Save > VBA Properties.

If you want to use macros written in Microsoft Excel using the VBA macro code in LibreOffice, you must first edit the code in the LibreOffice Basic IDE editor.

For more information, refer to Chapter 13, Calc Macros, in the Calc Guide.

Spreadsheets, sheets, and cells

Calc works with documents called spreadsheets. Spreadsheets consist of a number of individual sheets, each sheet containing cells arranged in rows and columns. A particular cell is identified by its row number and column letter.

Cells hold the individual elements – text, numbers, formulas, and so on – that make up the data to display and manipulate.

Each spreadsheet can have up to 10,000 sheets, and each sheet can have a maximum of 1,048,576 rows and a maximum of 16,384 columns.

Calc main window

When Calc is started, the main window opens (Figure 51). The parts of this window are described below. You can show or hide many of the parts as desired, using the View menu on the Menu bar.

Figure 51: Calc main window

Title bar

The Title bar, located at the top, shows the name of the current spreadsheet. When a spreadsheet is newly created from a template or a blank document, its name is Untitled X, where X is a number. When you save a spreadsheet for the first time, you are prompted to enter a name of your choice.

Menu bar

Under the Title bar is the Menu bar. When you select one of the menu items, a sub-menu drops down to show commands. You can also customize the Menu bar; see Chapter 13, Customizing LibreOffice, for more information.

Most of the menus are similar to those in other components of LibreOffice, although the specific commands and tools may vary. The menus specific to Calc are Sheet and Data; in addition, several important data analysis tools are found in the Tools menu.

Sheet

The most often used commands for handling sheets, such as Insert and Delete Cells, Columns, Rows and Sheets; select Cell Reference Type; and Link to External Data.

Data

Commands for manipulating data in the spreadsheet; for example, Define Range, Sort, Filters, Statistics, Pivot Tables, Consolidate, Forms, Groups and Outlines.

Tools

Functions to help you check and customize the spreadsheet; for example, Spelling, Macros, Goal Seek, Solver, Scenarios, Detective, Protect Sheet, XML Filter Settings, and Extension Manager.

View

Two commands of particular interest on the Calc View menu are:

Value Highlighting (Ctrl+F8) – when active, Calc can show or hide cell contents in different colors, depending on type. The default colors can be customized in Tools > Options > LibreOffice > Application Colors.

Show Formula (Ctrl+`) – when active, Calc shows formulas instead of calculated results.

Toolbars

In a default LibreOffice installation, the top docked toolbar, just under the Menu bar, is called the Standard toolbar. It is consistent across the LibreOffice applications. The position and use of it and other toolbars are described in Chapter 1, LibreOffice Basics.

Formula bar

The Formula Bar (Figure 52) is located at the top of the sheet in the Calc workspace. It is permanently docked in this position and cannot be used as a floating toolbar. However, it can be hidden or made visible by selecting or deselecting View > Formula Bar on the Menu bar.

Figure 52: Formula Bar

From left to right, the Formula Bar includes the following:

Name Box – gives the current active cell reference using a combination of a letter and number, for example A1. The letter indicates the column and the number indicates the row of the selected cell. If you have selected a range of cells that is also a named range, the name of the range is shown in this box. You can also type a cell reference in the Name Box to jump to the referenced cell. If you type the name of a named range and press the Enter key, the named range is selected and displayed.

Function Wizard – opens a dialog from which you can search through lists of available functions and formulas. This can be very useful because it also shows how the functions are formatted.

Select Function – this drop-down list provides eleven choices: Sum, Average, Min, Max, Count, CountA, Product, Stdev, StdevP, Var, and VarP (Figure 53).

Figure 53: Select Function drop-down

Formula – inserts an equals (=) sign into the selected cell and the Input line, allowing a formula to be entered. The Name Box now displays a drop-down list of the most frequently used functions, for a quick access to the function name and syntax.

Input line – displays the contents of the selected cell (data, formula, or function) and allows you to edit the cell contents. To turn it into a multi-line input area for very long formulas, click the down arrow on the far right-hand end of the Input line.

You can also directly edit the contents of a cell by double-clicking on the cell. When you enter or edit data in a cell, the Select Function and Formula icons change to Cancel and Accept icons.

Note

In a spreadsheet, the term “function” covers much more than just mathematical functions. See Chapter 8, Using Formulas and Functions, in the Calc Guide for more information.

Status bar

The Calc Status bar (Figures 54 and 55) provides information about the spreadsheet as well as quick and convenient ways to change some of its features. Most of the fields are similar to those in other components of LibreOffice. See Chapter 1, LibreOffice Basics, for more information.

Figure 54: Calc Status bar (left)

Figure 55: Calc Status bar (right)

The Status bar has a quick way to do some math operations on selected cells in the spreadsheet. You can view the calculated average and sum, count of elements, and more on the selection by right-clicking over the Cell/Object Information area and selecting the operations you want to display in the Status bar (Figure 56).

Figure 56: Selecting math operations to show on Status bar

Sidebar

The Calc Sidebar (View > Sidebar or Ctrl+F5) is located on the right side of the window. It is a mixture of toolbar and dialog. It is similar to the Sidebar in Writer (shown in Chapter 1 and Chapter 2 of this book) and consists of five decks: Properties, Styles, Gallery, Navigator, and Functions. Each deck has a corresponding icon on the Tab panel to the right of the sidebar, allowing you to switch between them. The decks are described below.

Properties

This deck includes five content panels. These panels, with the exception of the Style panel, have a More Options button that opens a dialog with additional options. These dialogs lock the document for editing until they are closed.

Style: Access to the available cell styles, update cell styles, and new cell styles.

Character: Controls for formatting the text, such as font family, size, and color. Some controls, such as superscript, become active only when the text cursor is active in the Input line of the Formula bar or the cell.

Number Format: Quickly change the format of numbers including decimals, currency, dates, percentage, or numeric text; and leading zeroes.

Alignment: Controls to align the text in various ways, including horizontal and vertical alignment, wrapping, indenting, merging, text orientation, and vertical stacking.

Cell Appearance: Controls to set the appearance of cells, including cell background color, cell border formats including line color and style, and grid lines.

Styles, Gallery, Navigator

These decks are similar to those in Writer. Their use is described in the Calc Guide.

Functions

This deck contains a list of functions organized by category. It is a simpler version of the Function Wizard, which is opened by selecting Insert > Function on the Menu bar, pressing the Function Wizard icon on the Formula Bar, or by pressing Ctrl+F2.

Spreadsheet layout

Individual cells

The main section of the workspace in Calc displays the cells in the form of a grid. Each cell is formed by the intersection of one column and one row in the spreadsheet.

At the top of the columns and the left of the rows are a series of header boxes containing letters and numbers. The column headers use an alpha character starting at A and go on to the right. The row headers use a numerical character starting at 1 and go down.

These column and row headers form the cell references that appear in the Name Box on the Formula Bar (Figure 52). If the headers are not visible on the spreadsheet, choose View > View Headers on the Menu bar.

Sheet tabs

Each Calc spreadsheet can contain multiple sheets. At the bottom of the grid of cells are sheet tabs indicating how many sheets are in the spreadsheet. By default, a new spreadsheet is created with one sheet named Sheet1. Click on a tab to display that sheet. An active sheet is indicated with a white tab (default Calc setup). You can also select multiple sheets by holding down the Ctrl key while clicking on the sheet tabs.

To change the default name for a sheet (Sheet1, Sheet2, and so on), right-click on a sheet tab and select Rename Sheet in the context menu, or double-click on the sheet tab, to open the Rename Sheet dialog where you can type a new name for the sheet.

To change the color of a sheet tab, right-click on the tab and select Tab Color in the context menu to open the Tab Color dialog. Select a color and click OK. To add new colors to this color palette, see Chapter 13, Customizing LibreOffice.

Opening a CSV file

Comma-separated values (CSV) files are spreadsheet files in a text format where cell contents are separated by a character, for example a comma or semicolon or any other character like vertical bar. Each line in a CSV text file represents a row in a spreadsheet. Text is entered between quotation marks; numbers are entered without quotation marks. It treats data as a formula if the column value begins with an equal sign (=).

Figure 57: Text Import dialog

Note

Most CSV files come from database tables, queries, or reports, where further calculations and charting are required.

To open a CSV file in Calc:

Choose File > Open on the Menu bar and locate the CSV file. Most CSV files have the extension .csv. However, some CSV files may have a .txt extension.

Select the file and click Open.

On the Text Import dialog (Figure 57), select the required options for importing the CSV file into the Calc spreadsheet. For details about these options, see Chapter 1, Introduction, in the Calc Guide.

Click OK to import the file.

Caution

Opening CSV files requires attention to the data type of each column. Dates and decimal numbers can be formatted differently from your current locale settings and is a source for errors and miscalculations.

Saving spreadsheets

For information on how to save files manually or automatically, see Chapter 1, LibreOffice Basics. Calc can save spreadsheets in a range of formats and also export spreadsheets to PDF, HTML, XHTML file formats and JPEG and PNG images formats; see Chapter 7, Printing, Exporting, E-mailing, and Signing, in the Calc Guide for more information.

Saving in other spreadsheet formats

You can save a spreadsheet in another format:

Save the spreadsheet in Calc spreadsheet file format (*.ods).

Select File > Save As on the Menu bar to open the Save As dialog.

In the File name field, you can enter a new file name for the spreadsheet.

In the File type drop-down list, select the type of spreadsheet format you want to use.

If Automatic file name extension is present and selected, the correct file extension for the spreadsheet format you have selected will be added to the file name.

Click Save.

When a spreadsheet file is saved in a format other than .ods, the Confirm File Format dialog opens (Figure 58). Click Use [xxx] Format to continue saving in your selected spreadsheet format or click Use ODF Format to save the spreadsheet in Calc .ods format. If you uncheck Ask when saving in ODF or default format, this dialog no longer appears when saving in another format.

Figure 58: Confirm File Format dialog

If you select Text CSV format (*.csv) for your spreadsheet, the Export Text File dialog (Figure 59) opens. Here you can select the character set, field delimiter, string (text) delimiter, and so on to be used for the CSV file.

Figure 59: Export Text File dialog for CSV files

Note

Once you have saved a spreadsheet in another format, all changes you make to the spreadsheet will now occur only in the format you are using. If you want to go back to working with a *.ods version, you must save the file as a *.ods file.

Tip

To have Calc save spreadsheets by default in a file format other than .ods, go to Tools > Options > Load/Save > General. In the Default File Format and ODF Settings area, select Spreadsheet in Document type, then in Always save as, select your preferred file format.

Exporting values and formulas as a CSV file

Calc can export raw data and calculated data as a CSV file. An example of data for export is shown in Figure 60, and the resulting CSV file is shown in Figure 61.

The steps to export are:

Click the sheet to be written as a CSV file.

Choose Tools > Options > LibreOffice Calc > View on the Menu bar.

Under Display, mark the Formulas check box. Click OK.

Choose File > Save as.

On the Save as dialog, select Text CSV in the File type field.

Enter a filename and click Save.

From the Export of text files dialog that appears, select the character set and the field and text delimiters for the data to be exported, and confirm with OK.

Figure 60: Exporting raw and calculated values

Figure 61: CSV file containing raw and calculated values

Exporting contents as an image

To send a fragment of a spreadsheet to someone or publish it on the Internet, you can export a range selection or a selected group of shapes (images) to a PNG or JPG graphics format:

Select the cell range or the group of shapes, then select File > Export.

In the Export dialog, type a name for the image, select the graphics file format, and mark the Selection checkbox.

Click Export or Save, as appropriate.

Calc may open a further dialog for you to configure the settings associated with the selected graphics format.

Exporting a whole sheet as one page

Calc can export the entire contents of a sheet as a PDF in one page. It is easier to preview the contents on one page to understand if it requires any changes.

The steps to export the contents to one page:

From the Menu bar, select File > Export as PDF.

On the General tab of the PDF options dialog (Figure 62), select the option Whole sheet export.

Click the Export button, and choose a location for the PDF.

Figure 62: Exporting sheets to PDF as one page

Importing external data – Web Query

Calc can import data using web query by linking to an external data source. You can filter or choose the table to import by HTML caption:

Position the cursor in the cell where you want the new content to be imported.

Choose Sheet > Link to External Data to open the External Data dialog (Figure 63).

Enter the URL of the HTML document or the name of the spreadsheet, then press Enter. You can also click the Browse button to open a file selection dialog.

In the Available Tables/Ranges list box, select the named ranges or tables you want to insert. You can also specify that the ranges or tables are updated every n seconds. These tables are now listed in the order they appear in the source. Click OK to finish.

Figure 63: Link to external data

Navigating within spreadsheets

Calc provides many ways to navigate within a spreadsheet from cell to cell and sheet to sheet. You can generally use the method you prefer.

Cell navigation

When a cell is selected or in focus, the cell borders are emphasized. When a group of cells is selected, the cell area is colored. The color of the cell border emphasis and the color of a group of selected cells depends on the operating system being used and how you have set up LibreOffice.

Mouse: place the mouse pointer over the cell and click the left mouse button.

Cell reference: delete the existing cell reference in the Name Box on the Formula Bar (Figure 52 on page 111). Type the new cell reference and press Enter. Cell references are case-insensitive.

Navigator: press F5 to open the Navigator (Figure 64) or click the Navigator button on the Sidebar. Type the cell reference into the Column and Row fields, or use the adjacent increment / decrement buttons, and press Enter.

Figure 64: Calc Navigator

Enter key: moves the cell focus down in a column to the next row. Shift+Enter moves the focus up in a column to the previous row. You can change the action of the Enter key; see “Customizing the Enter key” on page 122.

Tab key: moves the cell focus right in a row to the next column. Shift+Tab moves the focus to the left in a row to the previous column.

Arrow keys: the arrow keys on the keyboard move the cell focus in the direction of the arrow pressed.

Home, End, Page Up, and Page Down keys:

Home moves the cell focus to the start of a row.

End moves the cell focus to the last cell on the right in the row in the right-most column that contains data.

Page Down moves the cell focus down one complete screen display.

Page Up moves the cell focus up one complete screen display.

Sheet navigation

Each sheet in a spreadsheet is independent of the other sheets, though references can be linked from one sheet to another. To navigate between sheets in a spreadsheet:

Navigator – double-click on any of the listed sheets to select the sheet.

Keyboard – Ctrl+Page Down moves one sheet to the right and Ctrl+Page Up moves one sheet to the left.

Mouse – click on a sheet tab at the bottom of the spreadsheet to select that sheet.

If your spreadsheet contains a lot of sheets, then some of the sheet tabs may be hidden. If this is the case:

Using the four buttons to the left of the sheet tabs can move the tabs into view (Figure 65).

Right-clicking on any of the arrows, or the +, opens a context menu where you can select a sheet (Figure 66).

Figure 65: Navigating sheet tabs

Figure 66: Right-click any active arrow button

Note

When you insert a new sheet into a spreadsheet, Calc automatically uses the next number in the numeric sequence as a name. Depending on which sheet is open when you insert a new sheet, the new sheet may not be in its correct numerical position. It is recommended to rename sheets in a spreadsheet to make them more recognizable.

Keyboard navigation

You can navigate a spreadsheet using the keyboard, by pressing a key or a combination of keys. See Chapter 1, Introduction, and Appendix A, Keyboard Shortcuts, in the Calc Guide for the keys and key combinations you can use for spreadsheet navigation in Calc.

Customizing the Enter key

You can choose the direction in which the Enter key moves the cell focus by going to Tools > Options > LibreOffice Calc > General. Use the first two options under Input Settings (Figure 67) to change the Enter key settings.

Figure 67: Customizing the Enter key

Select the direction cell focus moves from the drop-down list. The Enter key can also be used to switch into and out of editing mode. You can enable or disable the use of Enter to paste the content of a cell that has been copied to the clipboard.

Selecting items in a spreadsheet

Selecting cells

Single cell

Click in the cell. You can verify your selection by looking in the Name Box on the Formula Bar (Figure 52 on page 111).

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 pointer:

Click in a cell.

Press and hold down the left mouse button.

Move the mouse to highlight the desired block of cells, then release the mouse button.

To select a range of cells without dragging the mouse:

Click in the cell that is to be one corner of the range of cells.

Hold down the Shift key and click in the opposite corner cell of the block of cells.

Tip

You can also select a contiguous range of cells by first clicking in the Selection mode field on the Status bar (Figure 55 on page 113) and selecting Extending selection before clicking in the opposite corner of the range of cells. Make sure to change back to Standard selection or you may extend a cell selection unintentionally.

To select a range of cells without using the mouse:

Select the cell that will be one of the corners in the range of cells.

While holding down the Shift key, use the cursor arrows to select the rest of the range.

Tip

You can also directly select a range of cells using the Name Box. Click in the Name Box on the Formula Bar (Figure 52 on page 111). Enter the cell reference for the upper left-hand cell, followed by a colon (:), and then the lower right-hand cell reference. For example, to select the range that would go from A3 to C6, you would enter A3:C6.

Range of non-contiguous cells

Select the cell or range of cells using one of the methods above.

Move the mouse pointer to the start of the next range or single cell.

Hold down the Ctrl key and click or click-and-drag to select another range of cells to add to the first range.

Repeat as necessary.

Selecting columns and rows

Single column or row

To select a single column, click on the column header (Figure 51 on page 110). To select a single row, click on the row header.

Multiple columns or rows

To select multiple columns or rows that are contiguous:

Click on the first column or row in the group.

Hold down the Shift key.

Click the last column or row in the group.

To select multiple columns or rows that are not contiguous:

Click on the first column or row in the group.

Hold down the Ctrl key.

Click on all of the subsequent columns or rows while holding down the Ctrl key.

Entire sheet

To select the entire sheet, click on the corner box between the column header A and the row header 1 (Figure 68), or use the key combination Ctrl+Shift+Space to select the entire sheet, or use Edit > Select All on the Menu bar.

Figure 68: Select All box

Selecting sheets

You can select one or multiple sheets in Calc. It can be advantageous to select multiple sheets, especially when you want to make changes to many sheets at once.

Single sheet

Click on the sheet tab for the sheet you want to select. The tab for the selected sheet becomes white (default Calc setup).

Multiple contiguous sheets

To select multiple contiguous sheets:

Click on the sheet tab for the first desired sheet.

Hold down the Shift key and click on the sheet tab for the last desired sheet.

All tabs between these two selections will turn white (default Calc setup). Any actions that you perform will now affect all the highlighted sheets.

Multiple non-contiguous sheets

To select multiple non-contiguous sheets:

Click on the sheet tab for the first desired sheet.

Hold down the Ctrl key and click on the sheet tab for the each additional desired sheet.

The selected tabs will turn white (default Calc setup).

All sheets

Right-click a sheet tab and choose Select All Sheets in the context menu, or select Edit > Select > Select All Sheets on the Menu bar.

Working with columns and rows

Inserting columns and rows

Single column or row

Using the Sheet menu:

Select a cell, column, or row where you want the new column or row inserted.

Go to Sheet on the Menu bar and select either Insert Columns > Columns Before, or Insert Columns > Columns After, or Insert Rows > Rows Above, or Insert Rows > Rows Below.

Using the mouse:

Select a column or row where you want the new column or row inserted.

Right-click the column or row header.

Select Insert Columns Before, Insert Columns After, Insert Rows Above, or Insert Rows Below in the context menu.

Multiple columns or rows

Multiple columns or rows can be inserted at once rather than inserting them one at a time.

Highlight the required number of columns or rows by holding down the left mouse button on the first one and then dragging across the required number of identifiers.

Proceed as for inserting a single column or row above.

Hiding and showing columns and rows

To hide columns or rows:

Select the row or column you want to hide.

Go to Format on the Menu bar and select Rows or Columns.

Select Hide in the submenu. Alternatively, right-click on the row or column header and select Hide Rows or Hide Columns in the context menu.

To show hidden columns or rows:

Select the rows or columns on each side of the hidden row or column.

Go to Format on the Menu bar and select Rows or Columns.

Select Show in the submenu. Alternatively, right-click on a row or column header and select Show Rows or Show Columns in the context menu.

Tip

To see an indicator for hidden columns and rows, enable the option in View > Hidden Row/Column Indicator.

Deleting columns or rows

Select the columns or rows you want to delete.

Go to Sheet on the Menu bar and select Delete Rows or Delete Columns, or right-click on the column or row header and select Delete Columns or Delete Rows in the context menu.

Deleting cells

Select the cells you want to delete. Go to Sheet > Delete Cells, or press Ctrl+-. Or, right-click on a cell and select Delete in the context menu.

Select the option you require from the Delete Cells dialog (Figure 69) and click OK.

Figure 69: Delete Cells dialog

Working with sheets

Inserting new sheets

Click on the Add Sheet (+) icon next to the sheet tabs to insert a new sheet after the last sheet in the spreadsheet without opening the Insert Sheet dialog.

The following methods open the Insert Sheet dialog (Figure 70), where you can position the new sheet, create more than one sheet, name the new sheet, or select a sheet from a file.

Select the sheet where you want to insert a new sheet, then go to Sheet > Insert Sheet on the Menu bar.

Click in the empty space at the end of the sheet tabs.

Figure 70: Insert Sheet dialog

Moving and copying sheets

You can move or copy sheets within the same spreadsheet by dragging and dropping, or by using the Move/Copy Sheet dialog. To move or copy a sheet into a different spreadsheet, you can use the Move/Copy Sheet dialog.

Tip

To make a quick copy of a sheet within your existing spreadsheet you can right-click on the sheet name and select Duplicate Sheet.

In the Move/Copy Sheet dialog (Figure 71), you can specify exactly whether you want the sheet in the same or a different spreadsheet, its position within the spreadsheet, and the sheet name when you move or copy it.

In the current document, right-click on the sheet tab you wish to move or copy and select Move or Copy Sheet in the context menu, or go to Sheet > Move or Copy Sheet on the Menu bar.

In the Action area, select Move to move the sheet or Copy to copy the sheet.

Figure 71: Move/Copy Sheet dialog

Select the spreadsheet where you want the sheet to be placed in the drop-down list in To document. This can be the same spreadsheet, another spreadsheet already open, or a new spreadsheet.

Select the position in Insert before where you want to place the sheet.

Type a name in the New name box if you want to rename the sheet when it is moved or copied. If you do not enter a name, Calc creates a default name (Sheet2, Sheet3, ...).

Click Move or Copy to confirm the move or copy and close the dialog.

Caution

When you move or copy to another spreadsheet or a new spreadsheet, a conflict may occur with formulas linked to other sheets in the previous location.

Hiding and showing sheets

Sometimes you may want to hide the contents of a sheet to preserve data from accidental editing or because its contents are not important to display.

To hide a sheet or many sheets, select the sheet or sheets as above, right-click to open the context menu, and select Hide Sheet.

To show hidden sheets, right-click any sheet tab and select Show Sheet in the context menu. A dialog will open with all hidden sheets listed. Select the desired sheets and then click OK. It is not possible to hide the last visible sheet.

For more information on how to hide and show data, including how to use outline groups and filtering, see Chapter 2, Entering and Editing Data, in the Calc Guide.

Note

Hidden elements are neither visible on a computer display nor printed when a spreadsheet is printed. However, they can still be selected for copying if you select the elements around them. For example, if column B is hidden, it is copied when you select columns A to C. When you require a hidden element again, you can reverse the process and show the element.

Renaming sheets

By default, the name for each new sheet added is SheetX, where X is the sequential number of the next sheet to be added. While this works for a small spreadsheet with only a few sheets, it can become difficult to identify each one when a spreadsheet contains many sheets.

To rename a sheet, use one of these methods:

Enter the name in the Name text box when you create the sheet using the Insert Sheet dialog (Figure 70 on page 126).

Right-click on a sheet tab and select Rename Sheet in the context menu to replace the existing name with a different one.

Double-click on a sheet tab to open the Rename Sheet dialog.

Note

Sheet names must start with either a letter or a number; other characters, including spaces, are not allowed. Apart from the first character of the sheet name, permitted characters are letters, numbers, spaces, and the underscore character. Attempting to rename a sheet with an invalid name will produce an error message.

Deleting sheets

To delete a single sheet, right-click on the sheet tab you want to delete and select Delete Sheet in the context menu, or go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.

To delete multiple sheets, select the sheets (see “Selecting sheets” on page 124), then right-click on one of the sheet tabs and select Delete Sheet in the context menu, or go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.

Viewing a spreadsheet

Changing document view

Use the zoom function (View > Zoom) to show more or fewer cells in the window when you are working on a spreadsheet. For more about zoom, see Chapter 1, LibreOffice Basics.

Freezing rows and columns

Freezing is used to lock rows across the top of a spreadsheet or to lock columns on the left of a spreadsheet. Then, when moving around within a sheet, the cells in frozen rows and columns remain in view.

Figure 72 shows some frozen rows and columns. The heavier horizontal line between rows 3 and 23 and the heavier vertical line between columns F and Q indicate that rows 1 to 3 and columns A to F are frozen. The rows between 3 and 23 and the columns between F and Q have been scrolled off the page.

Figure 72: Frozen rows and columns

Often the first row and column contain headings, which you may wish to be visible when scrolling through a long or wide spreadsheet. To quickly freeze either or both of these, use the Freeze Rows and Columns icon on the Standard toolbar for both, or the commands in the drop-down menu of the Freeze Rows and Columns icon: Freeze First Row and Freeze First Column for one of them.

To freeze either rows or columns (single or multiple):

Click on the row header below the rows you want the freeze or click on the column header to the right of the columns where you want the freeze.

Right-click and choose Freeze Rows and Columns in the context menu, or choose View > Freeze Rows and Columns on the Menu bar, or click the Freeze Rows and Columns icon on the Standard toolbar.

To freeze both rows and columns (single or multiple):

Click in the cell that is immediately below the rows you want to freeze and immediately to the right of the columns you want frozen.

Choose View > Freeze Rows and Columns on the Menu bar, or click the Freeze Rows and Columns icon on the Standard toolbar.

You can freeze the first column or first row with View > Freeze Cells > Freeze First Column (or Freeze First Row) even if the first column or first row are not visible.

Unfreezing

To unfreeze rows or columns, either use View > Freeze Rows and Columns on the Menu bar, or click on the Freeze Rows and Columns icon on the Standard toolbar. The heavier lines indicating freezing will disappear.

Splitting the screen

Another way to change the view is by splitting the screen your spreadsheet is displayed in (also known as splitting the window). The screen can be split horizontally, vertically, or both, giving you up to four portions of the spreadsheet in view at one time. An example of splitting the screen is shown in Figure 73, where a split is indicated by additional window borders within the sheet.

This could be useful, for example, when a large spreadsheet has one cell containing a number that is used by three formulas in other cells. By splitting the screen, you can position the cell containing the number in one section of the view and the cells with formulas in other sections. This makes it easy to see how changing the number in one cell affects each of the formulas.

Figure 73: Split screen example

Splitting horizontally or vertically

There are two ways to split a screen horizontally or vertically.

Method 1

To split either horizontally or vertically:

Click on the row header below the rows where you want to split the screen horizontally or click on the column header to the right of the columns where you want to split the screen vertically.

Right-click and choose Split Window in the context menu, or choose View > Split Window on the Menu bar. Window borders appear between the rows or columns indicating where the split has been placed, as shown in Figure 73.

To split both horizontally and vertically at the same time:

Click in the cell that is immediately below the rows where you want to split the screen horizontally and immediately to the right of the columns where you want to split the screen vertically.

Choose View > Split Window on the Menu bar.

Method 2

For a horizontal split, click on the thick black line at the top of the vertical scroll bar (Figure 74) and drag the split line below the row where you want the horizontal split positioned.

Similarly, for a vertical split, click on the thick black line at the right of the horizontal scroll bar and drag the split line to the right of the column where you want the vertical split positioned.

Figure 74. Split screen bars

Removing split views

To remove a split view, do one of the following:

Double-click on each split line.

Click and drag the split lines back to their default positions at the ends of the scroll bars.

Go to View on the Menu bar and deselect Split Window.

Right-click on a column or row heading and deselect Split Window in the context menu.

Entering data using the keyboard

Most data entry in Calc can be done using the keyboard.

Numbers

Click in the cell and type the number using the number keys on either the main keyboard or the numeric keypad. By default, numbers are right-aligned in a cell.

Negative numbers

To enter a negative number, either type a minus (–) sign in front of the number or enclose the number in parentheses, for example (1234). The result for both methods of entry will be the same; in this example, –1234.

Leading zeroes

If a number is entered with leading zeroes, for example 01481, by default Calc will drop the leading zero. To retain a minimum number of characters in a cell when entering numbers and retain the number format, for example 1234 and 0012, use one of these methods to add leading zeroes.

Method 1

With the cell selected, right-click on the cell, select Format Cells in the context menu, or go to Format > Cells on the Menu bar, or use the keyboard shortcut Ctrl+1, to open the Format Cells dialog (Figure 75). Make sure the Numbers tab is selected, then select Number in the Category list.

In the Leading zeroes field within the Options area, enter the minimum number of characters required. For example, for four characters, enter 4. Any number less than four characters will have leading zeroes added, for example 12 becomes 0012.

Click OK. The number entered retains its number format and any formula used in the spreadsheet will treat the entry as a number in formula functions.

Figure 75: Format Cells dialog – Numbers tab

Method 2

Select the cell.

On the Sidebar, go to the Properties deck.

In the Number Format panel (Figure 76), select Number in the drop-down list, and enter 4 in the Leading zeroes box. Formatting is applied immediately.

Figure 76: Set leading zeroes in Sidebar

Tip

To format numbers with only decimal places, but without a leading zero (for example, .019 instead of 0.019), type a . (period or full stop) followed by ? (question mark) in the Format code box (Figure 75), to represent the number of decimal places required. For example, for 3 decimal places, type .??? and click OK. Any number with only decimal places will then have no leading zero.

Tip

If numerical characters do not need to be treated as numbers in calculations (for example when entering zip codes), you can type an apostrophe (') before the number, for example '01481. When you move the cell focus, the apostrophe is hidden, the leading zeroes are retained, and the number is converted to left-aligned text.

Numbers as text

Numbers can also be entered as text using one of the following methods.

Method 1

With the cell selected, right-click on the cell and select Format Cells in the context menu, or go to Format > Cells on the Menu bar, or use the keyboard shortcut Ctrl+1, to open the Format Cells dialog (Figure 75).

Make sure the Numbers tab is selected, then select Text in the Category list.

Click OK. The number is converted to text and, by default, left-aligned.

Method 2

Select the cell.

On the Sidebar, go to the Properties deck. If necessary, click the Open Panel icon (+ or arrow) by Number Format to open that panel (Figure 76).

Select Text in the category drop-down list. Formatting is applied to the cell immediately.

Note

By default, any numbers that have been formatted as text in a spreadsheet will be treated as a zero by any formulas used in the spreadsheet. Formula functions will ignore text entries. You can change this feature in Tools > Options > LibreOffice Calc > Formula. In Detailed Calculation Settings, select Custom (conversion of text to numbers and more). Click the Details button, and then select the proper treatment in the Detailed Calculation Settings dialog.

Text

Click in the cell and type the text. By default, text is left-aligned in a cell. Cells can contain several lines of text. If you want to use paragraphs, press Ctrl+Enter to create another paragraph.

On the Formula bar, you can extend the Input line if you are entering several lines of text. Click on the Expand Formula Bar icon located on the right-hand end of the Formula bar and the Input line becomes multi-line.

Date and time

Select the cell and type the date or time. You can separate the date elements with a slash (/) or a hyphen (–), or use text, for example 10 Oct 2020. The date format automatically changes to the selected format used by Calc.

When entering a time, separate time elements with colons, for example 10:43:45. The time format automatically changes to the selected format used by Calc.

To change the date or time format used by Calc:

With the cell selected, open the Format Cells dialog (Figure 75).

Make sure the Numbers tab is selected, then select Date or Time in the Category list.

Select the date or time format you want to use in the Format list. Click OK.

Cell fields

You can insert a field linked to the date, sheet name, or document name in a cell.

Select a cell and double-click to activate edit mode.

Right-click and select Insert Field > Date, or Sheet Name, or Document Title in the context menu.

Above those three options are other Date and Time buttons, which will insert the same information but it will not be updated or recalculated as the options mentioned above.

Note

The Insert Field > Document Title command inserts the name of the spreadsheet and not the title defined in the Description tab in the Properties dialog for the file.

Tip

The fields are refreshed when the spreadsheet is saved or recalculated when using the Ctrl+Shift+F9 shortcut.

AutoCorrect Options

Calc automatically applies many changes during data input using AutoCorrect, unless you have deactivated any AutoCorrect changes. You can also undo any AutoCorrect changes by using Edit > Undo on the Menu bar, pressing the keyboard shortcut Ctrl+Z, or manually by going back to the change and replacing the AutoCorrection with what you want to actually see.

To change the AutoCorrect options, go to Tools > AutoCorrect Options on the Menu bar to open the AutoCorrect dialog (Figure 77).

Replace tab

Edit the replacement table for automatically correcting or replacing words or abbreviations.

Exceptions tab

Specify the abbreviations or letter combinations that you do not want corrected automatically.

Options tab

Select the options for automatically correcting errors as you type.

Localized Options tab

Specify the AutoCorrect options for quotation marks and for options that are specific to the language of the text.

Reset button

Reset modified values back to their previous values.

Figure 77: AutoCorrect dialog

Deactivating automatic changes

Some AutoCorrect settings are applied when you press the space bar after you enter data. To turn off or on Calc AutoCorrect, go to Tools on the Menu bar and deselect or select AutoInput. See also “AutoInput tool” below.

Speeding up data entry

Entering data into a spreadsheet can be very labor-intensive, but Calc provides several tools for removing some of the drudgery from input.

The most basic ability is to drag and drop the contents of one cell to another with a mouse. Many people also find AutoInput helpful. Calc also includes several other tools for automating input, especially of repetitive material. They include the Fill tool, selection lists, and the ability to input information into multiple sheets of the same document.

AutoInput tool

The AutoInput tool in Calc automatically completes entries, based on other entries in the same column. When text is highlighted in a cell, AutoInput can be used as follows:

To accept the completion, press Enter or F2, or click the left mouse button.

To view more completions that start with the same characters, use the key combinations Ctrl+Tab to scroll forward, or Ctrl+Shift+Tab to scroll backward.

To see a list of all available AutoInput text items for the current column, use the keyboard combination Alt+Down Arrow.

When typing formulas using characters that match previous entries, a Help tip will appear listing the available functions that start with matching characters. AutoInput ignores the case sensitivity of any data you enter.

By default, AutoInput is activated in Calc. To turn it off, go to Tools on the Menu bar and deselect AutoInput.

Fill tool

You can use the Fill tool to duplicate existing content or create a series in a range of cells (Figure 78).

Select the cell containing the contents you want to copy or start the series from.

Drag the mouse pointer in any direction or hold down the Shift key and click in the last cell you want to fill.

Go to Sheet > Fill Cells on the Menu bar and select the direction in which you want to copy or create data (Fill Up, Fill Down, Fill Left, or Fill Right), or Fill Series, or Fill Random Number in the submenu.

Tip

You can use the keyboard shortcut Ctrl+D as an alternative to selecting Sheet > Fill Cells > Fill Down on the Menu bar.

Figure 78: Using the Fill tool

Alternatively, you can use a shortcut to fill cells.

Select the cell containing the contents you want to copy or start the series from.

Move the mouse pointer over the small square in the bottom right corner of the selected cell. The mouse pointer will change shape.

Click and drag in the direction you want the cells to be filled. If the original cell contained text, then the text will automatically be copied. If the original cell contained a number, a series will be created.

Caution

When you are selecting cells so you can use the Fill tool, make sure that none of the cells contain data, except for the cell data you want to use. When you use the Fill tool, any data contained in the selected target cells is overwritten.

Using a fill series

When you select a series fill from Sheet > Fill Cells > Fill Series, the Fill Series dialog (Figure 79) opens. Here you can select the type of series you want.

Figure 79: Fill Series dialog

Defining a fill series

If you select the AutoFill option on the Fill Series dialog, type some text in the Start value field, and press OK, Calc will check if one of your predefined sort lists contains that text. If there is a sort list containing that text, Calc uses the entries in that sort list to fill cells. Go to Tools > Options > LibreOffice Calc > Sort Lists to view your currently defined sort lists.

To define your own sort list, which can later be used as a fill series:

Go to Tools > Options > LibreOffice Calc > Sort Lists to open the Sort Lists dialog (Figure 80). This dialog shows the previously-defined series in the Lists box and the contents of the highlighted list in the Entries box.

Click New and the Entries box is cleared.

Type the series for the new list in the Entries box (one entry per line).

Click Add and the new list will now appear in the Lists box.

Click OK to save the new list.

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.

Select a blank cell in a column that contains cells with text entries.

Right-click and select Selection Lists in the context menu, or press Alt+Down Arrow. A drop-down list appears listing any cell in the same column that either has at least one text character or whose format is defined as text.

Click on the text entry you require and it is entered into the selected cell.

Figure 80: Sort Lists dialog

Sharing content between sheets

You might want to enter the same information in the same cell on multiple sheets, for example to set up standard listings for a group of individuals or organizations. Instead of entering the list on each sheet individually, you can enter the information in several sheets at the same time.

Go to Edit > Select > Select Sheets on the Menu bar to open the Select Sheets dialog.

Select the individual sheets where you want the information to be repeated.

Click OK to select the sheets and the sheet tabs will change color.

Enter the information in the cells on the first sheet where you want it to appear and it will be repeated in all the selected sheets.

Caution

This technique automatically overwrites, without any warning, any information that is already in the cells on the selected sheets. Make sure you deselect the additional sheets when you are finished entering information that is going to be repeated before continuing to enter data into the spreadsheet.

Validating cell contents

When creating spreadsheets for other people to use, you may wish to ensure that they enter data that is valid and appropriate for the cell. You can also use validation in your own work as a guide to entering data that is either complex or rarely used.

Fill series and selection lists can handle some types of data, but are limited to predefined information. To validate new data entered by a user, select a cell and go to Data > Validity on the Menu bar to define the type of contents that can be entered in that cell. For example, a cell may require a date or a whole number with no alphabetic characters or decimal points, or a cell may not be left empty.

Depending on how validation is set up, it can also define the range of contents that can be entered, provide help messages explaining the content rules set up for the cell and what users should do when they enter invalid content. You can also set the cell to refuse invalid content, accept it with a warning, or start a macro when an error is entered. See Chapter 2, Entering and Editing Data, in the Calc Guide for more information.

Editing data

Deleting data

Deleting data only

To delete only the data in a cell or range of cells, without deleting any of the cell formatting, select the cells and then press the Delete key.

To completely delete cells, rows, or columns, see the instructions on page 125.

Deleting data and formatting

Data and cell formatting can be deleted from a cell at the same time. To do this:

Select a cell or a range of cells.

Press the Backspace key, or right-click in the cell selection and choose Clear Contents in the context menu, or select Sheet > Clear Cells on the Menu bar.

In the Delete Contents dialog (Figure 81), choose any of the options or Delete all.

Click OK.

Figure 81: Delete Contents dialog

Replacing data

To completely replace data in a cell and insert new data, select the cell and type in the new data. The new data will replace the old data but will retain the cell formatting.

Alternatively, select the cell and click in the Input line on the Formula bar (Figure 52 on page 111), then double-click on the data to highlight it completely and type the new data.

Changing data

Sometimes it is necessary to edit the contents of a cell without removing all of the data from the cell. For example, changing the phrase “Sales in Qtr. 2” to “Sales rose in Qtr” can be done as follows.

Using the keyboard

Click in the cell to select it.

Press F2 to switch the cell to edit mode. The cursor is placed at the end of the content in the cell.

Use the keyboard arrow keys to position the cursor where you want to start entering the new data in the cell, then press the Delete key or Backspace key to delete any unwanted data before typing the new data.

When you have finished editing, press the Enter key to save the changes.

Tip

You may want to enable Tools > Options > LibreOffice Calc > General > Press enter to switch to edit mode. Then, when you press the Enter key in a selected cell, the cell switches to edit mode, eliminating the need to press F2.

Using the mouse

Double-click on the cell, or press F2, to select it and place the cursor in the cell for editing. You can also use Edit > Cell Edit Mode on the Menu bar to put the cell in edit mode.

Either:

Reposition the cursor to where you want to start entering the new data in the cell.

Single-click to select the cell, then move the cursor to the Input line on the Formula bar and click at the position where you want to start editing data in the cell.

When you have finished, click away from the cell to deselect it and save the changes.

Paste Special function

To copy text, numbers, or formulas to the target cell or cell range:

Select the source cell or cell range and copy the data by pressing Ctrl+C or using Edit > Copy on the Menu bar.

Select the target cell or cell range.

Right-click on the target cell or cell range and select Paste Special in the context menu, then select Unformatted Text, Text, Number, or Formula.

Or, use the submenu items reached from Edit > Paste Special on the Menu bar.

You can also use the Paste Special function to paste into another cell selected parts of the data in the original cell or cell range, for example its format or the result of its formula. To do this:

Select a cell or a cell range.

Go to Edit > Copy on the Menu bar, or press Ctrl+C, or right-click and select Copy in the context menu.

Select the target cell or cell range.

Go to Edit > Paste Special > Paste Special on the Menu bar, or use the keyboard shortcut Ctrl+Shift+V, or right-click and select Paste Special > Paste Special in the context menu to open the Paste Special dialog (Figure 82).

In the preset buttons on the left side of the dialog, you can choose to paste Values Only, Values & Formats, Formats Only, or to Transpose All the data in the target cells. On the right side of the dialog, select the options for Paste, Options, Operations, and Shift Cells. These are described in the Help and in Chapter 2, Entering and Editing Data, of the Calc Guide.

Click OK to paste the data into the target cell or range of cells and close the dialog.

Tip

To see which combination of options on the right side would apply if one of the Preset buttons is selected, deselect the Run immediately option below the Presets. With the Run immediately option selected, clicking on a Preset button applies that combination of options and closes the dialog.

Figure 82: Paste Special dialog

Formatting data

Note

All the settings discussed in this section can also be set as a part of the cell style. See Chapter 5, Using Styles and Templates, in the Calc Guide for more information.

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.

Automatic wrapping

To automatically wrap multiple lines of text in a cell, use one of the following methods.

Method 1

Right-click on the cell and select Format Cells in the context menu to open the Format Cells dialog.

On the Alignment tab (Figure 83), under Properties, select Wrap text automatically and click OK.

Figure 83: Format Cells dialog – Alignment tab

Method 2

Select the cell.

On the Properties deck of the Sidebar, open the Alignment panel (Figure 84).

Select the Wrap text option to apply the formatting immediately.

Figure 84: Wrap text formatting

Manual line breaks

To insert a manual line break while typing in a cell, press Ctrl+Enter. When editing text, double-click the cell, then reposition the cursor to where you want the line break. In the Input line of the Formula bar, you can also press Shift+Enter.

When a manual line break is entered in a cell, the cell row height changes but the cell width does not change and the text may still overlap the end of the cell. You have to change the cell width manually or reposition the line break.

Shrinking text to fit the cell

The font size of the data in a cell can automatically adjust to fit inside cell borders. To do this, select the Shrink to fit cell size option under Properties on the Alignment tab of the Format Cells dialog (Figure 83).

Merging cells

You can select contiguous cells and merge them into one as follows:

Select the range of contiguous cells you want to merge.

Right-click on the selected cells and select Merge Cells in the context menu, or go to Format > Merge Cells > Merge Cells or Merge and Center Cells on the Menu bar, or click on the Merge and Center Cells icon on the Formatting toolbar. Using Merge and Center Cells will center align any contents in the cells.

If the cells contain any data, a small dialog (Figure 85) opens, showing choices for moving or hiding data in the hidden cells. Make your selection and click OK.

Caution

Merging cells can lead to calculation errors in formulas used in the spreadsheet.

Figure 85: Merge choices for non-empty cells

Splitting cells

You can split a cell that was created from several cells by merging.

Select a merged cell.

Go to Format > Merge Cells > Split Cells on the Menu bar, or right-click and select Split Cells in the context menu, or click on the Merge and Center Cells icon on the Formatting toolbar.

Any data in the cell will remain in the first cell. If the hidden cells did have any contents before the cells were merged, then you have to manually move the contents in to the correct cell.

Formatting numbers

Several number formats can be applied to cells by using icons on the Formatting toolbar. Select the cell, then click the relevant icon to change the number format.

For more control or to select other number formats, use the Numbers tab of the Format Cells dialog (Figure 75 on page 132):

Apply any of the data types in the Category list to the data.

Control the number of decimal places and leading zeroes in the Options area.

Enter a custom format code.

The Language setting controls the local settings for the different formats such as the date format and currency symbol.

Some number formats are available on the sidebar’s Number Format panel of the Properties deck. Click the More Options button to open the Format Cells dialog.

Formatting fonts and text in cells

Tip

For consistency in a spreadsheet, use cell styles whenever possible.

To manually select a font and format text for use in a cell:

Select a cell or cell range.

Click the small triangle on the right of the Font Name box on the Formatting toolbar and select a font in the drop-down list, or use the Font Name box in the Character panel of the Properties deck on the Sidebar.

Click on the small triangle on the right of the Font Size box on the Formatting toolbar and select a font size in the drop-down list, or use the Font Size box in the Character panel of the Properties deck on the Sidebar.

To change the character format, click on the Bold, Italic, or Underline icons on the Formatting toolbar or on the Character panel of the Properties deck of the Sidebar. On the Sidebar it is possible to change the underline appearance and add some extra effects to the font, such as Strikethrough and Shadow.

To change the horizontal paragraph alignment, click on one of the four alignment icons (Align Left, Align Center, Align Right, Justified) on the Formatting toolbar or on the Alignment panel of the Properties deck on the Sidebar. For more options, go to Format > Cells > Alignment and select one of the options in the Horizontal drop-down list.

To change the vertical alignment of the text in the cell, go to Format > Cells > Alignment and select one of the options in the Vertical drop-down list.

To change the font color, click the arrow next to the Font Color icon on the Formatting toolbar, or on the Character panel on the Properties deck of the Sidebar, to display the color palette, then select the desired color.

To specify the language used in the cell, use the Font tab on the Format Cells dialog.

Use the Font Effects tab on the Format Cells dialog to set other font characteristics.

Formatting cell borders

To format the borders of a cell or a group of selected cells, click the Borders icon on the Formatting toolbar and select a border from the palette.

To format the border line style, click the Border Style icon on the Formatting toolbar and select the line style in the palette. For the color of the border lines, click the arrow at the right of the Border Color icon on the Formatting toolbar and choose from the selected color palette.

The Cell Appearance panel of the Properties deck on the Sidebar also contains cell border, line style and line color controls.

For more control, including the spacing between cell borders and any data in the cell, use the Borders tab of the Format Cells dialog, where you can also define a shadow style. Clicking the More Options button on the Cell Appearance panel, or clicking More Options in the panel’s line style drop-down list, opens the Format Cells dialog at the Borders tab.

See Chapter 5, Using Styles and Templates, in the Calc Guide for more information.

Note

Cell border properties apply only to the selected cells and can be changed only when you are editing those cells. For example, if cell C3 has a top border, that border can only be removed by selecting C3. It cannot be removed in C2 despite also appearing to be the bottom border for cell C2.

Formatting cell background

To format the background color for a cell or a group of cells, click the small arrow next to the Background Color icon on the Formatting toolbar. A color palette, similar to the Font Color palette, is displayed. You can also use the Background tab of the Format Cells dialog. The Cell Appearance panel of the Properties deck on the Sidebar contains a cell background control with a color palette. See Chapter 5, Using Styles and Templates, in the Calc Guide for more information.

Formatting default cell styles

To add default styles for a cell or a group of cells, click Styles on the Menu bar and a menu displays the default styles. The default styles can be applied, or modified in the Styles deck on the Sidebar. You can create custom cell styles by clicking Styles > New Style from Selection on the Menu bar, or by clicking the New Style from Selection icon on the Styles deck of the Sidebar, or by right-clicking a style in the Styles deck of the Sidebar and selecting New in the context menu. Type a new name for the style or click an existing style name to update that style. Apply, delete, or modify the custom style on the Styles deck.

AutoFormatting of cells

Using AutoFormat

You can use Calc’s AutoFormat feature to format a table (range of cells) quickly and easily. It also lets you format different tables of the sheet with the same look and feel very easily. All formatting applied is direct formatting.

Select the cells in at least three columns and rows, including column and row headers, that you want to format.

Go to Format > AutoFormat Styles on the Menu bar to open the AutoFormat dialog (Figure 86).

Select the type of format and format color in the list.

Select the formatting properties to be included in the AutoFormat style. Click OK.

Figure 86: AutoFormat dialog

Defining a new AutoFormat

You can define a new AutoFormat so that it becomes available for use in all spreadsheets.

Format the data type, font, font size, cell borders, cell background, and so on for a range of cells.

Select the range, of at least 4x4 cells.

Go to Format > AutoFormat Styles to open the AutoFormat dialog. Click Add.

In the Name box of the Add AutoFormat dialog that opens, type a meaningful name for the new format.

Click OK to save. The new AutoFormat is now available in the Format list in the AutoFormat dialog.

Note

The new AutoFormat is stored in your computer user profile and is not available to other users. However, other users can import the new AutoFormat by selecting the table range in the spreadsheet document and defining it as a new AutoFormat.

Using themes

Calc comes with a predefined set of formatting themes (set of styles) that you can apply to spreadsheets. It is not possible to add new themes to Calc, but you can modify the theme styles after the theme is applied to the spreadsheet. The modified styles are available for use only in that spreadsheet.

To apply a theme to a spreadsheet:

Go to Format > Spreadsheet Theme on the Menu bar or click the Spreadsheet Theme icon on the Tools toolbar to open the Theme Selection dialog (Figure 87).

Select the theme that you want to apply. The theme styles are immediately visible on the underlying spreadsheet.

Click OK.

If you wish, you can now open the Styles deck on the Sidebar to modify specific styles. These changes do not modify the theme; they only change the appearance of the style in the specific spreadsheet you are using. For more about modifying styles, see Chapter 4, Working with Styles, Templates, and Hyperlinks.

Caution

Applying a new theme over an existing one will override all existing theme styles customization with the new theme styles.

Figure 87: Theme Selection dialog

Using conditional formatting

You can set up cell formats to change depending on conditions that you specify. For example, in a table of numbers, you can show all the values above the average in green and all those below the average in red. Multiple formatting options can be entered and arranged using assigned priority rules to order the importance of the conditions, allowing certain formatting options to take place before others. Conditional formatting also allows to add graphic icons and data bars to the cell background.

Conditional formatting depends upon the use of styles, and the AutoCalculate feature (Data > Calculate > AutoCalculate) must be enabled. See Chapter 4, Formatting Data, in the Calc Guide for details.

Filtering data

A filter is a list of conditions that each entry has to meet to be displayed. Calc provides three types of filter:

Standard – Specifies the logical conditions to filter the data. It allows filtering by text color or background color.

AutoFilter – Filters data according to a specific value or string. Automatically filters the selected cell range and adds list boxes to the top row, where you can choose the items that you want to display.

Advanced – Uses filter criteria from specified cells.

Setting up and using filters are explained in Chapter 2, Entering and Editing Data, of the Calc Guide.

Cell protection

All or some of the cells in a spreadsheet can be password protected to prevent changes being made by unauthorized users. This can be useful when multiple people have access to the spreadsheet itself, but only a few are allowed to modify the data it contains. Protected cells can optionally be hidden.

Use the Cell Protection tab of the Format Cells dialog (Figure 88) to set up cell protection and toggle the hidden status of protected cells.

Figure 88: Cell Protection tab in Format Cells dialog

When all desired cells have been flagged with either a protected or unprotected status:

Go to Tools > Protect Sheet, or right-click on the sheet’s tab in the Sheet tabs area and select Protect Sheet in the context menu. The Protect Sheet dialog opens (Figure 89).

Select Protect this sheet and the contents of protected cells.

Type a password and then confirm the password.

Select or deselect the user selection options for cells.

Click OK.

Figure 89: Protect Sheet dialog

Any cells that had been toggled as protected will no longer be editable by anyone that does not have the password.

The protected sheet has a lock icon in its tab, as shown in Figure 90.

Figure 90: The lock icon in a protected sheet

Alternatively, you can protect the structure of the entire spreadsheet rather than individual cells on individual sheets by selecting Tools > Protect Spreadsheet Structure on the Menu bar. This option enables you to protect your spreadsheet against adding, deleting, moving, or renaming sheets. You can optionally enter a password on the Protect Spreadsheet Structure dialog.

Sorting records

Sorting within Calc arranges the cells in a sheet using the sort criteria that you specify. Several criteria can be used and a sort applies each criteria consecutively. Sorts are useful when you are searching for a particular item and become even more useful after you have filtered data.

Also, sorting is useful when you add new information to your spreadsheet. When a spreadsheet is long, it is usually easier to add new information at the bottom of the sheet, rather than adding rows in their correct place. After you have added information, you can then sort the records to update the spreadsheet.

For more information on how to sort records and the sorting options available, see Chapter 2, Entering and Editing Data, in the Calc Guide.

To sort cells in a spreadsheet using the Sort dialog:

Select the cells to be sorted.

Go to Data > Sort on the Menu bar, or click the Sort icon on the Standard toolbar, to open the Sort dialog (Figure 91).

Figure 91: Sort dialog, Sort Criteria tab

On the Sort Criteria tab, select the sort criteria in the drop-down lists. The selected lists are populated from the selected cells.

Select either ascending order (A-Z, 0-9) or descending order (Z-A, 9-0).

Adjust the settings as required on the Sort Criteria and Options tabs. For details, see the Help or Chapter 2, Entering and Editing Data, of the Calc Guide.

Click OK and the sort is carried out on the spreadsheet.

Cell comments

Comments are small notes and text that can serve as a reminder or an aside to the user. A comment is not considered a part of the spreadsheet for calculation or printing purposes, and will only appear when hovering the mouse over the particular cell that has been commented.

The easiest way to insert a comment is by right-clicking on the desired cell and selecting Insert Comment in the context menu. Alternatively, you can select Insert > Comment on the Menu bar, or use Ctrl+Alt+C, or click the Insert Comment icon on the Standard toolbar.

By default, comments will remain hidden and only appear when hovering the mouse. Cells that contain comments are marked with a red square in the upper right corner. To toggle the visibility of comments, select View > Comments on the Menu bar.

For more information, see Chapter 12, Sharing and Reviewing Spreadsheets, in the Calc Guide.

Using formulas and functions

You may need more than numbers and text in a spreadsheet. Often the contents of one cell depend on the contents of other cells. Formulas are equations that use numbers and variables to produce a result. Variables are placed in cells to hold data required by equations.

A function is a predefined calculation entered in a cell to help you analyze or manipulate data. All you have to do is enter the arguments and the calculation is made automatically. Functions help you create the formulas required to get the results that you are looking for.

Creating formulas

Functions and formulas can be entered directly into the Formula bar or by accessing the Function Wizard. To launch the function wizard, click the Function Wizard icon to the right of the Name Box, or select Insert > Function on the Menu bar, or press Ctrl+F2.

Inside the Function Wizard, you can search, list, and narrow down the many Calc functions available. The search for a term in the Function Wizard matches the function descriptions as well as their names. You can also choose to complete functions from within the wizard rather than having to type full formulas into the Formula bar.

Each function, when selected, will display a brief explanation of its use and acceptable syntax. It will also display dialog boxes where you can enter the information required by that function and a result window showing the expected calculation from the data entered.

Note

A fast alternative to the Function Wizard is the Functions deck on the Sidebar, where you can quickly list and narrow down functions. It provides brief explanations on their use and syntax, but does not provide the search or data entry capabilities of the full wizard.

LibreOffice Calc offers powerful built-in functions under multiple domains or categories. They are: Database, Date & Time, Financial, Information, Logical, Mathematical, Array, Statistical, Spreadsheet, Text, and Add-in functions.

For a more in-depth introduction to formulas and the Function Wizard, see Chapter 8, Using Formulas and Functions, in the Calc Guide.

Figure 92: Function Wizard

Analyzing data

Calc includes several tools to help you analyze the information in your spreadsheets, ranging from features for copying and reusing data, to creating subtotals automatically, to varying information to help you find the answers you need. These tools are divided between the Tools and Data menus.

Calc also includes many tools for statistical analysis of data, where you can obtain important numerical information on data obtained from physical measurements, polls, or even business transactions such as sales, stock quotations, and so on. These statistical data analyses are available in the menu Data > Statistics.

See Chapter 10, Data Analysis, in the Calc Guide for more information on the tools available.

Pivot tables and pivot charts

One of the most useful tools for analyzing data is the pivot table, a way to organize, manipulate, and summarize large amounts of data to make it much easier to read and understand while also allowing you to answer different questions about a spreadsheet by rearranging – or pivoting – the data in it. Using a pivot table, you can view different summaries of the source data, display the details of areas of interest, and create reports. You can also create a pivot chart to view a graphical representation of the data in a pivot table.

For example, you might have a spreadsheet containing a list of donations to various charities by a group of recruiters in various months, but you are only interested in how much money each recruiter has collected in total. You could manually calculate that amount by using the sorting and formatting options provided by Calc. Alternatively, you could arrange a pivot table to make that data easier to organize and read.

To create a pivot table, choose Data > Pivot Table > Insert or Edit on the Menu bar, or click the Insert or Edit Pivot Table icon on the Standard toolbar. The Pivot Table Layout dialog will intelligently guess the column headings from the provided raw data and insert them into the Available Fields selection box. From there, you can drag and drop your desired information into column, row, data, or filter fields to organize accordingly and click OK to view the results.

To choose new information to display, or to alter the layout of the existing information, right-click anywhere in the existing pivot table to bring up the context menu and choose Properties. You can also access the same dialog by selecting Data > Pivot Table > Insert or Edit on the Menu bar, or clicking the Insert or Edit Pivot Table icon on the Standard toolbar.

For an in-depth explanation of pivot tables and the preconditions necessary to use them, see Chapter 9, Using Pivot Tables, in the Calc Guide.

Pivot charts

To get a quick visual representation of the data contained in a pivot table, you can generate a pivot chart. Functionally, pivot charts are nearly identical to regular charts except in two key areas. First, as the data in the pivot table is altered, the pivot chart will adjust itself automatically. Second, it includes field buttons, graphical elements that allow you to filter the content of the pivot table from within the pivot chart itself.

For more information on pivot charts and charts in general, see Chapter 3, Creating Charts and Graphs, and Chapter 9, Using Pivot Tables, in the Calc Guide.

Printing

Printing from Calc is much the same as printing from other LibreOffice components (see Chapter 1, LibreOffice Basics). However, some details of printing in Calc are different, especially regarding preparation for printing.

After print ranges have been defined, they are formatted with automatic page breaks. To view the page breaks, go to View > Page Break on the Menu bar.

Print ranges

Print ranges have several uses, including printing only a specific part of the data or printing selected rows or columns on every page. For more information about using print ranges, see Chapter 7, Printing, Exporting, Emailing, and Signing in the Calc Guide.

Defining a print range

To define a new print range or modify an existing print range:

Select the range of cells to be included in the print range.

Go to Format > Print Ranges > Define on the Menu bar. Automatic page break lines are displayed on screen.

To check the print range, go to File > Print Preview on the Menu bar, press Ctrl+Shift+O, or click the Toggle Print Preview icon on the Standard toolbar. Calc will display only the cells in the print range.

Adding to a print range

After defining a print range, you can add more cells to it by creating another print range. This allows multiple, separate areas of the same sheet to be printed while not printing the whole sheet.

After defining a print range, select an extra range of cells for adding to the print range.

Go to Format > Print Ranges > Add on the Menu bar to add the extra cells to the print range. The page break lines are no longer displayed on the screen.

To check the print ranges, go to File > Print Preview on the Menu bar, press Ctrl+Shift+O, or click the Toggle Print Preview icon on the Standard toolbar. LibreOffice will display the print ranges as separate pages.

Note

The additional print range will print as a separate page, even if both ranges are on the same sheet.

Removing a print range

It may become necessary to remove a defined print range, for example, if the whole sheet needs to be printed later.

To remove all the defined print ranges, go to Format > Print Ranges > Clear on the Menu bar. After the print ranges have been removed, the default page break lines will appear on the screen.

Editing a print range

At any time, you can directly edit the print range, for example to remove or resize part of the print range. Go to Format > Print Ranges > Edit on the Menu bar to open the Edit Print Ranges dialog where you can define the print range.

Printing options

To select the printing options for page order, details, and scale to be used when printing a spreadsheet:

Go to Format > Page Style on the Menu bar to open the Page Style dialog (Figure 93).

Select the Sheet tab and make your selections from the available options. Click OK.

Figure 93: Page Style dialog – Sheet tab

Repeat printing of rows or columns

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:

Go to Format > Print Ranges > Edit on the Menu bar to open the Edit Print Ranges dialog (Figure 94).

Type the row identifiers in the Rows to Repeat box. For example, to repeat rows 1 and 2, type $1:$2. This automatically changes Rows to Repeat from - none - to - user defined -.

Type the column identifiers in the Columns to Repeat box. For example, to repeat column A, type $A. In the Columns to Repeat list, - none - changes to - user defined -.

Click OK.

For more information on editing print ranges, see Chapter 7, Printing, Exporting, E-mailing, and Signing, in the Calc Guide.

Figure 94: Edit Print Ranges dialog

Page breaks

While defining a print range can be a powerful tool, it may sometimes be necessary to manually adjust the Calc printout manually using a manual or page break. A page break helps to ensure that the data prints properly according to the page size and page orientation. You can insert a horizontal page break above or a vertical page break to the left of the active cell.

Inserting a break

To insert a page break:

Navigate to the cell where the page break will begin.

Go to Sheet > Insert Page Break on the Menu bar.

Select Row Break to create a page break above the selected cell. Select Column Break to create a page break to the left of the selected cell.

Deleting a break

To remove a page break:

Navigate to a cell that is next to the break you want to remove.

Go to Sheet > Delete Page Break on the Menu bar.

Select Row Break or Column Break as needed.

Note

Multiple manual row and column breaks can exist on the same page. When you want to remove them, you have to remove each break individually.

For more information on manual breaks, see Chapter 7, Printing, Exporting, E-mailing, and Signing, in the Calc Guide.

Headers and footers

Headers and footers are predefined pieces of text that are printed at the top or bottom of a page when a spreadsheet is printed. Headers and footers are set and defined using the same method. For more information on setting and defining headers and footers, see Chapter 7, Printing, Exporting, E-mailing, and Signing, in the Calc Guide.

Headers and footers are also assigned to a page style. You can define more than one page style for a spreadsheet and assign different page styles to different sheets within a spreadsheet. For more information, see Chapter 5, Using Styles and Templates, in the Calc Guide.

Setting a header or footer

To set a header or footer:

Select the sheet that you want to set the header or footer for.

Go to Format > Page Style on the Menu bar to open the Page Style dialog (Figure 95) and select the Header or Footer tab (Figure 95).

Select the Header on or Footer on option.

Select Same content on left and right pages if you want the same header or footer to appear on all the printed pages.

Set the margins, spacing, and height for the header or footer. You can also select AutoFit height to automatically adjust the height of the header or footer.

To change the appearance of the header or footer, click on More to open the Border / Background dialog.

To set the contents, for example page number, date and so on, that appear in the header or footer, click Edit to open the Header (or Footer) dialog.

Figure 95: Header tab of Page Style dialog

Getting Started Guide

Chapter 4,
Working with Styles, Templates, and Hyperlinks

Using consistent formatting in documents

Introduction

Formatting text and other elements in LibreOffice documents can be done using three methods, which are templates, styles and direct formatting. Direct formatting is also known as manual formatting. Understanding how to format documents unlocks the power of LibreOffice.

Styles

Styles in LibreOffice provide a way of gathering all the required formatting attributes into one option. A style then can be applied several times to text or objects creating a consistent format. For example, using paragraph styles defines numerous settings such as font type and size, whether paragraphs should be indented, spacing between lines, paragraph alignment on a page, and so on.

When LibreOffice is installed onto a computer, a default set of styles is also installed. This provides a starting point for creating documents using styles. These default styles cannot be deleted, but can be modified to formatting requirements. New, or custom, styles can be created and these styles can be deleted.

Templates

A template is a document that contains specific formatting styles, graphics, tables, objects, and other information. Templates are used as a basis for creating several similar documents for company documents, or user guides. For example, define paragraph and character styles in a document, then save the document as a template. This template can then be used to create new documents with the same look and feel of company documentation.

New documents created in LibreOffice use a default template that is hard coded into LibreOffice. This default template can be changed to suit personal or corporate requirements.

When LibreOffice is installed on a computer, a number of predefined templates are also installed, providing a starting point for different types of documents, such as business letters, presentations, or drawings.

Direct (or manual) formatting

Applies formatting directly, or manually, to selected text. For example, select a word, then click on a tool on the Formatting toolbar, the Sidebar, or use a keyboard shortcut to format the text as bold or italic. However, using direct formatting can produce documents with a mismatch of formatting attributes.

Styles

Working with styles

A style is a set, or group, of formats applied at the same time to selected elements in a document, such as pages, text, frames, cells, and graphic objects. Using styles can quickly change the format, or appearance, of selected elements.

Many users manually format paragraphs, words, tables, page layouts, and other elements in documents without paying any attention to styles. This can increase the workload when creating documents and introduce format errors into a document. LibreOffice recommend the use of styles to reduce the workload and increase the accuracy of producing good documents with ease.

LibreOffice is a styles-based program, but LibreOffice styles may work differently from other office software programs. Using styles effectively requires some planning, but time spent in planning can save time and effort over the longer term.

Styles apply a set of attributes at the same time to a selected element. This means that a document is easily formatted with consistency and changing the formatting of an entire document is carried out with minimal effort. For example, Writer relies on heading styles (or other styles if specified) when compiling a table of contents.

When LibreOffice is installed on a computer, a default set of styles is also installed to provide a starting point for document formatting. However, the styles in this default set cannot be deleted, but the style attributes can be modified to suit the document requirements. Also, custom styles can be created when this is necessary to format a document to requirements.

Note

Direct, or manual, formatting overrides the formatting attributes in styles. Direct formatting cannot be changed, or removed, by applying a style to it. To remove direct formatting, select the text, then right-click and select Clear Direct Formatting from the context menu. Alternatively, clear direct formatting from selected text using the keyboard shortcut Ctrl+M (macOS ⌘+M), or go to Format > Clear Direct Formatting on the Menu bar. For more information on clearing direct formatting, see the relevant user guide for each LibreOffice module.

Style categories

Style are available in categories as follows. Actual style categories available depends on the LibreOffice module that is open. See Table 5 on which style categories are available for each module. For more information, see the specific user guide for each LibreOffice module.

Page styles

Control margins, headers and footers, borders and backgrounds. In Calc, page styles also define the sequence for printing sheets.

Paragraph styles

Control all aspects of paragraph appearance, such as text alignment, tab stops, line spacing, and borders, and can include character formatting.

Character styles

Affects selected text within a paragraph, such as the font and size of text, or bold and italic formats.

Table styles

Apply predefined formats to tables and table elements in a text document.

Frame styles

Format graphic and text frames, including text wrap, borders, backgrounds, and columns.

List styles

Allows selection of format and positioning of numbers or bullets in lists.

Cell styles

Format cell data, such as fonts, alignment, borders, background, number formats (for example, currency, date, number), and cell protection.

Drawing styles

Format drawings and presentations, such as line, area, shadowing, transparency, font, connectors, dimensioning, and other attributes.

Presentation styles

Format font, indents, spacing, alignment, and tabs.

Table 5: Style categories available in LibreOffice modules

Style Category	Writer	Calc	Draw	Impress
Page	Yes	Yes
Paragraph	Yes
Character	Yes
Frame	Yes
List	Yes
Table	Yes
Cell	Yes
Presentation	Yes
Drawing	Yes	Yes

Style types

Style types available depend on the LibreOffice module that is open. See Table 6 on which style types are available for each module. For more information on styles, see the specific user guide for each LibreOffice module.

Hierarchical

Displays the styles in the selected category in a hierarchical list. To view the styles in a sub‑level, click on the chevron > next to the style name.

All Styles

Displays all styles of the selected style category.

Hidden Styles

Displays the styles that have been hidden in the document. Hiding styles removes, but does not delete, selected styles from the list of displayed styles.

Applied Styles

Displays the styles of the selected category that have been applied in the current document.

Custom Styles

Displays all user-defined styles in the selected style category.

Automatic

Displays styles appropriate to the current context.

Text Styles

Displays formatting styles for text.

Chapter Styles

Displays formatting styles for headings.

List Styles

Displays formatting styles for ordered or unordered lists.

Index Styles

Displays formatting styles for indexes.

Special Styles

Displays formatting styles for headers, footers, footnotes, endnotes, tables, and captions.

HTML Styles

Displays a list of styles for HTML documents.

Conditional Styles

Displays the user-defined conditional styles.

Table 6: Style types available in LibreOffice modules

Style Type	Writer	Calc	Draw	Impress
Hierarchical	Yes	Yes	Yes	Yes
All Styles	Yes	Yes	Yes	Yes
Hidden Styles	Yes	Yes	Yes	Yes
Applied Styles	Yes	Yes	Yes	Yes
Custom Styles	Yes	Yes	Yes	Yes
Automatic	Yes
Text Styles	Yes
List Styles	Yes
Index Styles	Yes
Special Styles	Yes
HTML Styles	Yes
Conditional Styles	Yes

Applying styles

LibreOffice provides several ways to select and apply styles, as follows:

Styles deck on Sidebar.

View > Styles on Menu bar.

Styles on the Menu bar (Writer and Calc).

Set Paragraph Style on the Formatting toolbar (Writer).

Apply Style on the Formatting toolbar (Calc).

Right-click and select Character, Paragraph, or List from context menu (Writer).

Right-click and select Styles from context menu (Calc).

Fill Format Mode in Styles deck on Sidebar (Writer and Calc).

Keyboard shortcuts where available.

Styles deck on Sidebar

The Styles deck in LibreOffice (Figure 96) displays styles that are available in a document for the selected style categories and types.

Open the Styles deck on the Sidebar using one of the following methods:

Go to View > Styles on the Menu bar.

For Writer or Calc only, go to Styles > Manage Styles on the Menu bar.

Use the keyboard shortcut F11 (macOS ⌘+T).

Click on Styles on the right of the Sidebar.

To display a preview of styles in the Styles deck of how the style will look in a document, select Show previews at the bottom of the Styles deck.

Figure 96: Styles deck on Sidebar — Writer

To select a style category, click on one of the icons at the top of the Styles deck to display the styles available in the selected category. See “Style categories” on page 165 for more information on available style categories for each LibreOffice module.

To select a style type, click on the drop-down list to open it and select the style type required. The style types available depends on which LibreOffice module is open and the type of document being edited. See “Style types” on page 166 for more information on available style types for each LibreOffice module.

To apply a style to an element, position the cursor in text, or select an object, in the document, then double click on the required style in the Styles deck on the Sidebar.

Styles submenu

The Styles submenu is only available for the LibreOffice Writer and Calc modules. The styles available in this submenu are the same as the default set of styles available in the Styles deck on the Sidebar, as shown by Figure 97 for Writer and Figure 98 for Calc.

Select the text, or element where a style is going to be applied.

Go to Styles on the Menu bar to open the Styles submenu.

Double click on the style name to apply its attributes to the selected text, or element.

Figure 97: Styles submenu in Writer	Figure 98: Style submenu in Calc

Context menu

Writer

A context menu is only available in Writer to apply paragraph, character, or list styles to selected text using one of the following methods:

Right‑click in a paragraph and select Paragraph in the context menu that opens. Select a paragraph style from the options in the sub‑context menu that opens.

Highlight characters in a paragraph, then right‑click on the selected characters and select Character from the context menu that opens. Select a character style from the options in the sub‑context menu that opens.

Right‑click in a list item and select List in the context menu that opens. Select a list style from the options in the sub‑context menu that opens.

Calc

A context menu is only available in Calc to apply cell styles to selected cells. Right‑click in a cell and select Styles in the context menu that opens, then select a cell style from the options available in the sub‑context menu that opens.

Formatting toolbar

Writer

In Writer only, after a paragraph style has been used at least once in a document, the style name appears in the Set Paragraph Style drop‑down list at the left-hand end of the Formatting toolbar.

Click in a paragraph to select it.

Click on Set Paragraph Style on the Formatting toolbar to open the drop‑down list.

Select the required paragraph style from the options available in the drop‑down list to apply it to the selected paragraph.

Calc

In Calc only, after a cell style has been used at least once in a spreadsheet, the style name appears in the Apply Style drop‑down list at the left-hand end of the Formatting toolbar.

Click in a cell to select it.

Click on Apply Style on the Formatting toolbar to open the drop‑down list.

Select the required cell style from the options available in the drop‑down list to apply it to the selected cell.

Fill Format Mode

In Writer or Calc only, Fill Format Mode is used to apply a style to several elements without the need to use the Styles deck and double‑clicking.

Open the Styles deck on the Sidebar and select the required style.

Click on Fill Format Mode at the top of the Styles deck and the cursor changes shape to indicate Fill Format Mode.

Position the cursor on the element where a style is going to be applied.

Click and the style is applied to the selected element. To apply a character style, click and drag to select the characters, then release the cursor.

Repeat step 4 until the style has been applied to all required elements.

To quit Fill Format Mode, click on Fill Format Mode again, or press the Esc key.

Keyboard shortcuts

In Writer, keyboard shortcuts can be used to apply paragraph styles to selected paragraphs and perform some style editing, as shown in Table 98.

Table 7: Paragraph style and style editing keyboard shortcuts

Style name & editing function	Windows & Linux	macOS
Text Body	Ctrl+0	⌘+0
Heading 1	Ctrl+1	⌘+1
Heading 2	Ctrl+2	⌘+2
Heading 3	Ctrl+3	⌘+3
No List	Ctrl+Shift+F12	⌘+Shift+F12
Edit Style	Alt+P	⌥+P
Update Selected Style	Ctrl+Shift+F11	⌘+Shift+F11
New Style from Selection	Shift+F11	Shift+F11
Manage Styles	F11	F11

Creating new styles

Using a styles dialog

The following procedure is only an example of how to create a new style using a styles dialog. For more information on creating styles, refer to the user guide for each LibreOffice module.

If not already open, open the Styles deck on the Sidebar.

Click on the icon for the required style category at the top of the Styles deck to open the list of styles available in the style category.

Right‑click on a style and select New from the context menu to open a style dialog applicable for the selected style category. Figure 99 shows an example of the Paragraph Styles dialog.

Click on Organizer to open the Organizer page in the styles dialog.

In Name, enter a name for the new style.

In Next style, select a style from the drop‑down list that will follow the new style in the document.

If necessary, in Inherit from, select a style from the drop‑down list that will be used for basic formatting of the new style in the document.

In Category, select a style category from the drop‑down list that the new style will use. By default, Custom Styles is the selected category.

Use the various options available on the other dialog pages to format the new style to the document requirements. If available, changes to a style can be checked in the preview box on the dialog page.

When all formatting options have been carried out, click on OK to save the new style and close the dialog.

Note

If a style has been selected in Inherit from on the dialog Organizer page, any formatting changes to this style are also carried out on the new style that is created.

Creating new style from selection

A new style can be created by using the existing format of an element. This new style is only available in the document it was created in and will not be saved in the document template.

The following procedure is only an example of how to create a new style from selection. For more information on creating styles, refer to the user guide for each LibreOffice module.

If not already open, open the Styles deck on the Sidebar.

Click on the icon for the required style category at the top of the Styles deck to open the list of styles in the style category.

In the document, select the element to be used as a basis for a new style.

Create the new style using one of the following steps to open the New Style from Selection dialog:

In Writer, click on Styles actions on the Sidebar title bar and select New Style from Selection from the context menu.

In Calc, Draw, or Impress, click on New Style from Selection.

In the New Style from Selection dialog, enter a name for the new style in Enter new style name text box.

Click OK to create the new style in the selected style category using the selected formatting options and close the dialog.

Note

The New Style from Selection dialog displays a list of custom styles that are available in the document. By default, a new style created from a selection is placed in the Custom Styles.

Dragging and dropping

In Writer and Calc only, a style can be created by dragging and dropping a selected element into the Styles deck on the Sidebar. An example procedure of dragging and dropping to create a style is as follows:

If not already open, open the Styles deck on the Sidebar.

Click on the icon for the required style category at the top of the Styles deck to open the list of styles in the style category.

Select an element in the open document, then drag and drop the element onto the Styles deck on the Sidebar and open the New Style from Selection dialog.

In the New Style from Selection dialog, enter a name for the new style in Enter new style name text box.

Click OK to create the new style in the selected style category using the formatting of the selected element and close the dialog. The new style is placed in Custom Styles.

Editing styles

When LibreOffice is installed onto a computer, a default set of styles is also installed providing a starting point for creating documents using styles. These default styles cannot be deleted, but can be edited to match the formatting requirements for documents.

New, or custom, styles can be added to LibreOffice and these styles can also be edited or deleted. For more information on creating styles, see “Creating new styles” on page 171.

Styles can be edited using one of the following methods:

Styles deck in the Sidebar.

Update a style from a selection.

Use AutoUpdate for paragraph and frame styles only.

Load styles from another document or template.

Note

Any editing, or changes made to a style are effective only in the current document. To edit or change styles in more than one document, the template has to be changed, or styles loaded from another document.

Using a styles dialog

Editing a style can be carried out using the styles dialog applicable for the category of style being edited. The following procedure is only an example of how to edit a style using a styles dialog. For more information on editing styles, refer to the user guide for each LibreOffice module.

If not already open, open the Styles deck on the Sidebar.

Click on the icon for the required style category at the top of the Styles deck to open the list of styles available in the selected style category.

Right‑click on a style and select Modify from the context menu to open a style dialog applicable for the selected style category. Figure 99 shows an example of the Paragraph Styles dialog.

Use the various options available on the dialog pages to edit the selected style. If available, changes to a style can be checked in the preview box on the dialog page.

When changes are complete, click on OK to save the changes and close the dialog.

Set Paragraph Style or Apply Style

Editing or changing a style using Set Paragraph Style for Writer, or Apply Style for Calc, on the Formatting toolbar is as follows.

Select a paragraph in Writer, or a cell in Calc.

Figure 99: Paragraph Style dialog

On the Formatting toolbar, click on the chevron ˅, or triangle ▼ next to Set Paragraph Style for Writer, or Apply Style for Calc, to open a drop‑down list of styles.

Select a style and click on the chevron ˅, or triangle ▼next to the style name, then select Edit Style from the context menu to open the Paragraph Style dialog (Figure 99).

Use the various options available on the dialog pages to edit the selected style. Changes to a style can be checked in the preview box on the dialog page.

When changes are complete, click on OK to save the changes and close the dialog.

Updating styles from selection

If not already open, open the Styles deck on the Sidebar.

In the document, select the element that is formatted with the required formatting options.

On the Styles deck, select the style that is going to be updated from the selection.

Update the style using one of the following methods:

At the top of the Sidebar, click on the chevron ˅, or triangle ▼next to Styles actions and select Update Selected Style from the context menu.

In Writer or Calc, go Styles > Update Selected Style on the Menu bar.

Using Set Paragraph Style for Writer, or Apply Style for Calc, click on the chevron ˅, or triangle ▼next to the selected style and select Update to Match Selection from the context menu.

Use the keyboard shortcut Ctrl+Shift+F11 (macOS ⌘+Shift+F11).

Using AutoUpdate

In Writer only, using AutoUpdate applies to paragraph and frame styles only. See the Writer Guide for more information on AutoUpdate.

If the AutoUpdate option is selected on the Organizer page of the Paragraph Style, or Frame Style dialog, applying any direct formatting to a paragraph, or frame, that uses a style in the document automatically updates the style.

Renaming styles

Only custom styles can be renamed. The styles that were installed during the LibreOffice installation cannot be renamed.

If not already open, open the Styles deck on the Sidebar.

In the styles category drop‑down list at the bottom of the Sidebar, select Custom Styles to display any custom styles that are available in the document.

Select the style that is going to be renamed from the displayed list of custom styles.

Right‑click on the selected style and select Modify from the context menu to open the style dialog for the selected type of of style.

Note

If Modify is grayed out in the context menu, then the selected style cannot be renamed.

Click on Organizer to open the Organizer page in the style dialog.

In the Name text box, enter a new name for the selected style.

Click on Apply to rename the selected style, then click OK to close the style dialog.

Deleting styles

Only custom styles can be deleted. The styles that were installed during the LibreOffice installation cannot be deleted.

If not already open, open the Styles deck on the Sidebar.

In the styles category drop‑down list at the bottom of the Sidebar, select Custom Styles to display any custom styles that are available in the document.

Select the style that is going to be deleted from the displayed list of custom styles. To delete multiple styles, hold down the Ctrl key (macOS ⌘) while selecting styles.

Right‑click on the selected style and select Delete from the context menu.

Click on Apply to delete the selected style, then click OK to close the style dialog.

Note

If Delete is grayed out in the context menu, then the selected style cannot be deleted.

If a style is deleted that is in use, all elements that used the deleted style will return to the default style.

Page styles

Page styles can be created in LibreOffice, but only in Writer for text documents, or Calc for spreadsheets. For more information on page styles, see the Writer Guide and the Calc Guide.

For example, in many documents, such as letters and reports, the first page is different from the other pages in the document. In Writer, the first page of a letter normally has a company logo and all the necessary contact details. Subsequent letter pages only have the company logo. In Calc, the first page of a report may have no header or footer, while subsequent report pages have header and footers. When a first page style is created, the page style of the following pages can be specified to be applied automatically.

An example procedure of creating a new page style is as follows:

Open a new text document and open the Styles deck on the Sidebar.

Click on Page Styles at the top of the Styles deck to open the Page Styles panel.

Click on Styles actions at the top of the Styles deck and select New Style from Selection from the context menu to open the New Style from Selection dialog

Type a name for the new page style in the Enter new style name text box and click OK. This closes the New style from Selection dialog and the new page style appears in the Page Styles panel.

Right‑click on the new page style in the Page Styles panel and select Modify from the context to open the Page Style dialog.

Use the options available on the various pages of the Page Style dialog to modify and format the page.

Click OK to save the changes and close the Page Style dialog.

To apply the new page style to a page, double‑click on the required page style.

Templates

A template is a document that contains specific formatting styles, graphics, tables, objects, and other information. A template is used as the basis for creating other documents. For example, define paragraph and character styles in a document, save the document as a template, and then use the template to create a new document with the same styles.

All documents in LibreOffice are based on templates. As a starting point, LibreOffice has a number of predefined templates that can be used to create different types of documents, for example business letters, presentations, or drawings. Templates can be created to suit document requirements. Also, templates can be downloaded from the LibreOffice website using the following link: https://extensions.libreoffice.org.

If a document is created in LibreOffice without selecting a template, then LibreOffice opens the new document using the LibreOffice default template for the type of document being created. If required, this default template can be replaced by a custom template to suit user requirements, see “Setting default template” on page 179 for more information.

LibreOffice templates

Installing LibreOffice also installs a set of predefined templates. These templates only contain backgrounds and background objects, providing a starting point to create documents, or create more templates.

Templates created are located in the My Templates folder after a document is saved as a template. These templates appear in the LibreOffice startup window and the Select a Template dialog the next time LibreOffice is started.

Figure 100: Templates dialog

Creating new documents

Create a new document using the Templates dialog is as follows:

Open the Templates dialog (Figure 100) using one of the following methods:

Go to File > New > Templates on the Menu bar.

Go to File > Templates > Manage Templates on the Menu bar.

Use the keyboard shortcut Ctrl+Shift+N (macOS ⌘+Shift+N).

Click on the triangle ▼ next to New on the Standard toolbar and select Templates from the context menu.

Click on Templates in the LibreOffice Start Center.

In the Filter drop‑down lists select the LibreOffice application and template category to display the applicable templates.

Select the required template and open the template using one of the following methods. A new document opens in the selected LibreOffice module and the Template dialog closes.

Double‑click on the selected template.

Right‑click on the template and select Open from the context menu.

Click on Open on the Template dialog.

Creating templates

Any element properties or settings that can be formatted in a document can be saved in a template: for example, printer settings; file paths; text or object colors; and so on. Also, predefined text can be added to a template removing the need to enter text each time a new document is created: for example, company name and address in a letter template.

Open an existing document, or create a new document of the type required for a template.

Add any content that is required for the new template; for example company logo, copyright statement, and so on.

Figure 101: Save As Template dialog

Format any content added to the template requirements.

Create, or modify, any styles required for the new template.

Go to File > Templates > Save as Template on the Menu bar to open the Save As Template dialog (Figure 101).

Enter a name for the new template in the Enter Template Name text box.

Select a template category, from the categories available in Select Template Category.

If necessary, select Set as default template to change the default template for the required document type.

Click on Save to save template and close the Save As Template the dialog.

Template wizard

In LibreOffice Writer only, a template wizard can be used to create a template. For more information on using the template wizard, see the Writer Guide.

Go to File > Wizards on the Menu bar and select either Letter, Fax, or Agenda to open a wizard dialog. An example of the Letter Wizard dialog is shown in Figure 102.

Select and format the required options in each of the wizard steps and follow the instructions on each page of the dialog.

Click on Finish and a Save as dialog opens.

Navigate to the required folder where the template is going to be saved.

Enter a file name in the text box using the file extension OTT for document templates.

Click on Save to save the new template and close the Save as dialog. The new template appears in the list of templates available.

Figure 102: Letter Wizard dialog

Setting default template

If a new document is being created and no template is selected, LibreOffice creates the document from the default template that matches the document type. However, any template can be set as the default template. The template has to be located in a category displayed in the Save as Template dialog so that LibreOffice can find it. The default template can always be reset to the original LibreOffice default template.

Changing default template

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Select the document type from the Filter drop‑down list.

Select the template to use as the default LibreOffice template for the selected document type.

Right-click on the selected template and select Set as Default from the context menu. A default template icon appears at the top right of the new default template.

Click on Open and a new document opens using the new default template setting the default document template for the document type. The next time a new document is created and a template is not selected, the document is created using the new default template.

Resetting default template

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Select the presentation template that is being used as the default presentation template in the Select a Template dialog.

Right-click on the template and select Reset Default from the context menu.

Click on Close to close the Templates dialog. The next time that a new document is created and a template is not selected, the document is created using the original default LibreOffice template for that document type.

Editing templates

Templates installed with LibreOffice cannot be edited. Only templates that are created or imported can be edited.

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Right-click on the template to be edited and select Edit from the context menu and the template opens in the relevant LibreOffice module.

Edit and update the styles, text and/or objects on the selected template.

Go to File > Save on the Menu bar or use the keyboard shortcut Ctrl+S (macOS ⌘+S) to save the changes.

Close the template, or create a document, using the edited template.

Note

Any document created from a template before editing can be updated to show the changed template settings the next time the document is opened. A confirmation dialog opens asking if the updated styles are to be used or keep the old styles. If keep the old styles is selected, then the document continues to use the old styles without any confirmation.

Organizing templates

LibreOffice can only use templates that are in LibreOffice template categories (template folders). New LibreOffice template categories can be created and used to organize LibreOffice templates. For example, separate template categories for different projects or clients. Templates can also be imported and exported.

Tip

The location of folders used LibreOffice template categories varies with computer operating systems. To learn where the template folders are stored on a computer, go to Tools > Options > LibreOffice > Paths (macOS LibreOffice > Preferences > LibreOffice > Paths).

Creating custom categories

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Click on Manage at the top right of the Templates dialog and select New Category from the context menu.

Enter a category name in Enter new category name box in the New Category dialog (Figure 103).

Click OK to save the new category and the category appears in the Filter drop-down list for categories at the top of the Templates dialog.

Deleting custom categories

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Select the custom category for deletion from the drop-down list of categories at the top of the Templates dialog.

Click on Manage at the top right of the Template dialog and select Delete Category from the context menu.

Click Yes to confirm the deletion of the custom category.

Figure 103: New Category dialog

Figure 104: Select Category dialog

Note

Template categories supplied with LibreOffice, or installed using the Extension Manager, cannot be deleted. Only custom categories that have been created in Impress can be deleted.

Moving templates

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Right-click on the template that is going to be moved and select Move from the context menu.

In the Select Category dialog (Figure 104), select a category from the displayed list of categories, or enter a name in the Create a New Category box to create a new category for the template.

Click OK to move the template to its new category and close the Select Category dialog.

Note

Only custom templates can be moved between template categories. Templates supplied with LibreOffice, or installed using the Extension Manager, cannot be moved.

Deleting templates

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Right-click on the template being deleted and select Delete from the context menu.

Click on Yes to confirm the deletion.

Note

Templates supplied with LibreOffice, or installed using the Extension Manager, cannot be deleted. Only templates that have been created in LibreOffice, or imported from other sources, can be deleted.

Renaming templates

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog .

Right-click on the template being renamed and select Rename from the context menu.

Enter a new template name in the text box that has opened, then click on OK to save the new template name.

Note

Templates supplied with LibreOffice, or installed using the Extension Manager, cannot be renamed. Only templates that have been created in LibreOffice, or imported from other sources, can be renamed.

Importing templates

LibreOffice refers to sources for templates as repositories. A repository can be a directory on a computer or on the internet. The official template repository for LibreOffice can be found at https://extensions.libreoffice.org/.

If a template is in a different location on the computer, then the template must be imported into a LibreOffice category for LibreOffice to recognize the template.

To import a template onto the computer, go to https://extensions.libreoffice.org/ or another internet location and download the required template into a folder on the computer.

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

In the Filter drop‑down lists, select the required document type and template category.

Click on Manage at the top right of the Template dialog and select Import from the context menu to open the Open dialog.

In the Open dialog, navigate to the folder where the template is located on the computer.

Make sure that Templates is selected in the File type box to display the available templates.

Select the required template and click Open. The Open dialog closes and the template is imported into the selected template category.

Exporting templates

Go to File > New > Templates or File > Templates > Manage Templates on the Menu bar to open the Templates dialog.

Right-click on the template being exported and select Export from the context menu.

Navigate to the folder where the template is to be exported to and click on OK. The template is exported to the selected location and the file browser window closes.

Hyperlinks

Hyperlinks in LibreOffice make it possible to include references to web pages and other elements stored remotely.

Absolute and relative hyperlinks

When hyperlinks are used, two factors must be taken into account: whether they are set as absolute or relative on saving, and whether or not a file is present.

An absolute hyperlink contains the full address of the target file, or web site, such as https://libreoffice.org. It is used when linking to a web page, or file, that is outside the current domain or file location. An absolute hyperlink stops working if the hyperlink target is moved to another location on the internet.

A relative hyperlink contains an address that is relative to the current domain or file location. A relative hyperlink stops working if the hyperlink target is removed from the current location.

Inserting hyperlinks

Select the slide where the hyperlink is going to be inserted.

Go to Insert > Hyperlinks on the Menu bar or use the keyboard shortcut Ctrl+K (macOS ⌘+K) to open the Hyperlink dialog (Figure 105).

On the left hand side, select the type of hyperlink for insertion.

Create the hyperlink using the Hyperlink dialog, then click Apply to insert the hyperlink into the slide. The hyperlink is inserted into a text box.

Click Close or OK to close the dialog.

Tips

To prevent automatically turning website addresses or URLs into hyperlinks, go to Tools > AutoCorrect Options > Options and deselect URL Recognition.

To change the color of hyperlinks, go to Tools > Options > LibreOffice > Application Colors (macOS LibreOffice > Preferences > LibreOffice > Application Colors), scroll to Unvisited links and/or Visited links. Select the checkboxes, then select new colors from the color palettes for the links and click OK. Note that this color change changes the color for all hyperlinks across all LibreOffice modules.

Note

In LibreOffice Writer and Calc, the Navigator can be used to insert hyperlinks. For information, see the Writer Guide and Calc Guide.

Hyperlink types

Internet

Select either Web or FTP protocol. Enter the required web address in the URL text box and a name for the hyperlink in the Text text box (Figure 105).

Mail

Enter email details in Recipient and the subject of the link in Subject (Figure 106).

Figure 105: Hyperlink dialog — Internet page

Figure 106: Hyperlink dialog — Mail page

Figure 107: Hyperlink dialog — Document page

Figure 108: Hyperlink dialog — New Document page

Document

Creates a hyperlink to another document or to another place in a document, commonly referred to as a bookmark. Enter the details in the Path text box, or click on Open File to open a file browser. Leave this blank if the link is to a target in the same document (Figure 107).

Optionally, specify a target, for example a specific slide in a presentation. Click on Target in Document to open a dialog where a target can be selected. If the name of the target is known, type it into the Target text box.

New Document

Creates a hyperlink to a new document. Select Edit now to edit the newly created document immediately or Edit later to only create the hyperlink. Choose the type of document to create from the File type drop-down list. Click on Select path to open a file browser so that a directory is selected for the new document (Figure 108).

Further Settings

This section in the Hyperlink dialog is common to all the hyperlink types, although some choices are more relevant to some types of links.

Frame

Set the value to determine how the hyperlink opens. 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

Applicable to HTML documents. It specifies text that will be added as a NAME attribute in the HTML code behind the hyperlink.

Editing hyperlinks

Depending on LibreOffice module, select a hyperlink using one of the following methods:

Click anywhere in the hyperlink text.

Click and drag a selection marquee over the hyperlink text to display a text box border and selection handles.

Double‑click on a hyperlink to open an editing box.

Select editing mode and open the Hyperlink dialog using one of the following methods:

Click on Insert Hyperlink on the Standard toolbar.

Go to Edit > Hyperlink on the Menu bar.

Use the keyboard shortcut Ctrl+K (macOS ⌘+K).

Right‑click and select Edit Hyperlink from the context menu.

Use the various options in the Hyperlink dialog to make the changes, then click Apply to save the changes. The Hyperlink dialog remains open for further editing of hyperlinks.

When editing hyperlinks is complete, click on OK to close the Hyperlink dialog.

Removing hyperlinks

To remove the hyperlink from text and leave just the text, right-click on the link and select Remove Hyperlink from the context menu. If necessary, reformat the text to the document requirements. To completely remove a hyperlink from a document, select the hyperlink and press the Delete or Backspace key.

Getting Started Guide

Chapter 5,
Working with Images and Graphics

Images, Graphics, Gallery, Drawing Tools, Fontwork

Introduction

Adding image and graphic files to LibreOffice documents consist of the following types:

Image and graphic files, for example photos, drawings, PDF documents, and scanned images.

Diagrams created using LibreOffice Draw.

Artwork created using clipart or Fontwork.

Charts created using LibreOffice Calc.

Images, clipart and diagrams from the LibreOffice Gallery.

This chapter provides basic instructions and information for image and graphic files. For more detailed information and instructions on image and graphic files, see the specific user guide available for each LibreOffice module.

Images and graphics

Creating

Image and graphic files are created using a graphics program, scanning, or downloading from the Internet, or photos from a digital camera. When downloading image and graphic files from the Internet, make sure the licensing, or copyright, allows the use of an image or graphic.

LibreOffice can import, rotate and flip various vector (line drawing) image and graphic files. LibreOffice also supports raster (bitmap) file formats and the most common formats for raster files are GIF, JPG, PNG, and BMP. See Appendix B for a full list of image and graphic formats that LibreOffice can import.

LibreOffice can also import SmartArt images from Microsoft Office files. For example, Writer can open a Microsoft Word file that contains SmartArt and edit the SmartArt images.

Editing

To edit photos and other bitmap images, use a bitmap editor. To edit line drawings, use a vector drawing program. There is no need to use additional graphic applications because LibreOffice Draw has the capability to edit images and graphics.

Freely available Open-source tools are also a good alternative when editing image and graphic files, for example GIMP (bitmap editor) and Inkscape (vector drawing program). Open-source tools and many other Open-source applications work on Windows, macOS, and Linux operating systems.

Adding

Image and graphic files can be added to a document using one of the following methods:

Inserting a file directly from a graphics program, or a scanner.

Dragging images and graphics from a clipart gallery.

Copying and pasting from a source on a computer.

Inserting

When an image, or graphic, file is available on the computer being used, the file is inserted into a LibreOffice document using one of the following methods. These insertion methods are only examples because actual insertion does depend on the following:

Computer operating system.

Computer setup.

LibreOffice module being used.

Drag and drop

Dragging and dropping embeds a copy of the file into a document.

Open a file browser window and locate the file to be inserted.

Drag the file into the LibreOffice document and drop it on the selected page.

Note

To link an image, or graphic, file instead of embedding, hold down the Ctrl+Shift keys (macOS ⌘+Shift) while dragging the file.

Insert Image dialog

Open a LibreOffice document and click on the page where the image, or graphic, is to be inserted.

Go to Insert > Image on the Menu bar to open the Insert Image dialog (Figure 109). This dialog is similar to a file browser window.

Navigate to where the file is located and select it. If the Preview option is selected in the Insert Image dialog, a preview of the selected image, or graphic, appears in the Preview box.

Click on Open and the image, or graphic, is embedded into the document and Insert Image dialog closes.

Figure 109: Insert Image dialog

If the image, or graphic, is going to be linked and not embedded, select the Link option before clicking Open.

Note

If the Link option is selected, a message box appears when Open is clicked and the Confirm Linked Graphic dialog opens. Select Keep Link to the link the file, or Embed Graphic to embed the image, or graphic. To prevent this message from appearing again, deselect the option Ask when linking a graphic. When inserting the same image, or graphic, several times in a document, LibreOffice embeds only one copy of the file.

Copy and paste

Open both the source and target documents.

In the source document, select the image to be copied and copy the image to the clipboard.

In the target document, click at the position where the image is to be placed.

Paste the image from the clipboard into the document.

Note

If the source document is closed before the image is pasted into the target document, the image stored on the clipboard could be lost.

Embedding

Embedding linked image, or graphic, files breaks the link to the file and becomes part of the document. Linked images, or graphics can be embedded as follows:

Open a document in LibreOffice and go to Edit > External Links on the Menu bar to open the Edit Links dialog (Figure 110).

Select the files that are going to be embedded.

Click on Break Link, then click Yes to confirm embedding the files.

Figure 110: Edit Links dialog

Linking

When linking images, or graphics, LibreOffice creates a link to the file instead of saving a copy of the file in a document. The result is that the image, or graphic, is displayed in the document. However, when the document is saved, it contains only a reference to the linked file, not the file itself. The document and the image, or graphic, remain as two separate files reducing file size.

Advantage

File can be modified separately using a graphics program. The modified image, or graphic, appears the next time the document is opened. This is an advantage if another person is updating the files, for example a graphic artist.

Advantage

Linking reduces the file size of the document when it is saved, because the file itself is not included in the document. However, file size is usually not a problem on modern computers, and LibreOffice can handle large files.

Disadvantage

Sending a document with linked files to another computer, the linked files must also be sent, or moved with the document so that the receiver sees the linked images, or graphics in the document. Keep track of the file locations and make sure any recipient knows where to store the files so the document can find the files when it is opened. For example, image files placed in a subfolder named Images in the folder containing the document. The recipient needs to put the image files in an Images subfolder in the same folder the document has been placed.

Scanning

If a scanner is connected to a computer, LibreOffice can use the scanning software to scan an image, graphic, or document, then place the scanned media into the open document. The following scanning procedure is an example of how to insert scanned media into a document.

Go to Insert > Media > Scan > Select Source on the Menu bar and select the scanning source from the list of available devices.

Click in the document where the scanned media is to be inserted.

Place the media for scanning onto the selected scanner.

Go to Insert > Media > Scan > Request on the Menu bar to open the scanning software.

Click on Preview in the scanning software to scan the media and a preview image appears in the scanning software.

Adjust settings for image quality, size, and other attributes in the scanning software.

Click on Scan in the scanning software and the media is scanned. A scanned copy of the media is inserted into the LibreOffice document.

Click on Close in the scanning software to close the scanning application.

Note

The scanning software must be an application that LibreOffice recognizes and is compatible to scan and insert media into a document.

After a scanning sources has been selected, LibreOffice remembers the selected scanning source. This eliminates the need to select a scanning source each time scanned media is inserted into a document.

Figure 111: Gallery deck in Sidebar — Icon View

Inserting using the Gallery

The Gallery (Figure 111) provides a convenient way to insert media, such as graphics and sounds, into documents. The Gallery is available in the Writer, Calc, Impress, and Draw modules of LibreOffice. When copied, Gallery images are embedded into a document, but can also be linked to the Gallery image. See “LibreOffice Gallery” on page 203 for more information.

Click on Gallery on the right side of the Sidebar, or use the keyboard shortcut Ctrl+Alt+3 (macOS ⌘+⌥+3) to open the Gallery deck.

Select a Gallery theme from the list provided.

Select the required image from the displayed images with a single click.

To insert the required image into the document use one of the following methods:

Drag and drop the image into the document.

Right‑click on the image and select Insert in the context menu. This places the image in the center of the document.

To insert an image as a link, hold down the Shift and Ctrl (macOS ⌘) keys, then drag and drop the object into the document.

Editing images or graphics

LibreOffice provides many tools for editing images and graphics. These tools are described in more detail in the relevant user guide for each LibreOffice module. Editing images, or graphics, consists of the following:

Cropping, resizing, modifying, filtering, and positioning.

Wrapping text around images.

Using images as backgrounds and watermarks.

For complex editing, it is recommended to use a graphics application, such as Gimp, or Inkscape. The edited image, or graphic, can then be inserted into LibreOffice.

Image toolbar

When an image is inserted, or an image is selected in the document, the Image toolbar opens automatically. If the Image toolbar does not open, go to View > Toolbars on the Menu bar and select Image from the submenu. Two other toolbars also become available when an image is selected:

Image Filter toolbar, which can be used as a floating toolbar.

Color toolbar, which opens as a separate floating toolbar.

Using these three toolbars together, corrections and adjustments can be applied to an image. Also, special effects can be applied, such as transparency, color adjustment, flipping and rotation, and special effect filters.

Cropping

If only a part of an image, or graphic, is to be used in a document, it can be cropped. LibreOffice provides two ways to crop an image, or graphic:

Crop tool — available as a tool on toolbars, or in a context menu after right‑clicking on an image, or graphic. The Crop tool provides a quick and easy way to crop an image, or graphic.

Crop page in the Writer Image dialog — accessed by right‑clicking on the image, or graphic, and selecting Properties in the context menu. The Crop page provides more control when cropping.

Note

When an image, or graphic, is inserted into a LibreOffice document and is cropped, the image, or graphic, itself is not cropped. LibreOffice masks the parts of the image, or graphic, that have been cropped. If the document is exported as HTML, the original image, or graphic, is also exported. For exporting individual cropped images, or graphics, see “Exporting” on page 201.

Resizing

To fit an image, or graphic, into a LibreOffice document, it may have to be resized. The quickest way to resize an image, or graphic, is to use the selection handles as shown by the following example.

Click on an image, or graphic, to display the selection handles.

Figure 112: Example of resizing an image

Position the cursor over one of the selection handles and the cursor changes shape, giving a graphical representation of the resizing direction as follows:

Corner handles simultaneously resizes both width and height of an image.

Horizontal handles resizes the height of an image.

Vertical handles resizes the width of an image.

Click on a selection handle and drag to resize the image, or graphic. During resizing, a ghost image appears helping to resize an image, or graphic, (Figure 112).

To maintain the original height and width proportions of an image while dragging using a selection handle, hold down the Shift key before dragging a selection handle. Remember to release the Shift key before releasing the selection handle.

Positioning

After inserting an image, or graphic, into a LibreOffice document, it may have to be repositioned to achieve the correct document format. The quickest way to resize an image, or graphic, is to use the cursor as shown by the following example.

Select an image, or graphic, to display the selection handles.

Move the cursor over a selected image, or graphic, and the cursor changes shape to a grabbing cursor. The grabbing shape depends on the computer setup and the computer operating system.

Click and drag the selected image, or graphic, to the desired position. During movement, a ghost image appears helping with repositioning (Figure 113).

Release the cursor when the image, or graphic, is in the desired position.

Tip

The arrow keys on the keyboard can also be used to quickly move a selected image, or graphic, into a new position.

Figure 113: Example of positioning an image

Figure 114: Example of rotating an image

Rotating images

After inserting an image, or graphic, into a LibreOffice document, it can be rotated to achieve the correct document format. The quickest way to rotate an image, or graphic, is to use the cursor as shown by the following example.

Click on an image, or graphic, to display the selection handles.

Click again (NOT double‑click) on the selected image, or graphic, switching on rotation mode, or go to Format > Rotate on the Menu bar.

Note

Using a double‑click on an image, or graphic, switches on text editing mode for the selected image, or graphic.

Move the cursor over one of the corner handles and the cursor changes shape indicating the movement direction.

Click on a corner selection handle and move in the direction required to rotate the object. Only the corner selection handles are active for rotation.

When satisfied with the rotation, release the cursor.

To change the rotation center of the object, click and drag the central pivot point to the desired position before rotating. The central pivot point can be moved to any position on the document, even outside of the image boundaries.

To restrict the rotation angles to multiples of 15 degrees, press and hold the Shift key while rotating the image. This is useful for rotating images through a right angle, for example from portrait to landscape. Remember to release the Shift key before releasing the cursor.

Flipping

After inserting an image, or graphic, into a LibreOffice document, it can be flipped either vertically, or horizontally. Depending on which LibreOffice module is being used, use one of the following methods to quickly flip an image, or graphic:

Right-click on the selected image, or graphic, and select Flip > Vertically or Horizontally from the context menu.

Click on Vertically, or Horizontally on the Line and Filling toolbar.

Click on Flip Vertically, or Flip Horizontally on the Image toolbar.

Go to Format > Flip > Vertically, or Horizontally on the Menu bar.

Go to Format > Rotate or Flip > Flip Vertically, or Flip Horizontally on the Menu bar

Click on Flip Vertically, or Flip Horizontally in the Position and Size panel on the Properties deck of the Sidebar.

Arranging

LibreOffice organizes images and graphics in a stack. The image, or graphic, on the top level of a stack covers the images and graphics on the lower levels, if any overlapping occurs. Select images, or graphics, and use one of the following methods to change the stack level:

Click on the required arrange tool on the Line and Filling toolbar.

Right-click on selected objects and select Arrange from the context menu, then select the required arrange option from the sub-context menu.

Go to Format > Arrange on the Menu bar and select an option from the submenu.

Use the keyboard shortcut available for each arrangement option.

The stack level of each image, or graphic, can be changed. The options available for arranging the stack level of images, or graphics are as follows:

Bring to Front

Selected object is moved in front of all other objects. Keyboard shortcut Ctrl+Shift++ (macOS ⌘+Shift++).

Bring Forward

Selected object is moved one level up in the stack. Keyboard shortcut Ctrl++ (macOS ⌘++).

Send Backward

Selected object is moved one level down in the stack. Keyboard shortcut Ctrl+– (macOS ⌘+–).

Send to Back

Selected object is moved behind all other objects. Keyboard shortcut Ctrl+Shift+– (macOS ⌘+Shift+–).

In Front of Object

Moves the first selected object in front of the second selected object. Select the first object, then click on the second object and the objects swap position.

Behind Object

Moves the first selected object behind the second selected object. Select the first object, then click on the second object and the objects swap position.

Reverse

Swaps the stacking order of two selected objects.

Alignment and positioning

When an image, or graphic, is added to a document, the alignment and positioning has to be selected in respect to text and other objects on a document page.

Arrangement

Is the positioning of an image, or graphic, on an imaginary vertical axis. Arrangement controls how images, or graphics are stacked upon each other, or relative to the text.

Alignment

is the vertical, or horizontal positioning of an image, or graphic, in relation to the selected anchor point.

Anchoring

Is a reference point for that an image, or graphic, is fixed in a document. This reference, or anchor point can be a page, frame, cell, paragraph, or character. An image, or graphic, always has an anchor point.

Text wrapping

In a document refers to the relation of images and graphics to the surrounding text. Options for text wrapping allow the text to wrap around an image, or graphic, as follows:

One or both sides of the image, or graphic.

Above or below of the image, or graphic.

Allow text overprint of the image, or graphic.

Allow of the image, or graphic, to cover the text.

Treat the image, or graphic, as a separate paragraph, or character.

Exporting

To use another graphics application to edit an image, or graphic, the file is exported directly from the document. The following procedure is an example only. Actual procedure depends on the computer operating system and computer setup.

Right-click on the image, or graphic.

Select Save from the context menu to open the Image Export dialog (Figure 115).

Navigate to the folder where the image, or graphic, is going to be exported to.

Enter a file name in the File name text box and select the file type from the options available from the drop-down list in File type.

Click on Save to export the file and close the dialog.

Open the graphics program, then navigate to the folder where the file is located.

Carry out the necessary editing to the file and save the file in the required format. The image, or graphic, can then be re-inserted back into the document.

Figure 115: Image Export dialog

Figure 116: Compress Image dialog

Compressing

If an image, or graphic, has a large file size, it can be compressed to reduce the file size. This results in a smaller file size for the document, but may result in a loss of quality when the image, or graphic, is compressed. The following procedure is an example only. Actual procedure depends on the computer operating system and computer setup.

Right-click on the image, or graphic.

Select Compress from the context menu to open the Compress Image dialog (Figure 116).

Use options available in Compression and Resolution to compress the image, or graphic.

If necessary, click on Calculate New Size and check the file file size of the compressed image, or graphic.

Click on OK to save the changes and close the dialog.

If the resulting image is not acceptable, undo the changes and repat the procedure using different compression settings.

LibreOffice Gallery

Graphics in the Gallery are grouped by themes, such as Arrows, Diagrams, and Icons, and are installed when LibreOffice is installed on a computer. The Gallery can be displayed in Icon View (Figure 111 on page 196), or Detailed View (Figure 117).

Inserting Gallery images and graphics

The Gallery deck on the Sidebar contains a collection of images and graphics that can be used in a document. Images and graphics can also be added to the Gallery, making it an essential tool for inserting images and graphics into a document quickly. The Gallery is available for all LibreOffice modules.

Open the Gallery deck in the Sidebar using one of the following methods:

Go to Insert > Media > Gallery on the Menu bar.

Click on Gallery in the Sidebar.

Figure 117: Gallery deck on Sidebar — Detailed View

Select a theme from the available themes and the images and graphics for that theme are displayed.

Scroll through the available images and graphics and select the required image or graphic.

Click and hold on the image or graphic and drag it onto the slide. Release the hold and the image or graphic is inserted centrally onto the page.

Format the image or graphic to the document requirements.

Default themes

Images and graphics in the Gallery are grouped by themes, such as Arrows, Bullets, Diagrams and so on. These default themes are listed alphabetically in the box at the top of the Gallery deck on the Sidebar. Click on a theme name to see its images and graphics displayed in the Gallery deck.

The Gallery default themes are read-only. No images or graphics can be added to or deleted from these themes. The default themes are easily identified by right-clicking on a theme name and the only available option in the context menu is Properties.

Custom themes

Custom themes, when added to the Gallery, are the only themes where images and graphics can be added. Custom themes are listed alphabetically, along with the default themes, in the box at the top of the Gallery deck on the Sidebar. Custom themes are easily identified by right-clicking on a theme name and the options available in the context menu are Delete, Rename, and Properties.

Custom themes can also be added to the Gallery to hold any images or graphics that are used frequently. For example, a company logo, or images and graphics that are used for specific projects.

Tip

Gallery themes are available from the LibreOffice extensions website at https://extensions.libreoffice.org/. This website also includes themes from previous versions of LibreOffice that are no longer installed when newer versions of LibreOffice are installed. See Chapter 13, Customizing LibreOffice for information on managing extensions.

Creating themes

Open the Gallery deck in the Sidebar using one of the following methods:

Go to Insert > Media > Gallery on the Menu bar.

Click on Gallery in the Sidebar.

Click New at the bottom of the Gallery deck and the Properties of New Theme dialog opens (Figure 118).

Click on General and type a name for the new theme in the text box.

Click OK to save the new theme and close the dialog. The new theme is displayed in the list of themes in the Gallery.

Figure 118: Properties of New Theme dialog — General page

Figure 119: Properties of New Theme dialog — Files page

Note

The name of the Properties of New Theme dialog changes to show the name of the newly created custom theme in the Gallery deck.

Adding images and graphics

Right-click on a custom theme name in the theme list on the Gallery deck and select Properties from the context menu to open the Properties of New Theme dialog.

Click on Files to open the Files page (Figure 119), then click on Find Files to open a Select Path dialog.

Navigate to the folder that contains the images and graphics required and select the folder.

Click OK to close the Select Path dialog. The files contained in the folder appear in the Properties of New Theme dialog.

If necessary, select Preview and any image or graphic selected appears in the preview box.

Select the files required for the custom theme and click on Add. The added files disappear from the file list and the images and graphics appear in the custom theme on the Gallery deck.

To add all the files in the list, then click Add All. All the files disappear from the list and the images and graphics appear in the custom them on the Gallery deck.

Click OK and close the Properties of New Theme dialog.

Deleting images and graphics

Only images and graphics added to a custom themes can be deleted.

Open the Gallery deck and select a custom theme.

Right-click on the image or graphic and select Delete from the context menu.

Click Yes in the confirmation message to delete the image.

Note

Images and graphics in custom themes are linked files and are deleted from the Gallery only. The original image and graphic files are not deleted.

Updating themes

All images and graphics in the Gallery are linked files. It is recommended that any custom themes are updated on a regular basis to make sure that all the files are still available.

Open the Gallery deck and select a custom theme that contains at least one image or graphic.

Right-click on the name of the selected custom theme.

Select Update from the context menu and the links to all the image and graphic files are updated.

Gallery images and graphics location

Images and graphics in the Gallery can be located anywhere on a computer, or a network drive. When adding graphics to the Gallery, the files are not moved or copied. Only the location of each image or graphic added to the Gallery is used as a reference.

The location of the Gallery is specified in Tools > Options > LibreOffice > Paths (macOS LibreOffice > Preferences > LibreOffice > Paths). If necessary, this location can be changed and gallery files (*.sdv) can be copied to other computers.

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

Note

The location of Gallery themes installed using LibreOffice extensions are determined by the extension settings.

Figure 120: Image Map Editor dialog

Creating image maps

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 (for more information, see Chapter 4, Working with Styles, Templates, and Hyperlinks).

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 an ODS file; a PDF viewer for a PDF). Hotspots can be in various shapes and several hotspots can be included on the same image.

Image map editor

In a LibreOffice document, select the image where hotspots are going to be defined.

Go to Tools > ImageMap on the Menu bar to open the ImageMap Editor dialog (Figure 120). The main part of the dialog displays the image where hotspots are to be defined.

Use the tools and fields in the dialog to define the required hotspots and links. A hotspot is identified by a line indicating its shape. The information needed for the hotspot includes the address pointed to by the hyperlink and the text to be displayed when the cursor is moved over the hotspot.

Click on Apply to apply the settings.

Click Save to save the image map to a file, then close the dialog.

Image map tools

The toolbar at the top of the dialog contains the following tools and text boxes to specify the properties of an image map:

Apply

Applies any changes made.

Open

Opens a file browser window for navigating to a folder where an image map has been saved.

Save

Opens a file browser window for navigating to a folder where the image map is to be saved.

Close

Closes the Image Map dialog. A confirmation window opens asking for confirmation of what happens to any changes that have been made.

Select

Used to select a hotspot that has been created on an image.

Rectangle, Ellipse, Polygon and FreeForm Polygon

Drawing tools for hotspot shapes. These tools work in exactly the same way as the corresponding tools in the Drawing toolbar.

Edit Points, Move Points, Insert Points, Delete Points

Advanced editing tools to manipulate the shape of a polygon hotspot. Select Edit Points first to activate the other points tools.

Undo

Reverses any previous action taken.

Redo

Carries out any action that has been previously undone.

Active

Toggles the status of the hotspot activating a selected hotspot or deactivating it if active.

Macro

Associates a macro with the hotspot instead of a hyperlink.

Properties

Sets the hyperlink properties and adds the Name attribute to the hyperlink.

Address

Enter the URL address that points to a hyperlink, or to an anchor in a document (for example a specific slide number). Using an anchor in a document, write the address in this format: file:///<path>/document_name#anchor_name.

Text

Enter the text that is displayed when the cursor is moved over the hotspot.

Frame

Where the target of the hyperlink opens.

_blank

Opens in a new browser window.

_self

Default selection and opens in the current window.

_top

File opens in the topmost frame in the hierarchy.

_parent

File opens in the parent frame of the current frame. If there is no parent frame, the current frame is used.

Note

The value _self for the target frame works in the vast majority of occasions. It is not recommended to use the other selections unless absolutely necessary.

LibreOffice drawing tools

Drawing tools in LibreOffice are used to create graphics consisting of rectangles, circles, lines, text, and other predefined shapes. Also several graphics can be grouped to maintain their relative position and proportion with each other. Graphics are placed directly on a page in a document, or inserted into a frame.

Tip

When creating complex drawings, it is recommended to use LibreOffice Draw to make use of more advanced drawing features, for example drawing layers and styles.

Drawing toolbar

An example Drawing toolbar is shown in Figure 121. If the Drawing toolbar is not displayed, it can be opened by going to View > Toolbars > Drawing on the Menu bar, or by clicking on Show Draw Functions on the Standard toolbar.

The default tools available on a Drawing toolbar do vary slightly between the LibreOffice modules. Tools can be added to a Drawing toolbar using Visible Buttons, or customizing the toolbar. See Chapter 12, Configuring LibreOffice, Chapter 13, Customizing LibreOffice for more information, or the specific user guide for each LibreOffice module.

Figure 121: Drawing toolbar — Writer module

Drawing tools numbered from left to right for Figure 121

Select

Insert Line

Lines and Arrows

Curves and Polygons

Curve

Polygon

Rectangle

Rectangle, Rounded

Square

Ellipse

Circle

Isosceles Triangle

Right Triangle

Basic Shapes

Symbol Shapes

Block Arrows

Stars and Banners

Callout Shapes

Flowchart

Callouts

Vertical Callouts

Insert Text Box

Insert Vertical Text

Insert Fontwork Text

Points

Toggle Extrusion

Figure 122: Drawing Object Properties toolbar

Drawing object properties numbered from left to right for Figure 122

Select anchor for object

None

Parallel

Optimal

Before

After

Through

Align Objects

Bring to Front

Forward One

Back One

Send to Back

To Foreground

To Background

Select start and end arrowheads for lines

Line Style

Line Width

Line Color

Area Style/Filling

Fill Color

Rotate

Points

Group

Enter Group

Exit Group

Ungroup

Insert Caption

Note

The following procedures are examples only using LibreOffice Writer. Actual procedures depend on the LibreOffice module being used, computer operating system, and computer setup.

Inserting drawing objects

Click in the document at the position where the drawing is to be placed.

Select the drawing required tool on the Drawing toolbar and the following happens:

The cursor changes shape to indicate drawing mode is selected.

The Formatting toolbar changes to the Drawing Object Properties toolbar (Figure 122).

Click and drag to create the drawing object using the default properties.

Release the cursor and the selected drawing tool remains active. This allows drawing another object of the same type.

If necessary, select another drawing object to draw a different shape of drawing object.

Press the Esc key, or deselect the drawing object to cancel drawing mode.

Changing properties

Click on Select on the Drawing toolbar, then select the drawing object.

On the Drawing Object Properties toolbar, select each property tool required for the drawing object.

If necessary, select the property value from the available options.

Select the type of drawing object required on the Drawing toolbar.

Click and drag to create the drawing object using the selected properties.

Figure 123: Example of grouping objects

To change properties for another drawing object, repeat Steps 2 and 3 before drawing the object.

Press the Esc key, or deselect the drawing object to cancel drawing mode.

Editing drawing objects

Editing drawing objects uses the same procedures that are used for editing images and graphics. See “Images and graphics” on page 192 for more information.

Grouping objects

This section gives only a brief introduction to grouping of objects. An example of grouping two objects together is shown in Figure 123. For more information on working with grouped objects, see the specific user guide for each LibreOffice module.

Grouping of objects is similar to putting objects into a container. Objects within a group are moved together as one object and any changes made are applied globally to the objects within the group. A group can always be undone and the objects that make up the group can always be manipulated separately.

Temporary grouping

Temporary grouping is when several objects are selected together. Any changes to the objects are applied to all of the objects within the temporary group. For example, a temporary group of objects can be rotated in its entirety.

A temporary group is created using one of the following methods:

Hold down the Shift key whilst clicking multiple objects on a slide.

Click and drag the cursor to create a marquee around multiple objects. Release the cursor and all the objects within the marquee are selected.

To cancel a temporary grouping of objects, simply click outside of the selection handles displayed around the objects.

Permanent grouping

Objects are grouped together using one of the following methods:

Hold down the Shift key whilst clicking multiple objects on a slide.

Click and drag the cursor to create a marquee around multiple objects. Release the cursor and all the objects within the marquee are selected.

To select all the objects on the slide, go to Edit > Select All on the Menu bar, or use the keyboard shortcut Ctrl+A (macOS ⌘+A).

With selection handles displayed, use one of the following methods to create a group of selected objects:

Go to Format > Group > Group on the Menu bar.

Use the keyboard shortcut Ctrl+Shift+G (macOS ⌘+Shift+G).

Right-click on an object within the selected group and select Group from the context menu.

Editing or formatting groups

Click on an object in the group to select the group. Any editing or formatting can then be carried out on all the objects within the group or on individual objects within the group.

To edit an individual object within a group, enter the group using one of the following methods:

Use the keyboard shortcut F3.

Go to Format > Group > Enter Group on the Menu bar.

Right-click and select Enter Group from the context menu.

Select individual objects within the group for editing or formatting. An example of editing individual objects in a group is shown in Figure 124.

When editing or formatting is completed, use one of the following methods to exit the group and the whole group then becomes selected:

Use the keyboard shortcut Ctrl+F3 (macOS ⌘+F3).

Go to Format > Group > Exit Group on the Menu bar.

Right-click and select Exit Group from the context menu.

Ungrouping

Click on any one of the objects in the group to select the group.

Figure 124: Example of editing inside a group

With selection handles displayed, use one of the following methods to ungroup a group of objects:

Go to Format > Group > Ungroup on the Menu bar.

Use the keyboard shortcut Ctrl+Alt+Shift+G (macOS ⌘+⌥+Shift+G).

Right-click on the group and select Ungroup from the context menu.

Fontwork

With Fontwork, graphical text art objects can be created to make a document more attractive. There are many different settings for text art objects (line, area, position, size, and more) giving a large selection of effects. Fontwork is available with the Writer, Calc, Draw, and Impress modules of LibreOffice, but there are small differences in the way that each module displays Fontwork.

Creating Fontwork

Click on Insert Fontwork Text on the Drawing toolbar, or go to Insert > Fontwork on the Menu bar to open the Fontwork Gallery dialog (Figure 126).

Select a Fontwork style from the dialog and click OK. The selected Fontwork appears centrally on the page and the dialog closes.

Double-click on the Fontwork text graphic to switch on editing mode.

Type in the required text to replace the default text in the Fontwork graphic and the text appears over the default text as shown by the example in Figure 127.

Press Esc key, or click outside the Fontwork graphic and the text replaces default text.

Figure 125: Fontwork toolbar

Figure 126: Fontwork Gallery dialog

Figure 127: Example of creating Fontwork

Figure 128: Fontwork panel in Properties deck on Sidebar

Fontwork toolbar

The Fontwork toolbar (Figure 125) becomes visible and active when a Fontwork object is selected. If the toolbar is not visible, go to View > Toolbars > Fontwork on the Menu bar. Also, the Fontwork panel opens in the Properties deck on the Sidebar (Figure 128) and contains the same tools as the Fontwork toolbar.

Insert Fontwork Text

Opens the Fontwork Gallery dialog.

Fontwork Shape

Changes the shape of the selected object. Clicking on the triangle ▼ next to Fontwork Shape opens the Fontwork Shape sub-toolbar (Figure 129) allowing selection of different Fontwork shapes.

Figure 129: Fontwork Shape sub-toolbar

Fontwork Same Letter Heights

Changes the height of characters in the selected Fontwork object. Toggles between normal height where the characters have different heights to where all characters have the same height.

Fontwork Alignment

Specifies the text alignment within the frame. Options available 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 lines are filled completely.

Fontwork Character Spacing

Selects the spacing between characters and whether kerning pairs are used. Options available are Very Tight, Tight, Normal, Loose, Very Loose, and Custom Spacing. For Custom Spacing, input a percentage value: 100% is normal character spacing, less than 100% character spacing is tighter, and more than 100% character spacing is looser.

Toggle Extrusion

Converts the Fontwork object into a 3D shape using extrusion. See the Draw Guide for more information.

Editing Fontwork

It is possible to treat Fontwork text as an object and apply all the formatting that has been described in this chapter. Assign line properties only to Fontwork that does not have a 3D effect, otherwise the changes are not visible. Also, modify some of the Fontwork shapes by moving the dot that is displayed along with the selection handles. This is similar to modification of the angles of trapezoid and parallelogram basic shapes.

Barcodes and QR codes

Writer, Calc, Impress, and Draw can generate barcodes and QR (Quick Response) codes. Barcodes are used for many purposes to easily identify items using a code scanner. QR codes are a type of barcode containing, for example, data that points to a website or application.

Generating

Go to Insert > OLE Object > QR and Barcode on the Menu bar to open the QR and Barcode Code dialog.

Enter the required information in the URL/Text field. This can be, for example, a website address, or a product number.

Select the error correction factor from the options available in Error correction. This is the complexity of the graphic generated.

Enter the margin required in the Margin text box. The margin is placed around the code when it is generated.

Select the type of code from the options available in the Type drop-down list.

Click OK to generate the code and close the QR and Barcode dialog.

Figure 130: Example QR code

Figure 131: Example Barcode

Editing

After the barcode, or QR code has been generated, right-click in the code and select Edit Barcode from the context menu to open the QR and Barcode dialog.

Make the necessary changes to the information in the QR and Barcode dialog.

Click OK to regenerate the code and close the QR and Barcode dialog.

Getting Started Guide

Chapter 6,
Getting Started with Impress

Presentations in LibreOffice

What is Impress?

Impress is the presentation (slide show) program included in LibreOffice. Impress creates presentations in the Open Document Presentation (ODP) format, which can be opened by other presentation software or can be exported in different presentation formats.

Slides can be created that contain many different elements, including text, bulleted and numbered lists, tables, charts, and a wide range of graphic objects such as clip art, drawings, and photographs. Impress also includes a spelling checker, a thesaurus, text styles, and background styles.

This chapter introduces some features of Impress and does not attempt to cover all of the features available in Impress that can be used to create presentations. See the Impress Guide and LibreOffice Help for more information.

To use Impress for more than very simple presentations requires some knowledge of the elements used on the slides. Slides containing text use styles to determine the appearance of that text. Creating drawings in Impress is similar to the Draw module included in LibreOffice. For more information, refer to Chapter 4, Working with Styles, Templates, and Hyperlinks, and Chapter 7, Getting Started with Draw, in this guide. It is recommended to consult the Draw Guide for more details on how to use the drawing tools.

Starting Impress

Start Impress using any of the methods described in Chapter 1, LibreOffice Basics. The main Impress window opens and, by default, the Select a Template dialog (Figure 132) is displayed.

Figure 132: Select a Template dialog

Templates included with Impress are designed to fit the two standard sizes of presentation slides: 4:3 and 16:9 ratios. However, templates will adapt to other available sizes, which can be selected by going to Slide > Slide Properties > Paper Format on the Menu bar or Format in the Slide panel in the Properties deck on the Sidebar.

Tip

To start Impress without the Select a Template dialog, deselect Show this dialog box at startup in the lower left of the dialog.

In Windows or Linux, go to Tools > Options > LibreOffice Impress > General on the Menu bar (macOS LibreOffice > Preferences > LibreOffice Impress > General) and deselect Start with Template Selection under New Document.

Main Impress window

The main Impress window (Figure 133) has three main sections: Slides pane, Workspace, and Sidebar. At the top is the Menu bar and toolbars. Toolbars can be displayed, hidden, locked in position, or floating during the creation of a presentation.

Tip

The Slides pane and/or Sidebar can be closed by clicking the X in the upper right corner of each pane, or go to View > Slide Pane or View > Sidebar on the Menu bar to deselect. To reopen a pane, select View > Slide Pane or View > Sidebar on the Menu bar.

Figure 133: Impress main window Slides pane Workspace Sidebar

Menu bar

The Impress Menu bar, at the top of the main window, provides several menus common to all LibreOffice modules. The commands may differ between each LibreOffice module for File, Edit, View, Insert, Format, Tools, Window, and Help. Impress has two extra menus for Slide and Slide Show. When a menu item is selected, a submenu opens to show commands. The Menu bar can be customized; see Chapter 13, Customizing LibreOffice.

Workspace

The Workspace (normally the center of the main window) opens in Normal view. It has four standard views of Normal, Outline, Notes, and Slide Sorter. For more information, see “Workspace views” on page 232.

If master slides are being used, then master views become available: Master Slide, Master Notes and Master Handout. There are no tabs for master views, which are selected by going to View on the Menu bar. For more information on master slides, see the Impress Guide.

Slides pane

The Slides pane contains thumbnail images of slides in a presentation in the order in which the slides are shown. Clicking on a slide image in the Slides pane selects it and places the slide in the Workspace where changes are made to the displayed slide.

To display or close the Slides pane, go to View > Slide Pane on the Menu bar.

To close the Slides pane, click on the X in the right top corner of the Slides pane.

To display or hide the Slides pane, use the Hide/Show marker on the left of the Workspace.

Several additional operations can be carried out on one or more slides in the Slides pane. Also, these additional operations are available from a context menu when right-clicking on a slide in the Slides pane.

Add new slides to a presentation.

Hide a slide so that it will not show in a presentation.

Delete a slide from a presentation.

Rename a slide.

Duplicate a slide (copy and paste).

Move a slide to another position in the slide order by dragging and dropping it to the desired position.

Also, the following operations can be carried out, although there are more efficient methods than using the Slides pane:

Change the slide transition following the selected slide, or after each slide in a group.

Change the sequence of slides in the presentation.

Change the slide design.

Change slide layout for a group of slides simultaneously.

Sidebar

The Impress Sidebar, normally located on the right side of the Workspace, is similar to the Sidebar in the other LibreOffice modules. It consists of seven decks, as described below. To open a deck, use one of the following methods:

Click on its icon on the right side of the Sidebar.

Click on Sidebar Settings at the top of the Sidebar and select a deck in the drop‑down list.

Go to View on the Menu bar and select the deck required in the submenu.

Properties

The Properties deck has ten panels, allowing the slide layout to be changed and the formatting of any objects on a slide.

When a slide is selected and appears in the Workspace, the Properties deck opens with the Slide and Layouts panels available.

When an object on a slide is selected, the Properties deck has the following panels available: Character, Lists, Paragraph, Area, Shadow, Line, Position and Size, Columns, Effect, and Image. Actual panels displayed depends on the type of object selected.

Styles

On the Styles deck, drawing and presentation styles can be applied to a selected object, new styles created for drawing and presentation, and both types of styles can be modified. When saving changes to a style, the changes are applied to all of the elements formatted with that style in the presentation. For more information on styles, see “Styles” on page 257 and the Impress Guide.

Gallery

On the Gallery deck, an object can be inserted into a presentation either as a copy. or as a link. A copy of an object is independent of the original object. Changes to the original object have no effect on the copy. A link remains dependent on the original object. Changes to the original object are also reflected in the link. See the Impress Guide for more information.

Navigator

The Navigator deck displays all objects contained in a presentation. It provides a convenient way to move between slides in a presentation or select an object on a slide. It is recommended to give slides and objects in a presentation meaningful names so that they are easily identified when using the Navigator. For more information, see “Navigator” on page 231 and the Impress Guide.

Shapes

The Shapes deck provides panels quick selection of the most commonly used items when creating a presentation and are also available on the Drawing toolbar:

Lines and Arrows	Curves and Polygons

Connectors	Basic Shapes

Symbol Shapes	Block Arrows

Flowchart	Callout

Stars and Banners	3D Objects.

Slide transition

The Slide Transition deck provides a selection of slide transitions available in Impress, providing controls for transition speed, automatic or manual transition, and how long a selected slide is shown (automatic transition only). For more information on transitions, see “Slide transition” on page 271 and the Impress Guide.

Animation

The Animation deck provides an easy way to add, change, or remove animations to different elements or objects on a slide and how they appear during a slide show. For more information on animation effects, see “Animation effects” on page 273 and the Impress Guide.

Master slides

Using the Master Slides deck, the slide design can be selected for a presentation. Impress includes several designs for master slides. The default master slide is blank, but the remaining master slides have backgrounds and styled text. For more information on master slides, see “Working with master slides” on page 257 and the Impress Guide.

Rulers

Rulers are positioned on the upper and left-hand sides of the Workspace. If the rulers are not visible, go to View > Rulers on the Menu bar. The rulers show the size of a selected object on the slide using double lines (highlighted in Figure 134). Rulers are also used to manage object handles and guide lines when positioning objects.

To change the measurement units of the rulers, right-click on a ruler and select the measurement unit from the drop-down list, as shown in Figure 135 for the horizontal ruler. The horizontal and vertical rulers can be set to different measurement units.

The page margins in the drawing area are also represented on the rulers. The margins can be changed directly on the rulers by dragging them with the mouse. The margin area is indicated by either a grayed out area on the rulers or borders around the unused area of the ruler. This margin indication depends on computer setup and operating system.

Figure 134: Object size highlighted on rulers

Figure 135: Changing ruler measurement units

Figure 136: Status bar Slide number Information area Master slide Cursor position Object size Unsaved changes Digital signature Text language Fit slide Zoom slide Zoom percentage

Status bar

The Status bar (Figure 136), located at the bottom of the Impress window, contains information that maybe useful when working on a presentation. Several of the fields are the same as those in other modules of LibreOffice. Some Impress specific fields are described briefly below.

For details on the contents and use of these fields, see Chapter 1, LibreOffice Basics, in this guide and the Impress Guide. To hide the Status bar, go to View on the Menu bar and deselect Status Bar.

Slide number

The slide number currently displayed in the Workspace and the total number of slides in the presentation.

Information area

Changes depending on the object selected on the slide. Examples shown in Table 8.

Table 8: Examples of information

Example selection	Examples of information shown
Text area	Text Edit: Paragraph x, Row y, Column z
Charts, spreadsheets	Embedded object (OLE) “ObjectName” selected

Master slide

The master slide associated with the slide or notes page displayed in the Workspace. Right-click to pop up a list of available master slides and select one to apply it to the selected slide. Double-click to open the Available Master Slides dialog. For more information on master slides, see “Working with master slides” on page 257 and the Impress Guide.

Cursor position/Object size

Shows different information depending on whether objects are selected or not as follows:

When no object is selected, the position numbers show the current position (X and Y coordinates) of the cursor.

When an object is selected and being resized, the object size numbers show the size of the object (width and height).

If an object is selected, the position numbers shows X and Y coordinates of the upper‑left corner and the object size number pair displays the size of the object. These numbers do not relate to the object itself, but to the selection outline, which is the smallest possible rectangle that can contain the visible parts of the object.

When an object is selected, clicking in either of these areas opens the Position and Size dialog.

Unsaved changes

Indicates if there are any unsaved changes in the presentation. Clicking on this icon saves the document. If the presentation has not been saved before, the Save As dialog opens giving the opportunity to save the presentation.

Digital signatures

Indicates if the presentation has a digital signature.

Text language

Indicates the language used for any text on a presentation.

Fit slide

When this icon is clicked on, the displayed slide in the Workspace zooms to fit in the Workspace.

Zoom slider

When moved, the slide displayed in the Workspace adjusts its viewing zoom in the Workspace.

Zoom percentage

Indicates the zoom level of the slide displayed in the Workspace. Clicking on zoom percentage opens the Zoom & View Layout dialog where the settings for zoom factor and view layout are adjusted.

Navigator

The Navigator displays all objects contained in a presentation providing a convenient way to move around a presentation find items in the presentation, and reorder objects on slides.

To open the Navigator dialog (Figure 137) go to View > Navigator on the Menu bar, or use the keyboard shortcut Ctrl+Shift+F5 (macOS ⌘+Shift+F5). Alternatively, click on Navigator in the Sidebar to open the Navigator deck that is similar in appearance and function as the Navigator dialog.

The Navigator is more useful if slides and objects (pictures, spreadsheets, and so on) are given meaningful names, instead of leaving them with default names, such as “Slide 1” and “Shape 1” and so on (as shown in Figure 137). Using meaningful names allows for a slide or object to be easily located in a presentation.

Figure 137: Navigator dialog

Toolbars

Toolbars are used when creating a presentation. To display or hide the various toolbars in Impress, go to View > Toolbars on the Menu bar and select the required toolbar in the submenu that opens. For example, the Standard and Drawing toolbars are displayed by default, but the Line and Filling, and Text Formatting toolbars are not shown. For more information on toolbars and how to use them, see Chapter 1, LibreOffice Basics, and the Impress Guide.

Note

The icons used on toolbars vary depending on the computer operating system and the selection of icon size and style in Tools > Options > LibreOffice > View (macOS LibreOffice > Preferences > LibreOffice > View).

Workspace views

The Impress workspace has four standard views selected using tabs: Normal, Outline, Notes, and Slide Sorter. These tabs are normally displayed the top of the Workspace. If the tabs are not displayed, then go to View > Views Tab Bar on the Menu bar. Also, different workspace views can be selected by going to View on the Menu bar and selecting a view in the submenu. Each of the workspace views is designed to ease the completion of certain tasks.

Master views only become available in the Workspace when Master Slide, Master Notes or Master Handout are selected. There are no tabs for master views and can only be selected by going to View on the Menu bar.

Note

Each workspace view displays a different set of toolbars when selected. To customize these toolbar sets, go to View > Toolbars on the Menu bar, then check or uncheck the toolbars to add or remove.

Normal view

Normal view is the main standard view for creating individual slides in a presentation. In Normal view slides are designed, text or graphics added and formatted, and any animation effects added to text or graphics.

To place a slide in Normal view of the Workspace, either click on the slide thumbnail in the Slide Pane or click on the slide name in the Navigator.

Outline view

Outline view (Figure 139) contains all the slides of the presentation in their numbered sequence. It shows topic titles, bulleted lists, and numbered lists for each slide in outline format. Only the text contained in the default text boxes in each slide is shown. If text boxes or graphic objects have been added to the slides, then these objects are not displayed. Slide names are not included.

Use Outline view for the following tasks:

Make changes in the text of a slide:

Add or delete text in a slide as in Normal view.

Move a paragraph in a slide up or down by using the movement arrows on the Outline toolbar (Figure 138).

Change the outline level of a paragraph in a slide using the left and right arrow buttons on the Outline toolbar.

Compare slides with in an outline. If it is noticed in an outline that another slide is required, create it directly in Outline view, or return to Normal view to create it.

Figure 138: Outline toolbar

Figure 139: Example Outline view in Workspace

Figure 140: Example Notes view in Workspace

Notes view

Use Notes view (Figure 140) to add notes to a slide. These notes are not seen when the presentation is shown to an audience using an external display connected to a computer. Click on the words Click to add Notes and begin typing.

The Click to add notes text box can be resized using the resizing handles which appear when the edge of the notes box is selected. Move or change the size of the box by clicking and dragging on the box border.

When text is inserted in the Click to add notes text box, it is automatically formatted using the predefined Notes style in Presentation Styles in the Styles deck on the Sidebar. The Notes style can be formatted to the presentation requirements. For more information on editing styles, see Chapter 4, Working with Styles, Templates and Hyperlinks in this guide and the Impress Guide.

Slide sorter view

Slide Sorter view (Figure 141) contains all the thumbnails of slides used in a presentation. Use this view to work with one slide or a group of slides.

Customizing Slide Sorter view

To change the number of slides per row in Slide Sorter view:

Go to View > Toolbars > Slide View on the Menu bar to show the Slide View toolbar (Figure 142).

Adjust the number of slides, up to a maximum of 15, in the Slides per Row box.

Figure 141: Example Slide Sorter view in Workspace

Figure 142: Slide View toolbar

Changing slide order

To change the slide order of one or a group of slides in a presentation using Slide Sorter view:

Select a slide or a group of slides.

Drag and drop the slide or group of slides at the location required.

Selecting a group of slides

To select a group of slides, use one of the following methods:

Ctrl key — click on the first slide and, while holding the Ctrl key (macOS ⌘), select the required slides. The selected slides do not have to be next to each other.

Shift key — click on the first slide, and while holding the Shift key, select the final slide for the group. This selects all of the slides between the first and the last slide selected.

Mouse — position the cursor slightly outside the first slide, then click and hold the left mouse button and drag the cursor until all of slides required for the group are selected.

Working in Slide Sorter view

Working with slides in Slide Sorter view is similar to working with slides in the Slide Pane. To make changes, right-click on a slide in Slide Sorter view and choose one of the following in the context menu:

Cut

Removes the selected slide and saves it to the clipboard.

Copy

Copies the selected slide to the clipboard without removing it.

Paste

Inserts a slide from the clipboard after the selected slide.

New Slide

Adds a new slide after the selected slide.

Duplicate Slide

Creates a duplicate of the selected slide and places the new slide immediately after the selected slide.

Rename Slide

Renames the selected slide.

Hide Slide

Hides selected slides. Slides that are hidden are not shown in the slide show.

Delete Slide

Deletes the selected slide.

Layout

Allows changes to the layout of the selected slide.

Move

Allows moving or repositioning the slide in the presentation order.

Creating presentations

By default, Impress opens with the Select a Template dialog displayed to select a template for a new presentation. To create a new presentation without a template, click on Cancel in the Select a Template dialog and a blank slide opens in the Workspace and Slides pane. For more information on creating presentations, slide show options, and presentation settings, see the Impress Guide.

Tip

The first thing to do is decide on the purpose of a presentation and plan accordingly. Having an idea of audience type, structure, content, and how the presentation will be delivered, saves a lot of time from the start.

New presentation

When creating a new presentation, Impress shows only one slide in the Slides pane and Workspace.

Inserting new slide

To insert a new slide into a presentation, use one of the following methods.

Go to Slide > New Slide on the Menu bar.

Right-click in the Slides pane and select New Slide in the context menu.

Use the keyboard shortcut Ctrl+M.

Go to Slide Sorter view in the Workspace, right-click on a slide and select New Slide in the context menu.

Figure 143: Presentation toolbar

Click on New Slide in the Presentation toolbar (Figure 143). If the Presentation toolbar is not visible, go to View > Toolbars on the Menu bar and select Presentation from the drop‑down list.

Note

A new slide is inserted after the selected slide in the presentation. If a slide is not selected, then the new slide is inserted as the last slide in the presentation.

Duplicating slides

To duplicate a slide, select a slide for duplication in the Slides pane and use one of the following methods. A duplicate slide is inserted after the selected slide in the presentation.

Right-click on a slide in the Slides pane and select Duplicate Slide in the context menu.

Go to Slide Sorter view in the Workspace, right-click on a slide and select Duplicate Slide in the context menu.

Go to Slide > Duplicate Slide on the Menu bar.

Click on the Duplicate Slide icon on the Presentation toolbar.

Slide format

Click on Properties on the Sidebar and open the Slide panel (Figure 144) to display the format options available for a presentation. The Slide panel allows for quick formatting of all slides included in a presentation and selecting master slides for a presentation. For more information on formatting slides and using master slides, see the Impress Guide.

The first slide in a presentation is normally a title slide. The layouts Title Slide, which also contains a section for a subtitle, or Title Only are the most suitable layouts for the first slide in a presentation. For the remaining slides, select the most suitable layout to use for the slide contents.

Impress does not have the functionality to create custom layouts. However, the different elements in a slide layout can be resized and moved. For more information, see the Impress Guide.

Selecting slide layout

The available layouts are shown in the Layouts panel on the Properties deck on the Sidebar. After selecting a slide, select the slide layout using one of the following methods:

Go to the Properties deck on the Sidebar to open the Layouts panel (Figure 144).

Click on Slide Layout on the Presentation toolbar to open a pop-up Layouts panel.

Click on Slide > Layout on the Menu bar to open a drop-down list showing the layouts by name.

Right‑click on the selected slide and select Layout in the context menu to open a drop‑down list of slide layouts.

Figure 144: Slide and Layouts panels in Properties deck on Sidebar

Tip

To view the names for slide layouts, use the tooltip feature. Position the cursor on an icon in the Layouts panel (or on any other tool icon) in the Properties deck on the Sidebar and its name is displayed in a small rectangle.

Changing slide layout

Change the slide layout for a slide in a presentation as follows:

Select a slide in the presentation.

Select a new layout for the slide using one of the methods described in “Selecting slide layout” above.

Slide contents

Several layouts can contain one or more content boxes. Each of these content boxes can be configured to contain the following elements. For more information on layout content boxes, see the Impress Guide.

Slide title

Click on Click to add Title and type a title in the text box. Impress enters text editing mode and the Text Formatting toolbar automatically opens.

Text

Click on Click to add Text and type the contents into the text box. Impress enters text editing mode and the Text Formatting toolbar automatically opens.

Table

Go to Insert > Table on the Menu bar and the Insert Table dialog opens. Enter the number of columns and rows, then click OK. The dialog closes and a table is inserted into the slide. Impress enters text editing mode and the Text Formatting and Table toolbars automatically open.

Chart

Go to Insert > Chart on the Menu bar and the Impress default chart is inserted in the slide. The Chart Type panel opens in the Properties deck on the Sidebar allowing editing of the chart.

Image

Go to Insert > Image on the Menu bar and a file browser opens. Navigate to where the required image is located. Select the file and click on Open. The image is placed into the slide and the file browser closes. The Image panel opens in the Properties deck on the Sidebar allowing editing of the image file.

Audio or video

Go to Insert > Audio or Video on the Menu bar and a file browser opens. Navigate to where the required audio or video file is located. Select the file and click on Open. The audio or video file is inserted into the slide and the file browser closes. The Media Playback toolbar opens allowing operation of the audio or video file.

Note

Text and graphic elements can be readjusted at any time during the preparation of a presentation. However, changing slide layout that already has contents can have a dramatic effect. If the layout is changed after contents have been added, the contents are not lost, but they may need to be reformatted.

Modifying slide elements

When a slide is inserted into a presentation, it contains elements that were included in the selected slide layout. However, it is unlikely that the predefined layouts suit all requirements for a presentation. Elements required maybe removed, or objects inserted such as text and/or graphics.

Although Impress does not have the functionality to create new layouts, it allows for the resizing and moving of the slide elements. It is also possible to add slide elements without being limited to the size and position of content boxes.

Note

It is recommended that changes to slide elements in the layouts included in Impress are only made using Normal view, which is the default. Attempting any changes to a slide element when in Master view is possible, but may produce unpredictable results. Using Master view requires extra care as well as a certain amount of trial and error.

Moving contents box

Click on the outer frame of the contents box so that the selection handles are displayed.

Place the cursor on the frame so that it changes shape. This is normally a clenched hand, but depends on the computer setup.

Click and drag the contents box to its new position on the slide and release.

Resizing contents box

Click on the outer frame of the contents box so that the selection handles are displayed.

Place the cursor on the frame so that it changes shape.

Click and drag the selection handle on the frame to resize the contents box and release.

Top and bottom selection handles change the height of a contents box.

Left and right selection handles change the width of a contents box.

Corner selection handles change width and height of a contents box.

Removing elements

Select a contents box, or an element to highlight it and the selection handles are displayed.

Press the Delete or Backspace key to remove the contents box or element.

Adding text

There are two ways of adding text to a slide — contents box or text box. For more information, see “Adding and formatting text” on page 242 and the Impress Guide.

Contents box

Click on Click to add Text in the contents box and type the text. Outline styles are automatically applied to the text as it is inserted. If required, change the outline level of each paragraph as well as its position within the contents box by using the arrow buttons on the Outline toolbar and Workspace Outline view.

Text box

Click on Insert Text Box on the Standard toolbar or Drawing toolbar to select text mode, then click on the slide. A text box is created and the Text Formatting toolbar automatically opens. Type the text and click outside the text box to end text mode.

Adding images or objects

To add images or objects to a slide, for example a picture, clip art, drawing, photograph, or spreadsheet, click on Insert on the Menu bar and select in the drop-down menu the image or object type required. See “Inserting images, tables, charts, or media” on page 252 and the Impress Guide.

Modifying slide appearance

To change the background and other characteristics of all slides in the presentation, the master slide has to be modified or a different master slide selected, as explained in “Working with master slides” on page 257.

A master slide has a specified set of characteristics that acts as a template and is used as the starting point for creating other slides. These characteristics include slide background, objects in the background, formatting of any text used, and any background graphics.

Impress has a range of master slides, which are found in the Master Slides deck on the Sidebar. Additional master slides can be created or and saved, or added from other sources. See the Impress Guide for more information.

Figure 145: Slide Properties dialog — Background page

For example, to change the background of an individual slide or a master slide:

Right click on a slide, or master slide, and select Slide Properties from the context menu to open the Slide Properties dialog (Figure 145).

Select the Background tab and then select the type of background to use from None, Color, Gradient, Image, Pattern and Hatch.

Make a selection from the various properties that are available for each type of background.

Click OK to save the change and close the dialog.

For more information on inserting, formatting, and changing a background, see the Impress Guide, or Draw Guide.

Modifying presentations

By default, a presentation displays all the slides in the same order as they appear in Slide Sorter view on the Workspace. Run the presentation at least once, then answer the following questions:

Are the slides in the correct order? If not, some of the slides have to be moved.

Is the information well spaced and visible to members of an audience at the back of a large room? The audience may not be able to see information at the bottom of a slide, so redesign the presentation to fit the top three-quarters of a screen.

Would an additional slide make a particular point clearer? If so, create another slide.

Are some of the slides unnecessary? Hide or delete the slides not required.

Would animations help some of the slides? This is an advanced technique, but remember that too many animations may not create a good presentation.

Is the slide transition the same for all sides? Varying transitions can improve a presentation.

Once the questions have been answered, make the necessary changes. Making changes can be carried out in Slide Sorter view on the Workspace. For more information on running a presentation, see the Impress Guide.

Adding and formatting text

Most of the slides in a presentation are likely to contain some text. This section gives some guidelines on how to add text and change its appearance. Text used in slides is contained in text boxes. For more information on adding and formatting text, see the Impress Guide.

Two types of text boxes (AutoLayout text box and text box) are available in Impress for use on slides. Both types of text boxes can be moved, resized, and deleted.

Choose a predefined layout from the Layouts panel on the Properties deck on the Sidebar and do not select any special content type. These text boxes are called AutoLayout text boxes.

Use Insert Text Box for horizontal text, or Insert Vertical Text for vertical text on the Standard toolbar, Drawing toolbar, or Text toolbar (Figure 146) to create text boxes on a slide.

Use the keyboard shortcut F2 to create text boxes on a slide for horizontal text.

When adding and formatting text, the Text Formatting toolbar (Figure 147) normally opens, automatically providing a range of tools to add and format text.

Note

If the toolbars are not visible, go to View > Toolbars on the Menu bar and select the required toolbars in the drop-down list.

Figure 146: Text toolbar

Figure 147: Text Formatting toolbar

Note

The area fill and borders in AutoLayout text boxes and text boxes can be edited using the same methods that are used for graphic objects. For more information, see the Impress Guide.

AutoLayout text boxes

AutoLayout text boxes are automatically created when one of the slide layouts available in Impress is selected.

Make sure Normal view is selected in the Workspace.

Select the slide where text is to be added into an AutoLayout text box.

Click on Click to add Title or Click to add text in an AutoLayout text box. The text automatically disappears and is replaced by a flashing text cursor. The Text Formatting toolbar automatically opens replacing the Line and Filling toolbar.

Type or paste text into the AutoLayout text box and, if necessary, format the text to the presentation requirements.

Click outside the AutoLayout text box to deselect it.

Text boxes

Make sure Normal view is selected in the Workspace.

Select the slide where the text is to be added.

For horizontal text: click on the selected slide and create a text box using one of the following methods:

Single line text box — select Insert Text Box, click on the slide and then type or paste the text. The width of the text box increases as text is added creating a single line of horizontal text.

Single line text box — use the keyboard shortcut F2, click on the slide and then type or paste the text. The width of the text box increases as text is added creating a single line of horizontal text.

Multiple line text box — select Insert Text Box, or use the keyboard shortcut F2, click on the slide and drag to the approximate width required for the text box, then type or paste the text into the text box. The width of the text box is fixed and the height of the text box increases automatically as text is added creating multiple lines of horizontal text.

Multiple line text box from a single line text box — use the Enter key to create a new paragraph, or the keyboard combination Shift+Enter to create a line break in the text.

Figure 148: Example of a text box in edit mode

Select the text box to switch on edit mode. This is indicated by a colored border as shown in by the example in Figure 148. The width and final position of the text box can be adjusted after adding text into the text box.

Click outside the text box to deselect it.

Vertical text

In addition to normal text boxes, where text is horizontally aligned, it is possible to insert text boxes where the text is vertically aligned. Vertical text is available only when Asian languages are selected in Tools > Options > Language Settings > Languages (macOS LibreOffice > Preferences > Language Settings > Languages).

Creating vertical text boxes is similar to creating horizontal text boxes. Use the Insert Vertical Text tool on the Standard, Drawing, or Text toolbars to create a vertical text box with single or multiple lines of text. See “Text boxes” on page 243 on how to create a text box for single or multiple lines of text.

Quick font resizing

To quickly increase or decrease the font size of selected text by using the tools Increase Font Size (Ctrl+]) (macOS ⌘+]) and Decrease Font Size (Ctrl+[) (macOS ⌘+[) on the Text Formatting toolbar. The amount by which the font size changes depends on the standard sizes available for the font in use.

Note

AutoLayout text boxes automatically adjust font size of any text inserted into the box. For example, if a long piece of text is inserted into an AutoLayout text box, the font size may decrease in size to fit into the box.

Pasting text

Text can be added to an AutoLayout, or normal text box, by copying it from another document and pasting it into Impress. The formatting of pasted text will probably not match the formatting of the surrounding text, or that of the other slides in the presentation. This maybe what is required on some occasions. However, to make sure that the presentation style is consistent and does not become a patchwork of different styles, font types, bullet points, and so on, the text has to be formatted to match the rest of the presentation.

Unformatted text

It is good practice to paste text without formatting and apply the formatting later.

Highlight and copy the text from another document or slide.

Create a text box on a slide and make sure the text cursor is flashing in the text box. Alternatively, select an AutoLayout text box on a slide. See “Text boxes” on page 243 and see “AutoLayout text boxes” on page 243 and the Impress Guide for more information.

Paste unformatted text into the text box using one of the following methods. Text is pasted at the cursor position in the text box formatted using the Default Drawing Style, or Presentation Style if text was pasted into an AutoLayout text box.

Go to Edit > Paste Special > Paste Unformatted Text on the Menu bar.

Click on the triangle ▼to the right of the Paste tool on the Standard toolbar and select Unformatted Text in the context menu.

Use the keyboard shortcut Ctrl+Shift+V (macOS ⌘+Shift+V) and select Unformatted text on the dialog that opens.

Format the text to the presentation requirements using the tools on the Text Formatting toolbar, or the options in Format on the Menu bar.

Note

The Presentation style used in AutoLayout text boxes cannot be changed by selecting another presentation style. Make sure the AutoLayout text box uses the presentation style required. Change outline levels and outline styles using the Tab key or Shift+Tab key combination. See the Impress Guide for more information.

AutoLayout text box formatting of pasted text

If text is being pasted into an AutoLayout text box, the appropriate outline style has to be applied to the text giving it the same look and feel as the rest of the presentation.

Highlight and copy the text from another document or slide.

Paste the text into the AutoLayout text box, then select the pasted text.

Select Format > Clear Direct Formatting on the Menu bar, or use the keyboard shortcut Ctrl+Shift+M (macOS ⌘+Shift+M) to make sure any formatting is removed from the pasted text.

Use the four arrow buttons on the Outline toolbar to move the text to the appropriate position and give it the appropriate outline level.

Left arrow promotes a list entry by one level (for example from Outline 3 to Outline 2). Alternatively, place the cursor at the beginning of the paragraph and use the Shift+Tab keys.

Right arrow demotes a list entry by one level. Alternatively, place the cursor at the beginning of the paragraph and use the Tab key.

Up arrow moves a list entry up in the list order.

Down arrow moves a list entry down in the list order.

If necessary, modify the presentation style to format the text to the presentation requirements to change font attributes, tabs, and so on. See the Impress Guide for more information. Alternatively, apply any necessary manual or direct formatting to the text.

Text box formatting of pasted text

Pasting formatted text into a text box overwrites any formatting and replaces the text box style.

Highlight and copy the text from another document or slide.

If necessary, create a text box on a slide and make sure the text cursor is flashing in the text box. See “Text boxes” on page 243 and the Impress Guide for more information.

Paste formatted text into the text box. Text is pasted at the cursor position in the text box and the text formatting of the pasted text overwrites any style formatting of the text box.

Select Format > Clear Direct Formatting on the Menu bar or use the keyboard shortcut Ctrl+Shift+M (macOS ⌘+Shift+M) to make sure any formatting is removed from the pasted text.

Select the required drawing style to format the text from the available drawing styles.

If necessary, modify a drawing style or create a new drawing style to format the text to the presentation requirements. See the Impress Guide for more information.

Note

Drawing styles can be created in Impress and are only available for the presentation which is being created and has been saved. Templates can also be created that include any drawing styles required. For more information, see the Impress Guide.

Creating lists

The procedure to create an unordered (bulleted) or ordered (numbered) list varies depending on the type of text box used. The tools to manage and format a list are the same. To change the appearance of a list, see “Changing list type” on page 249.

AutoLayout text boxes

In AutoLayout text boxes and by default, the outline styles available are unordered lists. An example of these outline styles is shown in Figure 149. These outline styles are presentation styles and cannot be deleted, but can be modified or updated to the presentation requirements. See the Impress Guide for more information.

Create a slide using an AutoLayout text box with an unordered list as follows:

Go to View > Normal on the Menu bar to open Normal view.

Select a layout for the slide using one of the following methods:

Right-click in a blank area on the slide and select a layout in the context menu.

Go to Slide > Layout on the Menu bar and select a layout in the drop-down list.

Select a layout in the Layouts panel on the Properties deck in the Sidebar.

Click on the text ● Click to add Text and start typing the first list item.

Press Enter to start a new list point or use the keyboard combination Shift+Enter to start a new line without creating a new list point. The new line will have the same indentation as the list point.

Figure 149: Example of outline levels in AutoLayout text box

Tip

To switch off bullets altogether, click on Toggle Unordered List on the Text Formatting toolbar.

Changing outline level

In AutoLayout text boxes, change the outline level as follows:

To demote the outline level of a list point, use one of the following methods:

Press the Tab key.

Click on Demote to demote outline level of selected paragraphs on the Outline toolbar, or the Lists panel on the Properties deck in the Sidebar.

Go to Format > Lists on the Menu bar and select Demote in the submenu.

Use the keyboard shortcut Alt+Shift+Right Arrow (macOS ⌥+Shift+Right Arrow)

To promote the outline level of a list point, use one of the following methods:

Use the keyboard shortcut Shift+Tab.

Click on Promote to promote outline level of selected paragraphs on the Outline toolbar, or the Lists panel on the Properties deck in the Sidebar.

Go to Format > Lists on the Menu bar and select Promote in the submenu.

Use the keyboard shortcut Alt+Shift+Left Arrow (macOS ⌥+Shift+Left Arrow)

To move a list point lower in the list order without changing the outline level, use one of the following methods:

Click on Move Down to move selected paragraphs down one paragraph on the Outline toolbar, or the Lists panel on the Properties deck in the Sidebar.

Go to Format > Lists on the Menu bar and select Move Down in the submenu.

Use the keyboard shortcut Alt+Shift+Down Arrow (macOS ⌥+Shift+Down Arrow).

To move a list point higher in the list order without changing the outline level, use one of the following methods:

Click on Move Up to move selected paragraphs up one paragraph on the Outline toolbar, or the Lists panel on the Properties deck in the Sidebar.

Go to Format > Lists on the Menu bar and select Move Up in the submenu.

Use the keyboard shortcut Alt+Shift+Up Arrow (macOS ⌥+Shift+Up Arrow).

Note

In AutoLayout text boxes, promoting or demoting an item in the list corresponds to applying a different outline style. The second outline level corresponds to Outline 2 style, the third outline level to Outline 3 style, and so on. A change in level and style produces other changes, for example, to font size, bullet type, and so on.

Text boxes

Create an unordered or ordered list in a text box as follows:

Create a text box on a slide and make sure the cursor is flashing in the text box. See “Text boxes” on page 243 on how to create a text box.

Create a list using one of the following methods:

Click on Toggle Unordered List or Toggle Ordered List on the Text Formatting toolbar.

Click on Toggle Unordered List or Toggle Ordered List in the Lists panel on the Properties deck in the Sidebar.

Go to Format > Lists on the Menu bar and select Unordered List or Ordered List in the submenu.

Type the text and press Enter to start a new list point or use the keyboard combination Shift+Enter to start a new line without creating a new list point. The new line will have the same indentation as the list point.

To increase or decrease the indent level of a list point, or move a list point up or down, see “Changing outline level” on page 247.

Changing list type

The list type can be changed for an unordered or ordered type for the entire list or for a single point only as follows:

Select a point in a list, or select the entire list in the text box. Alternatively, click on the border of the text box so that the resizing handles are displayed to select the entire list.

Change the list type from unordered to ordered list, or ordered to unordered as described in “Text boxes” above.

If required, change the type of bullet or number used for the list:

Click on the triangle ▼ to the right of the Toggle Unordered List, or Toggle Ordered List, on the Text Formatting toolbar, or the Lists panel on the Properties deck in the Sidebar.

Select a bullet or number type from the options available in the drop-down window as shown in Figure 150, or Figure 151.

Figure 150: Available bullet list types

Figure 151: Available numbering list types

If necessary, click on More Bullets, or More Numbering, in the drop-down window to open the Bullets and Numbering dialog for further options to change the list appearance. See the Impress Guide for more information.

Changing bullet or number format

The bullet, or number format used in a list can be changed for the entire list, or for a single point only as follows:

Select a point in a list, or select the entire list in the text box. Alternatively, click on the border of the text box so that the resizing handles are displayed to select the entire list.

Click on the triangle ▼ to the right of the Toggle Unordered List, or Toggle Ordered List, on the Text Formatting toolbar, or the Lists panel on the Properties deck in the Sidebar to open a drop-down dialog displaying the format options available.

Select a bullet or number type from the options available in the drop-down window as shown in Figure 150, or Figure 151.

If necessary, click on More Bullets, or More Numbering, in the drop-down window to open the Bullets and Numbering dialog for further options to change the list appearance. See the Impress Guide for more information.

Note

The Bullets and Numbering dialog can also be opened by going to Format > Bullets and Numbering on the Menu bar, or by right-clicking on a list point and selecting Bullets and Numbering from the context menu.

Note

If a list was created in an AutoLayout text box, then the Outline styles can be modified to change the list type and/or format. Changes made to an Outline style apply to all the slides that use that style. See the Impress Guide for more information.

Text columns

The type of columns used in Impress are continuous flow columns. This means that when text reaches the bottom of a column, it automatically flows into the next column as text is added. This type of columns is also known as newspaper columns.

Note

Text in a presentation can be formatted into columns inside text boxes and objects. However, columns cannot be used on separate parts of text inside a text box or object. The whole of the text box or object has to be used for columns.

Columns in text boxes and graphic objects are created as follows:

For text boxes — click the border of a text box to select it so that the selection handles are displayed indicating that the text box is in edit mode.

For graphic objects — double-click on a graphic object to select it so that the selection handles are displayed and the cursor flashes in the center of the object indicating that the object is in text edit mode.

Open the options for text columns using one of the following methods:

Right-click in the text box or graphic object and select Text Attributes in the context menu to open the Text dialog, then click on the Text Columns tab to open the Text Columns page (Figure 152),

Click on Columns in Properties on the Sidebar to open the Columns panel (Figure 153).

Set the number of columns required in the Number of columns box and the required spacing between the columns in the Spacing box.

Figure 152: Text dialog — Text Columns page

Figure 153: Columns panel in Properties deck on Sidebar

Save the changes and deselect the text box, or graphic object, using one of the following methods:

For the Text dialog, click OK to save the changes and close the dialog, then click outside the text box, or graphic object, to deselect it.

For the Columns panel in the Properties deck on the Sidebar, click outside the text box, or graphic object, to deselect it and save the changes.

Type in the required text or use copy and paste to enter the required text into the text box, or graphic object. Any text entered will be in column format.

If necessary, format the text to the presentation requirements.

Click outside the text box, or graphic object, to deselect it and save the changes.

Note

Any text inside a text box, or graphic object, automatically flows into column format when the changes are saved.

Inserting images, tables, charts, or media

A contents box on a slide can contain images, tables, charts, or media as well as text. The Insert toolbar (Figure 154) provides quick access to relevant tools. This section provides an overview of how to work with these objects. For more information, see the Impress Guide.

Inserting images

Open the slide in Normal view on the Workspace where the image is going to be inserted.

Open the Insert Image file browser using one of the following methods:

Go to Insert > Image on the Menu bar.

Click on Insert Image on the Insert toolbar (Figure 154).

Click on Insert Image on the Standard toolbar.

Navigate to the location of the file and select the image file required.

Click Open to place the image in the center of the slide.

Reposition and resize the image to the presentation requirements.

Inserting tables

When a table is inserted into a slide, the Table toolbar (Figure 155) automatically opens. The Table toolbar in Impress offers the same functions as the Table toolbar in Writer, with the exception of the calculation functions Sort and Sum. To use Sum and Sort in a presentation, a Calc spreadsheet has to be inserted into the slide.

Figure 154: Insert toolbar

Figure 155: Table toolbar

Figure 156: Insert Table dialog

Note

If the Table toolbar does not automatically open, go to View > Toolbars on the Menu bar and select the Table toolbar.

Entering data into table cells is similar to working with text box objects. Click in a cell and begin typing. To move around cells quickly, use the following keyboard options:

Use the arrow keys to move the cursor to another cell if the cell is empty, or to the next character if the cell already contains text.

Press the Tab key to move to the next cell on the right, or press Shift+Tab to move to the next cell on the left.

Using the Menu bar

Open the slide in Normal view on the Workspace and go to Insert > Table on the Menu bar to open the Insert Table dialog (Figure 156).

Select the Number of columns and the Number of rows required for the table.

Click OK to place the table in the center of the slide and close the Insert Table dialog.

The Table Design panel on the Properties deck on the Sidebar opens (Figure 157). Select a table design, the type of rows, and the type of columns required.

If necessary, reposition and format the table on the slide to the presentation requirements.

Using Insert or Standard toolbar

Open the slide in Normal view on the Workspace and click on Table on the Insert toolbar or the Standard toolbar to open the Insert Table Grid (Figure 158).

Figure 157: Table Design panel in Properties deck on Sidebar

Figure 158: Insert Table Grid

Click and drag the cursor to create the number of columns and rows required, then click to place the table in the center of the slide and the Insert Table Grid closes.

The Table Design panel on the Properties deck in the Sidebar opens (Figure 157). Select a table design, the type of rows, and the type of columns from the options available.

If necessary, reposition and format the table on the slide to the presentation requirements.

Note

Select More Options at the bottom of the Insert Table grid (Figure 158) to open the Insert Table dialog (Figure 156) where the number of rows and columns required can be selected.

Inserting charts

To insert a chart into a selected slide in Normal view on the Workspace, use one of the following methods:

Go to Insert > Chart on the Menu bar.

Click on Insert Chart on the Insert toolbar.

When Impress switches to chart view, the Formatting toolbar (Figure 159) automatically opens, and the Chart Type panel on the Properties deck on the Sidebar opens (Figure 160). To change the chart type, insert the required data, and change the formatting, see the Impress Guide and the Calc Guide.

Figure 159: Formatting toolbar

Figure 160: Chart Type panel in Properties deck on Sidebar

Figure 161: Gallery deck in Sidebar

Inserting audio or video

Using a file browser

Go to Insert > Audio or Video on the Menu bar, or click on Insert Audio or Video on the Insert toolbar and the Insert Audio or Video file browser opens.

Navigate to the folder where the file is located and select the audio or video file you want to insert onto a slide. Only the audio and video files that are compatible with Impress will be highlighted in the file browser.

Click Open to place the audio or video file in the center of the slide. The Media Playback toolbar opens while the audio or video file is selected.

Reposition and/or resize the audio or video file. See the Impress Guide for more information.

Using the Gallery

If the Gallery deck (Figure 161) is not already open, use one of the following methods:

Go to View > Sidebar on the Menu bar to open the Sidebar, then select Gallery.

Go to View > Gallery on the Menu bar.

Browse to a category containing media files, for example Sounds.

Click on the audio or video file required and drag it onto the slide. The Media Playback toolbar automatically opens.

Reposition and/or resize the audio or video file. See the Impress Guide for more information.

Inserting graphics, spreadsheets, and OLE objects

Graphics

Graphics, such as shapes, callouts, and arrows, are often useful to complement the text on a slide. These objects are handled much the same way as graphics in Draw. For more information on inserting graphics, see Chapter 7, Getting Started with Draw in this guide, the Impress Guide, or the Draw Guide.

Spreadsheets

Spreadsheets embedded in Impress include most of the functionality of Calc spreadsheets and are capable of performing complex calculations and data analysis. If the data has to be analyzed or formulas applied, then these operations are best performed in a Calc spreadsheet and the results displayed in an embedded Calc spreadsheet or in an Impress table. For more information on spreadsheets, see the Impress Guide and the Calc Guide.

OLE objects

Object Linking and Embedding (OLE) is a software technology that allows linking and embedding of spreadsheets, charts, drawings, formulas, and text files into an Impress presentation.

The major benefit of using OLE objects is that it provides a quick and easy method of editing the object using tools from the software used to create the object. These file types can all be created using LibreOffice and OLE objects can be created from new or from an existing file.

When inserting a new OLE object into a presentation, it is only available in that presentation and can only be edited using Impress. For more information on inserting and formatting OLE objects, see the Impress Guide.

Working with master slides

A master slide is a slide that is used as the starting point for other slides. It is similar to a page style in LibreOffice Writer as it controls the basic formatting of all slides based on it. A presentation can have more than one master slide.

A master slide has a defined set of characteristics, including the background color, graphics, or gradients. It also can include objects (for example, logos, decorative lines) in the background; headers and footers; placement and size of text frames; and text formatting.

Styles

All of the characteristics of master slides are controlled by styles. The styles of any new slide created are inherited from the master slide from which it was created. In other words, the styles of the master slide are available and applied to all slides created from that master slide. Changing a style in a master slide results in changes to all the slides based on that master slide. It is possible to modify each individual slide without affecting the master slide.

Master slides have two types of styles — presentation styles and drawing styles. The presentation styles included with Impress can be modified, but new presentation styles cannot be created or deleted. The drawing styles included with Impress can be modified, but cannot be deleted. However, new drawing styles can be created and these drawing styles can be deleted.

Note

It is highly recommended to use the master slides whenever possible. However, there are occasions where manual changes are needed for a particular slide, for example editing an individual slide to enlarge the chart area when the text and chart layout is used.

Master slides

Impress comes with a collection of master slides, which are are shown on the Master Slides deck of the Sidebar (Figure 162).

This deck has three panels: Used in This Presentation, Recently Used, and Available for Use. Click the expand marker on the title bar of a panel to expand it and show thumbnails of the master slides, or click the collapse marker to collapse the panel to hide the thumbnails.

Each of the master slides shown in the Available for Use panel are from templates that are available in LibreOffice Impress:

Presentation templates included when LibreOffice is installed on a computer.

Templates have been created, or added from other sources.

If a new presentation is created without using one of the templates available, then a default master slide is available. This default master slide is a good starting point for creating master slides. An example of the default master slide is shown in Figure 163.

Figure 162: Master Slides deck on Sidebar

Figure 163: Default Master Slide

Figure 164: Master View toolbar

Creating master slides

Go to View > Master Slide on the Menu bar to open Master view in the Workspace. The Master View toolbar also opens (Figure 164). If the Master View toolbar does not open, go to View > Toolbars on the Menu bar and select Master View.

Create a new master slide using one of the following methods and the new master slide appears in the Slides pane:

Click on New Master in the Master View toolbar.

Right-click on a master slide in the Slides pane and select New Master in the context menu.

Go to Slide > New Master on the Menu bar.

Rename the new master slide using one of the following methods to open the Rename Master Slide dialog:

Click on Rename Master on the Master View toolbar.

Right-click on the new master slide in the Slides Pane and select Rename Master in the context menu.

Enter a memorable name for the new master slide in the Name text box, then click OK to save the changes and close the dialog.

Make sure the new master slide is selected in the Slides pane and add all the text, graphics and master elements that are required. For more information on adding, editing, formatting and managing the different types of objects on a master slide, see the Impress Guide.

When the new master slide has been created, use one of the following methods to return to Normal view:

Click Close Master View on the Master View toolbar.

Go to View > Normal on the Menu bar.

Save the presentation file before continuing.

Applying master slides

To apply a master slide to all slides or selected slides in a presentation:

Click on Master Slides on the right of the Sidebar to open the Master Slides deck (Figure 162 on page 258).

Right-click on the required master slide in the Used in This Presentation panel.

Select Apply to All Slides, or Apply to Selected Slides in the context menu.

Figure 165: Available Master Slides dialog

Loading additional master slides

In a presentation, it maybe necessary to mix multiple master slides that belong to different templates (for more information on templates, see the Impress Guide). For example, a completely different layout for the first slide of the presentation maybe required, or a slide from a different presentation maybe added to the current presentation.

Select the slide or slides on the Slides pane where the master slide is to be changed.

Go to Slide > Change Slide Master on the Menu bar to open the Available Master Slides dialog (Figure 165).

To add master slides, click on Load to open the Load Master Slide dialog (Figure 166).

In the Load Master Slide dialog, select the template category and the template to load as the master slide

Click OK to close the Load Master Slide dialog and the master slides from the selected template appear in the Available Master Slides dialog.

In the Available Master Slides dialog, select the master slide required in the Select a Slide Design box.

To apply the selected master slide to all slides in the presentation, select the Exchange background page check box. To apply the slide design to the selected slides only, deselect the Exchange background page check box.

Click OK to apply the selection to the slides and close the dialog.

Figure 166: Load Master Slide dialog

Note

The master slides in the template selected are now shown in the Available for use panel on the Master Slides deck on the Sidebar.

Modifying master slides

The following items can be changed on a master slide. For more information, see the Impress Guide:

Background (color, gradient, hatching, or bitmap).

Background objects (for example, adding a logo or decorative graphics).

Text attributes for the main text area and notes.

Size, placement, and contents of header and footer elements to appear on every slide.

Size and placement of default frames for slide titles and content.

To modify a master slide as follows:

Select View > Master Slide on the Menu bar. This also opens the Master View toolbar.

Select a master slide for editing in the Slides pane so that it appears in the Workspace.

Go to Slide > Slide Properties on the Menu bar or right-click in the Workspace and select Slide Properties in the context menu to open the Slide Properties dialog (Figure 167).

Figure 167: Slide Properties dialog

Use the various options in the Slide, Background, and Transparency pages in the Slide Properties dialog to make changes to the format of the master slide.

Click OK to save the changes and close the Slide Properties dialog.

Select an object on the master slide, then right-click on the object to open a context menu.

Select one of the options in the context menu to edit the object. Selecting an option may open another context menu, a dialog, an application or file browser window to make the necessary changes to the selected object.

Click Close Master View on the Master View toolbar or go to View > Normal on the Menu bar to exit from editing master slides.

Save the presentation file before continuing.

Notes

Any changes made to one slide when in Master Slide mode appears on all slides using this master slide. Always make sure to close Master Slide and return to Normal view before working on any of the presentation slides.

The changes made to an element on a slide in Normal view is not overridden by subsequent changes to the master slide. However, sometimes it is desirable to change a manually modified element of a slide to the style defined in the master slide. To change to default formatting, select the element and select Format > Clear Direct Formatting on the Menu bar.

Adding text, footers, and fields to master slides

Text, footers, or fields can be added to a master slide so these elements appear on every slide in a presentation. Headers are not normally added to slides.

Text

Go to View > Master Slide on the Menu bar to open Master View.

Insert a text box on the master slide, see “Text boxes” on page 243 for more information.

Type or paste the text into the text box.

Click outside the text box when finished adding text.

Go to View > Normal on the Menu bar or click Close Master View on the Master View toolbar when finished.

Default footers

By default, a slide footer consists of three sections, each containing a default field:

Left section — date and time, labeled Date Area. Field name is <date/time>.

Center section — footer text, labeled Footer Area. Field name is <footer>. This section could be the presentation title, file name, or other information.

Right section — slide number, labeled Slide Number Area. Field name is <number>.

The default footer fields are set up as follows using the Header and Footer dialog (Figure 168):

Go to View > Master Slide on the Menu bar to open Master View.

Go to Insert > Header and Footer on the Menu bar to open the Header and Footer dialog.

Click on the Slides tab to open the options available for inserting footers onto a slide.

Select Date and Time for the date and time to appear in the left section of the footer.

For a fixed date and time, select Fixed and enter the date required in the Fixed text box.

Figure 168: Header and Footer dialog — Slides page

For a variable date and time, select Variable, then select the format and language in the Format and Language drop-down lists. Using a variable date and time means that each time the presentation is opened, the date and time are updated.

To place text in the footer center section, select Footer and then type or paste the text into the Footer text input field.

To place the slide number in the right section of the footer, select Slide number.

If the footer is not going to appear on the first slide of a presentation, select Do not show on the first slide. The first slide is normally the title slide of a presentation.

Click Apply to save the changes and close the Header and Footer dialog.

To format the text used for the default footer fields, see the Impress Guide.

Click Close Master View on the Master View toolbar, or go to View > Normal on the Menu bar when setting up the default footer fields is completed.

Note

The default sections in a footer can be formatted, resized, and repositioned. See “Adding and formatting text” on page 242 for more information.

Custom footers

The default fields in a footer section can be replaced with text, or manual fields as follows:

Go to View > Master Slide on the Menu bar to open the master slide view.

Highlight the default field in the footer section and press the Delete or Backspace key. A flashing text cursor will appear in the footer section and the Text Formatting toolbar automatically opens replacing the Line and Filling toolbar.

Type in the required text or insert a manual field into the footer section. For more information, see “Manual fields” on page 265.

Format the text or manual field placed in the footer section. See “Adding and formatting text” on page 242 and the Impress Guide for more information.

Click outside the footer section to close the Text Formatting toolbar and reopen the Line and Filling toolbar.

Click Close Master View on the Master View toolbar or go to View > Normal on the Menu bar when setting up a custom footer section is completed.

Manual fields

Manual fields can be added as text objects on a master slide or replace one of the default footer fields and are as follows:

Date (fixed)

Date (variable) — updates automatically each time the presentation is opened.

Time (fixed)

Time (variable) — updates automatically each time the presentation is opened and each time a slide is opened more than once during a presentation.

Author — first and last names listed in the LibreOffice user data.

Slide number — the sequence number of the slide, without the word “Slide”.

Slide Title — defaults to Slide 1, Slide 2, and so on if the slides have not been renamed.

Slide Count — the number of slides in the presentation.

File Name

Figure 169: Adding a comment

Adding comments

Impress supports comments similar to those in Writer and Calc. For more about adding, navigating, and replying to comments, see Chapter 2, Getting Started with Writer.

Before using comments, make sure that the user name and initials are entered into Tools > Options > LibreOffice > User Data (macOS LibreOffice > Preferences > LibreOffice > User Data). The name and initials then appear in the comment marker and in the Author field of the comment. If more than one person edits the document, each person is automatically allocated a different background color.

In Normal View, go to Insert > Comment on the Menu bar or use the keyboard shortcut Ctrl+Alt+C to open a blank comment (Figure 169).

Move the small comment markers to the required position on the slide. Normally, this is on or near the text or object being referred to in the comment.

To show or hide the comment markers, choose View > Comments on the Menu bar.

Select Tools > Options > LibreOffice > User Data to configure the name and initials that appear in comments.

Note

A small box containing the user initials appears in the upper left-hand corner of the slide, with a larger text box beside it. Impress automatically adds the user name and current date at the bottom of the text box.

Printing handouts

Handouts are used for distributing copies of presentation slides to each member of the audience. Handouts are only available in View > Handout on the Menu bar and are printed using the printing options in Impress.

The printing of handouts depends on the printer, computer operating system, and how a computer is set up. The following is only an example of how to print handouts.

Figure 170: Example of Master Handout layout

Go to View > Master Handout on the Menu bar to open the Master Handout layout in the Workspace. An example Master Handout is shown in Figure 170.

Go to Insert > Header and Footer on the Menu bar to open the Header and Footer dialog (Figure 171).

Click on Notes and Handouts tab and select the required header and footer options as follows:

Select Header then enter text in the Header text: text box.

Select Date and time then select either Fixed or Variable for the date and time.

If a fixed date and time was selected, enter the date and/or time in the text box.

If a variable date and time was selected, select the Format for the date and time in the drop-down list.

If a variable date and time was selected, select the Language to set the options for the date and time format in the drop-down list.

Select Footer then enter text in the Footer text: text box.

Select Page Number if the handout pages are to be numbered.

Click on Apply to All to save the options for the handouts and close the Header and Footer dialog.

Figure 171: Header and Footer dialog — Notes and Handouts page

Figure 172: Example Print dialog — LibreOffice Impress page

Go to File > Print on the Menu bar or use the keyboard shortcut Ctrl+P (macOS ⌘+P) to open the Print dialog and click on the LibreOffice Impress tab to open the page for printing options of handouts. An example Print dialog for LibreOffice Impress is shown in Figure 172.

In Document, select the required options in the drop-down lists as follows:

Type: – select Handouts in the drop-down list.

Slides per page: – select how many slides are printed on a sheet of paper.

Order: – select the order in which the slides are printed on a sheet of paper.

In Contents, select Slide name, Date and time, and/or Hidden pages if these items are to be printed.

In Color, select how the handouts are printed.

In Size, select the size for how the handouts are printed.

Click on Print to print the handouts and close the Print dialog.

Creating a photo album

Impress can create a photo album from a set of photographs and images. The photo album can be a multimedia show with vacation pictures and/or graphics and images as a presentation file.

Create a new presentation or open an existing presentation.

Select the slide that is going to precede the photo album. In a new presentation, this will be the first slide.

Go to Insert > Media > Photo Album on the Menu bar to open the Create Photo Album dialog (Figure 173).

Click on Add to open a file browser and navigate to the folder where the images are located.

Select the images required and click Open. This closes the file browser and the selected files appear in the Create Photo Album dialog.

Select the number of images per slide in the Slide layout: drop-down list.

If required, select Add caption to each slide. This inserts a text box on each slide allowing captions to be added to the images.

If required and there is only one image per slide, select Fill Screen for each image to fill the entire slide.

Create the required sequence of photos or pictures by moving image files up or down in the list of images.

When the sequence of images is ready, click Insert Slides to create the number of slides required for the photo album. The sequence can be changed later.

If required, copy and paste images between slides as with any other elements that can be placed on a slide.

If required, set up the photo album to run as a presentation. See “Presentations (slide shows)” below, “Running presentations” on page 275, and the Impress Guide.

Figure 173: Create Photo Album dialog

Presentations (slide shows)

Impress allocates reasonable default settings for presentations, while at the same time allowing for customizing many aspects of the presentation experience. This section provides an introduction to presentations. For more information on creating, formatting and running presentations, see the Impress Guide.

Most of the tasks are best done in Slide Sorter view in the Workspace where the majority of the slides in a presentation can be viewed. Go to View > Slide Sorter on the Menu bar or click on the Slide Sorter tab at the top of the Workspace.

Multiple presentations — single set of slides

There maybe more slides than the time available for a presentation, or only a brief overview is required first and then a more detailed presentation at a later date. Impress provides two tools for this: hiding slides and custom slide shows.

Hiding slides

Select slides for hiding in the Slides pane, or Slide Sorter view in the Workspace.

Hide the selected slides using one of the following methods. Hidden slides are grayed out in the Slides pane or Slide Sorter view in the Workspace.

Go to Slide > Hide Slide on the Menu bar.

Right-click on the slide thumbnail and select Hide Slide in the context menu.

Click on Hide Slide in the Slide View toolbar.

To show a hidden slide, use one of the following methods.

Go to Slide > Show Slide on the Menu bar.

Right-click on the hidden slide thumbnail and select Show Slide in the context menu.

Click on Show Slide in the Slide View toolbar.

Custom slide shows

Select the slides required for a custom slide show in the Slides pane or Slide Sorter view in the Workspace.

Go to Slide Show > Custom Slide Show on the Menu bar to open the Custom Slide Shows dialog (Figure 174).

Click on New and the Define Custom Slide Show dialog opens (Figure 175).

Type a name for the new custom slide show in the Name text box.

In the Existing slides list, select the slides to include in the show.

Click the >> button to include the slides in the Selected slides list. Several slides can be selected and included at the same time. Hold down the Shift key and click the first and last slide in a group to select that group, or hold down the Ctrl key (macOS ⌘)and click on individual slides to select them.

If required, rearrange the slide order in the Selected slides list. Click on a slide name and drag it to a new position in the list, then release the mouse button.

Figure 174: Custom Slide Shows dialog

Figure 175: Define Custom Slide Show dialog

Click OK to save the custom slide show and return to the Custom Slide Shows dialog.

To activate a custom show, select it in the list in the Custom Slide Shows dialog and then select the Use custom slide show option.

Click Start to test the custom slide show or click OK to close the Custom Slide Shows dialog.

Slide transition

Slide transitions are effects and/or sounds that take place between slides when slides change in a presentation and can add a professional look to a presentation, smoothing the change over between slides. For more information on how to setup slide transitions, modify slide transitions, and to advance slides in a presentation, see the Impress Guide.

Click on Slide Transition in the Sidebar to open the Slide Transition deck (Figure 176).

Figure 176: Slide Transition deck in Sidebar

In the Slides pane or Slide Sorter view in the Workspace, select the slides where slide transitions are going to be applied.

Select a transition from the available options in the Slide Transition panel.

In the Modify Transition panel, select from the following options to modify the selected transition:

Variant — if available, select a slide transition variant from the options available in the drop-down list.

Duration — enter a duration time in seconds for slide transition.

Sound — from the options available in the drop-down list, select a sound or music, to be played during slide transition.

To apply the same transition to all slides in the presentation, click Apply Transition to All Slides at the bottom of the Slides Transition deck.

To check how the transition looks, click Play at the bottom of the Slides Transition deck. Alternatively, to automatically preview how the transition looks when it is applied, select Automatic Preview at the bottom of the Slides Transition deck.

In the Advance Slide section, select how the slides change in a presentation.

On mouse click — each time the mouse is clicked, the presentation advances to the next slide.

Automatically after — enter a time in box to elapse before the next slide in the presentation advances into view.

Playing sounds or music

Sound or music can be played during a presentation as a transition effect. When using music in a presentation, make sure any copyright or license for the music is not being infringed.

Click on Slide Transition on the Sidebar to open the Slide Transition deck.

In the Slides pane, or Slide Sorter view in the Workspace, select the slide to add sound or music.

In the Modify Transition panel, select a sound in the Sound drop-down list.

To play music, use the following steps to select a music file:

Select Other sound in the Sound drop-down list.

In the file browser window that opens, navigate to where the music file is located.

Select the music file required and click Play to check if the music is suitable.

If the music is suitable, click Open to add the music to the selected slide and close the file browser window.

To play a sound or music file continuously in the slide show, select the option Loop until next sound. The sound or music file restarts once it is finished until the next sound or music file that is inserted in the slide show.

Notes

Do not select the Apply Transition to All Slides option, otherwise the selected music file restarts at every slide.

The sound or music file is linked to a presentation rather than embedded. If the presentation is going to be displayed on a different computer, remember to make sure that the music file is available on the computer where the presentation will be played. The link to the sound or music file must be established before starting the presentation.

Animation effects

Slide animations are similar to transitions, but they are applied to individual elements in a single slide, such as title, chart, shape, or individual bullet point. Animations can make a presentation more lively and memorable. However, as with transitions, heavy use of animations can be distracting and even annoying for an audience expecting a professional presentation.

Animations are best applied using Normal view in the Workspace so that individual objects on a single slide can easily be selected.

Figure 177: Animation deck in Sidebar

On a slide, an element, such as a graphic or an entire text box, has selection handles around it when selected. If a portion of the text in a text box is selected, any selection handles may not be visible. For more information on animation effects, see the Impress Guide.

Go to View > Normal on the Menu bar to open Normal view in the Workspace.

Select an element on a slide for animation.

On the Sidebar, select Animation to open the Animation deck (Figure 177).

Select an element in the Animation panel.

In the Effects panel, click on +Add to open the animation options.

In Category, select an animation category from the drop-down list.

In Effect, select an animation effect from the available options.

In Start, select how the animation starts from the drop-down list.

In Direction, select the direction of the animation from the drop-down list.

In Duration, enter a time in seconds for the animation duration.

In Delay, enter a time in seconds for to create a delay before the animation starts.

If required, select Automatic Preview to check the effect of the animation to a slide element.

Click Play to check how the animation effect when applied to a slide element.

Running presentations

Open the presentation and start the slide show using one of the following methods:

Use the keyboard shortcut F5 to start from the first slide, or Shift+F5 to start from the current slide.

Go to Slide Show > Start from First Slide, or Start from Current Slide on the Menu bar.

Click on Start from First Slide on the Slide Sorter toolbar.

If the slide transition is set to start after a time delay set in After on the Advance Slide panel, the transition runs after the time delay has elapsed and advances to the next slide.

If the slide transition is set to On mouse click on the Advance Slide panel, use one of the following options to for the transition to work and advance to the next slide:

Click the left mouse button.

Press the down arrow key

Press the right arrow key.

Press the page down key.

Press the space bar.

To navigate backwards through a slide show one slide at a time, use one of the following options:

Press the up arrow key.

Press the left arrow key.

Press the page up key.

To access more navigation options during a slide-show, right-click on a slide and use the options available in the context menu.

When the last slide has displayed, the message Click to exit presentation is displayed on screen. Press the Esc key, or click the left mouse button to exit the slide show.

To exit the slide show and return to the Impress workspace at any time, press the Esc key during the slide show.

Note

During the presentation, any animations on a slide are run in the specified order as the slide is displayed.

Presenter Console

The Presenter Console provides extra control over slide shows when using dual displays, such as a laptop and a large display, or projector, for an audience. The view seen on a laptop display includes the current slide that can be seen by the audience, the next slide in the presentation, any slide notes, and a presentation timer.

Note

The Presenter Console only works with computers and operating systems that support two displays. When two displays are being used, one display can be a laptop.

The Presenter Console has to be enabled in Impress before use. Go to Tools > Options > LibreOffice Impress > General (macOS LibreOffice > Preferences > LibreOffice Impress > General) and select Enable Presenter Console in Presentation.

The Presenter Console provides the following views for making a presentation:

Default view — displays the current slide, including any effects and the next slide in the presentation (Figure 178). Click on the Previous and Next arrows to navigate through the presentation.

Figure 178: Presenter Console — Default view

Notes view — click on Notes to switch to display any notes that accompany each slide in the presentation (Figure 179). Click on Notes again to return to the default view.

Slides view — click on Slides to switch to display the slide thumbnails that are being used for the presentation (Figure 180). Click on Slides again to return to the default view.

Exchange — click on this icon to switch the Presenter Console between displays.

Figure 179: Presenter Console — Notes view

Figure 180: Presenter Console — Slides view

Getting Started Guide

Chapter 7,
Getting Started with Draw

Vector Drawing in LibreOffice

Introduction

LibreOffice Draw is a vector graphics drawing program, although it can also perform some operations on raster graphics (pixels). Using Draw, a wide variety of graphical images can easily and quickly be created.

Vector graphics store and display an image as an assembly of simple geometric elements such as lines, circles, and polygons, rather than a collection of pixels (points on the screen). Vector graphics allow for easier storage and scaling of the image.

Draw is fully integrated into the LibreOffice suite, and this simplifies exchanging graphics with all components of the LibreOffice suite. If an image is created in Draw, reusing it in a Writer document is relatively easy. For example, select and copy the drawing in Draw and then paste the image directly into a Writer document. Also, drawings can be worked on directly from within Writer or Impress, using a subset of the functions and tools from Draw.

The functionality of LibreOffice Draw is extensive. Draw was not designed to rival high-end graphics applications, but it possesses more functionality than the drawing tools that are generally integrated with the majority of office productivity suites. A few examples of the drawing functions are as follows:

Layer management;

Magnetic grid-point system;

Dimensions and measurement display;

Connectors for making organization charts and other diagrams;

3D functions for creating small three-dimensional drawings;

Drawing and page-style integration;

Bézier curves.

This chapter introduces some features of Draw, but it does not attempt to cover all of the Draw features. See the Draw Guide and LibreOffice Help for more information.

Draw main window

Workspace

The large area in the center of the Draw main window (Figure 181) is the Workspace, where drawings are created. This drawing area can be surrounded with toolbars and information areas. The number and position of the visible tools vary with the task in hand, user preferences, and computer setup.

The maximum size of a drawing page in Draw is limited by the computer setup and the page size that that can be set and used in the printer connected to the computer.

Pages pane

Drawings can be split over several pages. Multi-page drawings are used mainly for presentations. The Pages pane on the left side of the Draw main window provides an overview of the pages that are created in a drawing. If the Pages pane is not visible, go to View > Page Pane on the Menu bar. The Pages pane is also used to make changes to the page order by dragging and dropping one or more pages.

Layers bar

A layer is a workplace where drawing elements and objects can be inserted. By default, the Workspace consists of three layers (Layout, Controls, and Dimension Lines). These default layers cannot be deleted or renamed, but layers can be added when necessary.

Figure 181: Draw main window Pages pane Workspace Sidebar Status bar Layers bar

Tabs for default and other layers appear in the Layers bar at the bottom of the Workspace. The Layers bar can be used to navigate between layers, add layers as required, or delete layers that have been added. For more information, see “Working with layers” on page 317.

Sidebar

The Sidebar in Draw is similar to the Sidebar in the other LibreOffice components. In Draw, it has five main decks. To open a deck, click on its icon on the right of the Sidebar, or click on the Sidebar Settings icon at the top of the tab bar and select a deck in the drop-down list. If the Sidebar is not visible, go to View > Sidebar on the Menu bar.

Properties

Contains panels where properties of a selected object in a drawing can be changed: Page, Character, Paragraph, Area, Effect, Shadow, Line, Position and Size, Columns, and Image. Available panels depend on the selected object.

Styles

Provides options to edit and apply one of the available Drawing Styles to objects in a drawing. When a style is edited or modified, the changes are automatically applied to all of the elements formatted using that style. In Draw, Presentation Styles are not available. New drawing styles can be added to a drawing.

Gallery

Displays various objects. Objects on the Gallery deck can be inserted into a drawing either as a copy or as a link. The Gallery is divided into themes: Arrows, BPMN (Business Process Model and Notation), Bullets, Diagrams, Flowchart, Icons, Network, Shapes, and Sounds. New themes can be added to the Gallery. See Chapter 5, Working with Images and Graphics, and the Draw Guide for more information.

Navigator

On the Navigator deck, pages and objects in a drawing can be quickly selected. It is recommended to give pages and objects meaningful names so they are easily identified when using the Navigator.

Shapes

Provides a quick selection of most items that are available on the Drawing toolbar: Lines and Arrows, Curves and Polygons, Connectors, Basic Shapes, Symbol Shapes, Block Arrows, Flowchart, Callouts, Stars and Banners, and 3D Objects.

Rulers

Rulers are positioned on the upper and left-hand sides of the Workspace. If the rulers are not visible, go to View > Rulers on the Menu bar. The rulers show the size of a selected object using double lines (highlighted in Figure 182). Also the rulers can be used to manage object handles and guide lines when positioning objects.

The page margins in the drawing area are also represented on the rulers. The margins can be changed directly on the rulers by dragging the margins with the cursor. The margin areas are indicated by the grayed-out area on the rulers (Figure 182).

To change the measurement units of the rulers, right-click on a ruler and select the measurement unit in the drop-down list, as shown in Figure 183 for the horizontal ruler. The horizontal and vertical rulers can be set to different measurement units.

Status bar

The Status bar (Figure 184) is located at the bottom of the Workspace in all LibreOffice components. It includes several Draw-specific fields. For details on the contents and use of these fields, see Chapter 1, LibreOffice Basics, in this guide and the Draw Guide. To hide the Status Bar, go to View on the Menu bar and deselect Status Bar.

Note

The measurement units shown on the Status Bar are set by going to Tools > Options > LibreOffice Draw > General on the Menu bar. These units may be different to the measurement units set for the rulers.

Figure 182: Rulers showing object size

Figure 183: Ruler measurement units

Figure 184: Status bar Slide (drawing) number Information area Master drawing Cursor position Selected object size Scaling factor of the document Unsaved changes Digital signature Fit drawing Zoom slider Zoom percentage

Toolbars

To display or hide the various Draw toolbars, go to View > Toolbars on the Menu bar and select a toolbar from the drop-down menu. For more information on toolbars, see the Draw Guide.

The icons used for the tools on each toolbar depend on the computer operating system and how LibreOffice has been set up on a computer. For more information, see Chapter 12, Configuring LibreOffice.

The three main toolbars used in Draw are:

Standard — this toolbar is similar for all LibreOffice components. By default it is docked at the top of the Workspace when a Draw document is opened (Figure 185)

Figure 185: Standard toolbar

Drawing — this toolbar contains all the necessary functions for drawing various geometric and freehand shapes, and for organizing them in the drawing. By default, it is locked into position on the left of the Workspace (Figure 186).

Figure 186: Drawing toolbar

Line and Filling — this toolbar is normally docked at the top of the Workspace below the Standard toolbar. The tools and pull-down lists on this toolbar vary according to the type of object selected. The Line and Filling toolbar (Figure 187) only becomes active when an object on the Workspace is selected.

Figure 187: Line and Filling toolbar

Drawing basic shapes

Draw provides a wide range of shapes, located in palettes accessed on the Drawing toolbar, or in the Shapes deck on the Sidebar (Figure 188). See the Draw Guide for a complete description of the basic shapes available.

Some of the tool icons on the Drawing toolbar change according to the shape that has been selected. Also, some tools on a toolbar have extra tool palettes available and these are indicated by a triangle ▼ to the right of the tool icon.

Note

When drawing a basic shape, or selecting one for editing, the Information field in the Status bar changes to reflect the present action, for example Line created, Text frame xxyy selected, and so on.

Straight lines

Use one of the following methods to start drawing a line:

Click on Insert Line on the Drawing toolbar.

Click the triangle ▼ on the right of Lines and Arrows on the Drawing toolbar and select Insert Line in the drop-down list.

Click on Insert Line in the Lines and Arrows panel of the Shapes deck on the Sidebar (Figure 188).

Place the mouse pointer at the starting point on the drawing, then click and drag the pointer to draw a straight line.

Figure 188: Shapes deck on Sidebar

Figure 189: Line starting point

Release the mouse button when the end point is reached and a straight line is created. A selection handle appears at each end of the line, showing that this object is the currently selected object. The selection handle at the starting point of the line is slightly larger than the other selection handle (highlighted in Figure 189).

A line is drawn using default attributes. To change line attributes and format a line to the drawing requirements, select the line by clicking on it and use one of the following methods to access formatting options for the line:

Go to the Properties deck on the Sidebar and open the Line panel (Figure 190).

Right-click on a line and select Line in the context menu to open the Line dialog (Figure 191).

Go to Format > Line on the Menu bar to open the Line dialog.

Use the tools Line Style, Line Width, and Line Color on the Line and Filling toolbar.

Tips

To snap the end of a line to the nearest grid point, keep the Ctrl key (macOS ⌘) pressed while drawing the line. However, if the Snap to Grid option in View > Snap Guides on the Menu bar has been selected, the Ctrl key (macOS ⌘) deactivates the snap to grid.

To restrict the drawing angle of a line to a multiple of 45 degrees (0, 45, 90, 135, and so on), keep the Shift key pressed while drawing the line. However, if the option When creating or moving objects in the Constrain Objects section of Tools > Options > LibreOffice Draw > Grid has been selected, the Shift key deactivates this restriction.

To draw a line symmetrically outwards in both directions from the start point, keep the Alt key (macOS ⌥) pressed while drawing the line. This draws lines by starting from the center of the line.

Figure 190: Line panel in Properties deck on Sidebar

Figure 191: Line dialog — Line page

Figure 192: Lines and Arrows sub-toolbar

Arrows

Draw classifies both lines and arrows as lines. Arrows are drawn like straight lines. Hovering the cursor over each tool in the Lines and Arrows sub-toolbar (Figure 192) indicates what type of line, or arrow each tool will draw. The information field on the Status bar shows them only as lines.

Use one of the following methods to start drawing an arrow:

Click the triangle ▼ on the right of Lines and Arrows on the Drawing toolbar and select the type of arrow required from the Lines and Arrows sub-toolbar.

Click on the type of arrow required in the Lines and Arrows panel of the Shapes deck on the Sidebar.

Place the mouse pointer at the starting point of the arrow, then click and drag the pointer. The arrowhead is drawn when the mouse button is released.

Notes

The tool icon for the Lines and Arrows tool used most recently will be shown on the Drawing toolbar. This makes it easier to use the same tool again.

After drawing a line, or arrow, the line, or arrow style can be changed by opening the Line dialog and using the options available on the Line Styles or Arrow Styles pages.

Figure 193: Basic Shapes sub-toolbar

Figure 194: Legacy Rectangles toolbar

Rectangles

Use one of the following methods to start drawing a rectangle:

Click on Rectangle on the Drawing toolbar.

Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select Rectangle on the Basic Shapes sub-toolbar (Figure 193).

Click on Rectangle in the Basic Shapes panel of the Shapes deck on the Sidebar.

Select the type of rectangle on the Legacy Rectangles toolbar (Figure 194). To display the toolbar, go to View > Toolbars on the Menu bar and select it.

Place the mouse pointer at the starting point for the rectangle, then click and drag the pointer until the required size is drawn. As the rectangle is drawn, the rectangle appears with its bottom right corner attached to the cursor.

To draw a rectangle from its center, position the mouse pointer on the drawing, press the mouse button and then hold down the Alt key (macOS ⌥) while dragging the mouse pointer. The rectangle uses the start point as the center of the rectangle.

Squares

Use one of the following methods to start drawing a square:

Click on Rectangle on the Drawing toolbar, then hold down the Shift key while dragging the mouse pointer to draw a square.

Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select Square on the Basic Shapes sub-toolbar (Figure 193).

Click on Square in the Basic Shapes panel of the Shapes deck on the Sidebar.

Select the type of square from the Legacy Rectangles toolbar (Figure 194). To display the toolbar, go to View > Toolbars on the Menu bar and select it.

Place the mouse pointer at the starting point for the square, then click and drag the pointer until the required size is drawn. As the square is drawn, the square appears with its bottom right corner attached to the cursor.

To draw a square from its center, position the cursor on the drawing, press the mouse button and then hold down the Alt key (macOS ⌥) while dragging the mouse pointer. The square uses the start point as the center of the square.

Figure 195: Legacy Circles and Ovals toolbar

Ellipses (ovals)

Use one of the following methods to start drawing an ellipse:

Click on Ellipse on the Drawing toolbar.

Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select Ellipse on the Basic Shapes sub-toolbar (Figure 193).

Click on Ellipse in the Basic Shapes panel of the Shapes deck on the Sidebar.

Select the type of ellipse on the Legacy Circles and Ovals toolbar (Figure 195). To display the toolbar, go to View > Toolbars on the Menu bar and select it.

Place the mouse pointer at the starting point for the ellipse, then click and drag the pointer until the required size is drawn. As the ellipse is drawn, the ellipse appears with its bottom right corner attached to the cursor.

To draw an ellipse from its center, position the mouse pointer on the drawing, press the mouse button and then hold down the Alt key (macOS ⌥) while dragging with the pointer. The ellipse uses the start point as the center of the ellipse.

Circles

Use one of the following methods to start drawing a circle:

Click on Ellipse on the Drawing toolbar, then hold down the Shift key while dragging the cursor to draw a circle.

Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select Circle on the Basic Shapes sub-toolbar (Figure 193).

Click on Circle in the Basic Shapes panel of the Shapes deck on the Sidebar.

Select the type of circle on the Legacy Circles and Ovals toolbar (Figure 195). To display the toolbar, go to View > Toolbars on the Menu bar and select it.

Place the mouse pointer at the starting point for the circle, then click and drag the pointer until the required size is drawn. As the circle is drawn, the circle appears with its bottom right corner attached to the cursor.

To draw a circle from its center, position the mouse pointer on the drawing, press the mouse button and then hold down the Alt key (macOS ⌥) while dragging with the pointer. The circle uses the start point as the center of the circle.

Tip

To quickly insert a line, rectangle, ellipse, or circle, press and hold down the Ctrl key (macOS ⌘) and then click on one of the icons for Line, Rectangle, Ellipse, or Circle and a standard sized object is drawn automatically in the center of the Workspace. The size, shape, and color are all standard values. These attributes can be changed later, if desired. For more information, see the Draw Guide.

Dimension lines

Dimension lines display a measurement of an object in the drawing (Figure 196). The dimension line does not belong to the object itself, but it is normally placed close to it.

Use one of the following methods to start drawing a dimension line:

Click the triangle ▼ on the right of Lines and Arrows on the Drawing toolbar and select Dimension Line on the Lines and Arrows sub-toolbar that opens.

Click on Dimension Line in the Lines and Arrows panel of the Shapes deck on the Sidebar.

Place the mouse pointer close to the object to position the start of the dimension line.

Figure 196: Example of object dimension lines

Figure 197: Dimension Line dialog

Click and drag the mouse pointer to draw the dimension line. As the dimension line is drawn, the dimension is displayed and automatically calculated. To change the measurement unit used for dimension lines, go to Tools > Options > LibreOffice Draw > General on the Menu bar.

To change the display of a dimension line and its appearance, right-click on the dimension line and select Dimensions in the context menu to open the Dimension Line dialog (Figure 197).

Select the required options in Line and Legend, then click OK to save the changes and close the Line Dimension dialog.

Curves

Use one of the following methods to start drawing a curve:

Click the triangle ▼ on the right of Curves and Polygons on the Drawing toolbar and select the type of curve on the Curves and Polygons sub‑toolbar (Figure 198).

Click on the type of curve required in the Curves and Polygons panel of the Shapes deck on the Sidebar.

Click and hold the left mouse button to create the starting point of the curve, then drag from the starting point to draw a line. Release the mouse button and continue to drag the cursor to bend the line into a curve.

Double-click to set the end point of the curve and fix the curve on the drawing. A filled curve automatically joins the last point to the first point, closing the curve and filling it with the selected fill color. A curve without fill will not be closed at the end of drawing the curve.

Note

A single click fixes the curve to the drawing and allows drawing of straight lines from the end of the curve. Each single click allows the drawing of another straight line. Double-click to end drawing a curve with straight lines.

Polygons

Use one of the following methods to start drawing a polygon:

Click the triangle ▼ on the right of Curves and Polygons on the Drawing toolbar and select the type of polygon on the Curves and Polygons sub‑toolbar (Figure 198).

Click on the type of polygon required in the Curves and Polygons panel of the Shapes deck on the Sidebar.

Click and hold the left mouse button to create the starting point of the polygon, then drag from the starting point to draw a line.

Figure 198: Curves and Polygons sub-toolbar

Release the mouse button and continue to drag the cursor to draw the next line for polygon, then click to mark the end point of the line and to start drawing another line. Holding the Shift key down while drawing lines restricts the angles used in the polygon to 45° or 90°.

Double-click to set the end point of the polygon and fix the polygon on the drawing. A filled polygon automatically joins the last point to the first point, closing the polygon and filling it with the selected fill Color. A polygon without fill will not be closed at the end of drawing the polygon.

Polygons 45°

A polygon 45° is drawn using the same procedure as polygons, but the angles between lines are restricted to 45° or 90°. This restriction of angles cannot be changed. However, and if required, hold down the Shift key as the line is drawn so that the line is drawn at an angle other than 45 or 90 degrees.

A filled polygon 45° automatically joins the last point to the first point, closing the polygon and filling it with the selected fill color.

Free-form lines

Drawing a free-form line is similar to drawing with a pencil on paper.

Use one of the following methods to start drawing a free-form line:

Click the triangle ▼ on the right of Curves and Polygons on the Drawing toolbar and select the type of free-form line on the Curves and Polygons sub-toolbar (Figure 198).

Click on the type of free-form line required in the Curves and Polygons panel of the Shapes deck on the Sidebar.

Click and drag the mouse pointer to create the free-form line shape required.

Release the mouse button when satisfied with the free-form line and the drawing is completed. A filled free-form line automatically joins the last point to the first point, closing the free-form line and filling it with the selected fill color.

Glue points and connectors

Glue points

All Draw objects have glue points, which are not normally displayed. Glue points (Figure 200) become visible on an object when a connector is selected on the Drawing toolbar or in the Shapes deck on the Sidebar.

Most objects have four glue points (Figure 200). More glue points can be added and customized using the Gluepoints toolbar (Figure 199). If the Gluepoints toolbar is not visible, go to View > Toolbars > Gluepoints on the Menu bar to open the toolbar. For a more detailed description on adding and using glue points, see the Draw Guide.

Glue points are not the same as the selection handles of an object. Selection handles are for moving or changing the shape of an object. Glue points are used to fix or glue a connector to an object so that when the object moves, the connector stays fixed to the object.

Figure 199: Gluepoints toolbar

Figure 200: Example of object gluepoints

Figure 201: Connectors sub-toolbar

Figure 202: Example of connector between two objects

Connectors

Connectors are lines or arrows whose ends automatically snap to a glue point of an object. Connectors are especially useful in drawing organization charts, flow diagrams, and mind-maps. When objects are moved or reordered, the connectors remain attached to a glue point. Figure 202 shows an example of using two objects and a connector. For a more detailed description of the use of connectors, see the Draw Guide.

Use one of the following methods to select a connector:

Click the triangle ▼ on the right of Connectors on the Drawing toolbar and select the type of connector on the Connectors sub-toolbar (Figure 201).

Click on the type of connector required in the Connectors panel of the Shapes deck on the Sidebar.

Move the mouse pointer over one of the objects to be connected. Small crosses (the glue points) appear around the object edges. Click on the required glue point for the start of the connector, then drag the mouse pointer to drag the connector to another object.

When the mouse pointer is over a glue point of the target object, release the mouse button and the connector is drawn. The connector end point is attached to the glue point.

Geometric shapes

Geometric shapes are similar to basic shapes. They are provided in Draw as a starting point when creating objects for a drawing. Geometric shapes are located on the Drawing toolbar and in the Shapes deck on the Sidebar.

The tool icons on the Drawing toolbar always indicate the last geometric shape drawn. This makes it easier to use the same tool again.

Access geometric shapes using one of the following methods:

Click on Shapes on the Sidebar to open the Shapes deck, then choose from the geometric shapes available.

Click the triangle ▼ on the right of a geometric shape on the Drawing toolbar to open a sub-toolbar giving access to more geometric shape tools.

Using geometric shapes is similar to drawing rectangles, squares, ellipses, or circles as explained in “Drawing basic shapes” on page 289. Text can be added to all geometric shapes. See “Adding and formatting text” on page 303 and the Draw Guide.

Basic shapes

The Basic Shapes sub-toolbar (Figure 203) also includes rectangle and ellipse tools that are identical to the ones displayed on the Drawing toolbar.

Figure 203: Basic Shapes sub-toolbar

Basic shapes numbered from left to right

Rectangle

Rectangle, Rounded

Square

Square, Rounded

Parallelogram

Trapezoid

Ellipse

Circle

Circle Pie

Circle Segment

Arc

Block Arc

Isosceles Triangle

Right-angle Triangle

Diamond

Regular Pentagon

Hexagon

Octagon

Cylinder

Cube

Folded Corner

Cross

Frame

Ring

Symbol shapes

Figure 204: Symbol Shapes sub-toolbar

Symbol shapes numbered from left to right

Smiley Face

Heart

Sun

Moon

Cloud

Lightning Bolt

Flower

Prohibited

Puzzle

Square Bevel

Octagonal Bevel

Diamond Bevel

Double Bracket

Left Bracket

Right Bracket

Double Brace

Left Brace

Right Brace

Block arrows

Figure 205: Block Arrows sub-toolbar

Block arrows numbered from left to right

Right Arrow

Left Arrow

Down Arrow

Up Arrow

Left and Right Arrow

Up and Down Arrow

Circular Arrow

S-shaped Arrow

Split Arrow

Right or Left Arrow

4-way Arrow

Corner Right Arrow

Chevron

Pentagon

Striped Right Arrow

Up, Right and Down Arrow

Notched Right Arrow

Up and Right Arrow

Right Arrow Callout

Left Arrow Callout

Down Arrow Callout

Up Arrow Callout

Left and Right Arrow Callout

Up and Down Arrow Callout

4-way Arrow Callout

Up and Right Arrow Callout

Flowchart

Figure 206: Flowchart sub-toolbar

Flowchart shapes from left to right

Process

Alternate Process

Decision

Data

Predefined Process

Internal Process

Document

Multidocument

Terminator

Preparation

Manual Input

Manual Operation

Connector

Off-page Connector

Card

Punched Tape

Summing Junction

Or

Collate

Sort

Extract

Merge

Stored Data

Delay

Sequential Access

Magnetic Disc

Direct Access Storage

Display

Callouts

Figure 207: Callouts sub-toolbar

Callouts numbered from left to right

Rectangular Callout

Rounded Rectangular Callout

Round Callout

Cloud

Line Callout 1

Line Callout 2

Line Callout 3

Stars and banners

Figure 208: Stars and banners sub-toolbar

Stars and banners numbered from left to right

4-Pointed Star

5-Pointed Star

6-Pointed Star

8-Pointed Star

12-Pointed Star

24-Pointed Star

Explosion

Vertical Scroll

Horizontal Scroll

Signet

Door-plate

6-Point Star, Concave

3D objects

Figure 209: 3D-Objects sub-toolbar

3D objects numbered from left to right

Cube

Sphere

Cylinder

Cone

Pyramid

Torus

Shell

Hemisphere

Figure 210: Text Formatting toolbar

Adding and formatting text

Text can be added to drawings created in Draw. This section gives some guidelines on how to add text and change its appearance. Text added to drawings can be contained in text boxes, objects, or shapes. For more information on adding and formatting text, see the Draw Guide.

A text box is an independent Draw object that is dynamic and expands as more text is added within the frame.

An object or shape in a drawing is not dynamic, which means that the boundary rectangle does not expand as text is added. Care must be taken when adding text to prevent the text from extending outside the object or shape boundaries.

Text mode

Before adding any text to a drawing, text mode has to be activated using one of the following methods. The Text Formatting toolbar (Figure 210) automatically opens when text mode is activated, replacing the Line and Filling toolbar.

For horizontal text, click on Insert Text Box on the Drawing, or Text toolbars to create a text box.

For horizontal text, go to Insert > Text Box on the Menu bar to create a text box.

For horizontal text, use the keyboard shortcut F2 to create a text box.

For vertical text, click on Insert Vertical Text on the Drawing, or Text toolbars to create a vertical text box.

Double-click inside an object on the drawing and the object switches to text mode with a flashing cursor inside the object.

Note

Inserting and formatting vertical text and vertical text boxes is the same as horizontal text and horizontal text boxes. A vertical text box expands vertically as text is added into the box. For more information on vertical text, see the Draw Guide.

Text boxes

Create a text box in the drawing using one of the following methods. The Status Bar indicates Text Edit mode and the position of the cursor (Figure 211).

Figure 211: Text information in Status Bar

Click at the approximate position for the text box and a single line text box is created containing a flashing cursor. Start typing the text or paste copied text into the text box. The width of a single line text box increases as text is added.

Click at the approximate position for the text and drag the mouse pointer to the approximate width required for the text box creating a multi-line text box. Start typing the text, or paste copied text into the text box. As the horizontal limit of the text box is reached, the text automatically word wraps inside the text box and the text box expands vertically as it fills.

If necessary, create multiple lines of text in a single-line text box by pressing Enter to create a new paragraph, or using Shift+Enter to create a line break in the text.

When adding text is complete, click outside the text box to exit text mode. The Text Formatting toolbar closes and the Line and Filling toolbar opens in its original position.

To format and/or reposition the text box, see the Draw Guide for more information.

Vertical text

By default, Draw is set for horizontal text only. To enable vertical text:

Go to Tools > Options > Language Settings > Languages.

Under Default Languages for Documents, select Asian and accept the default language displayed.

Right-click in a blank area on the Drawing toolbar and select Visible Buttons in the context menu.

Select Insert Vertical Text in the list of available tools to enable vertical text on the Drawing toolbar.

Alternatively, go to View > Toolbars on the Menu bar and select the Text toolbar from the drop-down list, then select Insert Vertical Text from the tools available on the Text toolbar.

Text in Draw objects

Text can be added to most Draw objects. The exceptions are, for example, control elements, buttons, polygons, curves, or 3D objects.

By default, an object is not dynamic when created in Draw and does not behave like a text box. Text added to an object does not word wrap inside an object. To keep text within the borders of an object, use word wrap, paragraphs, line breaks, smaller text size, increasing object size, or a combination of all methods. For more information on adding text to objects, see the Draw Guide.

Create an object in a drawing and make sure the object is selected with the selection handles displayed.

Enter text mode on a selected object using one of the following methods:

Click on Insert Text Box for horizontal text, or Insert Vertical Text for vertical text on the Drawing, or Text toolbar.

For horizontal text, double-click on the selected object.

For vertical text, double-click on the selected object and click on Insert Vertical Text on the Drawing, or Text toolbar.

Type or paste text into the selected object.

If the text goes outside the object borders, format the text using the various tools on the Text Formatting toolbar, the panels in the Properties deck on the Sidebar, the options in Format on the Menu bar, or the Text page in the Text dialog. For more information on text formatting, see the Draw Guide.

Click outside the object to deselect it ending text mode and saving any changes.

Creating lists

Unordered (bulleted) or ordered (numbered) lists can be created in text boxes and Draw objects. For more information on creating and formatting lists, see the Draw Guide.

Switch on text mode and select all of the text required for a list, or type the required text.

Create a list using one of the following methods and default settings for lists:

Click on Toggle Unordered List, or Toggle Ordered List on the Text Formatting toolbar.

Click on Toggle Unordered List, or Toggle Ordered List in the Lists panel in the Properties deck on the Sidebar.

Go to Format > Lists > Unordered List, or Ordered List on the Menu bar.

To change the format of the list, click on the triangle ▼ on the right of the list tools in the toolbars, or List panel in the Sidebar, and select a list style from the options available.

Text columns

Text in a drawing can be formatted into columns inside text boxes and objects. However, columns cannot be used on separate parts of text inside a text box or object. The whole of the text box or object has to be used for columns. For more information on text columns, see the Draw Guide.

For text boxes — click the border of a text box to select it so that the selection handles are displayed indicating that the text box is in edit mode.

For graphic objects — double-click on a graphic object to select it so that the selection handles are displayed and the cursor flashes in the center of the object indicating that the object is in text edit mode.

Open the options for text columns using one of the following methods:

Right-click in the text box or graphic object and select Text Attributes in the context menu to open the Text dialog, then click on the Text Columns tab to open the Text Columns page,

Click on Columns in the Properties deck on the Sidebar to open the Columns panel.

Set the number of columns required in the Number of columns box and the required spacing between the columns in the Spacing box.

Type in the required text, or use copy and paste to enter the required text into the text box or graphic object. Any text entered will be in column format.

If necessary, format the text to the drawing requirements.

Save the changes and deselect the text box, or graphic object, using one of the following methods:

For the Text dialog, click OK to save the changes and close the dialog, then click outside the text box to deselect it.

For the Columns panel in the Properties deck on the Sidebar, click outside the text box or graphic object to deselect it and save the changes.

Click outside the text box, or graphic object, to deselect and save all the changes.

Note

Any text inside a text box, or graphic object automatically flows into column format when the changes are saved.

Selecting objects

Direct selection

The easiest way to select an object is to click directly on it. For objects that are not filled, click on the object outline to select it. To select, or deselect, more than one object, hold the Shift key down while clicking on each object.

Selection by framing

Several objects can be selected at the same time by clicking and dragging the cursor to draw a selection rectangle (also known as a marquee) around the objects. Only objects that lie entirely within this selection rectangle are selected. To select multiple objects by framing, Select on the Drawing toolbar must be active.

Selecting hidden objects

If objects are located behind others and not visible, they can still be selected. When selecting a hidden object, its selection handles appear through the objects covering it.

Windows, macOS or Linux — press the Tab key to select and cycle through the objects in a drawing, stopping at the hidden object to select it. To cycle through the objects in reverse order, press Shift+Tab.

Windows or macOS only — select the object in front of a hidden object, then press the Alt key (macOS ⌥) and click to select the hidden object. If there are several hidden objects, keep holding down the Alt key (macOS ⌥) and clicking until the object required is reached. To cycle through the objects in reverse order, hold down the Alt+Shift keys (macOS ⌥+Shift) and click.

Arranging objects

In a complex drawing, several objects may be stacked on top of one another. This stacking order can be rearranged by moving an object forward, or backward, using one of the following methods:

Select an object, go to Shape > Arrange on the Menu bar, or right-click on the object and select Arrange in the drop-down menu, then choose one of the following options:

Bring to Front (Ctrl+Shift++) (macOS ⌘+Shift++)

Bring Forward (Ctrl++) (macOS ⌘++)

Send Backward (Ctrl+-) (macOS ⌘+–)

Send to Back (Ctrl+Shift+-) (macOS ⌘+Shift+–)

In Front of Object

Behind Object

Reverse — clicking on this option reverses the order of the selected objects.

Select an object, then click on one of the Arrange tools, as above, on the Line and Filling toolbar. When hovering the cursor over a tool, its function is indicated.

Positioning and adjusting objects

When positioning or changing the size of an object, check the information area of the Status bar at the bottom of the Draw Workspace (Figure 212). From left to right, it shows what object is selected, its position on the drawing in X/Y coordinates, and the dimensions of the object. The measurement units are those selected in Tools > Options > LibreOffice Draw > General.

For more information on positioning and adjusting objects, see the Draw Guide.

Using zoom

To help in the positioning and adjustment of objects, Draw has a zoom function that reduces or enlarges the screen display of the current drawing. For example, zoom in to position objects on a drawing with greater accuracy; zoom out to see the complete drawing. Zooming is controlled using the Status bar, Zoom & View Layout dialog, or Zoom toolbar. For more information on using zoom, see the Draw Guide.

Figure 212: Object information on left end of Status Bar

Figure 213: Example of moving objects

Figure 214: Example of adjusting object size

Moving objects

To move an object (or a group of objects), select it within the object borders, then click and drag the object. Release the object when it is in its correct position. Whilst moving the object, a ghost image of the object appears helping with repositioning (Figure 213).

Adjusting object size

To change the size of a selected object (or a group of selected objects), move the cursor to one of the selection handles. The cursor changes shape to indicate the direction of movement for that selection handle. As the object size changes, a ghosted outline of the object appears (Figure 214). When the desired size of the object is reached, release the object.

The results depend on which selection handle is being used. To resize an object along one axis, use a side, top, or bottom handle. To resize along both axes, use a corner handle.

Note

Press and hold the Shift key while resizing an object, the change in size is carried out symmetrically with respect to the object width and height maintaining the aspect ratio of the object. This Shift key behavior works on all selection handles.

Rotating or slanting objects

To rotate or slant an object (or a group of objects), select it and switch to rotation mode using one of the following methods:

Right-click on the object and select Transformations > Rotate in the context menu.

Click on the triangle ▼ on the right of Transformations on the Standard or Line & Filling toolbars and select Rotate.

The selection handles change shape and color with a center of rotation appearing in the center of the object. As the cursor is moved over the handles, the cursor changes shape to indicate the type of movement.

Rotation

Click on and hold a corner selection handle, then drag the cursor to rotate the object around the rotation point. A ghost image of the object rotation appears and the current angle of rotation is shown in the Status Bar (Figure 216).

When the object is at the required rotation angle, release the object.

To change the type of rotation, click on the rotation point and drag it to another position. The rotation point can be moved outside of the object boundaries.

Note

Press the Shift key while rotating or slanting an object and the movement is restricted to 15°.

Figure 215: Transformations toolbar

Figure 216: Example of rotating an object

Figure 217: Example of slanting an object

Slanting

Click on a selection handle at the top, bottom, left side, or right side of an object. The cursor will change shape indicating the direction of movement.

Drag the selection handle to slant the object. A ghost image of the object being slanted appears (Figure 217) and the current slant angle is shown in the Status Bar. The axis used for slanting an object is fixed to the edge of the object directly opposite the selection handle being used to slant the object.

When the object is at the desired slant angle, release the object.

Flipping objects

Select an object so that the selection handles are displayed and flip the object vertically or horizontally using one of the following methods:

Right-click on the object and select Flip > Vertically, or Horizontally, in the context menu.

Go to Shape > Flip > Vertically, or Horizontally, on the Menu bar.

Click on Vertically, or Horizontally, tool on the Line and Filling toolbar.

Use Flip Vertically, or Flip Horizontally, tool in the Position and Size section on the Properties deck of the Sidebar.

However, the Flip tool on the Transformations toolbar (Figure 215) provides greater control over the flipping process. Use the Flip tool to change the position and angle that the object flips over. See the Draw Guide for more information.

Object distortion

Three tools on the Transformations toolbar (Figure 215) allow the dragging of the corners and edges of an object to distort an object.

Distort — distorts an object in perspective.

Set in Circle (perspective) — creates a pseudo 3D effect.

Set to Circle (slant) — creates a pseudo 3D effect. Despite the (slant) in the name of this tool, it operates differently from the slanting created by rotation.

In all three cases, the object has to be converted into a curve. This is a necessary first step, so click Yes, then move the object handles to produce the desired effect. See the Draw Guide for more information on how to distort an object.

Dynamic gradients

Transparency gradients can be controlled the same as color gradients and both types of gradient can be used together. With a transparency gradient, the direction and degree of the object fill color changes from opaque to transparent. In a color gradient, the fill changes from one color to another, but the degree of transparency remains the same. An example of a dynamic gradient is shown in Figure 218.

Figure 218: Example of a dynamic gradient

Figure 219: Example of duplicating objects

Two tools on the Transformations toolbar are used to dynamically control transparency and color gradients — Interactive Transparency and Interactive Gradient. See the Draw Guide for more information on how to create transparencies and gradients in an object.

Duplication

Duplication makes copies of an object while applying a set of changes such as Color or rotation to the duplicates that are created. An example of duplication is shown in Figure 219. For more information on duplication, see the Draw Guide.

Click on an object or group of objects and open the Duplicate dialog (Figure 221) using one of the following methods:

Go to Edit > Duplicate on the Menu bar.

Go to Shape > Duplicate on the Menu bar.

Use the keyboard shortcut Shift+F3.

Figure 220: Example of cross-fading two objects

Figure 221: Duplicate dialog

Select the required options in Number of copies, Placement, Enlargement, and Colors.

Click OK to duplicate the object and close the Duplicate dialog.

Cross-fading

Cross-fading transforms one object shape to another object shape. The result is a new group of objects with the first object selected as the start object and the second object selected as the end object. For example, when the options in the Cross-fading dialog are applied to a diamond and an ellipse, the cross-fading produces the result shown by the example in Figure 220.

Figure 222: Cross-fading dialog

Select two differently shaped objects and go to Shape > Cross-fading on the Menu bar to open the Cross-fading dialog (Figure 222).

In Increments enter the number of shapes between the two objects.

Select Cross-fading attributes to apply a gradual change of line and fill properties between the two objects.

Select Same orientation to apply a smooth transition between the two objects.

Click OK to carry out the cross-fading and close the Cross-fading dialog.

Grouping and combining multiple objects

Using Draw, a group of objects can be grouped together allowing multiple objects to be treated as one object, or combined together to create a new shape, as shown by the example in Figure 223. For more information on grouping and combining objects, see the Draw Guide.

Grouping

Grouping of objects is similar to putting objects into a container. The objects can be moved as a group and global changes applied to the objects within the group. A group can always be undone (ungroup). Objects that make up a group can always be manipulated separately and retain their own individual properties.

Figure 223: Example of grouping and combining objects Grouped Combined

Temporary grouping

A temporary grouping is when several objects are selected using one of the following methods:

While holding down the Shift key, click on each object with the cursor to select it for the temporary group.

Click and drag the cursor to create a rectangle (also known as a marquee) around the objects required for the temporary group.

Any changes to object parameters carried out are applied to all of the objects within the temporary group. For example, rotating a temporary group of objects in its entirety.

To cancel a temporary grouping of objects, click outside of the selection handles displayed around the objects.

Permanent grouping

A permanent grouping of objects can be created after selecting objects using one of the following methods:

Go to Shape > Group > Group on the Menu bar.

Right-click on the selected objects and select Group in the context menu.

Use the keyboard shortcut Ctrl+Shift+G (macOS ⌘+Shift+G)

When deselected, the objects remain grouped together. Any editing operations carried out on the group are applied to all objects within the group. If one object in the group is clicked, the whole group is selected.

Editing within groups

Editing an individual within a group can be carried out without ungrouping or breaking the group. After selecting the group, use one of the following methods to enter the group:

Go to Shape > Group > Enter Group on the Menu bar.

Right-click on the selected group and select Enter Group in the context menu.

Use the keyboard shortcut F3.

Double-click on the selected group.

When editing is finished on an individual object within a group, use one of the following methods to exit the group:

Go to Shape > Group > Exit Group on the Menu bar.

Right-click and select Exit Group in the context menu.

Use the keyboard shortcut Shift+F3 (macOS ⌘+F3).

Ungrouping

To ungroup or break apart a permanent group of objects, use one of the following methods after selecting the group:

Go to Shape > Group > Ungroup on the Menu bar.

Right-click and select Ungroup in the context menu.

Use the keyboard shortcut Ctrl+Alt+Shift+G (macOS ⌥+⌘+Shift+G).

Nesting groups

A group of groups, more commonly known as nested groups, can be created. When nested groups are created, Draw retains the individual group hierarchy and remembers the order in which groups were selected. That is, the last individual group selected will be on top of all the other groups within a nested group. Ungrouping and entering a nested group work in the same way as for individual groups.

Combining objects

Combining is a permanent merging of objects, creating a new object. The original objects are no longer available as individual entities and cannot be edited as individual objects. Any editing of a combined object affects all the objects that were used when combination was carried out. For more information on combining objects, see the Draw Guide.

After selecting the objects for combining, use one of the following methods to create a new object. An example of combining objects is shown in Figure 223 on page 314.

Go to Shape > Combine on the Menu bar.

Right-click on the objects and select Shapes > Combine in the context menu.

Use the keyboard shortcut Ctrl+Shift+K (macOS ⌘+Shift+K).

Merging, subtracting, and intersection

After selecting several objects, the Merge, Subtract, and Intersect functions become available. These functions are similar to combining objects, but allow the creation of a differently shaped object from the selected objects. The shape of the object depends on which function used. See the Draw Guide for more information on how to use these functions.

Arranging, aligning, and distributing objects

In Draw, selected objects can be arranged, aligned, and distributed in relation to each other. See the Draw Guide for more information on arranging and aligning objects.

Arrange the position of an object by moving it either forward or backward in relation to the order of objects.

Align objects with respect to each other using Left, Centered, or Right for horizontal alignment and Top, Center, or Bottom for vertical alignment.

Distribute objects so that the space between each of the objects is the same.

Inserting and exporting images

Inserting

Draw contains a number of functions for editing images (also called pictures, raster graphics, or bitmaps). These functions include the import and export of images, and conversion from one image format to another. For more information on working with images, see Chapter 5, Working with Images and Graphics, in this guide and the Draw Guide.

Draw includes a large range of filters so that it can read and display several image file formats. It also includes several tools for working with images, but does not have the same functionality as specialized programs, for example GIMP, or Adobe Photoshop.

Images can be added from several sources:

Directly from a scanner (Insert > Media > Scan on the Menu bar).

Created by another program, for example photographs from a digital camera (Insert > Image on the Menu bar).

The LibreOffice Gallery; see Chapter 5, Working with Images and Graphics.

Exporting

Draw saves images as drawings in the Open Document Format (odf). To save an image or the entire Draw file in another format, go to File > Export on the Menu bar and select a format in the drop-down list. The image formats that Draw can export in and save to are listed in Appendix B, Open Source, Open Standards, OpenDocument.

Draw files can also be exported in HTML, XHTML, or PDF format. The HTML export uses a conversion wizard that creates as many web pages as there are pages in a Draw document. Optionally drawing pages can be displayed in frames with a navigator and an index page. For more information about file formats, see Chapter 10, Working with File Formats, Security, and Exporting.

Working with 3D objects

Although Draw does not match the functionality of specialized drawing, or image editing programs, it is capable of producing and editing good 3D drawings. For more information, see the Draw Guide.

Create a 3D object in Draw using one of the following methods:

Select a 3D shape in the 3D Objects panel in the Shapes deck on the Sidebar.

Right-click on a 2D object and select Convert > To 3D, or To 3D Rotation Object in the context menu.

Right-click on a 2D object and select Format > 3D Effects on the Menu bar.

Working with layers

Using layers when creating complex drawings makes a drawing easier to navigate and edit. Placing a simpler drawing that is part of a complex drawing into its own layer makes editing easier. Any area of a layer that does not contain a drawing object is transparent and does not obscure any part of a complex drawing. Any number of layers can be added to a drawing. For more information on layers, see the Draw Guide.

A drawing in LibreOffice contains three default layers that cannot be deleted or renamed:

Layout — is the default Workspace where objects are normally placed when a drawing is created.

Controls — used for form controls that have been assigned an action. Objects on this layer are always in front of objects on other layers.

Dimension Lines — is where the dimension lines are drawn. By switching the layer to show or hide, dimension lines can be switched on or off.

A layer can be set to one or all of the following attributes:

Visible or hidden.

Printable or not printable.

Locked or unlocked.

Figure 224: Insert Layer dialog

To quickly toggle the attributes for a selected layer, use the following keyboard shortcuts:

Shift+click — toggle between a layer being visible or hidden.

Ctrl+click (macOS ⌘+click) — toggle between a layer being locked or unlocked.

Ctrl+Shift+click (macOS ⌘+Shift+click) — toggle between a layer being printed or not printed.

Adding layers

Use one of the following methods to open the Insert Layer dialog (Figure 224):

Go to Insert > Layer on the Menu bar.

Right-click on the layer tabs at the bottom of the Workspace and select Insert Layer in the context menu.

Enter a meaningful Name, Title, and Description for the new layer in the text boxes.

Select Visible if the layer is to be visible in a drawing. When Visible is not selected, the layer is hidden and its name in the layer tab changes color to blue.

Select Printable if the layer is to be printed when a drawing is printed. Not printing is useful if a draft layer is required for guides or annotations that are used in making a drawing, but do not appear in the final output. The name of a layer is underlined in the layer tab bar when the Printable option is turned off.

Select Locked to prevent any objects on this layer from deletion, editing, or moving. No additional objects can be added to a locked layer. Locking a layer is useful, for example, when a base plan is to be protected while adding a new layer with other details. The name of a locked layer is written in Italics in the layer tab bar.

Click OK to create the new layer and close the Insert Layer dialog. A new layer automatically becomes active when added to a drawing.

Note

Layers are added to the drawing in the order that they were inserted. The layer order cannot be changed.

Modifying layers

To modify a layer, use one of the following methods to open the Modify Layers dialog, which is similar in layout and options to the Insert Layers dialog.

Right-click on the name tab of the layer and select Modify Layer in the context menu.

Double-click on the layer tab.

Go to Format > Layer on the Menu bar.

Make the required changes to the layer, then click OK to save the changes and close the Modify Layers dialog.

Selecting colors

Colors are selected using a Color palette, the Area and Line panels on the Properties deck of the Sidebar, and tools on the Line and Filling, and Drawing toolbars.

Note

For a more detailed description of the options available for Color palettes and custom colors, as well as more information on the difference between the CMYK and RGB Color schemes, refer to the Draw Guide.

Color palette

The Color Palette allows quick selection of a color for an area, background, or lines of selected objects in a drawing. To display the Color Palette (Figure 225), go to View > Color Bar on the Menu bar. To close the Color Palette, go to View on the Menu bar and deselect Color Bar.

Left-click on a color to change the area or background color of a selected object.

Right-click on a color to change the color of lines in a selected object.

Left-click on the box with the X at the bottom left of the Color Palette to select no color for the area, or background of a selected object.

Right-click on the box with the X at the bottom left of the Color Palette to select no color for the lines of a selected object.

Sidebar color

In the Area and Line panels in the Properties deck on the Sidebar (Figure 226), the Color of an area or line of a selected object can be changed.

Select an object in a drawing.

Click on Properties on the Sidebar. In the Properties deck, open the Area and/or Line panels by clicking on the triangle ▼ on the panel title bar.

Figure 225: Color Palette (Color Bar)

Figure 226: Area and Line panels in Properties deck on Sidebar

Change the color of an area in the Area panel as follows:

Select Color in the Fill drop-down list.

Click on the triangle ▼ next to the Fill Color box to open a drop-down list of available color palettes.

Select the required color palette from the options available.

Click on the required color to change the area color.

Change the color of a line in the Line panel as follows:

Click on the triangle ▼ next to the Line Color box to open a drop-down list of available color palettes.

Select the required color palette from the options available.

Click on the required color to change the line color.

Toolbar color change

The Line and Filling, and Drawing toolbars have similar tools that can be used to change the color of an area (fill) or line — Fill Color and Line Color. These tools are used in a similar way as changing colors using the Area and Line panels on the Properties deck of the Sidebar.

Adding comments to a drawing

Adding comments to a drawing uses a similar process to the one used in Writer and Calc. For more about adding, navigating, and replying to comments, see Chapter 4, Getting Started with Writer.

Before using comments, make sure that name and initials are entered into Tools > Options > LibreOffice > User Data (macOS LibreOffice > Preferences > LibreOffice > User Data). The name and initials then appears in the comment marker and in the author field of the comment.

If more than one person edits the document, each author is automatically allocated a different background color.

Go to View > Comments on the Menu bar to show or hide the comment markers.

Go to Insert > Comment on the Menu bar. A small box containing the user initials appears in the upper left-hand corner of the drawing with a larger text box beside it (Figure 227). Draw automatically adds the name and the date at the bottom of this text box.

Type or paste comments into the text box.

Figure 227: Example of inserting a comment

If necessary, click and drag the small comment markers to move the comment to a different position on the drawing. Normally, the comment marker is placed on or near the object referred to in the comment.

Right-click on the comment and choose an option from the context menu to carrying out the following:

Delete the current comment.

Delete all the comments from the same author.

Delete all the comments in the document.

Carry out basic text formatting on the comment.

Getting Started Guide 7.5

Chapter 8,
Getting Started with Base

Relational databases in LibreOffice

Introduction

A data source, or database, is a collection of pieces of information that can be accessed or managed by LibreOffice. For example, a list of names and addresses is a data source that could be used for producing a mail merge letter. A business stock list could be a data source managed through LibreOffice.

Base is the database front-end component of LibreOffice. It can create and store an embedded database or connect to external databases. This chapter covers creating a database, showing what is contained in a database, and how the different parts are used by LibreOffice.

Note

LibreOffice uses the terms “Data Source” and “Database” to refer to the same thing, which could be a database such as MySQL or dBase, a spreadsheet or text document holding data, or an address book.

A database consists of a number of fields that contain the individual pieces of data. Each table of the database is a group of fields. When creating a table, you also determine the characteristics of each field within it. Forms are for data entry into the fields of one or more tables which have been associated with the form. They can also be used for viewing fields from one or more tables associated with the form. A query creates a new table from the existing tables based upon how you create the query. A report organizes the information from the fields of a query or table into a document according to your requirements.

Caution

Some Base features (most notably, the HSQLDB database engine, and the ability to create reports) require that a Java Runtime Environment (JRE) is installed.

Please go to Tools > Options > LibreOffice > Advanced to select a JRE from those installed on your computer.

If a JRE is not already installed, you will need to download and install one. For Windows and Linux, you can get Java from https://www.java.com/. For Linux, you can also use the JRE available from the repository of your Linux version. For macOS, you need to install Oracle’s Java Development Kit (JDK), not just the Java Runtime Environment (JRE). Download links can be found by selecting the macOS option at: https://www.oracle.com/java/technologies/downloads/.

Base creates both flat and 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. This is what is known as a one-to-many relationship: one author and more than one book. Most if not all the relationships in such a database are one-to-many relationships.

Consider an employment database for the same library. One of the fields contains the names of the employees while other fields contain the social security numbers and other personal data. The relationship between the names and social security numbers is one-to-one: only one social security number for each name.

If you are acquainted with mathematical sets, a relational database can easily be explained in terms of sets: elements, subsets, unions, and intersections. The fields of a database are the elements. The tables are subsets. Relationships are defined in terms of unions and intersections of the subsets (tables).

Planning a database

Instructions for creating a database for automobile expenses will be used as an example of creating and using a relational database.

The first step in creating a database is to ask yourself many questions. Here are some of the questions and answers developed for the example automobile expenses database in this chapter.

What are the user output requirements?

Information is needed on three broad areas: fuel usage, maintenance, and vacation.

What input data is required for the output?

Fuel purchases, maintenance expenses, and vacation expenses.

What fields fit the fuel purchases area?

Date purchased, odometer reading, fuel cost, fuel quantity, and payment method for it. (Fuel economy need not be included, as it can be calculated using a query.)

What fields fit the maintenance area?

Date of service, odometer reading, type of service, cost of service, and next scheduled service of this type (for example, for oil changes, list when the next oil change should be). A field for notes was added to the list.

What fields fit the vacations area?

Date, odometer reading, fuel (including all the fields of the fuel table), food (including meals and snacks), motel, total tolls, and miscellaneous. These purchases are made by one of two bank cards or cash; There should be a field to state which payment type was used for each item.

What fields fit into the food category?

Breakfast, lunch, supper, and snacks seem to fit. Should all the snacks be listed individually or list the total cost for snacks for the day? Here the snacks are divided into two fields: number of snacks and total cost of snacks. A payment type is also needed for each of these: breakfast, lunch, supper, and total cost of snacks.

What are the fields that are common to more than one area?

Date appears in multiple areas, as does odometer reading and payment type.

How will these fields be used to get the required information?

While on vacation, the expenses for each day are to be listed together. The date fields suggest a relationship between the vacation table and the dates in each of these tables: fuel and food. The date fields in these tables will be linked as the database is created.

The type of payment includes two bank cards and cash. So a table will be created with a field for the type of payment and use it in list boxes in the forms.

Tip

While the fields to create in the tables of the database have been listed, there is one more field that may be needed in a table: the field for the primary key, an identifier unique to each record. In some tables, a suitable field for the primary key has already been listed. In other tables such as the payment type, an additional field for the primary key must be created.

Without the primary key field in a table, any data added, deleted, or modified has to be done by using the Execute SQL Statement dialog (Tools > SQL…). This takes much longer than to insert it using the Table Data View dialog. But thereafter, the data is visible in the table and is available to be used in queries, forms, and reports.

Creating a new database

To create a new database, select File > New > Database on the Menu bar, or click the arrow next to the New icon on the Standard toolbar and select Database in the drop-down menu. You can also click the Base Database button in the Create area of the LibreOffice Start Center. If you are already working in Base, you can also press Ctrl+N. All of these methods open the Database Wizard.

On the first page of the Database Wizard (Figure 228), select Create a new database. Be sure that the HSQLDB Embedded entry is selected in the Embedded database drop-down menu; see the Base Guide for information about using alternative embedded database engines or existing external databases. Click Next.

Figure 228: Creating a new database

The second page of the Database Wizard (Figure 229) has two questions. For the first question, it is advised that the database should be registered. Make sure the choice for the second question is Open the database for editing. Click Finish. The Database Wizard will prompt you to select a location to name and save the database.

Figure 229: Registering the new database

Note

In Writer and Calc, selecting View > Data Sources, or pressing the Ctrl+Shift+F4 key combination, opens and closes the Data Sources window containing the list of registered databases. If a database is not registered, this window will not contain it and you cannot access it in Writer or Calc if you need to use data from it.

Save the new database with the name Automobile. This opens the Automobile.odb – LibreOffice Base window (Figure 230).

Figure 230: LibreOffice Base window

Tip

Every time the Automobile database is opened, the Automobile.odb – LibreOffice Base window opens. Changes can then be made to the database. The title for this window is always <database name> – LibreOffice Base.

Caution

As you create a database, you should save your work regularly. This means more than 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. This makes it part of the database in memory. But it is only when you save the database file that the table is written to disk.

Note

Database files in Open Document Format are stored with the *.odb extension. This file format is actually a container of all elements of the database, including forms, reports, tables, and the data itself. The same format can also store a connection to an external database server instead of the local data, for example, to access a MySQL or PostgreSQL database server in your network.

Creating database tables

In a database, a table stores information in a group of things called fields. For example, a table might hold an address book, a stock list, a phone book, or a price list. A database must have at least one table and may have several.

Each field of a table contains information of a single type. For example, the Phone field of an address book would only contain phone numbers. Similarly, a price list table could contain two fields: Name and Price. The Name field would contain the names of the items; the Price field would contain the amount of each item.

To work with tables, click the Tables icon in the Database list, select View > Tables, or press Alt+A. The tasks that you can perform on a table are in the Tasks list (see Figure 230).

Figure 231: Creating a table using Wizard

Using the Table Wizard to create a table

Wizards are designed to do the basic work. Sometimes this is not sufficient for what is desired; in those cases, use a wizard as a starting point and then build upon what it produces.

The Table Wizard in Base contains two categories of suggested tables: business and personal. Each category contains sample tables from which to choose. Each table has a list of available fields.

A field in a table is one bit of information. For example, a price list table might have one field for item name, one for the description, and a third for the price.

Since none of the fields are needed for the Automobile database are contained in any of the sample wizard tables, a simple table example will be created using the wizard that is unrelated to the Automobile database. This section is merely an exercise in explaining how the wizard works.

The Table 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 (Figure 232).

Step 1: Select fields

We will use the CD-Collection sample table in the Personal category and Employees in the Business category to select the fields we need.

Category: Select Personal. The Sample tables drop-down list changes to a list of personal sample tables.

Sample tables: Select CD-Collection. The Available fields area changes to a list of available fields for this table.

Selected fields: By selecting each field and using the > button, move the following fields from the Available fields list to the Selected fields list in this order: CollectionID, AlbumTitle, Artist, DatePurchased, Format, Notes, and NumberofTracks.

Figure 232: Selecting fields from Personal category

To select fields from another sample table, select Business as the Category. Select Employees in the drop-down list of sample tables. Use the > button to move the Photo field from the Available fields list to the Selected fields list. It will be at the bottom of the list, directly below the NumberofTracks field.

If you make a mistake in selecting fields, click on the field name in the Selected fields list and use the < button to move it from the Selected fields list back to the Available fields list.

If you make a mistake in the order of the selected fields, click the field name that is in the wrong order and use the up and down arrows on the right side of the Selected fields list to move it to the correct position.

Click Next.

Tip

You can double-click a field in the Available fields list to transfer it to the Selected fields list. Similarly you can double-click a field in the Selected fields list to transfer it back to the Available fields list.

Figure 233: Selecting fields for the table

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. (See Figure 234.) You can then make changes to meet your needs. Click each field, one at a time, and make the changes listed below.

Figure 234: Changing field types

Note

If any of these fields requires a mandatory entry, set Entry required to Yes. A blank field will then 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. (The Entry required option is not visible in Figure 234 because AutoValue has been set to Yes.)

CollectionID: Change AutoValue from No to Yes. (example of a mandatory entry)

AlbumTitle:

Entry required: Leave Entry required as No, unless all of your music is in albums.

Length: Unless you have an album title that exceeds 100 characters counting the spaces, do not change the length.

Artist: Use most of the default settings. Since music always has artists, set Entry Required to Yes.

Date Purchased: Field type: default setting. Entry required should be No. (You may not know the date.)

Format: Only change the Entry Required setting: from No to Yes.

Notes: No changes are required.

NumberofTracks: Change the Field type to Small Integer [ SMALLINT ], which allows for 32768 tracks.

Photo: Use the default settings.

Note

In Base the maximum length of each field must be specified on creation. It is not easy to change this later, so if in doubt specify a greater length. Base uses VARCHAR as the field format for text fields. This format uses only the actual number of characters in a field up to the limit set, so a field containing 20 characters will occupy only 20 characters even if the limit is set at 100. Two album titles containing 25 and 32 characters respectively will use space for 25 and 32 characters and not 100 characters.

Another text format is CHAR, which has a fixed length. If the limit is set to 100 characters, every entry into this field will have a length of 100 regardless of whether the actual length is 1 or 100.

Note

Each field has a Field type, which must be specified. 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), use text. If the field will always contain a number (for example, a price), the type should be decimal or another numerical field. The wizard picks the right field type, so to get an idea of how this works, see what the wizard has chosen for different fields.

Tip

Up and down arrows are available on this page (not shown in Figure 234) and you can use these to reorder the list of fields. Also + and – buttons are available and you can use these to remove fields from the list or to add new fields.

When you have finished, click Next.

Step 3: Set primary key

Create a primary key should be checked.

Select option Use an existing field as a primary key.

In the Fieldname drop-down list, select CollectionID.

Check Auto value if it is not already checked. Click Next.

Note

A primary key uniquely identifies an item (or record) in the table. For example, you might know two people called “Randy Herring” or three people living at the same address and the database needs to distinguish between them.

The simplest method is to assign a unique number to each one: number the first person 1, the second 2, and so on. Each entry has one number and every number is different, so it is easy to say “record ID 172”. This option is chosen here: CollectionID is just a number assigned automatically by Base to each record of this table.

Step 4: Create table

If desired, rename the table at this point. If you rename it, make the name meaningful to you. For this example, make no changes.

Leave the option Insert data immediately checked.

Click Finish to complete the Table Wizard. Close the Table Data View window created by the Table Wizard. You are now back to the main window of the database with the listing of the tables, queries, forms, and reports. Notice that a table named CD-Collection is now listed in the Tables portion of the window.

Click the Save button on the Standard toolbar at the top of the main window.

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 copies of the original table, naming each according to the type of music contained in it.

Click on the Tables icon in the Database area of the LibreOffice Base window to see the existing tables.

Right-click on the CD-Collection table icon. Choose Copy in the context menu.

Right-click, and select Paste. The Copy table dialog opens.

Change the Table name to CD-Jazz, and set Options to Definition and data and click Create.

Figure 235: Creating copies of original table

Tip

Using the four action buttons on this page, you can move selected fields, or all fields, in either direction. You can also double-click to move a field from one list to the other.

Click the Save button on the Standard toolbar at the top of the LibreOffice Base window.

Caution

Once tables have been created using the wizard, and data has been entered, editing a table should be very limited. You can add or delete fields, but adding a field requires you to enter the data for that one field for every existing record with an entry for that field.

Deleting a field deletes all the data once contained in that field. Changing the field type of a field can lead to data being lost either partially or completely. When creating a new table, it pays to create the fields with the correct names, length, and format before you add any data.

Deleting a table removes all of the data contained in every field of the table. Unless you are sure, do not delete a table.

Double-click on the CD-Jazz table icon and visually verify the data before closing the table

Right-click on the CD-Jazz table icon, select Delete and confirm deletion.

Creating tables in Design View

Design View is a more advanced method for creating a new table, in which you directly enter information about each field in a table. We will use this method for the remaining tables of our Automobile database.

Note

While the field types and formatting are different in Design View, the concepts are the same as in the Table Wizard.

The first table to be created is Fuel. Its fields are FuelID, Date, FuelCost, FuelQuantity, Odometer, and PaymentType.

Click Create Table in Design View in the Tasks area of the LibreOffice Base window. Base opens the LibreOffice Base: Table Design dialog.

FuelID field: Type FuelID as the first Field Name entry. Press the Tab key to move to the Field Type column. Select Integer [INTEGER] as the field type in the drop-down list. (The default setting is Text [VARCHAR].)

Tip

A shortcut for selecting from the Field Type drop-down list: press the key for the first letter of the choice. You can cycle through the choices for a given letter by repeatedly pressing that key.

Change the Field Properties in the bottom section of the dialog.
Change AutoValue from No to Yes.

Set FuelID as the primary key.
Click in the Field Name cell directly below FuelID. The dialog automatically sets FuelID as the primary key and places a key icon in front of FuelID (Figure 236).

Figure 236: Defining the primary key field

Tip

Certain of the integer field types (Integer and BigInt for example) have an AutoValue field property. When using one of these field types, your selection of Yes for AutoValue automatically makes the field the primary key.

Primary keys for any other field type must be selected by right-clicking the rectangle before the field and selecting Primary Key in the context menu.

Note

The primary key serves only one purpose: to identify each record uniquely. Any name can be used for this field. We have used FuelID for convenience, so we know to which table it belongs.

All other fields (Date, FuelCost, FuelQuantity, Odometer, and PaymentType):

Type the next field name in the Field Name column.

Select the field type for each field.

For Date use Date[DATE]. (Press the D key to select it.)

FuelCost, FuelQuantity, and Odometer use Number [NUMERIC]. (Press the N key once to select it.)

PaymentType uses Text [VARCHAR], the default setting.

FuelCost, FuelQuantity, and Odometer also need changes in the Field Properties section (Figure 237).

FuelCost: Change the Length to 5 and Decimal places to 2. Click Format Field (Figure 237). This opens the Field Format dialog (Figure 238). Use Currency as the Category and your currency as the Format.

FuelQuantity: Change Length to 6 and Decimal places to 3. (Many fuel pumps measure fuel to thousandths of a gallon in the USA.)

Odometer: Change the Length to 10 and the Decimal places to 1.

Repeat steps a) through c) until you have entered all of the fields.

Figure 237: Changing field properties

Figure 238: Format example options

To save and close the table in the Table Design dialog, select File > Save, or click the Save icon on the Standard toolbar, or press Ctrl+S. Name the table Fuel.

Close the Table Design dialog.

In the main database window, select File > Save, click the Save icon on the Standard toolbar, or Ctrl+S to save the database.

Follow the same steps to create the Vacations table. The fields, field types, and descriptions are listed in Figure 239.

Figure 239: Fields in Vacations table

Make the following changes in the Field Properties area of the window.

Odometer: As described in step 3)), bullet c)) for the corresponding field of the Fuel table.

Motel, Tolls, Breakfast, Lunch, Supper, SnCost, and Miscellaneous: Format currency the same as step 3)), bullet c)) for the FuelCost field of the Fuel table.

Making Date the primary key in this table has to be done in a different way because this field is typed as Date, not Integer.

Right-click to the left of the field name Date.

Select Primary Key in the context menu.

Following similar steps to those above, you should use Design View to create a much simpler table entitled Payment Type. This table contains two fields, named Type, with the field type set to Text [ VARCHAR ] and PaymentID (field type Integer [ INTEGER ]). Set the PaymentID field as the primary key for the table.

Defining relationships

Now that the tables have been created, what are the relationships between our tables? This is the time to define them based upon the questions we asked and answered in the beginning.

When on vacation, we want to enter all of our expenses at once each day. Most of these expenses are in the Vacations table, but the fuel we buy is not. So we will link these two tables using the Date fields. Since the Fuel table may have more than one entry per date, this relationship between the Vacations and Fuel tables is one to many (it is designated 1:n.)

The Fuel and Maintenance tables do not really have a relationship even though they share similar fields: Date and Odometer readings. (We are not creating the Maintenance table in these examples.)

Tip

As you create your own databases, you will also need to determine if tables are related and if so how.

To begin defining relationships, select Tools > Relationships. The Automobile – LibreOffice Base: Relation Design window opens and the Add Tables dialog pops up. (You can also open it by clicking the Add Tables icon on the Relation Design window if you ever need to do so.)

Figure 240: Designation for a 1:n relationship

In the Add Tables dialog, use either of these ways to add a table to the Relation Design window:

Double-click the name of the table. In our case, do this for both Vacations and Fuel.

Or, for each table, click the name of the table and then click Add.

Click Close to close the Add Tables dialog when you have added the tables you want.

Define the relationship between the Vacations and Fuel tables: click the New Relation icon on the Standard toolbar, or select Insert > New Relation. This opens the Relations dialog (Figure 241). Our two tables are listed in the Tables Involved section.

In the Fields Involved section, click the drop-down list under the Fuel label.

Select Date in the list.

Click in the cell to the right of this drop-down list. This opens a drop-down list for the Vacations table.

Select Date in the list. It should now look like Figure 241.

Figure 241: Selected fields in a relationship

Modify the Update Options and Delete Options section of the Relations dialog (Figure 242).

Select Update cascade in the Update options area.

Select Delete cascade in the Delete options area.

Click OK.

In the Relation Design dialog, click the Save icon or select File > Save.

Close the Relation Design dialog.

Click the Save button on the Standard toolbar at the top of the main database window.

Tip

The primary key can contain more than one field. (Its foreign key1 A field in a table that stores values of the primary key of records in another table. will contain the same number of fields.) If this were the case in Figure 241, the other fields of the primary field for the Fuel table would be listed under Date. The corresponding fields of the foreign key would be listed under Vacations. Detailed information about this is in the Base Guide.

Figure 242: Update Options and Delete Options section

While these options are not strictly necessary, they do help. Having them selected permits you to update a table that has a relationship defined with another table which has been modified. It also permits you to delete a field from the table without causing inconsistencies.

Creating a database form

Databases are used to store data. But, how is the data put into the database? Forms are used to do this. In the language of databases, a form is a front end for data entry and editing.

A simple form consists of the fields from a table (Figure 243). More complex forms can contain much more, including additional text, graphics, selection boxes, and many other elements. Figure 244 is made from the same table with a text label (Fuel Purchases), a list box placed in PaymentType, and a graphic background.

Tip

A list box is useful when a field contains a fixed number of options. It saves you from having to type data by hand and having to double-check that the entered data is correct, and ensures that invalid options are not entered.

Figure 243: Fields of a simple form	Figure 244: Simple form with additions

In our database, payments for food or fuel might be made from one of two credit cards (Dan or Kevin) or in cash, so these would be the available options for all boxes that contain payments.

Note

To create a list box as in Figure 244, we first need to create a small, separate table containing the name of the options. Then use the contents of the table to fill the list box. See Modifying a form below

Using the Form Wizard to create a form

We will use the Form Wizard to create a Vacations form, which will contain a form and a subform.

In the main database window (Figure 230), click the Forms icon in the Database area, select View > Forms, or press Alt+M. In the Tasks list, click Use Wizard to Create Form to open the Form Wizard (Figure 245). Base displays the Database Form window and the Form Wizard. Simple forms require only some of these steps, while more complex forms may use all of them.

Step 1: Select fields

On the Form Wizard dialog, under Tables or queries drop-down, select Table: Vacations. Available fields lists the fields for the Vacations table.

Click the >> button to move all of these fields to the Fields in the form list. Click Next.

Tip

Using the four action buttons in the center of this page, you can move selected fields, or all fields, in either direction. You can also double-click to move a field from one list to the other. The up and down arrows on the right can be used to re-order entries in the Fields in the form list.

Figure 245: Selecting fields in the Form Wizard

Step 2: Set up a subform

Since we have already created a relationship between the Fuel and Vacations tables, we will use that relationship. If no relationship had been defined, this would need to be done later in the wizard (Step 4: Get joined fields).

Click the box labeled Add Subform.

Click Subform based upon existing relation.

Fuel is listed as a relation we want to add. So click Fuel to highlight it, as in Figure 246. Click Next.

Figure 246: Adding a subform

Step 3: Add subform fields

This step is similar to Step 1: Select fields. The only difference is that not all of the fields will be used in the subform.

Fuel is preselected under Tables or queries.

Use the >> button to move all the fields to the Fields in the form list.

Click the FuelID field to highlight it.

Use the < button to move the FuelID back to the Available fields list (Figure 247).

Click Next.

Figure 247: Selecting fields of a subform

Step 4: Get joined fields

This step is for tables or queries for which no relationship has been defined. Because this has been defined in the relationship, the wizard skips this step.

Note

It is possible to create a relationship between two tables that is based upon more than one pair of fields. How to do that and why is discussed in the Base Guide.

Caution

When selecting a pair of fields from two tables to use as a relationship, they have to have the same field type. That is why we used the Date field from both tables: both their field types are Date [ DATE ].

Whether a single pair of fields from two tables are chosen as the relationship, or two or more pairs are chosen, certain requirements must be met for the form to work.

One of the fields from the main form must be the primary key for its table. (Date would have to be used.)

No field from the subform can be the primary key for its table. (FuelID cannot be used.)

Each pair of joined fields must have the same field type.

Step 5: Arrange controls

A control in a form consists of two parts: label and field. This step in creating the form determines where a control’s label and field are placed relative to each other. The four choices from left to right are Columnar – Labels Left, Columnar – Labels on Top, As Data Sheet, and In Blocks – Labels Above.

Arrangement of the main form: Click the second icon (Columnar – Labels on Top). The labels will be placed above their field.

Arrangement of the subform: Click the third icon (As Data Sheet). (The labels are column headings and the field entries are in spreadsheet format.) Click Next.

Figure 248: Arrange controls

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

Select the color you want in the Apply styles list. (This example uses the Beige option.)

Select the Field border you want. (This examples uses the 3D look option. You might want to experiment with the different possible settings.)

Click Next.

Step 8: Set name

Enter the name for the form. In this case, it is Vacations.

Click Modify the form.

Click Finish. The form opens in edit mode, Base displaying the Fuel – LibreOffice Base: Database Form window.

Figure 249: Basic form created using Wizard

Modifying a form

The form does not look organized at all. Every control seems to have a different size. The background is not the best color, nor are all of the labels the way we would want them.

The reason for different sized controls is that they contain different types of field data. There are three different sized controls: text, formatted, and date. Text controls have their width set to display a large number of characters. Formatted controls will usually contain numbers or decimals although they can contain a wide variety of formatting. So, these are likely going to have a limited number of characters, hence a shorter control. Date controls obviously contain dates. Most formats for them are fairly short, which is the reason for their width. However, one of the date formats is day of the week, month day, year (Thursday, October 31, 2020). This needs a larger width than 10/31/2020 or 31/10/2020 for example.

First, all of the payment type controls need to be modified. The fields need to be replaced with a list box, and each needs to be related to an existing field in the table, Payment Type. The rest of the controls require modification based upon the category into which they fall.

Note

The steps that follow assume that the PaymentType table already contains three single-field records. These might be Cash, Dan, and Kevin. If necessary you could use the Form Wizard to create a very simple form to input or edit these values.

We will carry out the following steps:

Replace fields with list boxes.

Modify text controls (label field first and then the data field).

Modify date control.

Modify formatted controls.

Modify fields in the table.

Group the controls (food, fuel subform, and miscellaneous).

Modify memo control.

Add headings (for each group in the form).

Change the background to a picture, then modify some of the labels so that they can be read clearly against this background. Change the font color of the headings.

Change tab order of fields.

Figure 250 shows a section of the Form Design toolbar, identifying key icons that will be used during the following steps. Figure 251 shows the Form Navigator.

1	Design Mode	3	Form Properties
2	Control Properties	4	Form Navigator
Figure 250: Part of Form Design toolbar

Figure 251: Form Navigator

Step 1): Replace fields with list boxes

Use the Control Properties and Form Navigator icons on the Form Design toolbar to open the corresponding dialogs. (You may need to select a control for the Control Properties icon to become available)

Going down the list of labels and fields in the Form Navigator, click the first text box whose name contains the word “Payment”.

If both the label and text box components of the field are highlighted in the Form Navigator, double-click the text box so that only it is highlighted.

Tip

In some cases when the Form Navigator does not have the input focus, selecting a field highlights both components (for example, label and text) of the field. If this arises, then double-clicking the required component will highlight it, and enable you to subsequently move from one component to another with a single click.

Right-click the text box in the Form Navigator and select Replace with > List Box in the context menu.

In the Properties dialog, the heading becomes Properties: List Box.

The General tab is selected, so scroll down to the Dropdown property. Change No to Yes.

Click the Data tab.

Go to Type of list contents. Change Valuelist to Sql.

The line below this becomes List content. Click the ellipsis (…) to the right of this property.

Base opens the SQL Command – LibreOffice Base: Query Design window and the Add Table or Query dialog. The PaymentType table has the entries that are required.

Click it, and then click the Add button.

Close the Add Table or Query dialog.

In the SQL Command – LibreOffice Base: Query Design window, double-click Type in the table named PaymentType. This places Type in the Field row of the tabular area.

Figure 252: Selecting PaymentType

Save and close this window. The SQL code appears in the List content property. (SELECT "Type" FROM "PaymentType")

Change the Bound field value from 1 to 0.

Repeat these steps for each field containing the word “Payment”, six fields in total. (See Note below before doing this.)

Tip

There are times, as in this example, when 8)) through 12)) produces the same SQL code. When this happens, copy the code. Paste the code into the Type of list contents property before doing 13)). It is a nice shortcut.

Step 2): Modifying text controls

These are limited to controls whose fields begin with txt. This is when the labels and fields are modified if necessary to make them more meaningful. In this example, all but one control contains the word “Payment”. The content of these are payment types which determines that name given to them. The other one is named Note.

Next the size of the controls needs to be modified based upon the contents they will contain. Because it is hard to determine beforehand just how large the Note control needs to be, this will be done after all of the other controls are arranged in a more compact order. The rest of the controls with text will have their sizes changed now.

Rename the labels.

Locate the topmost text control in the Form Navigator.

Select the associated the control label (begins with lbl). Make sure that the title of the Properties dialog has become Label Field.

Click the General tab if it is not already selected.

Click the down-arrow at the right end of the Label property to open the drop-down. Only then rename the label to Payment Type and press Enter.

Click on another property to save this change.

Adjust the width of the label field if necessary for the new width of the label name.

Repeat a)) through f)) for each label field in the form that contains the word Payment.

Note

This database form contains multiple controls with the same label: Payment Type. When this name has been entered for the first time, it can be copied. In d)) for the next label, highlight the current label name, paste the name you want, and click another property.

Resize the fields.

Make sure that you are in the edit mode, with the Form Navigator and Properties dialogs open.

In the Form Navigator dialog, click the field whose size you want to change.

Scroll down to the Width property in the Properties dialog.

Estimate the width required based on the set of possible values for this field and change the Width property to that value. In the case of our Payment Type fields, the text box should be wide enough for the longest possible payment type value of “Kevin”.

Figure 253: Modifying listbox properties

Click either the PositionY or the Height property to save the change. (These are adjacent properties, but clicking on any other property will do the same thing.)

Use these same steps to change the size for each of the remaining text controls, including txtSnackNo and all the payment type fields.

Step 3): Modify date control

With the Properties and Form Navigator dialogs open, select the datDate field in the Form Navigator dialog. The heading of the Properties dialog changes to Properties: Date Field.

In the General tab of the Properties dialog, scroll down to the Date format property. In the drop-down list, select the date format you desire.

Scroll down to the Dropdown property and select Yes.

Is the width of the Date field inappropriate for the selected format? If so:

The Date field has a border around it.

Move the cursor over the middle green marker on the right side of the Date field. It should become a horizontal double arrow. Drag this to the right to increase the width. Drag it to the left to reduce the width. (It may take several attempts to get this right.)

Step 4): Modify formatted controls

At each step, instructions have been given for which changes need to be made. With the help of the Form Navigator, make a list of the formatted fields and their labels. The fields are those with the prefix, fmt. (There are eight of them.)

One of these fields, Odometer, contains the odometer readings as integers. The rest are currency fields. Selecting the correct format follows the same steps.

Working with one control at a time perform the following tasks:

Check that the label of the control provides the annotation that you require. In the case of lblSnCost, change it to Snack Cost.

Click the label of the control to be modified in the Form Navigator. If the border for the label is longer or shorter than the text in the label, adjust its width as described for the Date field above.

Click this formatted field in the Form Navigator list.

Under the General tab, scroll down to the Formatting property.

Click the ellipsis (…) on the right to open the Format Number dialog.

For the Odometer field click Number in the Category list, otherwise click Currency.

Under Format, select the example to be used.

Select the desired number of decimal places (one for Odometer, two otherwise).

Select the desired number of leading zeros.

Negative numbers red: check if yes, remove the check if no.

Thousands separator: check if yes, remove check if no.

Click OK.

If the width of the field is not correct for the selected format, adjust its width as described for the Date field above.

Repeat these steps for each field name in the Form Navigator that begins with fmt.

Step 5): Modify fields in the table

The labels in these controls form the headings of the columns. The values of the field are in the column. The Form Navigator does not show any information about them. So modifications must be done using the Properties dialog.

The controls in a table control require the same types of modification as have already been discussed. To change things, click the header to be able to access that particular control’s properties.

Click the Date label (the column named Date).

Scroll to the Date format property. In the drop-down list, select the format you desire, if different from the default setting.

Scroll to the Width property. Adjust the width if necessary.

Scroll to the Dropdown property. If you want to have a small calendar pop-up window, select Yes.

Click the FuelCost label.

Open the drop-down list for the Label property. Add a space between Fuel and Cost. Press Enter.

Scroll to the Formatting property. Click the ellipsis (…) on the right. Select Currency from the Category column. Uncheck Negative numbers red and Thousands separator. Click OK.

Scroll to the Width property. Adjust the width if necessary.

Change the Alignment property if you do not want data to be to the left. Select Center to put the data in the middle of the cell.

Click the FuelQuantity label.

Open the drop-down list for the Label property. Add a space between Fuel and Quantity. Press Enter.

Scroll to the Formatting property. Change if needed to show three decimal places.

Scroll to the Width property. Adjust the width if necessary.

Change the Alignment property if you do not want data to be to the left. Select Center to put the data in the middle of the cell.

Click the Odometer label.

Scroll to the Formatting property. Change if needed to show one decimal place.

Scroll to the Width property. Adjust the width if necessary.

Change the Alignment property if you do not want data to be to the left. Select Center to put the data in the middle of the cell.

Click the PaymentType label.

Right-click this label to open a context menu to add a list box. Select Replace with > List Box in the context menu.

Open the drop-down list for the Label property. Add a space between Payment and Type. Press Enter.

On the Data tab, change the Type of list contents property to Sql.

Paste the SQL code SELECT "Type" FROM "PaymentType" into the List content property. (This is a shortcut method – see the Tip on page 350 and the detailed instructions above it if you want more details).

Step 6): Group the controls

This is a suggested layout which looks reasonably well organized. Use this one or create one that appeals to you. The controls may be wider or narrower than yours because of the content that will be in them. Note that this layout has left space for the additional labels that will be added later.

Three icons need to be activated on the Form Design toolbar: Display Grid, Snap to Grid, and Helplines While Moving. If this toolbar is on the side of the form, click the double arrow (») to open a sub toolbar showing them. If the toolbar is on the top or bottom of the form, they are on the right end of it. If there is a double arrow at the end, click it to reveal them. Make sure they are highlighted as in this figure.

Figure 254: Help for moving controls

Tip

You can also control the Display Grid, Snap to Grid, and Helplines While Moving options using the View > Grid and Helplines menu.

Some of the controls need to be moved in pairs so the Form Navigator needs to remain open. Close the Properties dialog now.

Note

When moving a control, it is tempting to use the PositionX and PositionY properties to place the control exactly where you want it to be. Do not do this. This will place the control’s label and field on top of each other. These properties can be used to move a label or field to a specific location, but are not designed to move a control. Use the Position and Size icon on the Form Design toolbar to move a control or group of selected controls.

The list in the Form Navigator reveals which controls needed to be grouped based upon their names:

lblMotel / fmtMotel with lblMPayment / txtMPayment;

lblBreakfast / fmtBreakfast with lblBPayment / txtBPayment;

lblLunch / fmtLunch with lblLPayment / txtLPayment;

lblSupper / fmtSupper with lblSPayment / txtSPayment;

lblSnackNo / txtSnackNo with lblSnCost / fmtSnCost and with lblSnPayment / txtSnPayment (group these three controls together);

lblMiscellaneous / fmtMiscellaneous with lblMiscPayment / txtMiscPayment.

That is six groups of controls; each one will be moved separately.

Figure 255: Form suggested layout

The layout shows, for each of these groups, an order as to where each control of a group goes. For most of them, the first control holds the cost, and the second contains the payment type in a row. The snacks places the number of snacks followed by the cost and then the payment type. The miscellaneous controls contains the payment below the cost.

Before moving an entire group to a new location, move the controls within the group to where you want them to be relative to each other, such as the order mentioned in the last paragraph.

Click on the first control, placing a border around it.

Place the mouse pointer over the label or field where it changes its shape.

Drag it to an open area of the form.

Using the same method, move the second control to the correct position relative to the first control.

As soon as you begin to move it, the helplines will appear. Use them to line up the edges of the controls before releasing the mouse button.

If there is a third control, move it to the correct position relative to the second one.

Move the controls for the group to where you want them:

Click the first component in the Form Navigator list.

Use the standard Control+Click and Shift+Click mechanisms until all of the labels and fields in this group are highlighted.

Place the mouse pointer over one of the labels or fields changing the arrow.

Drag the group to where you want its controls to be.

Repeat for the other controls using these same steps. If a group is going to be below another group of controls, use the helplines to line up the left end of the two groups (for example: first control under left control).

Step 7): Modify memo control

The size of the Note control allows it to be moved into a place on the form that permits the controls of the form to be organized without changing the size of the Note control. This might not always be the case. If the size had needed modification, this is done using the same methods as for other text controls.

The other modification is adding scrollbars. The choices are none, vertical, horizontal, or both.

To change the size of this control, follow the same steps for changing the size for any text control.

If necessary, move the control to the required position using the same steps described above for grouping the controls (Step 6)).

Click the Control Properties icon on the Form Design toolbar if the Properties dialog is not open.

Select the txtNotes control in the Form Navigator dialog.

On the Properties dialog, click the General tab if it is not selected.

Scroll down to the Text type property.

Select the Multi-line option in its drop-down list.

Scroll down to the Scrollbars property.

In its drop-down list, select the option you need (None, Vertical, Horizontal, or Both).

Close the Properties dialog.

Figure 256: Scroll bar selections in the Properties dialog

Step 8): Add headings

This task is easier to complete if you have end-of-paragraph markers visible. You should turn them on by selecting View > Formatting Marks, or by clicking the Toggle Formatting Marks icon on the Standard toolbar, or by pressing Ctrl+F10.

Make sure that the cursor is in the top left hand corner of the Database Form window. If it is not, click in that corner to move the cursor there.

Press the Enter key repeatedly to move the cursor down until it aligns with the gap between the Date field and the Breakfast field.

Use the Set Paragraph Style drop-down list on the Formatting toolbar to select the Heading 2 style.

Use the space bar to move the input cursor along the empty line to the position where you want the first heading to appear. Type the heading Meals.

Use the space bar to move the input cursor along the same line to the position where you want the second heading to appear. Type the heading Snacks.

Press the Enter key repeatedly to move the cursor down until it aligns with the gap between the Supper field and the table.

If necessary, use the Set Paragraph Style drop-down list on the Formatting toolbar to re-select the Heading 2 style.

Use the space bar to move the input cursor along the line to the position where you want the table’s heading to appear. Type the heading Fuel Data.

Tip

If you have experience in using styles, you can open the Styles deck by selecting View > Styles, or by pressing F11. Right-clicking the Heading 2 style and selecting the Modify option in the context menu would allow you to quickly modify the appearance of all three headings. See the Writer Guide for details.

Step 9): Change the background

The background for a form can be a color, or a graphic (picture). You can use any of the colors in the color table at Tools > Options > LibreOffice > Application Colors. If you know how to create custom colors, you can use them. You can also use a picture (graphic file) as the background.

To add a color to the form background:

Right-click the form and select Page Style in the context menu.

Base displays the Page Style dialog (Figure 257). Make sure the Area tab is selected.

Figure 257: Page Style dialog

Select Color in the row of buttons near the top of the tab.

Select a color from the grid. You can change the color palette to access more choices or use the RGB or Hex boxes to specify a color, or click Pick for even more choices.

Click Apply to see what your selection will look like in your form.

Change if necessary.

Click OK to accept your color choice and close the dialog.

To add other form backgrounds:

Perform steps 1)) and 2)) as for adding color to the background.

Select the type of background from the row of buttons: None, Gradient, Bitmap, Pattern, or Hatch.

In the selected type, choose one of the selections provided or create your own. For details, see Chapter 4, Changing Object Attributes, in the Draw Guide.

Click Apply to see what your selection will look like in your form.

Click OK to accept your choice and close the dialog.

If you selected a bitmap in the list, the form might look like Figure 258.

Step 10): 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. For example, all of our meal receipts can be grouped together as can our snacks and also our fuel purchases.

Figure 258: Finished form

Figure 259: Form Design toolbar with Activation Order icon circled

If it is not open already, select View > Toolbar > Form Design to open the Form Design toolbar.

Click the Activation Order icon (circled in Figure 259).

Rearrange the order of the fields in the Tab Order dialog.

If you click the Automatic Sort button, Base will interpret the structure of your form and propose what it considers to be a sensible tab order.

You can use the Move Up and Move Down buttons to change the position of a selected control in the list.

You can drag a control from one position to another in the Controls list.

You may chose to define your own tab order, or you could put the fields in the same order as that shown in Figure 260.

Click OK.

Save and close the form.

Save the database.

Figure 260: Possible tab order for the Vacations form

Entering data in a form

Records are used to organize the data we enter into a form. They also organize the data we enter into a subform.

Different types of fields allow different methods of data entry. In many cases, more than one method can be used.

The first step to entering data in a form is to open it from the main database window (Figure 230).

Click the Forms icon in the Database list, or select View > Database, or press Alt+M.

Find the form’s name in the Forms list (Vacations).

Double-click the form’s name.

Note

The order in which the following descriptions are presented assume a particular tab order for the form, and this may not match the tab order that you want to define.

The quickest way to enter a date in the Date field is to click the arrow that opens the drop-down calendar (Figure 261) and click the day that you want. Then press the Tab key to go to the next field.

Figure 261: Calendar drop down

The Odometer, Tolls, and Motel fields are numeric fields. Enter values directly into them, or use the up and down arrows (if you selected to display them during form creation). When the value has been entered, use the Tab key to go to the next field.

Typing the up arrow increases the value, and the down arrow decreases the value by one unit.

The two arrows only change the numerals to the left of the decimal place.

Numerals to the right of the decimal place must be changed by deleting them and typing the desired ones.

The Motel’s Payment Type field is a drop-down list. If all of the elements of the list start with different letters, typing the first letter selects the desired entry.

If two or more elements of the list have the same first letter, repeated typing of the first letter will cycle through these elements.

When the selection is correct, use the Tab key to go to the next field.

The rest of the fields of the main form are either numeric fields or drop-down lists until we reach the Notes field. It is a text field. Type anything you desire in this field just as you would any simple text editor.

Note

The Tab key is used to move between fields. But since text fields do not have tab positions in them, they can not be used to move from one position in the field to another one. All spacing must be done by the space bar. The Enter key is a little more complex. It can be used to move between non-text fields. With a text field, its action depends upon whether the text field has a single line property. With it, pressing Enter will move the cursor to the next field. But when the field has a multi-line property, pressing Enter moved will only move the cursor down one line. With this field, the Tab key has to be used to move the cursor to the next field.

If we did not have a subform for fuel data, pressing the Tab key in the last field would save all of the fields, clear them, and make the form ready to accept data on the second record.

Since we have a subform, using the Tab key places the cursor in the first Date field of the subform with the date automatically entered to match the Date field of the main form.

The Fuel Cost, Fuel Quantity, and Odometer fields are numeric fields. The Payment Type field is a drop-down list. Enter the data just as you did in the main form, and use the Tab key to go to the next field.

When you use the Tab key to leave the Payment Type field, it goes to the Date field of the next line and automatically enters the date. Now you can enter your second set of fuel data for this day.

To move to another record when the form has a subform, click any of the fields of the main form. In this case, click the Date field of the main form. Then use the directional arrows at the bottom; from left to right: First Record, Previous Record, Next Record, and Last Record (all have keyboard shortcuts identified in their extended tips). To the right of these arrows is the New Record icon.

To create a new record while in the last record of the main form, click either the Next Record icon or the New Record icon.

Tip

The number in the Record box is the number of the record whose data is shown in the form.

If you know the number of the record you want, you can enter it into the record box and then type Enter to take you to that record.

Figure 262 is a record with data inserted in its fields.

Figure 262: Sample record of the Vacations form and subform

Quickly populate a table with data from a spreadsheet

If you have data in a spreadsheet document that represents the layout of a database table, and you want to copy it into a table of your database, then it is possible to load the sheet contents quickly by dragging and dropping the sheet into a database table:

Open the database file in the LibreOffice Base window (Figure 230) and select the Table view.

Open the spreadsheet in Calc. Select the sheet you want to insert in the database.

Place the two windows side by side on your desktop.

Drag the sheet tab in the bottom of the Calc window into the table list of the database file. The mouse pointer shows a square with a + sign. (Sheet tab: This has the name of the sheet on it.)

Drop the sheet by releasing the mouse button.

The Copy table wizard appears to help you migrate the content to the database table.

On the first page of the wizard, select the options of the copy operation and name the database table. Each option is explained in the Help (F1).

On the second page of the wizard, select the sheet columns you want to copy into the table.

On the third page of the wizard, define the data type of each column of your table.

Click Create to populate the new table with the spreadsheet data.

Note

The Copy table operation copies only values and strings from the Calc spreadsheet. It does not copy formulas.

Creating queries

Queries are used to get specific information from a database. Their results are special tables within the database.

To demonstrate the use of queries, we will use two different methods:

Using our CD-Collection table, we will create a list of albums by a particular artist. We will do this using the Query Wizard.

The information we might want from the Fuel table includes what our fuel economy is. We will do this using Design View. (Queries that require calculations are best created with Design View.)

Using the Wizard to create a query

Queries created by the Query Wizard provide a list, or lists, of information based upon what one wants to know. It is possible to obtain a single answer or multiple answers, depending upon the circumstances.

In the main database window (Figure 230), click the Queries icon in the Database section, select View > Queries, or press Alt+Q. In the Tasks section, click Use Wizard to Create Query. The Query Wizard dialog opens (Figure 263). The information we want is which albums are by a certain musical group or individual (the album’s artist). We can include when each album was bought.

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.field name, with a period (.) between the table name and the field name. For example, the Lunch field of the Vacations table used in a query has the name Vacations.Lunch.

Figure 263: First page of the Query Wizard

Step 1: Select the fields

Select the Table: CD-Collection option in the Tables drop-down list.

Select fields from the CD-Collection table in the Available fields list.

Click Artist, and use the > button to move it to the Fields in the Query list.

Move the AlbumTitle and DatePurchased fields in the same manner. You can also move a single field from one list to the other by double-clicking.

If you make a mistake, you can return an unwanted field from the Fields in the Query list to the Available fields list by selecting it and then typing the < button.

In other circumstances, you can use the >> and << buttons to move all fields in one list to the other list.

Click Next.

Tip

To change the order of the fields, select the field you want to move and click the up or down arrow to the right of the Fields in the Query list.

Step 2: Select the sorting order

Up to four fields can be used to sort the information of our query. A little simple logic helps at this point. Which field is most important?

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 264: Sorting order page

Click the first Sort by drop-down list.

Select the CD-Collection.Artist option.

To list the artists in alphabetical order (a-z), select Ascending on the right.

Click the first Then by drop-down list.

Select CD-Collection.AlbumTitle and then select Ascending.

Click the second Then by drop-down list.

Select CD-Collection.DatePurchased and then select Ascending.

Click Next.

Step 3: Select the search conditions

The search conditions allow us to compare the name we entered with the names of the artist in our database and decide whether to include a particular artist in our query results or not. The following options are available:

is equal to: the same as

is not equal to: not the same as

is smaller than: comes before

is greater than: comes after

is equal or less than: the same as or comes before

is equal or greater than: the same as or comes after

like: similar to in some way

not like: is not similar to

is null:

is not null:

Note

These conditions apply to numbers, letters (using alphabetical order), and dates.

Since we are only searching for one thing, we will use the default setting of Match all of the following.

We are looking for a particular artist, so select CD-Collection.Artist in the Fields drop-down and is equal to in the Condition drop-down.

Type the name of the artist in the Value box.

Click Next.

Step 4: Select the type of query

We want simple information, so the default setting: Detailed query is what we want. Click Next.

Note

Since we have a simple query, the Grouping and Grouping conditions are not needed. Steps 5 and 6 of the wizard are skipped in our query.

Step 7: Assign aliases if desired

The fields, AlbumTitle and DatePurchased, have names made up of two words without separation. Instead, aliases can be made containing two words each (Album Title and Date Purchased, respectively).

Change the alias for AlbumTitle to Album Title.

Change the alias for DatePurchased to Date Purchased.

Click Next.

Step 8: Overview

Make sure that the query conditions listed in the Overview area are the ones you wanted.

If something is wrong, use the Back button to move to the step that contains the error.

Then use the Next button to return to this Overview step.

Name the query (suggestion: Query_Artists).

To the right of this are two choices. Select Display Query.

Click Finish.

Base displays the LibreOffice Base: Table Data View query showing any records that match the query. Close the window when you have finished with it.

Using Design View to create a query

Creating a query using Design View is not as difficult as it may first seem. It may take multiple steps, but each step is fairly simple.

What fuel economy is our vehicle getting (miles per gallon in the USA)? This question requires us to create two queries, with the first query used as part of the second query.

Step 1: Open the first query in Design View

Click Create Query in Design View in the Tasks area of the main window. Base displays the Add Table or query dialog (Figure 265) and the LibreOffice Base: Query Design window.

Step 2: Add tables to window

In the Add Table or query dialog, click Fuel to highlight it.

Click Add.

Click Close.

Base closes the Add Table or Query dialog and includes the Fuel table in the upper area of the Query Design window.

Figure 265: Add Table or Query dialog

Tip

Move the mouse pointer over the bottom edge of the Fuel table (Figure 266) and drag the edge to make it longer and easier to see all of the fields in the table.

Figure 266: Fuel table in query

Step 3: Add fields to the table at the bottom

Double-click the FuelID field in the Fuel table.

Double-click the Odometer field.

Double-click the FuelQuantity field.

Double-click the FuelCost field.

The query table at the bottom of the Query Design dialog should now have four columns (Figure 267).

Figure 267: Query table

Step 4: Set the criterion for the query

We want the query to include FuelID values that are greater than 0.

Type >0 in the Criterion cell under FuelID in the query table.

Click the Run Query icon on the Query Design toolbar(circled in red in Figure 268), or click View > Run Query, or press F5.

Figure 268: Run Query icon in Query Design toolbar

Base presents the results of the query in the area above the query table.

Figure 269 shows the Fuel table with sample entries. The query results based upon the Fuel table are shown in Figure 270.

Figure 269: Fuel table

Figure 270: Query of Fuel table

Step 5: Save and close the query

Since this query contains the final odometer reading for our calculations, name it End-Reading when saving it. Then close the query. Now click the Save icon in the main database window.

Step 6: Create the query to calculate the fuel economy

Click Create Query in Design View in the Tasks area of the main window to open a new query.

Base opens the LibreOffice Base: Query Design window and the Add Table or Query dialog.

Add the Fuel table to the query just as you did in Step 2: Add tables to window but do not close the Add Table or Query dialog.

Add the End-Reading query to this query.

Click Queries to get the list of queries in the database (Figure 271).

Click End-Reading.

Click Add, and then click Close.

Base closes the Add Table or Query dialog and displays the Fuel table and End-Reading query in the upper area of the Query Design window.

Figure 271: Selecting queries to add to another query

Step 7: Add fields to the table at the bottom of the query

We are going to calculate the fuel economy. To do this we need the fuel quantity and distance traveled. Since the fuel quantity we want to use is the final odometer reading, we will use the End-Reading query to get it. We will also use the Odometer field from both the Fuel table and End-Reading query.

Figure 272: Tables in this query

Double-click FuelQuantity in the End-Reading query.

Double-click Odometer in the End-Reading query.

Double-click Odometer in the Fuel table.

Figure 273: Added fields to the query

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).

Type "End-Reading"."FuelID" - "Fuel"."FuelID" in the field to the right of the Odometer field of the Fuel table (Figure 274).

Type = '1' in the Criterion cell of this column.

Leave the Visible cell of this column unchecked.

Calculate the distance traveled:

Type in the next empty Field cell (Figure 275):
"End-Reading"."Odometer" - "Fuel"."Odometer"

In the Alias row, type Distance.

Type > '0' in the Criterion cell.

Calculate fuel economy: Type
("End-Reading"."Odometer" - "Fuel"."Odometer")/"End-Reading"."FuelQuantity"
in the next column to the right of the word Field (Figure 276).

Type Fuel Economy as the alias.

Figure 274: Typing in calculation of fields

Figure 275: Field for distance traveled calculations

Figure 276: Fuel economy calculation field

Note

When entering fields for these calculations, you must follow this format: table or query name followed by a period followed 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 276.

Use the arithmetical symbol between the two. More than one calculation can be done by using parentheses to group the arithmetical operations.

Step 9: Run the query and make some modification

After we run the query to make sure it works correctly, we will hide all of the fields that we do not need.

Figure 277: Result of running the fuel economy query

Click the Run Query icon on the Query Design toolbar (Figure 268). The results are shown in Figure 277.

Two of the column headers are identical. By giving these two headers different aliases, we can distinguish them.

Add Aliases: Type the aliases as they are listed in Figure 278.

Figure 278: Query table with Odometer aliases added

Run the query again. The results are in Figure 279.

Figure 279: Query run with aliases

Step 10: Close, save, and name the query

Name the query Fuel Economy.

Click the Save icon.

Name the query.

Close the query.

Save the database file.

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 payment types.

Note

To fully use queries requires a knowledge of set operations (unions, intersections, and, or, complements, or any combinations of these). Having a copy of the RDBMS manuals, is also extremely useful.

Creating reports

Reports provide information found in the database arranged in a useful way. In this respect, they are similar to queries. They are different in that they are designed to be distributed to people. Queries are only designed to answer a question about the database. Reports are generated from the database’s tables, views, or queries.

All reports are based upon a single table, view, or query, so you need first to decide what fields you want to use in the report. If you want to use fields from different tables, you must first combine these fields in a single query or view. Then you can create a report from this.

For example, a report on vacation expenses includes both fuel costs and meal costs. These values are contained in fields of two different tables: Vacations and Fuel. So this report requires you to create a query or view.

Caution

Dynamic reports update only the data that is changed or added to a table or query. They do not show any modifications made to the table or query itself. For example, after creating the report below, open the Fuel Economy query created in the previous section. For the “End-Reading”.“Odometer” – “Fuel”.“Odometer” column, change the number 1 to the number 3 (see Figure 274). The report will be identical before and after you make the change. But if you add more data to the query and run the report again, it will contain the new data. However, all data will be based upon “End-Reading”.“Odometer” – “Fuel”.“Odometer” having the value 1. No data will be present in the report for which “End-Reading”.“Odometer” – “Fuel”.“Odometer” has the value 3.

Creating a report: Example

We will create a report on vacation expenses. Certain questions need to be asked before creating the report.

What information do we want in the report?

How do we want the information arranged?

What fields are required to provide this information?

Will a query or view have to be created because these fields are in different tables?

Are any calculations required in the data before being added to the report?

The expenses for our vacation are motel, tolls, miscellaneous, breakfast, lunch, supper, snacks, and fuel. One possible report could list the totals of each of these expense groups. Another could list the expense totals for each day of the vacation. A third could list the totals for each expense group for each type of payment. (This would let us know where the money came from to pay the expenses.) Once you create a query to do any one of these, you can create a report based upon the query.

We will create two reports, one listing the expenses each day (other than fuel) and the second listing fuel statistics. The fields we need for the first report from the Vacations table are: Date, Motel, Tolls, Breakfast, Lunch, Supper, Snack Cost, and Miscellaneous. This report only requires the Vacations table. Had the report listed the total expenses for each of these fields, we would have to create a query to provide us with these totals, which is beyond the scope of this chapter.

The second report involves the Fuel table. Since this table includes fuel purchases at times other than during the vacation, we need to create a query that contains only the fuel purchased during vacation periods.

Report Wizard vs Report Design View

When you open the Report Wizard, the Report Builder also opens. As you make your selections in the wizard, these appear in layout in the Report Builder. When you have finished making your selections, you save the report, name it and then close it.

When using Design View to create a report, you open the Report Builder to design the layout of it. (There is only one layout available when the wizard is used.)

Vacations table report

To create a new report:

Click the Reports icon in the Database area of the main Base window (Figure 230), or select View > Reports, or press Alt+R.

In the Tasks list, click Use Wizard to Create Report. The Report Wizard dialog and the Report Builder window open.

Step 1: Field selection

Select Table: Vacations in the Tables or queries drop-down list.

Use the > to move these fields from the Available fields list to the Fields in report list: Date, Motel, Tolls, Miscellaneous, Breakfast, Lunch, Supper, and SnCost. The other buttons (<, >>, <<, up arrow, and down arrow) and the double-click action perform similar functions to the equivalent interactions on other wizard pages as described earlier in this chapter.

Click Next.

Figure 280: Adding fields to a report

Step 2: Labeling fields

Change any field labels you wish. We will shorten Miscellaneous to Misc. and expand SnackCost into two words.

Figure 281: Giving aliases to fields

Shorten Miscellaneous to Misc.

Change SnCost into Snack Cost.

Click Next.

Step 3: Grouping

Since we are grouping by the date, use the > button to move the Date field from the Fields list to the Groupings list.

You can use the < button to return an entry in the Groupings list to the Fields list. You can use the up and down arrows to re-order entries in the Groupings list. You can double-click to move a field from one list to the other.

Click Next.

Figure 282: Selecting fields for grouping data

Step 4: Sort options

We do not want to do any additional sorting.

Click Next.

Step 5: Choose layout

Select Columnar, three columns in the Layout of data list.

Layout of headers and footers have no possible selections.

Select Landscape as the Orientation for the page layout.

Click Next.

Figure 283: Report Builder template determined by the Report Wizard

Figure 283 shows part of the final template that has been built up in the Report Builder as you reach the end of the wizard.

Step 6: Create report

Title the report: Vacation Expenses.

Select the Dynamic report option.

Select the Create report now option.

Click Finish.

LibreOffice opens the output report in read-only mode in Writer.

The report (Figure 284) has been created, but it needs some editing. The date could be formatted better, and all the numbers need to be formatted as currency. It could use a heading that includes its name, its author, and the date it was prepared. If the report had more than one page, the page numbers could be put in a footer of each page, perhaps including the total number of pages. But to do these things, you must use Report Builder.

Figure 284: Report without modifications

Report Builder: another way to create reports

With Report Builder, you can create complex and stylish database reports. You can define group and page headers, group and page footers, and calculation fields. Report Builder is installed with LibreOffice.

When we used the Report Wizard, we created a template in Report Builder for our report. If we edit our report, we open Report Builder with this template. By modifying the template, we also modify the report. For example, we can change the Date field’s format, and it will change the format of all the dates contained in that field in the above report. Similarly, we can change the field formatting of any of the other fields and change the format everywhere that field appears in the report.

Report Builder can also create reports by itself. To do this, click Create Report in Design View. For instructions on how to use the Report Builder, see Chapter 6, Reports, in the Base Guide.

Accessing other data sources

LibreOffice allows data sources to be accessed and then linked into LibreOffice documents. For example, a mail merge links an external document containing a list of names and addresses into a letter, with one copy of the letter being generated for each entry.

To access a data source that is not a *.odb file:

Select File > New > Database, or click the arrow at the right of the New icon on the Standard toolbar and select the Database option in the menu, to open the Database Wizard.

Select Connect to an existing database. Select the required database type in the drop-down list. Click Next.

The remaining steps in the Database Wizard may vary depending on which database type you have chosen.

At some stage the wizard may prompt you to browse to, and select, the database of interest. You will normally select to register the database and open the database for editing.

Finally, click Finish to exit the wizard. Name and save the database in the location of your choice.

Accessing a spreadsheet as a data source

Accessing a spreadsheet is similar to accessing other databases:

Select File > New > Database, or click the arrow at the right of the New icon on the Standard toolbar and select the Database option in the menu, to open the Database Wizard dialog.

Select Connect to an existing database. Select Spreadsheet in the drop-down list. Click Next.

Click Browse to locate the spreadsheet you want to access. If the spreadsheet is password protected, check the Password required box. Click Next.

Make sure that the Yes, register the database for me and Open the database for editing options are selected.

Click Finish to exit the wizard. Name and save the database in the location of your choice.

Note

Using this method of accessing a spreadsheet, you cannot change anything in the spreadsheet using Base. You can only view the contents of the spreadsheet, run queries, and create reports based upon the data already entered into the spreadsheet.

All changes in a spreadsheet must be made in the spreadsheet itself, using Calc. After modifying the spreadsheet and saving it, you will see the changes in the database. If you create and save an additional sheet in your spreadsheet, the database will have a new table the next time you access it.

Registering *.odb databases

Databases created by LibreOffice are in the *.odb (OpenDocument Database) format. Other programs can also produce databases in this format. Registering a *.odb database is simple:

Choose Tools > Options > LibreOffice Base > Databases.

Under Registered Databases, click New. LibreOffice displays the Create Database Link dialog.

Browse to where the database is located. Make sure the registered name is correct.

Click OK.

Note

Sometimes after updating LibreOffice to a newer version, your list of registered database files disappears. When that happens, you can use these steps to re-register your database files with your latest version of LibreOffice.

Using data sources in LibreOffice

Having registered the data source, whether a spreadsheet, text document, external database or other accepted data source, you can use it in other LibreOffice components including Writer and Calc.

Viewing data sources

Open a document in Writer or Calc. To view the data sources available, press Ctrl+Shift+F4 or select View > Data Sources. This brings up a list of registered databases, which will include Bibliography and any other registered database, such as the Automobile database created earlier in this chapter.

To view each database, click the drop-down arrow for the database’s name (Figure 285). This expands to show Queries and Tables. Click the drop-down arrow for Tables to view the individual tables created. Now click on a table to see all the records held in it.

Figure 285: Databases in Data Sources window

Editing data sources

Some data sources (but not spreadsheets) can be edited in the Data Sources window. A record can be edited, added, or deleted.

View a table’s data

If you click on a table, its rows and columns of data appear on the right side of the Data Sources window. Editing this data requires only a click in the cell whose data should be changed, change the data, and click in the row above or below it to save the new data.

Beneath the records are five small buttons. The first four move the cursor to the beginning, to the left, to the right, and to the end respectively. The fifth button, with a small star, inserts a new record.

Figure 286: Data Sources navigation buttons

To delete a record, right-click on the gray box to the left of a row to highlight the entire row, and select Delete Rows in the context window to remove the selected row.

Figure 287: Deleting a row in the Data Sources window

Launching Base to work on data sources

You can launch LibreOffice Base at any time in the Data Sources window. Just right-click on a database or its Tables or Queries components and select Edit Database File in the context menu. Once in Base, you can edit, add, and delete tables, queries, forms, and reports.

Using data sources in Writer and Calc

Data can be placed into Writer and Calc documents from the tables in the Data Sources 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.

Figure 288: Toolbar for the Data Sources window

Tip

Choose Tools > Mail Merge Wizard or click on the Mail Merge icon (circled in Figure 288) in the Data Sources window to start the Mail Merge Wizard, which steps you through creating a mail merge document. See Chapter 14 in the Writer Guide.

Writer documents

To insert a field from a table opened in the Data Sources window into a Writer document, click on the field name (the gray square at the top of the field list) and, with the left mouse button held down, drag the field onto the document. In a Writer document, it will appear as <FIELD> (where FIELD is the name of the field you dragged).

For example, to enter the cost of meals and who paid for them on a certain date of a vacation:

Open the list of data sources (Ctrl+Shift+F4) and select the Vacations table in the Automobile database.

Use this sentence: “On (date), our breakfast cost (amount) paid by (name), our lunch cost (amount) paid by (name), and our supper cost (amount) paid by (name).” But only type
“On, our breakfast cost paid by, our lunch cost paid by, and our supper cost paid by.”

To replace (date), click the field name Date in the Data Sources window and drag it to the right of the word On. Insert an extra space if necessary. The result: On <Date>. If you have field shadings turned on (View > Field Shadings), <Date> has a gray background. Otherwise it does not.

To replace first (amount), click the Breakfast field name and drag it to the right of our breakfast cost. Make sure you have the proper spacing between the field names and the words before and after them. Result: breakfast cost <Breakfast>.

To replace the first (name), click the BPayment field name and drag it to the right of paid by. Result: paid by <BPayment>.

In the same way, fill in the rest of the fields in the sentence.

Use <Lunch> and <LPayment> for the second set of (amount) and (name) in the sentence.

Use <Supper> and <SPayment> for the third set of (amount) and (name) in the sentence.

Final result: On <Date>, our breakfast cost <Breakfast> paid by <BPayment>, our lunch cost <Lunch> paid by <LPayment>, and our supper cost <Supper> paid by <SPayment>.

Add data to the fields of the sentence:

Click the gray box to the left of the row of data you want to add. That row should be highlighted like the second row of Figure 289.

Click the Data to Fields icon in the Table Data toolbar (circled in Figure 289). This should fill the fields with the data from the row you chose.

Click another row and then click this icon again. The data in the sentence changes to reflect this selected row of data.

Save the document if you want to use it as an example later.

Figure 289: Selected row in Data Sources window

Adding data in table format is a little easier and takes perhaps fewer steps. Some of the steps will be quite similar.

Navigate to the place you want to place the table and click the location.

Ctrl+Click the gray box to the left of each row of the data source that you want to be a row in your table if the rows are not consecutive. To select consecutive rows, click the gray box to the left of the top desired row and Shift+click the bottom desired row.

Click the Data to Text icon to open the Insert Database Columns dialog (Figure 290). (The Data to Text icon is to the left of the Data to Fields icon in Figure 289.)

Move the fields you want in your table from the Database columns list to the Table column(s) list.

To place the fields in the order you select, click the field and use the single right arrow to move the fields in the order you desire. You can also limit the fields you use to less than all of the fields available.

To use all of the fields, use the double arrow pointing to the right to move all of them at one time (this icon may have a different appearance in some environments). The order of the fields in the table you create will be the same as in the data source table.

To remove a single field from the Table column(s) list, click the field and use the single arrow pointing to the left.

You can double-click a field in one list to move it to the other list.

To start over, click the double arrow pointing to the left (this icon may have a different appearance in some environments).

Select the settings for your table. Use the default settings as in Figure 290.

Click OK. Save the document.

Figure 290: Insert Database Columns dialog

Calc spreadsheets

There are two ways to transfer data into a Calc spreadsheet. One enters the data into the spreadsheet cells. The other creates complete new records in the spreadsheet. While you can directly access the data inserted into the spreadsheet cells, new records created in the spreadsheet are read-only.

Entering data directly to the spreadsheet cells uses the Data to Text icon as when making a table in a Writer document. But there are certain differences.

The steps are straightforward.

Click the cell of the spreadsheet which you want to be the top left cell of your data, including the column names.

Use Ctrl+Shift+F4 to open the Data Sources window and select the table whose data you want to use.

Select the rows of data you want to add to the spreadsheet:

Click the gray box to the left of the row (the row header) you want to select if only selecting one row. That row is highlighted.

To select multiple rows, hold down the Ctrl key while clicking the gray box of the rows you need. Those rows are highlighted.

To select all the rows, click the gray box in the upper left corner. All rows are highlighted.

Click the Data to Text icon to insert the data into the spreadsheet cells.

Save the spreadsheet.

Adding records to a spreadsheet is fairly easy. You need to have the Data Sources window open, your spreadsheet open, and the table you want to use selected.

Drag and drop the gray box containing the field name for the table’s ID field (the column header) to where you want the record to appear in the spreadsheet.

Repeat until you have copied all of the fields you need to where you want them in the spreadsheet.

Select File > Save, or click the Save icon on the Standard toolbar, to name and save the spreadsheet. Close the file.

Next time you open the spreadsheet, the fields will be populated with data from the first record of the table, and the Form Navigation toolbar will appear at the bottom of the spreadsheet.

Click the arrows on the Form Navigation toolbar to view the different records of the table. (The arrows are circled in red in Figure 291.) The number in the box changes when you change the record number by clicking an arrow. The data in the fields changes to reflect the data for that particular record number.

Figure 291: Navigation arrows of a form

Getting Started Guide 7.5

Chapter 9,
Getting Started with Math

LibreOffice’s Formula (Equation) Editor

Introduction

Math is a formula editor included with LibreOffice used to create or edit formulas (equations) in a symbolic form, within LibreOffice documents or as stand-alone objects. Example formulas are shown below:

or

The Formula Editor in Math uses a markup language to represent formulas. This markup language is designed to be easily read wherever possible. For example, a over b using markup language produces the fractionwhen used in a formula.

Getting started

The Formula Editor creates a formula as a separate file for a formula library or insert formulas directly into a document using LibreOffice Writer, Calc, Impress, or Draw.

Formulas as separate documents or files

To create a formula as a separate document or file, use one of the following methods to open an empty formula document in LibreOffice Math (Figure 298):

On the Menu bar, go to File > New > Formula.

On the Standard toolbar, click the triangle to the right of the New icon and select Formula.

In the Start Center, click Math Formula.

Figure 292: LibreOffice Math window parts

From within LibreOffice Math, use the keyboard shortcut Ctrl+N.

As the markup language in the Formula Editor is entered, the formula will appear in the Preview window during and after input of the markup language. The Elements panel on the sidebar to the right of the Preview window may also appear, if it has been selected in View on the Menu bar (Figure 293).

For more information on creating formulas, see “Writer does not have an automated way to do Title Case, where all words are capitalized except for certain subsets defined by rules that are not universally standardized. However, you can use Capitalize Every Word and then restore those words that you do not want capitalized.” on page 80.

Figure 293: Enabling the Elements panel

Formulas in LibreOffice documents

To insert a formula into a LibreOffice document, open the document in Writer, Calc, Draw, or Impress. The LibreOffice component in use affects how to position the cursor to insert the formula.

In Writer, click in the paragraph where the formula should be inserted.

In Calc, click in the spreadsheet cell where the formula should be inserted.

In Draw and Impress, the formula is inserted into the center of the drawing or slide.

Then, go to Insert > Object > Formula Object on the Menu bar to open the Formula Editor. Alternatively, go to Insert > Object > OLE Object on the Menu bar to open the Insert OLE Object dialog, then select Create new, choose the Object Type “LibreOffice 7.5 Formula” and then click OK to open the Formula Editor.

The Elements panel to the right of the Preview window if Elements has been selected in View on the Menu bar.

Figure 294 shows an example Writer document with the formula box selected ready for a formula to be entered.

After entering the markup language for the formula, close the Formula Editor by pressing the Esc key or by clicking an area outside the formula in the document. Double-click on the formula object in the document to open the Formula Editor again to edit the formula.

Formulas are inserted as OLE objects into documents and can be placed in different ways. For more information on OLE objects, see “Formulas in Writer” on page 411, “Formulas in Calc, Draw, and Impress” on page 417, and the user guides for Writer, Calc, Draw, and Impress

. Figure 294: Empty formula in a Writer document

For frequent formula insertion, it is recommended to add the Formula button to the Standard toolbar or create a keyboard shortcut. See “Customization” on page 419 for more information.

Creating formulas

Create a formula using one of the following methods:

In the Elements panel, select a category in the drop-down list, then select a symbol.

Right-click in the Formula Editor and select a category, then select a symbol in the context menu.

Enter markup language directly in the Formula Editor.

Note

Using the Elements panel or the context menus to create a formula provides a convenient way to learn the markup language used by Math.

Tip

When using the Elements panel, it is recommended to have Extended tips selected in the LibreOffice Options. This will help to identify the categories and symbols to use in the formula. Go to Tools > Options > LibreOffice > General on the Menu bar and select Extended tips in the Help section.

Elements panel

The Elements panel (Figure 293) is a visual tool to help create and edit formulas. It organizes mathematical symbols and operators using Categories in a drop-down list. The steps below describe how to enable the Elements panel and navigate its categories and symbols.

Go to View > Elements on the Menu bar to open the Elements panel.

Select the category for the formula from the drop-down list at the top of the Elements panel.

Select the symbol for the formula in the Elements panel. The symbols that are available change according to the selected category.

After choosing one of the symbols in the Elements panel, the Formula Editor will be updated with the Markup notation of the selected symbol.

Note

The Elements panel can either be a floating dialog, as shown in Figure 293, or positioned to the right of the Formula Editor, as shown in Figure 294.

Tip

The Elements panel includes an Examples category which provides example formulas to use as a starting point for a formula or equation.

Context menu

The Formula Editor also provides a context menu to access categories and symbols when creating a formula. Right-click in the Formula Editor to open the context menu. Select a category and then select the markup example for use in the sub-context menu. An example is shown in Figure 295.

Note

The Elements panel and the context menu contain only the most common commands that are used in formulas. Other symbols and commands not listed in the Elements panel and context menu must be inserted manually using the markup language. For a complete list of commands and symbols available in Math, see Appendix A, Commands Reference, in the Math Guide.

Figure 295: Context menu in Formula Editor

Markup language

Markup language is entered directly into the Formula Editor. For example, typing 5 times 4 into the Formula Editor creates the simple formula . For experienced markup language users, it can be the quickest way to enter a formula. Table 9 shows some examples of using markup language to enter commands. For a full list of commands that can be used in the Formula Editor, see Appendix A, Commands Reference, in the Math Guide.

Table 9: Example commands using markup language

Display	Command	Display	Command
a = b	sqrt {a}
a^2	a_n
int f(x) dx	sum a_n
a <= b	infinity
a times b	x cdot y

Greek characters

Using markup language

Greek characters are commonly used in formulas, but they cannot be entered into a formula using the Elements panel or the context menu. Use the English names of Greek characters in markup language when entering Greek characters into a formula. See Appendix A, Commands Reference, in the Math Guide for a list of characters that can be entered using markup language.

For a lowercase Greek character, type a percentage % sign, then type the character name in lowercase using the English name. For example, typing %lambda creates the Greek character λ.

For an UPPERCASE Greek character, type a percentage % sign, then type the character name in UPPERCASE using the English name. For example, typing %LAMBDA creates the Greek character Λ.

For an italic Greek character, type a percentage % sign followed by the i character, then the English name of the Greek character in lower or UPPER case. For example, typing %iTHETA creates the italic Greek character Θ.

Symbols dialog

Greek characters can also be entered into a formula using the Symbols dialog.

Make sure the cursor is in the correct position in the Formula Editor.

Go to Tools > Symbols on the Menu bar, or click the Symbols icon in the Tools toolbar, to open the Symbols dialog (Figure 296).

Select Greek in the Symbol set drop-down list. For italic characters, select iGreek in the drop-down list.

Double-click the desired Greek character to insert it or select it and click Insert. When selected, the name of the character is shown below the symbol list.

Click Close after entering Greek characters into the formula.

Figure 296: Symbols dialog

Formula examples

Example 1

The simple formula can be created using LibreOffice Math as follows:

Make sure the cursor is flashing in the Formula Editor, then select the category Unary/Binary Operators and symbol Multiplication using one of the following methods:

In the Elements panel, select Unary/Binary Operators in the drop-down list and then select the Multiplication icon .

Right-click in the Formula Editor and select Unary/Binary Operators > a times b in the context menu.

Using markup language, enter 5 times 4 in the Formula Editor.

The first two methods place the formula text <?> times <?> in the Formula Editor and the symbol appears in the document. For the third method, using markup language in the Formula Editor places the formuladirectly into the document and there is no need to carry out the following steps.

Select the first placeholder <?> before the word times in the Formula Editor and replace it with the character 5. The formula in the document updates automatically.

Select the second placeholder <?> after the word times in the Formula Editor and replace it with the character 4. The formula in the document updates automatically.

Tip

To move forward from one placeholder to the next placeholder in a formula, press the F4 key. To move backward from one placeholder to the previous placeholder in a formula, use the key combination Shift+F4.

Note

If necessary, to prevent a formula in a document from updating automatically. Go to View on the Menu bar and deselect AutoUpdate display. To then manually update a formula, press the F9 key or select View > Update on the Menu bar.

Example 2

To create the formulawhere the value of pi is rounded to 5 decimal places, without knowing markup associated with the Is Similar Or Equal symbol, follow these steps:

Make sure the cursor is flashing in the Formula Editor.

Enter %pi in the Formula Editor to enter the Greek character for pi (π).

Select the category Relations and symbol Is Similar Or Equal using one of the following methods:

In the Elements panel, select Relations in the drop-down list and then select the Is Similar Or Equal icon .

Right-click in the Formula Editor and select Relations > a simeq b in the context menu.

Delete the first placeholder <?> before the word simeq in the Formula Editor.

Select the second placeholder <?> after the word simeq in the Formula Editor and replace it with the characters 3.14159. The formulanow appears in the document.

Editing formulas

To edit a formula and switch into formula editing mode depends on whether the formula is in Math or another LibreOffice component.

In Math, double-click on a formula element in the formula that appears in the Preview window to select the formula element in the Formula Editor, or directly select a formula element in the Formula Editor.

In Writer, Calc, Impress, or Draw, double-click on the formula, or right-click on the formula and select Edit in the context menu, to open the Formula Editor and enter editing mode. The cursor is positioned at the start of the formula in the Formula Editor.

Note

If a formula element cannot be selected using the cursor, click on the Formula Cursor icon in the Tools toolbar to activate the formula cursor.

Select the formula element to be changed using one of the following methods:

Click on the formula element in the Preview window, positioning the cursor at the beginning of the formula element in the Formula Editor, then select the formula element in the Formula Editor.

Double-click on the formula element in the Preview window to select the formula element in the Formula Editor.

Position the cursor in the Formula Editor at the formula element to be edited, then select that formula element.

Double-click directly on the formula element in the Formula Editor to select it.

Make changes to the selected formula element.

Go to View > Update on the Menu bar, or press the F9 key, or click on the Update icon on the Tools toolbar to update the formula in the Preview window or in the document.

In Math, save changes to the formula after editing.

In Writer, Calc, Impress, or Draw, click anywhere in the document away from the formula to leave editing mode, then save the document to save changes to the formula.

Formula layout

This section provides some advice on how to lay out complex formulas in Math or in a LibreOffice document.

Using braces

LibreOffice Math knows nothing about order of operations within a formula. Braces (curly brackets) are used to define the order of operations. The following examples show how braces can be used in a formula.

Example 1

2 over x + 1 gives the result

Math has recognized that the 2 before and the x after the over command as belonging to the fraction, and has represented them accordingly. For rather than to be the denominator, they must be bracketed together using braces so that both will be placed there.

Inserting braces into 2 over {x + 1} gives the resultwhere is now the denominator.

Example 2

– 1 over 2 gives the result

Math has recognized the minus sign as a prefix for the 1 and has therefore placed it in the numerator of the fraction. To show that the whole fraction is negative, with the minus sign in front of the fraction, put the fraction in braces to signify to Math that the characters belong together.

Adding braces into the markup language – {1 over 2} gives the resultand the whole fraction is now negative.

Example 3

When braces are used in markup language, they define the layout of the formula and are not displayed or printed. To use braces within a formula, use the commands lbrace and rbrace within the markup language.

x over {–x + 1} gives the result

Replace the braces using the commands lbrace and rbrace in the markup language. Write x over lbrace –x + 1 rbrace and the result is

Brackets (parentheses) and matrices

To use a matrix in a formula, the matrix command must be used. Below is a simple example of a 2 x 2 matrix.

matrix { a # b ## c # d }

In matrices, rows are separated by two hashes (##) and entries within each row are separated by one hash (#).

Normally, when brackets are within a matrix, the brackets do not scale as the matrix increases in size. The example below shows a formula where the parentheses do not scale to the size of the resulting matrix.

( matrix { a # b ## c # d } )

To overcome this problem, Math provides scalable brackets that grow in size to match the size of the matrix. Use the commands left( and right) to create scalable brackets around a matrix. The following example shows how to create a matrix with scalable parentheses.

left( matrix { a # b ## c # d } right)

Scalable brackets can also be used with any element of a formula, such as fraction, square root, and so on.

To create a matrix where some values are empty, use the grave accent (`) so that Math will put a small space in that position, as shown in the example below.

left( matrix { 1 # 2 # 3 ## 4 # ` # 6 } right)

Tip

Use the commands left[ and right] to obtain square brackets. A list of all brackets available within Math can be found in Appendix A, Commands Reference, of the Math Guide.

Tip

To make all brackets to be scalable, go to Format > Spacing on the Menu bar to open the Spacing dialog. Click on Category, select Brackets in the drop-down list, and then select the option Scale all brackets.

Unpaired brackets

When using brackets in a formula, Math expects that for every opening bracket there will be a closing one. If there is no closing bracket, Math places an inverted question mark next to where the closing bracket should have been placed. For example, lbrace a; b will result in because the right bracket rbrace is missing.

This inverted question mark disappears when all the brackets are paired. The previous example could be fixed to lbrace a; b rbrace, resulting in . However, there are cases where an unpaired bracket is necessary and for that there are a couple of options.

Non scalable brackets

A backslash \ is placed before a non scalable bracket to indicate that the subsequent character should not be regarded as a bracket, but rather as a literal character.

For example, the unpaired brackets in the formula [ a; b [ would result in an inverted question mark because Math expects that [ will be closed by ]. To fix the error, use the backslash and insert \ [ a; b \ [ into the Formula Editor to obtain as the result.

Scalable brackets

To create unpaired scalable brackets or braces in a formula, the markup commands left, right, and none can be used.

Example

The following formula uses the stack command to create a two-line formula and adds a bracket only to the right side of the stack.

abs x = left lbrace stack {x "for" x >= 0 # -x "for" x < 0} right none

This effect can be achieved by using the left lbrace command combined with the right none command. The first command indicates that the left bracket is a lbrace whereas the second command tells Math that the right bracket will be none, meaning that no bracket will be added to the right side of the formula.

Recognizing functions

In the basic installation of Math, Math outputs functions in normal characters and variables in italic characters. However, if Math fails to recognize a function, the markup command func before a function can force Math to recognize any following text as a function and uses normal characters.

For a full list of functions within Math, see Appendix A, Commands Reference, in the Math Guide.

Some Math functions have to be followed by a number or a variable. If these are missing, Math places an inverted question mark where the missing number or variable should be. To remove the inverted question mark and correct the formula, enter a number, a variable, or a pair of empty brackets as a placeholder.

Tip

Use the F3 key to navigate to the next formula error or the key combination Shift+F3 to move to the previous error.

Formulas over multiple lines

To create a formula that requires more than one line, do not press the Enter key to create a new line -- the markup language in the Formula Editor goes to a new line, but the resulting formula does not have two lines. To add a new line to the formula, use the markup command newline.

Example

The examples below illustrate how the markup command newline can be used to add a new line to a formula. The first one simply adds an Enter to break the line in the markup language, which does not result in adding a new line. The second example uses the newline command, yielding a two-line formula.

Markup Language	Resulting Formula
x = 3 y = 1
x = 3 newline y = 1

It is not possible in Math to create multiple line formulas when a line ends with an equals sign and to continue the formula on a new line without completing the term on the right side of the equals sign. If a multiple line formula is required to have an equals sign at the end of a line without a term after the equals sign, then use either empty quotes “” or empty braces {} or the space characters grave ` or tilde ˜.

By default, a multiple line formula is center aligned. For more information on alignment using the equals sign, see “Customization” on page 419.

Spacing within formulas

Spacing between the elements in a formula is not set by using space characters in the markup language. To add spaces into a formula, use one of the following options:

Grave ` to add a small space.

Tilde ~ for a large space.

Add space characters between quotes “ ”. These spaces will be considered as text.

Any spaces at the end of a line in the markup language are ignored by default.

For more information, see “Adjusting formula spacing” on page 406.

Adding limits to sum/integral commands

The sum and int commands, used for summations and integrals respectively, can take the parameters, from and to, to set the lower and upper limits. The parameters from and to can be used singly or together as shown by the following examples. For more information on the sum and integral commands, see Appendix A, Commands Reference, in the Math Guide.

Examples

Here are some examples of how to add upper and lower bounds to summations and integrals. Note that brackets can be used to explicitly define which parts of the formula correspond to the desired bounds.

Markup Language	Resulting Formula
sum from k = 1 to n a_k
sum to infinity 2^{-n}
sum from{ i=1 } to{ n } sum from{ j=1; i <> j } to{ m } x_ij
int from 0 to x f(t) dt
int_0^x f(t) dt
int from Re f

Writing derivatives

When writing derivatives, use the over command to identify fractions to Math. The over command is combined with the character d for a total derivative or the partial command for a partial derivative to achieve the effect of a derivative. Braces {} are used in each side of the elements to surround them and make the derivative, as shown by the following examples.

Examples

Below are a few examples of using Math to write derivatives.

Markup Language	Resulting Formula
{df} over {dx}
{partial f} over {partial y}
{partial^2 f} over {partial t^2}

Note

To write function names with primes, as is normal in school notation, first add the symbols to the catalog. See “Catalog customization” on page 419 for more information.

Markup language characters as normal characters

Characters that are used as controls in markup language cannot be entered directly as normal characters. These characters are: %, {, }, &, |, _, ^ and ". For example, 2% = 0.02 in markup language will not appear in the formula with the same characters. To overcome this limitation in markup language, use one of the following methods:

Use double quotes to mark that character as text, for example 2"%"= 0.02 will appear in a formula as. However, this method cannot be used for the double-quote character itself, see “Text in formulas” below.

Add the character to the Math Catalog, for example the double quote character.

Use commands, for example lbrace and rbrace provide literal braces .

Note

The Special Characters dialog used by other LibreOffice components is not available in Math. For regular use of special characters in Math, adding the characters to the Math Catalog is recommended; see “Catalog customization” on page 419 for more information.

Text in formulas

To include text in a formula, enclose any text in double-quotes, for example x " for " x >= 0 in markup language will create the formula . All characters, except double quotes, can be used in text.

However, for double quotes in formula text, create the text with double quotes in LibreOffice Writer, then copy and paste the text into the Formula Editor, as shown in Figure 297.

Figure 297: Example of double quotes in formula text

The font used for text in a formula will be the default font that has been set in the Fonts dialog. For more information on how to change fonts used for in formulas, see “Changing formula appearance” on page 402.

By default, text alignment is left-justified in formulas. For more information on how to change text alignment, see “Adjusting formula alignment” on page 408.

Formatting text in formulas

Formatting commands are not interpreted within text used in formulas. To use formatting commands within formula text, break up the text using double quotes in the Formula Editor.

Example

Enter the following in the Formula Editor:

"In " color blue bold "isosceles" "triangles, the base angles are equal"

creates the following text in a formula .

This example shows how to use the markup commands color and bold to format the word “isosceles”. Note that the commands are applied to the immediately subsequent text within double quotes. Hence, the formatting commands do not apply to the remainder of the text in the example because it is in a separate quote block.

The command color needs to be followed by the name of the desired color or to its RGB or hexadecimal value. Refer to Appendix A, Command Reference, in the Math Guide for a list of predefined color names.

Aligning formulas using equals sign

LibreOffice Math does not have a command for aligning formulas on a particular character. However, a matrix can align formulas on a character and this character is normally the equals sign (=). In addition, the markup commands alignr, alignl and alignc can set the alignment of each value inside the matrix to the right, left or center, respectively.

Example

The example below uses a matrix to align formulas on the equals sign. Notice how the alignment commands align the contents of each position in the matrix.

matrix{ alignr x+y # {}={} # alignl 2 ## alignr x # {}={} # alignl 2-y }

Note

The empty braces each side of the equals sign are necessary because the equals sign is a binary operator and requires an expression on each side. Spaces, or ` or ~ characters each side of the equals sign can be used, but braces are recommended as they are easier to see within the markup language.

The spacing on each side of the equals sign can be reduced by changing the inter-column spacing of the matrix. See “Adjusting formula spacing” on page 406 for more information.

Changing formula appearance

This section describes how to change the font or font size in a selected formula and how to change the default font or font size.

Note

Only formulas inserted after the change in font settings will use the new default settings. The font settings of formulas previously inserted would have to be updated individually to match the same font settings as the new default settings.

Tip

The extension “Formatting of all Math formulas” allows the changing of font name and font size for all or only for selected formulas in a document. The download and the installation and usage instructions are here: https://extensions.libreoffice.org/en/extensions/show/formatting-of-all-math-formulas

The Properties panel in the sidebar

This very simple panel contains buttons to set fonts, fonts sizes, spacing and alignment of formulas (Figure 298).

Figure 298: Properties panel on the sidebar

Formula font size

Current formula font size

To change the font size used for a formula already inserted in Math or another LibreOffice component:

Click in the markup language in the Formula Editor.

Go to Format > Font size on the Menu bar or click on the Font Size button on the sidebar to open the Font Sizes dialog (Figure 299).

Select a different font size using the Base size spinner or type a new font size in the Base Size box.

Click OK to save changes and close the dialog. An example result when the font size is changed is shown below.

Example

Default font size 12pt:

After font size change to 18pt:

Figure 299: Font Sizes dialog

Default formula font size

To change the default font size used for all formulas in Math or another LibreOffice component:

Before inserting any formulas into a document, go to Format > Font size on the Menu bar or click on the Font Size button on the sidebar to open the Font Sizes dialog (Figure 299).

Select a different font size using the Base size spinner or type a new font size in the Base size box.

Click Default and confirm the changes to the base size font. Any formulas created from this point on will use the new base size font for formulas.

Click OK to save changes and close the Font Sizes dialog.

Font size options

The Font Sizes dialog (Figure 299) specifies the font sizes for a formula. Select a base size and all elements of the formula will be scaled in relation to this base.

Base size – all elements of a formula are proportionally scaled to the base size. To change the base size, select or type in the desired point (pt) size. Other units of measure or other metrics can also be automatically converted to points. For example, entering 1in or 1”, Math converts the value to 72 pt.

Relative Sizes – in this section, determine the relative sizes for each type of element with reference to the base size.

Default – click this button to save any changes as a default for all new formulas. A confirmation message appears.

Formula fonts

Current formula fonts

To change the fonts used for the current formula in Math or another LibreOffice component:

Click in the markup language in the Formula Editor.

Go to Format > Fonts on the Menu bar or click on the Fonts button on the sidebar to open the Fonts dialog (Figure 300).

Figure 300: Fonts dialog

Select a new font for each of the various options in the drop-down lists.

If the desired font is not in the drop-down list, click Modify and select the option in the context menu to open a fonts dialog. Select the desired font and click OK to add it to the drop-down list for that option.

Click OK to save changes and close the Fonts dialog.

Default formula fonts

To change the default fonts used for all formulas in Math or another LibreOffice component:

Before inserting any formulas in a document, go to Format > Fonts on the Menu bar or click on the Fonts button on the sidebar to open the Fonts dialog (Figure 300).

Select a new font for each of the various options in the drop-down lists.

If the desired font is not in the drop-down list, click Modify and select the option in the context menu to open a fonts dialog. Select a font, and click OK to add it to the drop-down list for that option.

Click Default and confirm changes to the fonts. Any formulas created from this point on will use the new font for formulas.

Click OK to save changes and close the Fonts dialog.

Formula font options

Defines the fonts that can be applied to formula elements.

Formula Fonts – defines the fonts used for the variables, functions, numbers and inserted text that form the elements of a formula.

Custom Fonts – in this section of the Fonts dialog (Figure 300), fonts are defined which format other text components in a formula. The three basic fonts Serif, Sans, and Fixed are available. Other fonts can be added to each standard installed basic font using the Modify button. Every font installed on a computer system is available for use.

Modify – click one of the options in the drop-down menu to access the Fonts dialog, where the font and attributes can be defined for the respective formula and for custom fonts.

Default – click this button to save any changes as a default for all new formulas. A confirmation message appears.

Note

When a new font is selected for a formula, the old font remains in the list alongside the new one and can be selected again.

Note

Variables should be written in italics, so make sure that the Italic option is selected for the desired font. For all other elements, use the basic form of a font. The style can be easily altered in the formula itself by using the commands italic or bold to set these characteristics and nitalic or nbold to unset them.

Adjusting formula spacing

Use the Spacing dialog (Figure 301) to determine the spacing between formula elements. The spacing is specified as a percentage in relation to the defined base size for font sizes.

Figure 301: Spacing dialog

Current formula spacing

To change the spacing used for the current formula in Math or another LibreOffice component:

Click in the markup language in the Formula Editor.

Go to Format > Spacing on the Menu bar or click on the Spacing button on the sidebar to open the Spacing dialog (Figure 301).

Click Category and select one of the options in the drop-down list. The options in the Spacing dialog change according to the category selected.

Enter new values for the spacing category and click OK.

Check the result in the formula.

Default formula spacing

To change the default spacing used for all formulas in Math or another LibreOffice component:

Before inserting any formulas into a document, go to Format > Spacing on the Menu bar or click on the Spacing button on the sidebar to open the Spacing dialog (Figure 301).

Click Category and select one of the options in the drop-down list. The options in the Spacing dialog change according to the category selected.

Enter new values for the spacing category.

Click Default and confirm changes to the formula spacing. Any formulas created from this point on will use the new spacing for formulas.

Click OK to save changes and close the Spacing dialog.

Note

Only formulas inserted after the change in default spacing will use the new default settings. The spacing of formulas previously inserted would have to be updated individually to match the same spacing as the new default settings.

Spacing options

Use Category in the Spacing dialog (Figure 301) to determine the formula element to be updated. The appearance of the dialog depends on the selected category. A preview window shows which spacing is modified through the respective boxes.

Category – defines the selection for the spacing change.

Spacing – defines the spacing between variables and operators, between lines, and between root signs and radicals.

Indexes – defines the spacing for superscript and subscript indexes.

Fractions – defines the spacing between the fraction bar and the numerator or denominator.

Fraction Bars – defines the excess length and line weight of the fraction bar.

Limits – defines the spacing between the sum symbol and the limit conditions.

Brackets – defines the spacing between brackets and the content.

Excess size (left/right) – determines the vertical distance between the upper edge of the contents and the upper end of the brackets.

Spacing – determines the horizontal distance between the contents and the upper end of the brackets.

Scale all brackets – scales all types of brackets. By entering (a over b) in the Formula Editor, the brackets will surround the whole height of the argument. Normally, this is done by entering left (a over b right).

Excess size – adjusts the percentage excess size. At 0% the brackets are set so that they surround the argument at the same height. The higher the entered value is, the larger the vertical gap between the contents of the brackets and the external border of the brackets. The field can only be used in combination with Scale all brackets.

Matrices – defines the relative spacing for the elements in a matrix.

Line spacing – determines the spacing between matrix elements in a row.

Column spacing – determines the spacing between matrix elements in a column.

Symbols – defines the spacing of symbols in relation to variables

Primary height – defines the height of the symbols in relation to the baseline.

Minimum spacing – determines the minimum distance between a symbol and variable.

Operators – defines the spacing between operators and variables or numbers.

Excess size – determines the height from the variable to the operator upper edge.

Spacing – determines the horizontal distance between operators and variables.

Borders – adds a border to a formula. This option is particularly useful for integrating the formula into a text file in Writer. When making settings, be sure to not use 0 as a size as this creates viewing problems for text that surrounds the insertion point.

Preview Field – displays a preview of the current selection.

Default – saves any changes as default settings for all new formulas. A confirmation dialog will appear before saving these changes.

Adjusting formula alignment

The alignment settings determine how formula elements located above one another are aligned horizontally relative to each other.

Note

It is not possible to align formulas on a particular character and formula alignment does not apply to text elements. Text elements are always aligned left.

Note

Independent of using formula alignment given below, it is possible to align formulas using the commands alignl, alignc and alignr. These commands also work for text elements.

Current formula alignment

To change the alignment used for the current formula in Math or another LibreOffice component:

Click in the markup language in the Formula Editor.

Go to Format > Alignment on the Menu bar or click on the Alignment button on the sidebar to open the Alignment dialog (Figure 302).

Select either Left, Centered, or Right for horizontal alignment.

Click OK and check the result in the formula.

Figure 302: Alignment dialog

Note

Regardless of the alignment option selected in the Alignment dialog, it is possible to align sections of a formula using the commands alignl, alignc and alignr. For example, they can be useful to align formulas in matrices. These commands also work for text elements.

Default formula alignment

To change the default alignment used for all formulas in Math or another LibreOffice component:

Before inserting any formulas into a document, go to Format > Alignment on the Menu bar or click on the Alignment button on the sidebar to open the Alignment dialog (Figure 302).

Select either Left, Centered, or Right for horizontal alignment.

Click Default and confirm changes to the formula alignment. Any formulas created from this point on will use the new alignment for formulas.

Click OK and check the result in the formula.

Note

Only formulas inserted after the change in default alignment will use the new default settings. The alignment of formulas previously inserted would have to be updated individually to match the same alignment as the new default settings.

Changing formula color

The color of characters used in a formula can be changed by using the markup language command color followed by a color name, RGB value, or HTML hex value.

The color command only works on the formula element immediately after the color name, RGB value, or hex value. For example, entering the markup language color red 5 times 4 gives the result . Note that only the number 5 was colored red.

To change the color of the whole formula, enclose the whole formula within brackets. For example, entering the markup language color red {5 times 4} gives the result .

Named colors

For information on the named colors available in Math, see Appendix A, Commands Reference, in the Math Guide. These colors are listed in the Attributes section of the Elements panel (Figure 293 on page 390).

RGB values

To use custom colors defined by RGB (Red, Green and Blue) values ranging from 0 to 255, use the color rgb R G B markup command, where R, G, and B correspond to the Red, Green, and Blue values of the desired color.

Example

In this example, the term “decision variable” uses the color defined by the RGB values 160, 82, 45.

"Let " x_ij " be a " color rgb 160 82 45 "decision variable " "in the problem under consideration"

Math will create the following output:

Hex values

Math now supports HTML colors defined by a hex number. Use the color hex 000000 markup command, where 00000 is the corresponding hex number. For example, the command color hex FF0000 decision creates the output .

Background color

It is not possible to select a background color for formulas in LibreOffice Math. The background color for a formula is by default the same color as the document or frame that the formula has been inserted into. In LibreOffice Writer, use object properties to change the background color for a formula. For more information, see “Background and borders” on page 415.

Formula library

For reuse of formulas, a formula library can be created of the formulas created by the Formula Editor. Individual formulas can be saved as separate files using the ODF format for formulas (file type .odf), or in MathML format (file type .mml).

LibreOffice Math, Writer, Calc, Draw, or Impress can create formulas and build up a formula library.

Using Math

Create a file folder to contain the formula library.

In LibreOffice, go to File > New > Formula on the Menu bar, or click on Math Formula in the Start Center to open Math and create a formula using the Formula Editor. See “Formulas as separate documents or files” on page 389 for more information.

Go to File > Save As on the Menu bar or use the keyboard shortcut Ctrl+Shift+S to open a Save As dialog.

Navigate to the formula library folder created in step 1.

Name the formula in the File name box.

Select in the File type drop-down list either ODF Formula (.odf) or MathML 2.0 (.mml) as the file type for the formula.

Click Save to save the formula and close the Save As dialog.

Using Writer, Calc, Draw, or Impress

Create a file folder to contain the formula library.

Open a document using Writer, Calc, Draw, or Impress.

Go to Insert > Object > Formula Object on the Menu bar to open the Formula Editor and create a formula. See “Formulas in LibreOffice documents” on page 390 for more information.

Right-click on the formula object and select Save Copy as in the context menu to open a Save As dialog.

Navigate to the folder created for the formula library.

Name the formula in the File name box.

Select in the File type drop-down list either ODF Formula (.odf) or MathML 2.0 (.mml) as the file type for the formula.

Click Save to save the formula and close the Save As dialog.

Using a formula library

A formula from the formula library can neither be added to a document by dragging and dropping using the mouse, nor by using Insert > File on the Menu bar. The formula must be inserted as an OLE object.

Open the document in Writer, Calc, Draw, or Impress.

Go to Insert > Object > OLE Object on the Menu bar to open the Insert OLE Object dialog.

Select the option Create from file.

Click Search to open a file browser dialog.

Navigate to the formula library folder.

Select the formula to be inserted and click Open, or double-click on the formula.

Click OK to insert the formula as an OLE object in the document and close the dialog.

Formulas in Writer

When a formula is inserted into a document, LibreOffice Writer places the formula in a frame and treats the formula as an OLE object. Double-click on an inserted formula to open the Formula Editor in LibreOffice Math, to edit it.

This section explains the options available to change each individual formula within a Writer document. Please refer to the chapters on styles in the Writer Guide for information on how to change the default settings for frame styles for OLE objects.

Automatic formula numbering

Automatic numbering of formulas for cross-reference purposes can only be carried out in LibreOffice Writer. The easiest way to add numbered formulas in sequence is to use the AutoText entry fn (for 'formula numbered').

Start a new line in the document.

Type fn and then press the F3 key. A two column table with no borders is inserted into the document with the left column containing a sample formula and the right column containing a reference number, as shown below.

(1)

Delete the sample formula and insert the formula as an object in the left column.

Alternatively, first insert the formula into the document, then carry out Steps 1 and 2 above replacing the sample formula with another formula.

Cross-referencing

Click in the document where the cross-reference should appear.

Go to Insert > Cross-reference on the Menu bar to open the Fields dialog (Figure 303).

Click on the Cross-references tab, then select Text in the Type section.

In the Selection section, select the formula number to refer to.

In the Insert reference to section, select Reference and click Insert.

After creating the cross-references, click Close to close the Fields dialog.

Figure 303: Fields dialog – Cross-references tab

Tip

To insert the cross-reference number without parentheses, select Numbering instead of Reference in the Insert reference to section.

Note

To use square parentheses instead of round ones, or to have the cross-reference number be separated from the formula by tabs instead of using a table, then refer to the Writer Guide.

Anchoring formulas

A formula is treated as an object within Writer and its default anchoring is To character within a paragraph when it is inserted into a document. To change the anchoring of a formula object:

Right-click on the selected formula object and select Anchor in the context menu.

Select a new anchoring option in the context sub-menu. The anchoring positions available are To Page, To Paragraph, To Character, or As Character.

Alternatively,

Right-click on the selected formula object and select Properties in the context menu, or go to Format > Frame and Object > Properties on the Menu bar, to open the Object dialog (Figure 304).

On the Type tab, select an anchoring position from the Anchor section in the upper right.

Click OK to save changes and close the Object dialog.

Figure 304: Object dialog – Type tab with Anchor options

Note

The anchoring options are not available in the Object dialog when making changes to the options available for frame styles. For more information on how to modify frame styles, please refer to the chapters on styles in the Writer Guide.

Vertical alignment

The normal default setting for vertical alignment for formula objects is to use the text base line as a reference. This default setting can be changed by modifying the Formula frame style; see the chapters on styles in the Writer Guide for more information.

To change the vertical alignment position of an individual formula object (assuming that the As character anchoring option is selected):

Right-click on the selected formula object and select Properties in the context menu, or go to Format > Frame and Object > Properties to open the Object dialog (Figure 304).

Make sure the Type tab is selected and select a new alignment position in the drop-down list in the Position section. The vertical alignment options available are Top, Bottom, Center, or From bottom.

If necessary, type in the text box a plus or minus value for vertical alignment. This option is only available if From bottom vertical alignment has been selected.

Select the type of text alignment in the drop-down list in the Position section. The text alignment options available are Base line, Character, and Row.

Click OK to save changes and close the Object dialog.

Note

If the Position section in the Object dialog is grayed out and not available, then go to Tools > Options > LibreOffice Writer > Formatting Aids and uncheck the option Math baseline alignment. This setting is stored with the document and applies to all formulas within it. Any new documents created will also use this setting for Math baseline alignment.

Object spacing

A formula object, when inserted into a Writer document, has spacing each side of the formula object. The default value used for spacing is set within the frame style for formula objects and can be changed by modifying the Formula frame style. See the chapters on styles in the Writer Guide for more information.

To individually adjust the spacing for each formula object within a document:

Create a formula in a Writer document.

Right-click on the selected formula object and select Properties in the context menu, or go to Format > Frame and Object > Properties to open the Object dialog.

Click on the Wrap tab to open the Wrap page in the Object dialog (Figure 305).

In the Spacing section, enter the spacing value for Left, Right, Top, and Bottom spacing.

Click OK to save the changes and close the Object dialog.

Figure 305: Object dialog – Wrap tab

Text mode

In large formulas placed within a line of text, the formula elements can often be higher than the text height. Therefore, to make large formulas easier to read, it is recommended to always insert large formulas into a separate paragraph of their own so that it is separated from text.

However, if it is necessary to place a large formula within a line of text, double-click on the formula to open the Formula Editor and then go to Format > Text Mode on the Menu bar. The Formula Editor will try to shrink the formula to fit the text height. The numerators and denominators of fractions are shrunk, and the limits of integrals and sums are placed beside the integral/sum sign, as shown in the following example.

Example

A formula in a separate paragraph:

and the same formula embedded into a line of text using text mode format:

Background and borders

The default setting for background (area fill) and borders for formula objects is set by the Formula frame style. To change the default setting for the Formula frame style, refer to the chapters on styles in the Writer Guide. However, for individual formulas in a document, the background and borders can be changed.

Note

The size of the frame that a formula is placed in when inserted into a document cannot be changed. The frame size for a formula object depends on the setting of the formula font size. See “Formula font size” on page 403 for more information.

Backgrounds

In the document, select the formula for the background change.

Right-click on the formula and select Properties in the context menu, or go to Format > Frame and Object > Properties to open the Object dialog.

Click on the Area tab and use the buttons at the top to select the desired type of fill for the formula (Figure 306).

Select the options for the formula background. The options change depending on the type of fill selected.

Click OK to save changes and close the Object dialog.

Figure 306: Object dialog – Area tab

Borders

In the document, select the formula for the border change.

Right-click on the formula and select Properties in the context menu, or go to Format > Frame and Object > Properties to open the Object dialog.

Click on the Borders tab and select the options for the formula borders (Figure 307).

Click OK to save changes and close the Object dialog.

Figure 307: Object dialog – Borders tab

Quick insertion of formulas

To quickly insert formula markup language into a Writer document without opening the Formula Editor:

Enter the formula markup language into document at the position where it should be placed.

Select the markup language.

Go to Insert > Object on the Menu bar and select Formula Object to create a formula from the selected markup language.

Alternatively use the key combination Ctrl + Insert to open the Insert OLE Object dialog and then select Formula.

Formulas in Calc, Draw, and Impress

In Calc, Draw, and Impress, formulas are inserted as OLE objects without any background (area fill) or borders. Each formula object is inserted into a spreadsheet, drawing, or slide as follows:

In Calc, formulas are inserted into a selected cell in a spreadsheet with no style assigned to the formula object.

In Draw and Impress, formulas are inserted into a central position on a drawing or slide and, by default, are assigned the drawing object style Object with no fill and no line. For more information on how to modify or assign drawing object styles, see the Draw Guide or the Impress Guide.

Anchoring formulas

Calc

A formula object can be anchored into a spreadsheet as To Page (default setting), or as To Cell. To change the anchoring type of formulas in a Calc spreadsheet:

Select the formula object in the spreadsheet.

Right-click on the formula and select Anchor > To Page or To Cell in the context menu.

Alternatively, go to Format > Anchor on the Menu bar and select To Page or To Cell.

Tip

If an inserted formula in a Calc spreadsheet appears out of scale, fix it by right-clicking the formula object and then selecting the Original Size option in the context menu.

Draw and Impress

When a formula is inserted into a drawing or slide, it is inserted as a floating OLE object and is not anchored to any particular position in the drawing or slide.

Formula object properties

Formula objects in Calc, Draw, and Impress can be modified just like any other object that has been placed in a spreadsheet, drawing, or presentation, with the exception of formula object size and changing the format of any text within a formula. For more information on how to change object properties, see the Calc Guide, Draw Guide and Impress Guide.

The following points will help determine which dialog to use to change the properties of formula objects.

For formula backgrounds, use the various options in the tabs of the Area dialog.

For formula borders, use the various options in the Line dialog. Note that formula borders are separate from cell borders in a Calc spreadsheet.

To accurately re-position a formula object, use the various options in tabs of the Position and Size dialog.

In Draw and Impress, formula objects can be arranged, aligned, grouped, flipped, converted, combined, and edited.

The text attributes of a formula object cannot be changed. The text used in a formula is set when creating the formula in the Formula Editor.

Formula object size is set by the formula font size when the formula is created in the Formula Editor. The formula object size is protected in the Position and Size dialog, but this can be deselected if desired. However, this is not recommended as resizing a formula object using the Position and Size dialog could lead to distortion of the formula making it difficult to read.

Formulas in charts

A chart in a Calc spreadsheet is itself an OLE object, therefore, the Formula Editor cannot be used to create and insert a formula directly into a chart. However, both the Chart and Math objects can be created separately and late copy and paste the Math formula into the Chart object:

Create the chart using LibreOffice Calc. For a complete reference on how to create charts, see Chapter 3 in the Calc Guide.

Click at any cell in the spreadsheet so that the Chart is no longer selected.

Insert a Math Formula object by clicking Insert > Object > Formula.

Type the desired formula into the Formula Editor.

After editing the formula, select the Math Formula object and press Ctrl+C to copy the Formula object to the clipboard.

Double-click the chart object to start editing the chart and press Ctrl+V to paste the Formula object into the chart.

Now the object can be positioned anywhere inside the chart.

To change the formula, repeat the whole process of creating, copying, and pasting the Formula object into the chart.

Chemical formulas

The primary purpose of Math is to create mathematical formulas, but it can also be used to write chemical formulas. However, in chemical formulas, the chemical symbols are normally written in uppercase using non-italic characters.

To create chemical formulas using Math, change the font used for variables to a non-italic font. For more information on how to change fonts in a formula, see “Formula fonts” on page 404.

For reversible reactions in chemical formulas, there is no symbol for a double arrow in Math. With access to a font with correct symbols for use in chemical formulas, these symbols can be added to the Catalog. See “Catalog customization” on page 419 for more information.

Customization

This section explains how to customize LibreOffice Math formula creation in LibreOffice documents. Also, refer to Chapter 13, Customizing LibreOffice, for more general information on how to customize LibreOffice.

Adding keyboard shortcuts

Keyboard shortcuts can be added to LibreOffice to make creating documents much easier. See Chapter 13, Customizing LibreOffice, for instructions.

Catalog customization

For regular use of a symbol that is not available in Math, add it to the Symbols dialog (Figure 308) by using the Edit Symbols dialog (Figure 309).

Symbols can be added to a symbol set, symbol sets edited, symbol notations modified, new symbol sets defined, names assigned to symbols, existing symbol sets modified.

For details of the fields in the Edit Symbols dialog, please refer to the Math Guide.

Adding symbols

Go to Tools > Symbols on the Menu bar or click on the Symbols icon on the Tools toolbar to open the Symbols dialog.

Click the Edit button to open the Edit Symbols dialog.

Select a font in the Font drop-down list.

Scroll down and select a symbol character to be added in the preview box. The small right preview box displays the new symbol.

In the Symbol box, name the symbol being added.

In the Symbol set box, select a symbol set in the drop-down list to add the new symbol to, or type a new name to create a new symbol set for the new symbol.

If required, select a font style in the Style drop-down list – Standard, Italic, Bold, or Bold, Italic.

Click Add, then click OK to close the Edit Symbols dialog. The new symbol and, if created, new symbol set are now available for use.

Figure 308: Symbols dialog

Figure 309: Edit Symbols dialog

Note

After a new symbol is added to the catalog, it can be added to a new formula by typing a percentage sign (%) followed by the new name into the markup language. Remember that symbol names are case sensitive, for example, %prime is a different symbol to %Prime.

Note

By default, only those user-defined symbols that actually occur in the document are stored with it. Sometimes it is useful to embed all the user-defined symbols, so that when the document is transferred to another computer it can be edited by another person. Go to Tools > Options > LibreOffice Math > Settings on the Menu bar and uncheck Embed only used symbols (smaller file size) in the Miscellaneous Options section.

Editing symbols

Modifying symbol names

To change the name of a symbol:

In the Edit Symbols dialog (Figure 309), select the symbol name to be changed in the Old symbol drop-down list. The symbol appears in the left preview pane at the bottom of the Edit Symbols dialog (Figure 309).

Type a new name for the symbol in the Symbol text box, or select a new name in the Symbol drop-down list. The new symbol name appears above the right preview pane at the bottom of the Edit Symbols dialog.

Click Modify and the symbol name is changed.

Click OK to close the Edit Symbols dialog.

Moving symbols

To move a symbol from one symbol set to another:

In the Edit Symbols dialog (Figure 309), in the Old symbol set drop-down list, select the symbol set where the symbol to be moved is located.

Select the symbol name to be moved in the Old symbol drop-down list. The symbol appears in the left preview pane at the bottom of the Edit Symbols dialog (Figure 309).

In the Symbol set drop-down list, select the desired symbol set to move the symbol to. The new symbol set name appears below the right preview pane at the bottom of the Edit Symbols dialog.

Click Modify and the symbol is moved to the new symbol set.

Click OK to close the Edit Symbols dialog.

Deleting symbols

To delete a symbol from a symbol set:

In the Edit Symbols dialog (Figure 309), in the Old symbol set drop-down list, select the symbol set from which the symbol should be deleted.

Select the symbol name to be deleted in the Old symbol drop-down list. The symbol appears in the left preview pane at the bottom of the Edit Symbols dialog (Figure 309).

Click Delete and the symbol is deleted from the symbol set without any confirmation.

Click OK to close the Edit Symbols dialog.

Note

The only way to delete a symbol set is by deleting all of the symbols in that set. When the last symbol is deleted from a set, the set is also deleted.

Formula spacing

The grave accent (`) inserts an additional small space and the tilde (~) inserts an additional large space into formulas. However, in the basic installation of LibreOffice, these symbols are ignored when they occur at the end of a formula. For running text in a formula, it may be necessary to include spacing at the end of formulas as well. This customization is only required when working with a Math document and is not required when inserting a formula into another LibreOffice component.

To add spacing at the end of formula in Math, go to Tools > Options > LibreOffice Math > Settings on the Menu bar and uncheck Ignore ~ and ` at the end of the line in the Miscellaneous Options section.

Note

To customize LibreOffice Math settings, open LibreOffice Math and then navigate to Tools > Options > LibreOffice Math > Settings.

Scaling of code in the Formula Editor input window

By default, the code in the Formula Editor input window (Figure 298) is scaled to 100%. The scaling factor can be changed by going to Tools > Options > LibreOffice Math > Settings on the Menu bar and changing the percent in the Scaling code input window box in the Miscellaneous Options section. For example, if the scaling is changed to 150%, the code in the input window will appear larger. This setting affects the Formula Editor in all LibreOffice components. However, the LibreOffice Math section in the Options dialog can only be accessed from within the Math component. It is not available when editing a formula in a document in any other LibreOffice component.

Extensions

For frequent formula creation and editing, LibreOffice can be customized by adding extensions that are designed to help create formulas. Extensions are easily installed using the Extension Manager. For more information on how to install extensions, see Chapter 13, Customizing LibreOffice.

A commonly used extension is Formatting of All Math Formulas. It allows the formatting of all Math formulas in a Writer, Calc, Draw, or Impress document. With it the font names and font sizes of all formulas can be changed in a document. For more information on this extension, go to https://extensions.libreoffice.org/en/extensions/show/formatting-of-all-math-formulas.

Exporting and Importing

Math ML format

In addition to exporting documents as PDFs, LibreOffice offers the possibility of saving formulas in the MathML format. This allows the insertion of formulas into documents that were created in other software, for example, Microsoft Office or an internet browser.

Note

Some internet browsers do not fully support the MathML format, so formulas may not display correctly.

If working on a Math document, go to File > Save as on the Menu bar or use the keyboard combination Ctrl+Shift+S to open the Save as dialog. Select MathML in the list of available file formats in File type to save the formula as MathML.

If working in another LibreOffice component, right-click on the formula object and select Save Copy as in the context menu to open the Save as dialog. Select MathML in the list of available file formats in File type to save the formula object as MathML.

MathML formulas can be imported into Math by using Tools > Import MathML from Clipboard on the Menu bar.

Microsoft file formats

To control how formulas in Microsoft format are imported and exported using LibreOffice, go to Tools > Options > Load/Save > Microsoft Office on the Menu bar and select or deselect the options for MathType to LibreOffice Math or reverse.

[L]: Load and convert the object

[S]: Convert and save the object

[L]: Load and convert the object

Select this option if Microsoft OLE objects are to be converted into the specified LibreOffice OLE objects when a Microsoft document is opened in LibreOffice. For formulas, any embedded MathType objects must not exceed the MathType 3.1 specifications to be successfully loaded and converted. Information on MathType format can be found at https://docs.wiris.com/en/mathtype/office_tools/microsoft_office.

If a document containing OMML formulas has been saved in .docx format and then converted to the older .doc format, then any OMML objects are converted into graphics, which will be displayed in LibreOffice as graphics.

[S]: Convert and save the object

Select this option if LibreOffice OLE objects are to be converted and saved in Microsoft file format. LibreOffice converts any formulas into a format that can be read and modified by Microsoft Equation Editor and MathType.

When this option is not selected, the formula is treated as an OLE object on conversion into a .doc format and remains linked to LibreOffice. A double-click on the object in Microsoft Office will attempt to launch LibreOffice.

Getting Started Guide 7.5

Chapter 10
Working with File Formats, Security, and Exporting

File formats

LibreOffice can open a wide variety of file formats as shown below in addition to the Open Document Format (ODF), including Portable Document Format (PDF).

Most file formats are automatically detected by LibreOffice and can be opened without explicitly selecting the document format in the file picker.

Text documents

In addition to Open Document text formats (.odt, .ott, .oth, .odm, and .fodt), Writer can open the following text formats and a variety of legacy formats that are not listed.

When opening .htm or .html files used for web pages, LibreOffice customizes Writer for working with these files.

Microsoft Word 6.0/95/97/2000/XP/Mac) (.doc and .dot)

Microsoft Word 2003 XML (.xml)

Microsoft Word 2007/2010 XML (.docx, .docm, .dotx, .dotm)

Microsoft WinWord 5 (.doc)

Microsoft Works (.wps)

Abiword Document (.abw, .zabw)

MacWrite Document (.mw, .mcw)

Text CSV (.csv and .txt)

DocBook (.xml)

T602 Document (.602, .txt)

Apple Pages (.pages)

HTML Document (.htm, .html)

WordPerfect Document (.wpd)

Lotus WordPro (.lwp)

ClarisWorks/Appleworks Document (.cwk)

Rich Text Format (.rtf)

StarWriter formats (.sdw, .sgl, .vor)

Unified Office Format text (.uot, .uof)

Hangul WP 97 (.hwp)

eBook (.pdb)

OpenOffice.org 1.x (.sxw, .stw, and .sxg)

Spreadsheets

In addition to Open Document spreadsheet formats (.ods, .ots, and .fods), Calc can open the following spreadsheet formats and a variety of legacy formats that are not listed.

Microsoft Excel 97/2000/XP (.xls, .xlw, and .xlt)

Microsoft Excel 4.x–5.0/95 (.xls, .xlw, and .xlt)

Microsoft Excel 97-2003 (.xml)

Microsoft Excel 2007-365 (.xlsx, .xlsm, .xltx, .xltm)

Microsoft Excel 2007-2010 binary (.xlsb)

Lotus 1-2-3 (.wk1, .wks, and .123)

Data Interchange Format (.dif)

Rich Text Format (.rtf)

Text CSV (.csv and .txt)

StarCalc (.sdc and .vor)

OpenOffice.org 1.x (.sxc and .stc)

dBASE (.dbf)

SYLK (.slk)

Unified Office Format spreadsheet (.uos, .uof)

HTML Document (.htm and .html files, including Web page queries)

Quattro Pro 6.0 (.wb2)

Apple Numbers 2 (.numbers)

Presentations

In addition to Open Document presentation formats (.odp, .odg, .otp, and .fopd), Impress can open the following presentation formats:

Microsoft PowerPoint 97/2000/XP (.ppt and .pot)

Microsoft PowerPoint 2007-365 (.pptx, .pptm, .potx, .potm)

StarDraw and StarImpress (.sda, .sdd, .sdp, and .vor)

OpenOffice.org 1.x (.sxi and .sti)

Unified Office Format presentation (.uop, .uof)

CGM – Computer Graphics Metafile (.cgm)

Portable Document Format (.pdf)

Apple Keynote 5 (.key)

Graphics

In addition to Open Document graphic file formats (.odg and .otg) and PDF files, Draw can open the following graphic formats:

Adobe Photoshop (*.psd)

AutoCAD Interchange Format (*.dxf)

Corel Draw (*.cdr)

Corel Presentation Exchange (*.cmx)

Microsoft Publisher 98-2010 (*.pub)

Microsoft Visio 2000-2013 (*.vdx; *.vsd; *.vsdm; *.vsdx)

WordPerfect Graphics (*.wpg)

OpenOffice.org 1.x (.sxd and .std)

Bitmap (*.bmp)

Joint Photographic Experts Group (*.jpeg, *.jpg)

Picture Exchange (*.pcx)

Sun Raster (*.ras)

Truevision TGA (*.tga, *.icb, *.vda, *.vst)

Drawing Exchange Format, or Drawing Interchange Format (*.dxf)

eMule Resource Files (*.met)

Portable Gray Map (*.pgm)

Open Office, or Star Office Draw (*.sda)

Tag Image File Format (*.tif, *.tiff)

Windows Metafile (*.wmf)

Enhanced Windows Metafile (*.emf)

Portable Bitmap Image (*.pbm)

Portable Network Graphics (*.png)

StarOffice Presentation (*.sdd)

Encapsulated Postscript (*.eps)

Kodak Photo CD (*.pcd)

Portable Pixmap (*.ppm)

Scalable Vector Graphics (*.svg)

X Window System or X BitMap (*.xbm)

Graphics Interchange Format (*.gif)

Macintosh Picture Image (*.pct)

Photoshop Document (*.psd)

StarView Metafile (*.svm(

X Windows System (*.xpm)

Formulas

In addition to Open Document Formula files (.odf), Math can open the formats used by OpenOffice.org 1.x (.sxm), StarMath (.smf), and MathML (.mml) files.

When opening a Word document that contains an embedded equation editor object, if the option MathType to LibreOffice Math or reverse is checked in Tools > Options > Load/Save > Microsoft Office (macOS LibreOffice > Preferences > Load/Save > Microsoft Office), the object is automatically converted to a LibreOffice Math object.

File formats for saving

Saving in ODF format guarantees the correct rendering of a file when it is transferred to another user, or when the file is reopened with a later version of LibreOffice, or with another application that can open ODF files. It is strongly recommended to use ODF as the default file format. However, files can be saved in other formats, if required.

Tip

When sharing a document that is not going to be modified, the preferred option is to convert the document to PDF. LibreOffice provides an easy method to convert documents to PDF.

Text documents

In addition to the ODF text format (.odt, .ott, and .fodt), Writer can save in the following formats:

Office Open XML Text (.docx)

Microsoft Word 2007–365 (.docx, .dotx)

Microsoft Word 97–2003 (.doc)

Microsoft Word 2003 XML (.xml)

Rich Text Format (.rtf)

Text (.txt)

Text Encoded (.txt)

Unified Office Format text (.uot, .uof)

HTML Document (.html and .htm)

DocBook (.xml)

Notes

Encryption support within the Microsoft Word 97/2000/XP filter allows password protected Microsoft Word documents to be saved.

The .rtf format is a common format for transferring text files between applications, but there is a loss of formatting and images. For this reason, it is preferable to use other formats.

Spreadsheets

In addition to the ODF spreadsheet format (.ods, .ots, and .fods), Calc can save in the following formats:

Office Open XML Spreadsheet (.xlsx)

Data Interchange Format (.dif)

Microsoft Excel 2007–365 XML (.xlsx)

dBase (.dbf)

Microsoft Excel 97–2003 (.xls and .xlw)

SYLK (.slk)

Microsoft Excel 97–2003 Template (.xlt)

Text CSV (.csv and .txt)

Microsoft Excel 2003 XML (.xml)

Unified Office Format spreadsheet (.uos)

HTML Document (Calc) (.html and .htm)

Presentations

In addition to the ODF presentation format (.odp, .otp, .fodp, and .odg), Impress can save in the following formats. Impress can also export to graphics formats listed as compatible with Draw.

Microsoft PowerPoint 2007–365 (.pptx, .potm)

Microsoft PowerPoint 2007–365 AutoPlay (.ppsx)

Microsoft PowerPoint 97–2003 (.ppt)

Microsoft PowerPoint 97–2003 Template (.pot)

Microsoft PowerPoint 97–2003 AutoPlay (.pps)

Office Open XML Presentation (.pptx, .potm, .ppsx)

Unified Office Format presentation (.uop)

Drawings

Draw can save in the ODF Drawing format (.odg, .otg, and .fodg). Draw can also export to any of the graphics formats BMP, EMF, EPS, GIF, JPEG, PNG, SVG, TIFF, and WMF.

Note

Adobe [Macromedia] Flash (.swf) export has been removed from LibreOffice 7. Flash Player reached end-of-life in December 2020.

Writer/Web documents

Writer/Web can save to the following formats:

HTML document (.html and .htm), as HTML 4.0 Transitional

Text and Text Encoded (LibreOffice Writer/Web) (.txt)

Exporting files

LibreOffice uses the term “export” for file operations where there is a change of file type. If the file type cannot be found in File > Save As on the Menu bar, check File > Export on the Menu bar (not available in Math) for additional file types.

LibreOffice can export in PDF format for Writer, Calc, Impress, and Draw, or EPUB for Writer only. Also, LibreOffice can export files in HTML and XHTML formats. Draw and Impress can also export in several image and graphic formats.

PDF format is a standard file format ideal for sending a file that can be viewed using Adobe Reader, or other PDF viewing applications. The process of PDF export and the dialogs used are similar for Writer, Calc, Impress, and Draw.

Note

When using the Export command, LibreOffice creates a copy of the file as a new file using the selected format. The original file remains open in LibreOffice.

Figure 310: Export dialog

PDF quick export

When quickly exporting a file in PDF format, the file format, page range, image compression, or PDF other options cannot be selected.

Open the file in LibreOffice that is going to be exported in PDF format.

To quickly export the file in PDF format and open the Export dialog (Figure 310), use one of the following methods:

Click on Export Directly as PDF on the Standard toolbar.

Go to File > Export As > Export Directly as PDF on the Menu bar.

Enter a file name and navigate to the required location for the PDF file in the Export dialog.

Click on Export to create the PDF file and close the Export dialog.

Note

By default, a file in PDF format is not protected against contents tampering, or editing. Contents of a PDF file can be edited by specialized software tools, including LibreOffice Draw.

Controlled PDF export

For more control over the content and quality when exporting in PDF format, the PDF Options dialog (Figure 311) has to be used.

Open the file in LibreOffice that is going to be exported in PDF format.

Go to File > Export As > Export as PDF on the Menu bar to open the PDF Options dialog.

Figure 311: PDF Options dialog — General page

Select the various options required on each tabbed page of the PDF Options dialog.

Click on Export to open the Export dialog.

Navigate to the required folder for the PDF file.

Enter a file name the PDF file and click on Export to save the PDF file in its selected location.

General PDF options

Refer to Figure 311 for the PDF options available on the General page of the PDF dialog.

Range

Sets the export options for the pages included in a PDF file.

All

Exports all defined print ranges. If no print range is defined, exports the entire document.

Pages

Exports the pages that have their page number entered in the box. To export a range of pages, use the format 3-6. To export single pages, use the format 7;9;11. If you want, you can export a combination of page ranges and single pages, by using a format like 3-6;8;10;12.

Selection

Exports all the current selection.

View PDF after export

Opens the exported PDF file in the default PDF viewer application.

Images

Sets the PDF export options for images in a PDF file.

Lossless compression

Selects a lossless compression of images. All pixels are preserved. This setting can create large files when used with photographs.

JPEG compression Quality

Enter the quality level for JPEG compression. With a high quality level, almost all pixels are preserved. With a low quality level, some pixels are lost and artifacts are introduced, but file sizes are reduced.

Reduce image resolution

Lower DPI (dots per inch) images have lower quality. Lower resolutions (100 DPI or less) may be sufficient for viewing on a computer screen, but many modern devices have much higher resolutions. For printing it is generally preferable to use at least 300 or 600 DPI, depending on the capability of the printer. Higher DPI settings increase the size of the exported file.

Note

Encapsulated PostScript (EPS) images with embedded previews are exported only as previews. EPS images without embedded previews are exported as empty placeholders.

Watermark

Add a centered, vertical, light green watermark text to the page background. The watermark is not part of the source document.

Sign with watermark

Insert the required text for the watermark signature. When this option is selected, a watermark signature appears on the PDF pages.

General

Sets general PDF export options.

Hybrid PDF (embed ODF file)

Use this setting to export the document as a PDF containing two file formats: PDF and ODF. In PDF viewers it behaves like a normal PDF file, but remains fully editable in LibreOffice.

Archive (PDF/A, ISO 19005)

Converts to the PDF/A-1b, PDF/A-2b, or PDF/A-3b format. All fonts used in the source document are embedded in the generated PDF file, and PDF tags are created. The primary purpose is to create an electronic document whose appearance is independent of device and application, making it suitable for long term preservation.

PDF/A-2b is recommended for most users, because it allows for layers and transparency with shapes and images. It also compresses better (JPEG 2000) than PDF/A-1b, usually producing smaller files. PDF/A-3b is identical to PDF/A-2b, but also accepts embedding of other file formats.

Universal Accessibility (PDF/UA)

Creates a universal, accessible PDF file that follows the requirements of PDF/UA (ISO 14289) specifications.

Tagged PDF (add document structure)

A tagged PDF contains information about the structure of document contents. This can help to display the document on devices with different screens and using screen reader applications. Some tags that are exported are table of contents, hyperlinks, and controls. This option can increase file sizes significantly.

Create PDF

Select the format for submitting forms from within the PDF file from the available options in the Submit format drop‑down list. This setting overrides the URL property that is set in the document. Only one is setting valid for the PDF document: PDF (sends the whole document); FDF (sends the control contents); HTML, and XML. Normally PDF format is selected.

Allow duplicate field names

Allows the use of the same field name for multiple fields in a generated PDF file. If disabled, field names are exported using the generated unique names.

Structure

Sets options for diverse features such as bookmarks, comments, page layout.

Export outlines

Select to export bookmarks of Writer documents as PDF bookmarks. Bookmarks are created for all outline paragraphs and for all table of contents entries where hyperlinks are assigned in the source document.

Only paragraphs with Outline level 1 — 10 are exported. The name of the Paragraph Style is irrelevant. For example, the default version of Paragraph Style Title is not exported when its Outline level is Text Body.

Export placeholders

The PDF file includes any defined placeholder fields, which can be filled in by users. This option is only available in Writer.

Comments as PDF annotations

If selected, comments are included in the PDF file as annotations.

To export comments of Writer documents as displayed in LibreOffice, select Tools > Options > LibreOffice Writer > Print (macOS LibreOffice > Preferences > LibreOffice Writer > Print) and select the In margins option in Comments. The exported pages are scaled down and the comments are placed into margins.

Export automatically inserted blank pages

If selected, blank pages are exported automatically inserted in the PDF file. This is recommended when printing the PDF file as a double-sided document. For example, books usually have chapters set to start on an odd-numbered (right-hand) page. When the previous chapter ends on an odd page, LibreOffice inserts a blank page between the two odd pages. This option controls whether to export that blank page.

Use reference Xobjects

This option affects how PDF images are exported back to a PDF file.

When this option is disabled, the first page of the PDF data is included in the output. The PDF export merges images, fonts and other resources during export. This is a complex operation, but the result can be viewed in various viewers.

When the option is enabled, then the reference XObject markup is used. This is a simple operation, but PDF viewers have to support this markup to show vector images. Otherwise a fallback bitmap is shown in the viewer.

More information can be found in the PDF specification, ISO 32000-2:2017 (https://www.iso.org/standard/63534.html).

Figure 312: PDF Options dialog — Initial View page

Initial View PDF options

On the Initial View page in the PDF Options dialog (Figure 312), select how the PDF file opens by default in a PDF viewer.

Panes

Page only

Select to generate a PDF file that shows only page contents.

Outline and page

Select to generate a PDF file that shows a bookmarks palette and page contents.

Thumbnails and page

Select to generate a PDF file that shows a thumbnails palette and the page contents.

Open on page

Enter a page number to display that page when a PDF reader opens a PDF file.

Magnification

Default

Select to generate a PDF file that shows the page contents without zooming. If the PDF reader application is configured to use a zoom factor by default, the page displays with that zoom factor.

Fit in window

Select to generate a PDF file that displays the page zoomed to fit entirely into a PDF reader window.

Fit width

Select to generate a PDF file that displays the page zoomed to fit the width of a PDF reader window.

Fit visible

Select to generate a PDF file that displays the text and graphics on the page zoomed to fit the width of a PDF reader window.

Zoom factor

Enter a zoom factor when a PDF reader opens a PDF file.

Page layout

Default

Select to generate a PDF file that displays the pages according to the layout setting of the PDF reader application.

Single page

Select to generate a PDF file that displays one page at a time.

Continuous

Select to generate a PDF file that displays pages in a continuous vertical column.

Continuous facing

Select to generate a PDF file that displays pages side by side in a continuous column. For more than two pages, the first page is displayed on the right.

First page is left

Select to generate a PDF file that shows pages side by side in a continuous column. For more than two pages, the first page is displayed on the left. Complex Text Layout must be enabled in Tools > Options > Language Settings > Languages (macOS LibreOffice > Preferences Language Settings > Languages) for this option to be available.

User Interface PDF options

On the User Interface page in the PDF Options dialog (Figure 313), the options available specify how the user interface for an external PDF viewer appears. Some of the options are useful when creating a PDF file to be used as a presentation, or a kiosk-type display.

Window Options

Resize window to initial page

Select to generate a PDF file that is shown in a window displaying the whole initial page.

Center window on screen

Select to generate a PDF file that is shown in a PDF reader application centered on the display.

Open in full screen mode

Select to generate a PDF file that is shown in full screen in a PDF reader window and in front of all other windows.

Display document title

Select to generate a PDF file that is displays the PDF file title in the PDF reader title bar.

Figure 313: PDF Options dialog — User Interface page

User Interface Options

Hide menubar

Select to hide the menu bar when a PDF file is active.

Hide toolbar

Select to hide the toolbar when a PDF file is active.

Hide window controls

Select to hide the reader controls when a PDF file is active.

Transitions

Use transition effects

Select to export Impress slide transition effects to respective PDF effects.

Collapse Outlines

Show All

Select to show all outline levels as bookmarks when a PDF reader opens a PDF file.

Visible levels

Select to show bookmarks down to the selected level when a PDF reader opens a PDF file.

Links PDF options

The Links page in the PDF Options dialog (Figure 314), specifies how outlines and hyperlinks are exported in a document.

General

Export outlines as named destinations

The bookmarks (targets of references) in PDF files are defined as rectangular areas. Additionally, bookmarks to named objects are defined by their names. Enable the checkbox to export the names of objects in a document as valid bookmark targets. This allows linking of these objects by name from other documents.

Convert document references to PDF targets

When selected, this option converts the URLs referencing other ODF files to PDF files with the same name. In the referencing URLs, the extensions .odt, .odp, .ods, .odg, and .odm are converted to the extension .pdf.

Export URLs relative to file system

Enable this option to export URLs to other documents as relative URLs in the file system.

Cross-document links

Specify how to handle hyperlinks from a PDF file to other files.

Figure 314: PDF Options dialog — Links page

Default mode

Links from a PDF document to other documents are handled as specified in the computer operating system.

Open with PDF reader application

Cross-document links are opened with the PDF reader application that currently shows the document. The PDF reader application must be able to handle the specified file type inside the hyperlink.

Open with Internet browser

Cross-document links are opened with the Internet browser. The Internet browser must be able to handle the specified file type inside the hyperlink.

Security PDF options

The Security page in the PDF Options dialog (Figure 315), specifies the security options of the exported PDF file.

Note

The document permission restrictions set by a password are observed only by PDF readers compliant with the version 1.5 of the PDF format. For older PDF readers, these restrictions may have no effect.

File Encryption and Permission

Set passwords

Click on this option to open a dialog box where passwords are entered. Specify a password required for viewing a PDF file. Enter an optional password that allows a user viewing the PDF to edit and/or print the document.

Printing

Not permitted

Printing a document is not permitted.

Low resolution (150 dpi)

The document can only be printed in low resolution (150 dpi). Some PDF readers ignore the setting of this option.

Figure 315: PDF Options dialog — Security page

High resolution

The document can be printed in high resolution.

Changes

Not permitted

No changes of the content of the PDF file are permitted.

Inserting, deleting, and rotating pages

Only inserting, deleting, and rotating pages is permitted.

Filling in form fields

Only filling in form fields is permitted.

Commenting, filling in form fields

Only commenting and filling in form fields is permitted.

Any except extracting pages

All changes are permitted, except extracting pages.

Contents

Enable copying of content

Select to enable copying of content to the clipboard.

Enable text access for accessibility tools

Select to enable text access for accessibility tools.

Digital Signature PDF options

The Digital Signatures page in the PDF Options dialog (Figure 316), specifies the options for exporting to a digitally signed PDF file.

Digital signatures are used to ensure that the PDF was really created by the original author and that the document has not been modified since it was signed.

The signed PDF export uses the keys and X.509 certificates already stored in a default key store location, or on a smart card.

When using a smart card, it must already be configured for use by a key store. This is usually done during installation of smart card software.

Certificate

Use this certificate to digitally sign PDF documents

Allows selection of a certificate to be used for signing a PDF export.

Select

Opens the Select Certificate dialog.

All certificates found in the selected key store are displayed. If the key store is protected by a password, there is a prompt to enter a password. When using a smart card that is protected by a PIN, there is a prompt to enter the PIN.

Select the certificate to use for digitally signing the exported PDF by clicking on the corresponding line, then click OK.

All other fields on the Digital Signatures page are accessible only after a certificate has been selected.

Certificate password

Enter the password used for protecting the private key associated with the selected certificate. Usually this is the key store password.

Figure 316: PDF Options dialog — Digital Signatures page

Notes

If the key store password has already been entered in the Select Certificate dialog box, the key store may already be unlocked and not require the password again. But to be on the safe side, enter the password.

When using a smart card, enter the PIN here. Some smart card software prompts for the PIN again before signing. This is cumbersome, but that is how smart cards work.

Location, Contact information, Reason

These three fields optionally allow additional information to be entered about the digital signature that is applied to the PDF (Where, by whom and why it was made). It is embedded in the appropriate PDF fields and is visible to anyone viewing the PDF. Each, or all of the three fields, may be left blank.

Time Stamp Authority

During the PDF signing process, the Time Stamp Authority (TSA) is used to obtain a digitally signed timestamp that is then embedded in the signature. This (RFC 3161) timestamp allows viewing of the PDF to verify when the document was signed.

If no TSA URL is selected (the default), the signature is timestamped, but uses the current time from the local computer.

EPUB format export (Writer only)

EPUB is standard for electronic book files with the extension .epub that can be downloaded and read on devices like smartphones, tablets, computers or e-readers. The EPUB format is implemented as an archive file consisting of HTML files carrying the content, along with images and other supporting files.

Writer can export a file to EPUB. A text-only document generally exports well, but some contents (such as illustrations, tables, and cross-references) may not export correctly.

Quick EPUB export

When quickly exporting a Writer file as an EPUB file, there is no control over content and quality of the EPUB file.

Open the Writer file that is going to be converted.

Go to File > Export As > Export Directly as EPUB on the Menu bar and the Export dialog opens.

Navigate to the folder where the EPUB file is going to be saved.

Enter a file name in the File name text box. The format of the exported file is fixed to EPUB Document (.epub).

Click on Export and the Writer file is converted to an EPUB file and saved in the selected location.

Controlled EPUB export

To control the content and quality of the resulting EPUB file, a Writer file is exported as follows:

Open the Writer file that is going to be converted.

Go to File > Export As > Export as EPUB and open the EPUB Export dialog (Figure 317).

Enter the necessary information into the various options in EPUB Export dialog. For more information, refer to “EPUB export options” below.

Click OK to close the EPUB Export dialog and open the Export dialog.

Navigate to the folder where the EPUB file is going to be saved.

Enter a file name in the File name text box. The format of the exported file is fixed to EPUB Document (.epub).

Click on Export and the Writer file is converted to an EPUB file and saved in the selected location.

Tip

Other ways to export to EPUB from Writer (.odt) files include Calibre, an open source e‑book manager that runs on Windows, macOS, and Linux. Calibre provides many e‑book conversion facilities (including PDF to EPUB) and allows editing of the conversion. See https://calibre-ebook.com/ for more information.

EPUB export options

General

Version

Sets the version of the resulting EPUB file.

Split method

Select the type of start of the next EPUB section.

Heading — starts the next section on headings, according to the document outline numbering.

Page break — starts the new section on a page break.

Layout method

Determines the layout that is generated for the EPUB document.

Reflowable — content flows, or reflows, to fit the screen and to fit the needs of the user. This also means that page style information (for example page size or header/footer content) is not exported.

Fixed — gives greater control over presentation when a reflowable EPUB is not suitable for the content.

Figure 317: EPUB Export dialog

Customize

Custom cover image

Enter the full path of the custom cover image file. If the entry is empty, the exporter uses the cover image in the media directory when the name is one of the following: cover.gif, cover.jpg, cover.png, or cover.svg. The custom cover image is embedded in the EPUB file.

Custom media directory

Enter the custom media directory for the EPUB file. The media directory may contain a cover image as seen above, custom metadata and image links.

By default, the exporter looks for custom media and custom metadata in the current document directory inside a folder with the same name of the document file name. For example, if the document name is MyText.odt, the default media folder for cover and metadata is MyText in the current directory.

For custom metadata, provide a file with same name as the original filename and using the extension .xmp. The provided metadata overrides the internal document metadata. In the example above, the custom metadata must exist in the MyText directory as MyText.xmp.

Image links mean that if create relative links are created on images or text and they link an image that is available in the media directory, then this media is available in the EPUB export file as a pop-up.

Metadata

Enter the custom metadata to override the document default metadata. These text fields can be left empty.

Identifier

Enter a unique identifier for the publication.

Title

Enter the title of the publication.

Author

Enter the Author of the publication.

Language

Language of the publication (see RFC4646 and ISO 639 for possible values).

Date

Last modification date for the publication. The value of this property must be an XML Schema date Time conformant date in the form: CCYY-MM-DDThh:mm:ssZ. Default is the date and time when the export dialogue box opened.

Creating HTML files

The easiest way to create HTML documents in LibreOffice is to start with an existing text document. For example, in Writer, go to View > Web and the view changes to show how the text document appears as a web page. However, Web view does not show which features will, or will not be saved correctly in HTML format. Refer to “HTML files using Writer/Web” on page 455 for more information on creating a web page from a text document.

Text documents

Note

The use of styles in the text document is strongly recommended when saving, or exporting to HTML, or XHTML format.

Saving a text document as HTML is limited by the HTML 4.0 Transitional specification. Text documents in office suites normally use a richer set of resources that do not appear in HTML, for example page formatting. Do not expect the same layout when saving a file in HTML format.

Saving as HTML

A text document can be saved in HTML format so that it can be viewed in a web browser. If required, associate a page break with a specific heading paragraph style to generate a separate HTML page each time the style appears in the document. LibreOffice Writer automatically creates a page containing hyperlinks to each of these pages.

Saving a text document in HTML format, any graphics in the document are saved into the HTML document as embedded data streams. For graphics, JPEG, or SVG formats are saved as HTML and all other graphic formats are saved as PNG.

LibreOffice generates the image files and the HTML file necessary to create an HTML page in a browser. The number of files generated by the format conversion depends on the number of images and objects in the original text document. Refer to Table 10 for the file types created and file content when saving HTML format.

Table 10: File types created saving in HTML format

File	Contents
Myfile.html	The text contents, page layout, text attributes, meta tags, and styles.
Myfile_html_[random number].gif	GIF images of visible contents of OLE objects.
Myfile_html_[random number].png, jpg, or bmp	Images inserted in the text document as PNG, BMP, or JPEG keep their original format.

Create a HTML file from a text document as follows:

If necessary, create a new folder as a location for the HTML file and images.

Go to File > Save As on the Menu bar to open the Save As dialog.

Navigate to the required location in the Save As dialog.

Enter a file name for the HTML file in the File name: text box.

In File type:, select HTML Document (Writer) (.html) as the file type.

Click on Save to save the file as HTML and close the Save As dialog.

If necessary, click on Use HTML Document (Writer) Format in the Confirmation dialog that opens confirming the file is saved as HTML.

Export as HTML

When exporting a text document as a HTML file, LibreOffice generates an XHTML file for each text document. Image files are also embedded in the XHTML file. XHTML files created by exporting a text document using LibreOffice have better layout rendering, but fail to render objects other than images.

If necessary, create a new folder as a location for the HTML file and images.

Go to File > Export on the Menu bar to open the Export dialog (Figure 310 on page 435).

Navigate to the location of the new folder in the Export dialog.

Enter a file name for the HTML file in the File name: text box.

In File type:, select XHTML (Extensible Hypertext Markup Language) as the file type.

Click on Export to save the file as XHTML and close the Export dialog.

Notes

Writer does not replace multiple spaces in the original document with the HTML code for non-breaking spaces. To create extra spaces in a HTML file or web page, insert non-breaking spaces in LibreOffice. To enter non-breaking spaces, use the keyboard shortcut Ctrl+Spacebar (macOS ⌘+Shift+Spacebar).

The Tab character is not rendered on exporting to XHTML. Instead, use borderless tables to position contents instead of the Tab character in a line. This also affects bullet and number lists that insert a Tab character between the bullet or number and the text. Use a list style where the Tab character is replaced by a space.

Objects different from usual image formats are not rendered in LibreOffice XHTML output. These include drawings, spreadsheets, charts, and OLE object in general. To render an OLE object in XHTML, create an image of the OLE object and replace the OLE object in the document with the image.

Series of web pages

Writer can save a large document as a series of web pages (HTML files) with a table of contents page, as follows:

Decide which heading style in a document starts a new page and make sure all those headings have the same paragraph style, for example, Heading 1.

Go to File > Send > Create HTML Document on the Menu bar and open the Name and Path of the HTML Document dialog (Figure 318).

Figure 318: Name and Path of the HTML Document dialog

Navigate to the location of where the HTML file is going to be saved.

Enter a file name in the File name: text box.

In File type:, select HTML Document from options available.

In separated by:, select the style from the drop-down list that is going to create a new page in the HTML file, for example Heading 1.

Click on Save to create the multi-page HTML document and close the dialog. The HTML files created conform to the HTML 4.0 Transitional standard.

Spreadsheets

Calc can save spreadsheet files as HTML documents as follows. If the file contains more than one sheet, the additional sheets follow each other in the HTML file. Links to each sheet are placed at the top of the HTML document.

If necessary, create a new folder as a location for the HTML file.

Go to File > Save As on the Menu bar to open the Save As dialog.

Navigate to the required location in the Save As dialog.

Enter a file name for the HTML file in the File name: text box.

In File type:, select HTML Document (Calc) (.html) as the file type.

Click on Save to save the file as HTML and close the Save As dialog.

If necessary, click on Use HTML Document (Calc) Format in the Confirmation dialog that opens confirming the file is saved as HTML.

Note

Calc allows the insertion of links directly into a spreadsheet using the Hyperlink dialog. See Chapter 4, Working with Styles, Templates and Hyperlinks, for more information on hyperlinks.

Presentations and drawings

Exporting

Impress presentations and Draw drawings cannot be saved in HTML format, but can be exported as HTML documents. HTML files are created using the selected options in the HTML Export dialog.

Notes

Saving in HTML format does not retain any animation, or slide transitions that have been created in the Impress presentation.

Click on Create on the HTML Export dialog at any stage in the following procedure to create the HTML file.

If a web page design has not been previously created, the option Existing design is not available on the Assign Design page of the HTML Export dialog.

Depending on the size of a presentation, or drawing and the number of graphics it contains, the HTML export function creates several HTML, JPG, and GIF files. It is recommended to create a folder to hold all the files created for the web version of a presentation, or drawing. Saving to the desktop and not to a specific folder, the HTML and graphics files are placed onto the desktop, which could create difficulties in locating the files.

If necessary, create a new folder as a location for the HTML file.

Go to File > Export on the Menu bar to open the Export dialog (Figure 310 on page 435).

Navigate to the location of the new folder in the Export dialog.

Enter a file name for the HTML file in the File name: text box.

In File type:, select HTML Document (Impress) (.html; .htm), or HTML Document (Draw) (.html; .htm) as the file type.

Click on Export and open the HTML Export dialog (Figure 319).

Select the required option, or enter the necessary information on each page of the HTML Export dialog, then click on Next to open the next page in the HTML Export dialog. See “HTML options” below for more information on available options.

When the HTML design is completed to design requirements, click on Create to close the HTML Export dialog and create the HTML file.

HTML options

Assign Design

Refer to Figure 319. On this page, select to create a new design, or select an existing design, or delete an existing design. If a design is deleted, only the design information is deleted in the Export dialog. An export file is not be deleted by this action.

New design

Creates a new design using the pages of the Export dialog.

Figure 319: HTML Export dialog — Assign Design page

Figure 320: HTML Export dialog — Publication Type page

Existing Design

Loads an existing design that is selected from the design list displayed and is used as a starting point in creating a HTML design.

Delete Selected Design

Deletes the selected design from the design list. Only available when an existing design is selected.

Publication type

Refer to Figure 320. Defines the basic settings for exporting the HTML file.

Standard HTML format

Creates standard HTML pages from export pages.

Standard HTML with frames

Creates standard HTML pages with frames. The exported page is placed in the main frame. The frame to the left displays a table of contents in using hyperlinks.

Single-document HTML

Creates a single file containing the text of the presentation, but not the layout, or images.

Automatic

Creates a default HTML presentation as a kiosk export, where pages are automatically advanced after a specified amount of time and does not depend on the document contents.

WebCast

In a WebCast export, automatic scripts are generated with Perl or ASP support. This enables the speaker (for example, a speaker in a telephone conference using a slide show on the Internet) to change pages in web browsers used by the audience. For more information on WebCast is available on the LibreOffice help pages.

Options

Refer to Figure 320.

Create title page

Creates a title page for a document.

Show notes

Specifies that notes are also displayed.

Save images as

Refer to Figure 321. Determines the image format and defines the compression value for export.

PNG

The files are exported as Portable Network Graphics (PNG). PNG files are compressed without loss of data, and can contain more than 256 colors.

GIF

The files are exported as Graphics Interchange Format (GIF). GIF files are compressed without loss of data, and have a maximum of 256 colors.

Figure 321: HTML Export dialog — Save images as page

JPG

The files are exported as Joint Photographic Experts Group (JPEG) files. JPEG files are compressed with adjustable compression and can contain more than 256 colors.

Quality

Specifies the compression factor of the JPEG graphic. A 100% value offers the best quality for a large data range. A 25% factor indicates small files with inferior image quality.

Effects

Refer to Figure 321.

Export sounds when slide advances

Specifies that the sound files that are defined as a transition effect are exported.

Export hidden slides

Exports any hidden slides in a presentation.

Monitor resolution

Refer to Figure 321. Defines the resolution for the target screen. Depending on the selected resolution, the image may be displayed in a reduced size. A reduction of up to 80% from the original size can be specified.

Low (640 × 480 pixels)

Select low resolution to keep the file size small, even for presentations with many slides.

Medium (800 × 600 pixels)

Select medium resolution for a medium-sized presentation.

High (1024 × 768 pixels)

Select high resolution for a high quality display.

Full HD (1920 × 1080 pixels)

Select high definition resolution for a high quality display.

Information for the title page

Refer to Figure 322.

Author

Specifies the name of the author.

Figure 322: HTML Export dialog — Title page

Figure 323: HTML Export dialog — Button page

Email address

Specifies the email address of the author

Your homepage

Specifies the homepage of the author. A hyperlink is inserted in the HTML file.

Additional information

Specifies any additional text required for the title page.

Select button style

Refer to Figure 323. Specifies the style of navigation buttons inserted into a presentation.

Text only

Inserts only text hyperlinks instead of buttons.

Selection box

Displays the available button styles. Click on a button style to select it.

Select color scheme

Refer to Figure 324. Determines the color scheme and the colors for text and background.

Apply color scheme from document

Determines the colors from the styles used in the current document.

Use browser colors

Uses the default colors of a web browser.

Use custom color scheme

Allows definition of custom colors for some presentation objects.

Text

Opens the Color dialog where colors are selected for the text color in the presentation.

Hyperlink

Opens the Color dialog where colors are selected for the hyperlink color of the presentation.

Active Link

Opens the Color dialog where colors are selected for the active link color of the presentation.

Figure 324: HTML Export dialog — Color Scheme page

Visited Link

Opens the Color dialog where colors are selected for the visited link color of the presentation.

Background

Opens the Color dialog where colors are selected for the background color of the presentation.

HTML files using Writer/Web

LibreOffice Writer can create, edit, and save files in HTML format using a configuration called Writer/Web. LibreOffice Writer/Web is only available when working with documents that are in HTML format.

Display modes

By default, an HTML file opens in Normal view in Writer/Web (Figure 325). To change to Web view in Writer/Web, go to View > Web on the Menu bar (Figure 326). If necessary, Normal or Web view are used to add to an HTML document, then edit and format the contents of the HTML document. The contents in an HTML document are rendered as if displayed in a browser.

Figure 325: Example of Normal view in Writer/Web

Figure 326: Example of Web view in Writer/Web

Figure 327: Example of HTML Source view in Writer/Web

Writer/Web also has a display mode to display the source code of an HTML document. Go to View > HTML Source on the Menu bar to open the source code display for an HTML document (Figure 327). The HTML Source display mode is used to change the formatting and page elements of a web page. Using this display mode for editing requires familiarity and knowledge of the HTML markup language.

Notes

HTML markup language has fewer formatting possibilities than a text document in ODF format. Writer/Web cannot provide all formatting features for HTML documents and some formatting dialogs have fewer options available. For example, a HTML paragraph has no tab settings.

HTML markup content generated by Writer/Web is limited to the production of a displayable document in a web browser. It does not consider other components of a website such as external cascading style sheets (CSS), external JavaScript, or other script languages. It is recommended to only use HTML Source display mode to manually insert links to any external components into the web page.

Creating and editing

Create and edit an HTML document as follows:

Go to File > New > HTML Document and Writer/Web opens a blank document in Web display mode (Figure 326).

Add content to the document by typing or pasting text, images, tables, and other objects.

Use all the formatting resources available in Writer/Web, including styles to edit and format the content.

When all editing is complete, go to File > Save As on the Menu bar and save the document as HTML file type.

Preview the HTML document in a browser to make sure renders correctly.

Editing source code

Edit the source code of an HTML document as follows:

Open, or create an HTML document.

Open HTML source view (Figure 327) using one of the following methods:

Go to View > HTML Source on the Menu bar.

Click on HTML source on the Standard toolbar.

Add, or edit the HTML source code.

When all editing is complete, go to File > Save As on the Menu bar and save the document as HTML file type.

Preview the HTML document in a browser to make sure renders correctly.

Previewing HTML documents

It is important to preview, or check HTML documents in a web browser to make sure the document displays correctly, for example Firefox, Chrome, Edge, or Safari. Not all browsers render HTML files the same way, so it is recommended to preview an HTML document in several browsers, where possible.

To make LibreOffice open the default web browser and display an HTML document, use one of the following methods:

Go to File > Preview in Web Browser on the Menu bar.

Click Preview in Web Browser on the Standard toolbar.

Open the web browser and then open the HTML file in the browser.

Writer/Web options

Go to Tools > Options > LibreOffice Writer/Web (macOS LibreOffice > Preferences > LibreOffice Writer/Web) on the Menu bar to open the Options LibreOffice Writer/Web dialog (Figure 328) and define the basic settings for LibreOffice documents in HTML format. For more information on the options available for Writer/Web, go to the LibreOffice Help website.

Click on a tab in the dialog to access the available options. The tabbed pages are as follows:

View

Defines the default settings for displaying objects in text documents and also the default settings for the window elements.

Figure 328: Options LibreOffice Writer/Web dialog

Formatting Aids

In LibreOffice text and HTML documents, defines the display for certain characters and for the direct cursor.

Grid

Specifies the settings for the configurable grid in document pages. This grid helps to determine the exact position of objects. Also, this grid can be set to align with the snap grid in LibreOffice.

Print

Specifies print settings within a text or HTML document.

Table

Defines the attributes of tables in text documents.

Background

Specifies the background for HTML documents. The background is valid for creating new HTML documents and for HTML documents already created. Any created HTML documents must not have a background defined to use this option.

Emailing documents

LibreOffice provides several ways to send documents quickly and easily as email attachments in one of three formats — Open Document Format (LibreOffice default format); Microsoft Office format; Portable Document Format.

Go to File > Send on the Menu bar and use one of the following options:

Email Document — LibreOffice opens the default email program and the document is attached to the email message.

Email as OpenDocument text — LibreOffice opens the default email program and the document is attached to the email message.

Email as Microsoft Word — LibreOffice creates a file in Microsoft Word format and then opens the default email program with the document attached to the email message.

Email as PDF — LibreOffice opens the PDF Options dialog. Select the required settings required and click OK. LibreOffice opens the default email program with the PDF file attached to the email message.

Enter the recipient name, subject, and message, then send the email.

Note

The above procedure is for sending text documents as an attachment to an email. When sending spreadsheets, presentations, or drawings, the email options change to reflect the type of document being attached to an email message.

Files on remote servers

LibreOffice can open and save files stored on remote servers. Keeping files on remote servers allows access to documents using different computers. For example, working on a document in the office during the day and edit the same document at home for last-minute changes. Storing files on a remote server also backs up documents from computer loss or hard disk failure. Some remote servers can also check-in and check-out files controlling usage and access for documents.

LibreOffice supports many document servers that use well known network protocols such as FTP, WebDav, Windows share, and SSH. It also supports popular services like Google Drive and Microsoft OneNote, as well as commercial and open source servers that implement the OASIS CMIS standard.

Access a remote server connection as follows. The following procedure is an example only. Actual procedure depends on operating system, computer setup and type of remote file service selected.

Open the Remote Files dialog (Figure 329) using one of the following methods:

Click on Remote Files in the LibreOffice Start Center.

Select File > Open Remote on the Menu bar.

Select File > Save Remote on the Menu bar.

Click on Manage Services, and select Add service to open the File Services dialog (Figure 330).

Figure 329: Remote Files dialog

Figure 330: File Services dialog

Select the type of file service required from options available in the Type drop‑down list. Depending on the file service selected, different parameters are necessary for connection to a remote server.

Enter the necessary information in the text boxes. The text boxes change depending on the type of service that has been selected in Type.

If necessary, enter a label for the remote server in the Label text box.

Click on OK to save the details and close the File Services dialog.

In the Remote Files dialog, select the service from the Service drop-down list.

Navigate to where the remote file is located and select the required file.

Click on Open to open the file and close the Remote Files dialog.

Digital signatures

A digital signature is a mathematical scheme for verifying the authenticity of digital versions of drawings or documents.

To sign a drawing digitally, a personal key, also known as a certificate, is required. This personal key is stored on the computer being used as a combination of a private key, which must be kept secret, and a public key. These keys are added to a drawing when a digital signature is applied. A certificate is obtained from a certification authority, which may be a private company or a government institution.

When a digital signature is applied to a document, a checksum is computed from the document content, plus the personal key being used. The checksum and public key are stored together with the document.

When the document is opened on another computer with a recent version of LibreOffice, the program computes the checksum again and compares it with the stored checksum. If both checksums are the same, the program opens the original, unchanged document.

In addition, the program can display the public key information from the certificate. This information can then be compared with the public key that is published on the web site of the certificate authority. Whenever a document is changed, this change breaks the digital signature.

For a more information on digital signatures, see “About Digital Signatures” and “Applying Digital Signatures” on the LibreOffice Help website.

Figure 331: Digital Signatures dialog

Figure 332: Select Certificate dialog

Applying digital signatures

The following procedure is an example of how to digitally sign a document. Actual procedure depends on computer set up and the computer operating system.

Go to File > Digital Signatures > Digital Signatures on the Menu bar and open the Digital Signatures dialog (Figure 331) listing the available digital signatures for the document.

If a message box opens advising to save the document, click on Yes to save the document.

If necessary, click on Sign Document to open the Select Certificate dialog (Figure 332).

Select the required digital signature in the Select Certificate dialog.

Click on Sign to apply the digital signature to the document and close the Select Certificate dialog.

In the Digital Signatures dialog, select the required digital signature from the signature list.

Click on Close to apply the selected digital signature to the document and close the Digital Signatures dialog.

Go to File > Save on the Menu bar to save the document.

Notes

A signed document displays a Digital Signature icon in the Status Bar. Double‑click on this Digital Signature icon to view the certificate. More than one digital signature can be added to a document.

Changing an existing description invalidates a digital signature. However, multiple digital signatures from the same author are allowed, because each digital signature can have a different description.

Signature line

Graphic boxes, that includes a signature line, can also be added to a document. This allows the user to optionally sign a document with their signature. This option is only available for Writer and Calc documents.

Add a graphic signature box to a Writer, or Calc document as follows:

Go to Insert > Signature Line on the Menu bar to open the Signature Line dialog (Figure 333).

Enter the necessary details and select the required options.

Click OK to close the Signature Line dialog and a graphic box with a signature line is inserted into the document. An example is shown in Figure 334.

Figure 333: Signature Line dialog

Figure 334: Example of a signature box

Figure 335: Drawing Object Properties dialog

Click on the signature box to select it and display the object selection handles.

Use the keyboard arrow keys to move the signature box to the required position on the page. The normal position for a signature box is at the bottom of a page.

Right click on the selected signature box to open the Drawing Object Properties toolbar (Figure 335).

Click on Select anchor for object and select the required anchor type from the options available in the drop‑down list.

If necessary, use the other tools available on the Drawing Object Properties toolbar to format the signature box to the document requirements.

Deselect the signature box to close the Drawing Object Properties toolbar.

Save the document fix the signature box into the document.

Document properties

To open the Properties dialog (Figure 336) for a document, go to File > Properties on the Menu bar. The tabbed pages in the Properties dialog provides information about the document and allows properties to be changed.

Figure 336: Properties dialog

General

Contains basic information about the current file as follows:

File

Displays the file name.

Change Password

Opens a dialog to change the password. It is only active if a password has been set for the file.

Type

Displays the file type for the current document.

Location

Displays the path and the name of the directory where the file is stored.

Size

Displays the size of the current document in bytes.

Created

Displays the date and time and author when the file was first saved

Modified

Displays the date and time and author when the file was last saved in a LibreOffice file format.

Template

Displays the template that was used to create the file.

Digitally signed

Displays the date and the time when the file was last signed as well as the name of the author who signed the document.

Digital Signatures

Opens the Digital Signatures dialog box where digital signatures are managed for the current document.

Last printed

Displays the date, time and user name when the file was last printed.

Note

After printing, a document must be saved to preserve the Last printed data. No warning message is displayed if an unsaved document is closed.

Total editing time

Displays the amount of time that the file has been open for editing since the file was created. The editing time is updated when the file is saved.

Revision number

Displays the number of times that the file has been saved.

Apply user data

Saves the full name of the user with the file. The user data can be changed by going to Tools > Options > LibreOffice > User Data (macOS LibreOffice > Preferences > LibreOffice > User Data) on the Menu bar.

Reset Properties

Resets the editing time to zero, the creation date to the current date and time, and the version number to 1. The modification and printing dates are also deleted.

Save preview image with this document

Saves a thumbnail preview in PNG format inside the document. This image may be used by a file manager under certain conditions.

Preferred resolution for images

Select this option and enter a value in Points Per Inch (ppi) for the preferred image resolution. This is used as default when an image is inserted into a Writer, Impress, or Draw document and resize images according to the value in the list box.

Reset

Resets any changes made to the document and is available for all tabbed pages in the Properties dialog.

Description

Contains optional editable descriptive information about the document, which may be exported as metadata to other file formats.

Title

Enter a title for the document.

Subject

Enter a subject for the document. A subject can be used to group documents with similar contents.

Keywords

Enter the words that required to index the content of the document. Keywords must be separated by commas. A keyword can contain white space characters, or semicolons.

Comments

Enter comments to help identify the document.

Tip

Title, Subject and Keywords are exported to PDF files as PDF Document Properties. Entered values are exported and appear in the corresponding fields in the PDF Document Properties Description.

Custom Properties

Allows custom information fields to be added to a document. In a new document, this page may be blank. If the new document is based on a template, this page may contain custom properties.

Properties

Enter the Name, Type and Value for each custom property required. The custom properties are exported as metadata to other file formats.

Add

Click to add a new row to the custom property list.

Security

Sets the password options for the current document.

Open file read-only

Select to allow this document to be opened in read-only mode only.

Note

This file sharing option protects the document against accidental changes. It is still possible to edit a copy of the document and save that copy with the same name as the original.

Record changes

Select to enable recording changes. This is the same as Edit > Track Changes > Record on the Menu bar.

Tip

To protect the recording state with a password, select Protect and enter a password. Other users of this document can apply changes, but cannot disable change recording without knowing the password.

Protect/Unprotect

Protects the change recording state with a password. If change recording is protected for the current document, the button is named Unprotect. Click Unprotect and type the correct password to disable the protection.

Font

When Embed fonts in the document is selected, any fonts used in the document will be embedded into the document when it is saved. This may be useful if you are creating a PDF and want to control how it will look on other computer systems.

Only embed fonts that are used in documents – If fonts have been defined for the document (for example, in the template), but have not been used, select this option to not embed them.

Font scripts to embed – You can choose which types of fonts are embedded: Latin, Asian, Complex.

Font Embedding

Select this option to embed document fonts into the document file and allow portability between different computer systems. The document with embedded fonts has a larger size and the fonts are used on the target computer for better rendering of the document layout.

Consider embedding fonts when a document use rare, or custom fonts not generally available in other computers.

Note

Font licenses may restrict embedding fonts in documents. Font files contain flags that indicate if and how they can be embedded within a document file. LibreOffice parses these flags and determines if and how it may be embedded in a document file. When opening a document containing embedded fonts, LibreOffice looks at these flags to determine if and how a document can be viewed or edited.

Font scripts to embed

Select which types of fonts are embedded: Latin, Asian, Complex.

Statistics

Displays statistics for the current file, for example number of pages, words, and characters.

Document classification

Document classification and security is an important issue for businesses and governments. Information is exchanged between users and organizations that collaborate to pursue a business goal. Where sensitive information is involved, it is assumed that the parties have agreed what information is sensitive and how such information is identified and handled. Any recipient of a resource relies upon the provider of the information to follow the agreed procedures identifying the sensitivity of the information.

LibreOffice implemented the open standards produced by TSCP (Transglobal Secure Collaboration Participation, Inc.) containing three BAF (Business Authentication Framework) categories: Intellectual Property, National Security and Export Control with each category having four BAILS (Business Authorization Identification and Labeling Scheme) levels: Non-Business, General Business, Confidential, and Internal Only.

While this standard has been developed with the intent that it would be applicable in any domain of activity, LibreOffice retained the aerospace and defense industry nomenclature and categories, where sensitivity marking results from national security, export control and intellectual property policies.

To enable document classification, go to View > Toolbars > TSCP Classification on the Menu bar to open the TSCP toolbar. This toolbar contains list boxes helping in selection of security for a document. LibreOffice then adds custom fields in the document properties (File > Properties, Custom Properties on the Menu bar) to store the classification policy as document metadata.

To prevent a breach in security policy, contents with a higher classification level cannot be pasted into documents with a lower classification level.

BAF Categories

The default BAF categories for LibreOffice are listed below.

Intellectual Property

Intellectual property is a generic term for the nature of the contents of the document. Select this category for general purpose document classification.

Tip

Only the Intellectual Properties category modifies the layout of a document with a watermark, fields in the header and footer and an information bar on top of the document area. Each item inserted in the document is controlled by the classification configuration file.

National Security

Selects the category of a document for the national security policy type. The selected category is saved together with the document as BAILS metadata in the file properties and no modifications are carried in the document layout or the user interface.

Export Control

Selects the category of a document for the export control policy type. The selected category is saved together with the document as BAILS metadata in the file properties and no modifications are carried in the document layout or the user interface.

Note

Refer to the corporate data security policy and information security officers for support in document classification.

Default levels of classification

LibreOffice provides default levels of document classification (BAILS) shown below, sorted by increasing level of business sensitivity:

Non-Business

Information in document has no impact in business, if made public.

General Business

Minor impact. Information has impact in business, can generate embarrassments, minor damage in brand image, if made public.

Confidential

Modest impact. Information disclosed can damage business brand, can generate negative media coverage and loss of revenue.

Internal use only

Major damage. Negative national media, lawsuits, fines, long term brand damages.

Customizing classification levels

LibreOffice allows customization of the levels of classification for a business. To customize the number and the name of the levels, copy a file, for example newplan.odt, located in Tools > Options > LibreOffice > Paths > Classification (macOS LibreOffice > Preferences > LibreOffice > Paths > Classification) into a local folder and edit the contents. Save the file and make the required changes to the classification path to access the file.

Pasting contents

Pasting contents in documents with different levels of classification prevents a breach in the security policy, contents with high classification level pasted to documents with lower classification level are not allowed. LibreOffice displays a warning message wherever it detects that the contents of the clipboard have higher security classification than the target document.

User and personal data

Removing data

To make sure that any user or personal data, versions, notes, hidden information, or recorded changes are removed from files before sending them to other users, or create PDF files, is as follows:

Go to Tools > Options > LibreOffice > Security (macOS LibreOffice > Preferences > LibreOffice > Security) on the Menu bar to open the Security page of the Options LibreOffice dialog.

Click Options to open the Security Options and Warnings dialog (Figure 337).

Select the required options to display warnings and/or set security options. See “Security options and warnings” on page 469 for more information.

Click OK to close the Security Options and Warnings dialog.

Go to File > Properties on the Menu bar to open the Properties dialog (Figure 336 on page 463) and click on General to open the General page.

Figure 337: Security Options and Warnings dialog

Deselect the option Apply user data and click on Reset Properties and the following happens:

Removes names in the created and modified fields.

Deletes modification and printing dates.

Resets editing time to zero, creation date to the current date and time, and version number to 1.

Click OK to close the Properties dialog.

Go to File > Versions on the Menu bar, select the versions from the Existing Versions list and click Delete. Alternatively, go to File > Save As on the Menu bar and save the file with a different name.

Security options and warnings

The Security Options and Warnings dialog contains the following options:

When saving or sending

Select to see a warning dialog when saving or sending a document that contains recorded changes, versions, or comments

When printing

Select to see a warning dialog when printing a document that contains recorded changes or comments.

When signing

Select to see a warning dialog when signing a document that contains recorded changes, versions, fields, references to other sources (for example linked sections or linked pictures), or comments.

When creating PDF files

Select to see a warning dialog when you exporting a document to PDF format that displays recorded changes in Writer, or displays comments.

Remove personal information on saving

Select to always remove user data from file properties, comments and tracked changes. The names of authors in comments and changes are replaced by generic values as "Author1", "Author2" and so forth. Time values are reset to a single standard value. If this option is not selected, personal information can still be removed for the current document using Reset Properties on the General page of the Properties dialog.

Recommend password protection on saving

Select to always enable the Save with password option in the file save dialogs. Deselect the option to save files by default without password.

Ctrl-click required to follow hyperlinks

If enabled, hold down the Ctrl key (macOS ⌘) while clicking a hyperlink to open the link. If not enabled, a click opens the hyperlink.

Block any links from documents not among the trusted locations (see Macro Security)

Blocks the use of linked images by documents not in the trusted locations defined in Trusted Sources of the Macro Security dialog. This can increase security if working with documents from untrusted sources (for example the internet) and are worried about vulnerabilities in image processing software components. Blocking the use of links means that images are not loaded in untrusted documents, only a placeholder frame is visible.

Redaction

Documents can be redacted to remove, or hide, any sensitive information allowing selective disclosure of information in a document while keeping other parts of the document secret. When a redacted document is redacted, it is exported as a new PDF file with all the redacted portions removed and replaced by redaction blocks of pixels preventing any attempt to restore or copy the original contents. A redacted document is exported in PDF format for publication, or sharing.

Any documents redacted in LibreOffice Writer, Calc, or Impress are automatically transferred as a copy to LibreOffice Draw where the redaction is carried out.

Redaction tools

The tools available on the Redaction toolbar (Figure 338) are as follows:

Rectangle Redaction

Used to mark the content for redaction by drawing transparent rectangles covering the content. Use the handles to resize the redaction rectangle.

Freeform Redaction

Allows the user to mark the content for redaction by drawing free-form lines, or polygons covering the content.

Redacted Export (Black)

Converts the semi-transparent redaction shape to opaque black and exports as pixels in the PDF file.

Redacted Export (White)

Converts the semi-transparent redaction shapes to opaque white shapes and exports as pixels in the PDF file.

Export Preview PDF

Makes a copy of the presentation as a PDF file to preview the redaction areas before making a redacted PDF file of the presentation.

Figure 338: Redaction toolbar

Documents, spreadsheets, or presentations

A copy of a document, spreadsheet, or presentation is automatically transferred to LibreOffice Draw where the redaction is carried out.

Open the document to be redacted in LibreOffice Writer, Calc or Impress, then go to Tools > Redact on the Menu bar and the following happens:

The document is copied, prepared and transferred to LibreOffice Draw as an untitled file.

LibreOffice Draw opens with the untitled document displayed.

The Redaction toolbar automatically opens. If the Redaction toolbar is not displayed, go to View > Toolbars on the Menu bar in LibreOffice Draw and select Redaction.

Go to Tools > Redact on the Menu bar and click on Rectangle Redaction or Freeform Redaction in the Redaction toolbar.

Draw the required shapes to redact the sensitive areas in the document. The redaction shape is gray allowing the sensitive areas in the document to be visible before they are redacted.

If necessary, click on Export Preview PDF to create a preview copy of the PDF file to review the redaction areas before the redaction is finalized.

If necessary, delete the PDF copy after reviewing the redaction areas in the file.

Click on Redacted Export (White), or Redacted Export (Black) in the Redaction toolbar to export the presentation file as a redacted PDF file.

Navigate to the folder in the file browser window that opens where the redact PDF file is going to be saved and enter a name for the file.

Click on Save to create the redacted PDF file. The gray redaction shapes are converted to white, or black shapes and the document is exported as a PDF

Drawings

Open a drawing file in Draw, then use Steps 2) thru 8) in “Documents, spreadsheets, or presentations” on page 471 to create a redacted PDF copy of the drawing file.

Note

When a redacted document is exported as a new PDF file. Any redacted areas are removed from the new document and replaced by redaction blocks of pixels. This prevents any attempt to restore, or copying the original contents that have been redacted.

Automatic redaction

Automatic redaction is used to define words and patterns that are automatically marked for redaction. Automatic redaction is useful for documents that have multiple occurrences of names and other personal information (for example credit cards, phone numbers, and so on). Manually redacting this type information in a document would require significant effort, but automatic redaction makes redaction of a document easier and more efficient.

Figure 339: Automatic Redaction dialog

Figure 340: Add Target dialog

Creating targets

Targets are rules and patterns used by automatic redaction to find words and information in a document that are to be marked for automatic redaction.

Open a document and go to Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog (Figure 339).

Click on Add Target to open the Add Target dialog (Figure 340).

Enter a target name in the Name text box.

Select a target type from the available options in the Type drop‑down list.

Text — automatic redaction looks for all occurrences of the specified text and marks them for redaction.

Regular expression — define a regular expression for searching in a document. All matches are marked for redaction.

Predefined — select predefined regular expressions for automatic redaction, such as credit card numbers, email addresses and so on.

Enter the content in the Content text box.

If necessary, select the options Match case and Whole words only to help define which targets are auto-redacted.

Click OK to close the Add Target dialog and the target is added to the Redaction Targets list in the Automatic Redaction dialog.

Repeat Steps 2 thru 7 above until all targets required have been added to the document.

Click OK to close the Automatic Redaction dialog. This opens the document as a drawing in LibreOffice Draw with all targets automatically redacted using Rectangle Redaction.

Print the document, or export the document as a PDF file.

Exporting targets

Open a document where targets for automatic redaction have been added.

Go to Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog.

Select the targets for export in the Redaction Targets list.

Click on Save Targets to open the Save Targets dialog and navigate to the location where the JSON file is going to be saved.

Enter a file name for the JSON file in the File name text box.

Click on Save to save the JSON file and close the Save Targets dialog.

Click OK to close the Automatic Redaction dialog.

Importing targets

Open a document where targets for automatic redaction are going to be used.

Go to Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog.

Click on Load Targets to open the Load Targets dialog and navigate to the location of the JSON file.

Select the required file and click on Open to import the targets into the document and close the Load Targets dialog.

Click OK to close the Automatic Redaction dialog. This opens the document as a drawing in LibreOffice Draw with all targets automatically redacted using Rectangle Redaction.

Print the document, or export the document as a PDF file.

Note

The automatic redaction targets are saved in a document. The targets are available after the document is saved and closed.

Password protection and OpenPGP encryption

LibreOffice provides two types of document protection: password protection and OpenPGP encryption.

Files encrypted with the Save password option enabled cannot be decrypted without the password.

Files encrypted with OpenPGP encryption, the document is encrypted using an algorithm, which requires a key. Each key is used only once and is sent to the recipient along with the document.

Figure 341: Save as dialog

Figure 342: Set Password dialog

Password protection

LibreOffice provides two levels of password protection:

The document file cannot be opened without entering a password.

The document cannot be edited until a second password is entered.

The two options above make a document available for reading by one group of people and for reading and editing by a different group. This is compatible with Microsoft Word file protection.

Adding passwords

Go to File > Save As on the Menu bar to open the Save as dialog (Figure 341).

Navigate to the folder where the file is going to be saved.

If necessary, enter a file name in the File name text box and select the file type from the available options in the File type drop‑down list.

Select the Save with password option, then click on Save to open the Set Password dialog (Figure 342).

In File Encryption Password, enter a password to open the document and then enter the same password as confirmation. Passwords are case sensitive.

Click on Options to open File Sharing Password.

Select Open file read-only to prevent any editing being carried out on the document.

To allow editing of the document, enter a password in Enter password to allow editing and repeat the password as confirmation.

Click OK and the Set Password dialog closes and the file is saved with password protection.

Notes

If the passwords match, the document is saved password protected. If either the passwords do not match, an error message is displayed.

LibreOffice uses a very strong encryption mechanism that makes it almost impossible to recover the contents of a document if the password is lost or forgotten.

Changing passwords

When a document is password protected, the password can be changed while the document is open.

Go to File > Properties > General on the Menu bar to open the Properties dialog.

Click on Change Password to open the Set Password dialog.

Enter a new password to open the file and to allow editing of the document.

Click OK to close the Set Password dialog.

Click OK again to close the Properties dialog.

OpenPGP encryption

LibreOffice can encrypt documents confidentially using OpenPGP. The document is encrypted using a symmetric encryption algorithm, which requires a symmetric key. Each symmetric key is used only once and is also called a session key. The document and its session key are sent to the recipient. The session key must be sent to the recipients so they know how to decrypt the document. To protect the document during transmission, it is encrypted with the public key belonging to the recipient. Only the private key belonging to the recipient can decrypt the session key. For more information on using OpenPGP encryption, go to the LibreOffice Help website.

LibreOffice uses the OpenPGP software installed on a computer. If no OpenPGP software is available, download and install OpenPGP software that is compatible with the computer operating system before using OpenPGP encryption.

A personal pair of cryptography keys must be defined using the OpenPGP software. Refer to the OpenPGP software installed on how to create a pair of keys.

OpenPGP encryption requires the use of the public key belonging to the recipient. This key must be available in the OpenPGP key chain stored in the computer.

The following is an example of how to use OpenPGP encryption on a document:

Set the preferred public key for OpenPGP encryption and digital signature. This preferred key is pre-selected in key selection dialog each time a document is signed or encrypted. This removes the requirement to select the preferred key when frequently signing a document with one specific key.

Go to Tools > Options > LibreOffice > User Data (macOS LibreOffice > Preferences > LibreOffice > User Data) on the Menu bar and select the following options in the Cryptography section:

OpenPGP signing key — select an OpenPGP key from the drop-down list for signing ODF documents.

OpenPGP encryption key — select an OpenPGP key from the drop-down list for encrypting ODF documents.

When encrypting documents, always encrypt to self — select this option to also encrypt the file with a public key, allowing the document to be opened with a private key.

Note

Keep this option selected to allow decryption of documents that have been encrypted for other people.

Go to File > Save As on the Menu bar to open the Save as dialog.

Navigate to the required location for the file, then enter a file name and file type in the Save as dialog.

Select Encrypt with GPG key option and click on Save to open the Select X.509 Certificate dialog.

Select the public key for the recipient. Multiple keys can be selected.

Click Encrypt to close the dialog and save the file encrypted with the selected public keys.

Getting Started Guide 7.5

Chapter 11,
Getting Started with Macros

Using the Macro Recorder … and Beyond

Introduction

A macro is a set of commands or keystrokes that are stored for later use. An example of a simple macro is one that enters your address into an open document. You can use macros to automate both simple and complex tasks. Macros are very useful when you have to repeat the same task in the same way.

The simplest way to create a macro is to record a series of actions through LibreOffice’s user interface. LibreOffice saves recorded macros using the open source LibreOffice Basic scripting language, which is an implementation of the well-known BASIC programming language. Such macros can be edited and enhanced after recording using the built-in LibreOffice Basic Integrated Development Environment (IDE).

The most powerful macros in LibreOffice are created by writing code using one of the four supported scripting languages (LibreOffice Basic, Python, JavaScript, and BeanShell). This chapter provides an overview of LibreOffice’s macro facilities, mostly focused on its default macro scripting language, LibreOffice Basic. Some introductory examples are included for the BeanShell, JavaScript, and Python scripting languages. However, an in-depth discussion of how to use these languages for scripting is beyond the scope of this chapter.

Your first macros

Adding a macro

The first step in learning macro programming is to find and use existing macros. This section assumes that you have a macro that you want to use, which you may have found in a book or on the internet. For this example, the macro in Listing 1 is used. You should create a library and module to contain your macro; see “Macro organization” on page 495 for more information.

Listing 1: Simple macro that says hello

Sub HelloMacro

Print "Hello"

End Sub

Use the following steps to create a library that will contain your macro:

Open any LibreOffice application.

Go to Tools > Macros > Organize Macros > Basic to open the Basic Macros dialog (Figure 343).

Click Organizer to open the Basic Macro Organizer dialog (Figure 344) and select the Libraries tab.

Set the Location drop-down to My Macros & Dialogs, which is the default location.

Click New to open the New Library dialog (not shown here).

Enter a library name, for example TestLibrary, and click OK.

On the Basic Macro Organizer dialog, select the Modules tab (Figure 345).

In the Module list, expand My Macros and select your library (in the example, TestLibrary). A module named Module1 already exists and can contain your macro. If you wish, you can click New to create another module in the library.

Select Module1, or the new module that you created, and click Edit to open the Integrated Development Environment (IDE) (Figure 346). The IDE is a text editor and associated facilities that are built into LibreOffice and allow you to create, edit, run, and debug macros.

Figure 343: Basic Macros dialog

Figure 344: LibreOffice Basic Macro Organizer dialog, Libraries tab

When a new module is created, it contains a comment and an empty macro named Main, which currently does nothing.

Add the new macro either before Sub Main or after End Sub. Listing 2 shows the new macro added before Sub Main.

Figure 345: Basic Macro Organizer dialog, Modules tab

Figure 346: LibreOffice Basic IDE (Integrated Development Environment) window

Listing 2: Module1 after adding the new macro

REM ***** BASIC *****

Sub HelloMacro

Print "Hello"

End Sub

Sub Main

End Sub

Tip

If you prefer, you can remove the Sub Main … End Sub code from the Module and leave only the HelloMacro subroutine.

(Optional) To check if the macro is written as expected by the programming language, click the Compile icon on the Macro toolbar.

Double-click the HelloMacro subroutine in the Object Catalog window under TestLibrary > Module 1 and click the Run icon on the Macro toolbar, or press the F5 key, to run the HelloMacro subroutine in the module. A small dialog will open with the word “Hello” displayed (see below).

Figure 347: Dialog with results of the Print instruction.

Click OK to close this small dialog.

If no subroutine or function is selected, a dialog like the one in Figure 348 will open. Then select the macro and click Run to execute it.

To select and run any macro in the module, click the Select Macro icon on the Standard toolbar or go to Tools > Macros > Organize Macros > Basic.

Select a macro and then click Run.

Figure 348: Dialog to select and run a macro

Recording a macro

When you record a macro in LibreOffice, you are actually recording the steps to perform a certain task using programming language. For example, consider that you have to repeatedly enter the same information into a document. You can copy this information after it has been entered into the document for the first time, then paste the information into the document each time you want to use it. However, if something else is copied to the clipboard, the contents of the clipboard are changed. This means that you have to re-copy this piece of information again to later paste it into the document. To overcome this problem, you can create a macro that enters this piece of information without having to copy it every time you need it.

Note

For some cases when you want to repeatedly enter information into a document, it may be more convenient to create an AutoText. See Chapter 2, Working with Text: Basics, in the Writer Guide for more information.

Make sure macro recording is enabled by going to Tools > Options > LibreOffice > Advanced and selecting the option Enable macro recording under Optional Features. By default, this feature is turned off in LibreOffice.

Go to Tools > Macros > Record Macro to start recording a macro. A small dialog with a Stop Recording button is displayed indicating that LibreOffice is recording a macro.

Type the desired text you want to be entered when this macro is run. As an example, type your name.

Click Stop Recording on the small dialog. This will cause Basic Macros dialog to open (similar to Figure 343 on page 482, but with different action buttons).

Open the library container My Macros.

Find the library named Standard in My Macros. Note that every library container has a library named Standard.

Select the Standard library and then choose an existing module in which to save the macro. Alternatively you can click New Module to create a new module to contain the newly recorded macro.

In the Macro Name text box at the top left section of the dialog, type a name for the macro you have just recorded, for example EnterMyName.

Click Save to save the macro and close the Basic Macros dialog.

If you followed all of the above steps, a macro named EnterMyName will have been created inside the selected module.

Note

Whenever you create a new module in LibreOffice, a subroutine named Main is automatically added to the module.

Running a macro

Go to Tools > Macros > Run Macro to open the Macro Selector dialog (Figure 349).

For example, select your newly created macro EnterMyName and click Run.

Alternatively, go to Tools > Macros > Organize Macros > Basic to open the Basic Macros dialog (Figure 343), select your macro and click Run.

Figure 349: Use the Macro Selector dialog to select and run an existing macro

Viewing and editing macros

To view and/or edit the macro that you created:

Go to Tools > Macros > Organize Macros > Basic to open the Basic Macros dialog.

Select your new macro EnterMyName and click Edit. The Basic IDE will open and the macro EnterMyName will be shown as in Listing 3.

This first macro is not complicated. A little explanation will significantly help you in understanding macros. The discussion starts with first line of the macro and describes features through the whole listing.

Listing 3: Code recorded for the EnterMyname macro

sub EnterMyName

rem -------------------------------------------------------------

rem define variables

dim document as object

dim dispatcher as object

rem -------------------------------------------------------------

rem get access to the document

document = ThisComponent.CurrentController.Frame

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 = "Your name"

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1())

end sub

Commenting with REM

All comments in Basic macro coding begin with REM, which stands for remark. All text after REM on the same line is ignored by the Basic interpreter when the macro is run.

Tip

As a shortcut, you can use the single quote character (') to start a comment.

LibreOffice Basic is not case-sensitive for keywords, so REM, Rem, and rem can all start a comment. If you use symbolic constants defined by the Application Programming Interface (API), it is safer to assume that the names are case-sensitive. Symbolic constants are an advanced topic not covered by this user guide and are not required when using the macro recorder in LibreOffice.

Defining subroutines with SUB

Individual macros are stored in subroutines and these subroutines begin with the keyword SUB. The end of a subroutine is indicated by the words END SUB. The code starts by defining the subroutine named Main, which is empty and does nothing. Note that the code in Listing 3 for the EnterMyName macro starts with the keyword SUB and ends with END SUB.

There are advanced topics that are beyond the scope of this user guide, but knowing about them might be of interest:

You can write subroutines that accept input values to be used inside the macro. These values are called arguments. This can only be done when you create subroutines from scratch. Recorded macros in LibreOffice do not accept arguments.

Another kind of subroutine is called a function, which is a subroutine that can return a value as a result of its work. Functions are defined by the keyword FUNCTION at the beginning. Recorded macros in LibreOffice create subroutines only.

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 keyword originally stood for Dimension and was used to define the dimensions of an array. The DIM statement used in the EnterMyName macro is similar to setting aside a piece of paper to be used to store a message or note.

In the EnterMyName macro, the variables document and dispatcher are defined as the type object. Other common variable types include string, integer, and date. A third variable, named args1, is an array of property values. A variable of type array allows a single variable to contain multiple values, similar to storing multiple pages in a single book. Values in an array are usually numbered starting from zero. The number in the parentheses indicates the highest usable number to access a storage location. In this example, there is only one value, and it is numbered zero.

Explaining macro code

The following is an explanation of the code used in the EnterMyName macro. You may not understand all the details, but the explanation of each line of code may give you some idea of how a macro works.

sub EnterMyName

Defines the start of the EnterMyName macro.

dim document as object

Defines document as an object variable. Objects are a specific variable type with multiple fields (sometimes they are called properties) and actions (also they are called methods). The fields can be perceived like variables (including an object) and actions like subroutines which allow us to operate with the object.

Note

Sometimes the word service is used. A service is supplied by a type of object which are distinguished in order to point out how they are used.

dim dispatcher as object

Defines dispatcher as an object variable.

document = ThisComponent.CurrentController.Frame

ThisComponent is a runtime object created by LibreOffice that refers to the current document.

CurrentController is a property referring to a service that controls the document. For example, when you type, it is the current controller that takes note of what you type. CurrentController then dispatches the changes to the document frame.

Frame is a controller property that returns the main frame for a document. Therefore, the variable named document refers to a document’s frame, which receives dispatched commands.

dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

Most tasks in LibreOffice are accomplished by dispatching a command. LibreOffice includes a DispatchHelper service, which provides an easy way to dispatch a URL using one call instead of multiple ones and does most of the work when using dispatches in macros. The method 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.

dim args1(0) as new com.sun.star.beans.PropertyValue

Declares the args1 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.

The com.sun.star.beans.PropertyValue expression is a Universal Network Objects (UNO) structure. Structures are special variable types that contain other variables united by logical basis. They can be convenient to operate with sets of heterogeneous information that should be treated as a single whole. An explanation of UNO and user structures goes far beyond the scope of this book. For more information on creating and using structures, see the LibreOffice Help system and other Basic guides.

args1(0).Name = "Text"

args1(0).Value = "Your name"

Gives the property the name “Text” and the value “Your name”, which is the text that is inserted when the macro is run.

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1())

The dispatch helper sends a dispatch to the document frame (stored in the variable document) with the command .uno:InsertText. The next two arguments, frame name and search flags, are beyond the scope of this book. The last argument is the array of property values to be used while executing the command InsertText.

In other words, this line of code executes the UNO command .uno:InsertText passing the value “Your Name” as the “Text” parameter.

end sub

The last line of the code ends the subroutine.

Creating a macro

When creating a macro, it is important to ask two questions before recording:

Can the task be written as a simple set of commands?

Can the steps be arranged so that the last command leaves the cursor ready for the next command or entering text or data into the document?

A more complex example of a macro

A common task is to copy rows and columns of data from a website and format them as a table in a text document as follows:

Copy the data from the website to the clipboard.

To avoid strange formatting and fonts, paste the text into a Writer document as unformatted text.

Reformat the text with tabs between columns so that it can be converted into a table using Table > Convert > Text to Table.

With the two questions above in mind, inspect the text to see if a macro can be recorded to format the text. As an example of copied data, consider the text copied from the API website describing the FontWeight constants (Figure 350). The first column in this example indicates a constant name and each name is followed by a space and a tab, and each line has two trailing spaces.

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.
Figure 350: Example of copied data

Suppose you want the first column in the table to contain the numeric value of the font weight, the second column the constant name, and the third column the text description. This task can be accomplished easily for every row except for DONTKNOW and NORMAL, which do not contain a numeric value.

Below are the steps to record this macro using keystrokes and assuming that the cursor is at the beginning of the line with the text “THIN”.

Make sure macro recording is enabled by going to Tools > Options > LibreOffice > Advanced and selecting the option Enable macro recording. By default, this feature is turned off when LibreOffice is installed on your computer.

Go to Tools > Macros > Record Macro to start recording.

Press Ctrl+Right Arrow to move the cursor to the start of the word “specifies”.

Press Backspace twice to remove the tab and the space.

Press Tab to add the tab without the space after the constant name.

Press Delete to delete the lower case “s” and then press Shift+S to add an upper case “S”.

Press Ctrl+Right Arrow twice to move the cursor to the start of the number.

Press Ctrl+Shift+Right Arrow to select and move the cursor before the % sign.

Press Ctrl+C to copy the selected text to the clipboard.

Press End to move the cursor to the end of the line.

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, see “Recording a macro” on page 486.

It takes much longer to read and write the steps above than to actually record the macro. Work slowly and think about the steps as you do them. With practice you will learn how to organize the steps to create macros that can be used to automate repetitive tasks.

The generated macro code in Listing 4 has been modified to contain the step numbers in the comments to match the steps discussed above.

Listing 4: Copying numeric value to start of the column

sub CopyNumToCol1

rem -------------------------------------------------------------

rem define variables

dim document as object

dim dispatcher as object

rem -------------------------------------------------------------

rem get access to the document

document = ThisComponent.CurrentController.Frame

dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem (3) Press Ctrl+Right Arrow to move the cursor to the start of “specifies”.

dispatcher.executeDispatch(document, ".uno:GoToNextWord", "", 0, Array())

rem (4) Press Backspace twice to remove the tab and the space.

dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())

rem -------------------------------------------------------------

dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())

rem (5) Press Tab to add the tab without the space after the constant name.

dim args4(0) as new com.sun.star.beans.PropertyValue

args4(0).Name = "Text"

args4(0).Value = CHR$(9)

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args4())

rem (6) Press Delete to delete the lower case s ....

dispatcher.executeDispatch(document, ".uno:Delete", "", 0, Array())

rem (6) ... and then press Shift+S to add an upper case S.

dim args6(0) as new com.sun.star.beans.PropertyValue

args6(0).Name = "Text"

args6(0).Value = "S"

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args6())

rem (7) 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 (8) Press Ctrl+Shift+Right Arrow to select the number.

dispatcher.executeDispatch(document, ".uno:WordRightSel", "", 0, Array())

rem (9) Press Ctrl+C to copy the selected text to the clipboard.

dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())

rem (10) Press End to move the cursor to the end of the line.

dispatcher.executeDispatch(document, ".uno:GoToEndOfLine", "", 0, Array())

rem (11) Press Backspace twice to remove the two trailing spaces.

dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())

rem -------------------------------------------------------------

dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())

rem (12) Press Home to move the cursor to the start of the line.

dispatcher.executeDispatch(document, ".uno:GoToStartOfLine", "", 0, Array())

rem (13) Press Ctrl+V to paste the selected number to the start of the line.

dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())

rem (14) Press Backspace to remove the extra space.

dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())

rem (15) Press Tab to insert a tab between the number and the name.

dim args17(0) as new com.sun.star.beans.PropertyValue

args17(0).Name = "Text"

args17(0).Value = CHR$(9)

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args17())

rem (16) Press Home to move to the start of the line.

dispatcher.executeDispatch(document, ".uno:GoToStartOfLine", "", 0, Array())

rem (17) Press Down Arrow to move to the next line.

dim args19(1) as new com.sun.star.beans.PropertyValue

args19(0).Name = "Count"

args19(0).Value = 1

args19(1).Name = "Select"

args19(1).Value = false

dispatcher.executeDispatch(document, ".uno:GoDown", "", 0, args19())

end sub

To run this macro, first place the cursor at the beginning of the line to which you want to apply the recorded steps. Then go to Tools > Macros > Run Macro, select the CopyNumToCol1 macro and click Run. Figure 351 shows the original line and the resulting line after applying the macro.

Figure 351: Result of applying the recorded macro

Keep in mind that the steps described above will only work properly if the line follows the format we assumed while creating the macro. If you run this macro on the “DONTKNOW” and “NORMAL” lines the results will not be as expected because these two lines have different formats. Figure 352 shows the original line starting with “DONTKNOW”.

Figure 352: Result of using the macro in a line with a different structure

Running a macro quickly

It is not convenient to repeatedly run macros using Tools > Macros > Run Macro. If you frequently need to use a certain macro, you can assign a keyboard shortcut to quickly run it. Next are the steps to assign the shortcut Ctrl+K to the CopyNumToCol1 macro.

Go to Tools > Customize. This will open the Customize dialog.

Select the Keyboard tab. In the Shortcut Keys section, select the Ctrl+K shortcut.

In the Category section, select LibreOffice macros. Navigate this section and select the CopyNumToCol1 macro.

Now click the Modify button to assign the Ctrl+K shortcut to the CopyNumToCol1 macro.

Click OK to close the Customize dialog.

Now you can run the CopyNumToCol1 macro using the Ctrl+K shortcut. This is very fast and easy to configure after you get used to the macro workflow. Figure 353 illustrates the steps involved.

Figure 353: Assigning a shortcut to a macro

Limitations of the macro recorder

The Macro Recorder has some limitations, which means that some actions may not be recorded. A deeper knowledge of LibreOffice internal workings helps to understand how and why the macro recorder will work. The main cause of these limitations is the dispatch framework and its relationship to the macro recorder.

Dispatch framework

The purpose of the dispatch framework is to provide uniform access to components (documents) for commands that usually correspond to menu items. Using File > Save, the shortcut keys Ctrl+S, or clicking the Save icon on the Standard toolbar are all commands that are translated into the same “dispatch command”.

The dispatch framework can also be used to send “commands” back to the user interface (UI). For example, after saving a new document, the list of recent files is updated.

A dispatch command is text, for example .uno:InsertObject or .uno:GoToStartOfLine. The command is sent to the document frame and this passes on the command until an object is found that can handle the command.

How the macro recorder uses the dispatch framework

The macro recorder records the generated dispatches. The recorder is a relatively simple tool to use and the same commands that are issued are recorded for later use. The problem is that not all dispatched commands are complete. For example, inserting an object generates the following code:

dispatcher.executeDispatch(document, ".uno:InsertObject", "", 0, Array())

It is not possible to specify what kind of object to create or insert. If an object is inserted from a file, you cannot specify which file to insert.

If while recording a macro you use Tools > Options to open and modify configuration items, the generated macro does not record any configuration changes. In fact, the generated code is commented so it will not even be run.

rem dispatcher.executeDispatch(document, ".uno:OptionsTreeDialog", "", 0, Array())

If a dialog is opened, a command to open the dialog is likely to be generated. Any work done inside the dialog is not usually recorded. Examples of this include macro organization dialogs, inserting special characters, and similar types of dialogs. Other possible problems using the macro recorder include things such as inserting a formula, setting user data, setting filters in Calc, actions in database forms, and exporting a document to an encrypted PDF file. You never know for certain what will work unless you try it. For example, the actions from the search dialog are properly captured.

Other options

When the macro recorder is not able to solve a specific problem, the usual solution is to write code using the LibreOffice objects. Unfortunately, there is a steep learning curve for these LibreOffice objects. It is usually best to start with simple examples and then increase the scope of macros as you learn more. Learning to read generated macros is a good place to start.

Macro organization

In LibreOffice, macros are grouped in modules, modules are grouped in libraries, and libraries are grouped in library containers. A library is usually used as a major grouping for either an entire category of macros, or for an entire application. Modules usually split functionality, such as user interaction and calculations. Individual macros are subroutines and functions. Figure 354 shows an example of the hierarchical structure of macro libraries in LibreOffice.

Figure 354: Macro Library hierarchy

Go to Tools > Macros > Organize Macros > Basic to open the Basic Macros dialog (Figure 343 on page 482). All available library containers are shown in the Macro From list. Every document is a library container, capable of containing multiple libraries. The application itself acts as two library containers, one container for macros distributed with LibreOffice called LibreOffice Macros, and one container for personal macros called My Macros.

The LibreOffice Macros are stored with the application runtime code, which may not be editable to you unless you are an administrator. This helps protect these macros because they should not be changed and you should not store your own macros in the LibreOffice Macros container.

Unless your macros are applicable to a single document, and only to a single document, your macros will probably be stored in the My 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, because it primarily 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. Not only are meaningful names easier to manage, but they can also be imported into other library containers whereas the Standard library cannot.

Caution

LibreOffice allows you to import libraries into a library container, but it will not allow you to overwrite the library named Standard. Therefore, if you store your macros in the Standard library, you cannot import them into another library container.

Just as it makes good sense to give your libraries meaningful names, it is prudent to use meaningful names for your modules. By default, LibreOffice uses names such as Module1, Module2, and so on.

As you create your macros, you must decide where to store them. Storing a macro in a document is useful if the document will be shared and you want the macro to be included with the document. Macros stored in the application library container named My Macros, however, are globally available to all documents.

Macros are not available until the library that contains them is loaded. However, in contrast to other libraries, the Standard and Template libraries are automatically loaded. A loaded library is displayed differently from a library that is not loaded. To load the library and the modules it contains, double-click on the library.

Where are macros stored?

LibreOffice stores user-specific data in a folder inside the user’s home directory. The location is operating system specific. Go to Tools > Options > LibreOffice > Paths to view where other configuration data are stored. User macros written in Basic are stored in LibreOffice\4\user\basic. Each library is stored in its own directory inside the basic directory.

For casual use, it is not necessary to understand where macros are stored. If you know where they are stored, however, you can create a backup, share your macros, or inspect them if there is an error.

Exporting macros

The LibreOffice Basic Macro Organizer dialog allows you to export macro libraries so that they can be reused and shared with other people. To export a macro library:

Go to Tools > Macros > Organize Macros > Basic and the click the Organizer button.

Click the Libraries tab and choose which library you want to export.

Click Export and then select Export as BASIC Library (note that you cannot export the Standard library).

Choose where you want to save the library and click Save.

When a library is exported, LibreOffice creates a folder containing all files related to the library. Figure 355 shows an example of how a library named TestLibrary with a single module called Module1 would be exported.

Figure 355: Folder containing the exported library

Importing macros

The LibreOffice Basic Macro Organizer dialog allows you to import macro libraries into your document as well as creating, deleting, and renaming libraries, modules, and dialogs.

On the Libraries tab, select the library container to use and then click Import to import macro libraries.

Navigate to the directory containing the library to import (Figure 356). 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. Macros can be stored in libraries inside LibreOffice documents. Select a document rather than a directory on disk to import libraries contained in a document.

Figure 356: Navigating to a macro library

Select a file and click Open to continue and open the Import Libraries dialog (Figure 357).

Figure 357: Choose library import options

Select the following options for importing libraries:

If no options are selected, the library is copied to your user macro directory. However, if the library you are importing has the same name and you are importing into the same location, it will not be copied.

Select Insert as reference (read-only) if you want to use the library as reference, but not import it into the document. When a library is used as a reference, it remains in its current location and is fully functional, but cannot be modified in the Basic IDE.

Select Replace existing libraries if the library you want to import has the same name and you want to replace the existing library.

Click OK to import the macro library you selected.

Note

You cannot export/import the library named Standard.

Tip

On Linux, LibreOffice-specific files are stored in the user’s home directory inside the .config folder. Directories and files with names beginning with a dot may be hidden and not shown in a normal file selection dialog. When using LibreOffice dialogs, rather than the operating system’s specific dialogs, type the name of the desired directory in the Name field.

Downloading macros to import

You can find macros created by the community to download from the internet. Some macros are contained in documents, some as regular files that you need to import, and some are published as text and need to be copied and pasted into the Basic IDE. See “Adding a macro” on page 481 on how to add macros to your macro library and “Viewing and editing macros” on page 487 on how to edit macros using the Basic IDE.

Some macros are available as free downloads on the Internet (see Table 11).

Table 11. Places to find macro examples

Location	Description
https://www.pitonyak.org/oo.php	Reference materials regarding macros.
https://www.pitonyak.org/database/	Reference materials regarding database macros.
https://wiki.documentfoundation.org/Macros	Lots of links to macros.
https://forum.openoffice.org/en/forum/	Forums, with many examples and help.

How to run a macro

Although you can use Tools > Macros > Run to run all macros, this is not efficient for frequently used macros. LibreOffice offers many ways for you to quickly run your macros.

In addition to assigning a shortcut to macros, as seen in “Running a macro” on page 486, you can also link macros to a toolbar icon, menu item, event, or a button embedded in a document. When choosing a method, it is also good to ask questions such as:

Should the macro be available for only one document or globally for all documents?

Is the macro for a specific document type, such as a Calc document?

How frequently will the macro be used?

The answers will determine where to store the macro and how to make it available. For example, you will probably not add a rarely used macro to a toolbar. To help determine your choices, see Table 12.

Table 12. Where to store a macro

Where to place the macro	For all LibreOffice applications	For a specific LO application	For a single document
Toolbar	No	Yes	Yes
Menu	No	Yes	Yes
Shortcut	Yes	Yes	No
Event	Yes	No	Yes

Toolbars, menu items, and keyboard shortcuts

To add a menu item, keyboard shortcut, or toolbar icon that calls a macro, use the Customize dialog, which contains pages to configure menus, keyboard shortcuts, toolbars, and events. To open this dialog, go to Tools > Customize. Use of the Menus, Toolbars, Context Menus, and Keyboard tabs are covered in Chapter 13, Customizing LibreOffice.

Events

Whenever something happens in LibreOffice, it is called an event. For example, opening a document, changing status of modified, or moving the mouse cursor are all events. LibreOffice allows events to trigger the execution of a macro; the macro is then called an event handler. Full coverage of event handlers is well beyond the scope of this chapter, but a little knowledge can accomplish much.

Caution

Be careful when you configure an event handler. For example, assume that you write an event handler that is called every time that a document is modified, but you make a mistake so the event is not properly handled. One possible result is that your event handler will force you to kill LibreOffice.

Go to Tools > Customize to open the Customize dialog and select the Events tab (Figure 358). The events in the Customize dialog are related to the entire application and specific documents.

In the Save In drop-down, select LibreOffice, or a specific document from the menu to save your 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 Macro to open the Macro Selector dialog (similar to Figure 349 on page 487 but with different action buttons).

Select the desired macro and click OK to assign the macro to the event. The Events tab will show that the event has been assigned to a macro.

Many objects in a document can be set to call macros when events occur. The most common use is to add a control, such as a button, into a document. Even double-clicking on a graphic opens a dialog with a Macros tab that allows you to assign a macro to an event.

Figure 358: Events tab in Customize dialog

Using extensions

An extension is a package that can be installed into LibreOffice to add new functionality. Extensions can be written in almost any programming language and may be simple or sophisticated. Extensions can be grouped into types, for example:

Calc add-ins, which provide new functionality for Calc, including new functions that act like normal built-in functions.

New components and functionality, which normally include some level of User Interface (UI) integration such as new menus or toolbars.

Chart add-ins with new chart types.

Linguistic components such as spelling checkers.

Document templates and images.

Although individual extensions can be found in several places, there is currently an extension repository at: https://extensions.libreoffice.org/ and some documentation at https://libreplanet.org/wiki/Group:OpenOfficeExtensions/List.

For more about obtaining and installing extensions, see Chapter 13, Customizing LibreOffice.

Writing macros without the recorder

The examples covered so far in this chapter were created using the macro recorder and the dispatcher. You can also write macros that directly access the objects that comprise LibreOffice if you are confident in writing computer code. In other words, you can create a macro that directly manipulates a document using more advanced programming logic.

Directly manipulating LibreOffice internal objects is an advanced topic that is beyond the scope of this chapter. A simple example, however, demonstrates how this works.

An example of a macro for Writer

The sample code in Listing 5 is a simple example of a macro created without the recorder that adds the string “Hello” at the end of a Writer document.

To add this macro to a library, follow the steps below:

Go to Tools > Macros > Organize Macros > Basic.

In My Macros, navigate to the library where you want the macro to be created. In this example, consider the library TestLibrary.

Select one of the modules already available in the library, for example Module1. If you want to create a new module, click Organizer and then add the new module.

With the module selected, click Edit. This will open the Basic IDE window and show the code for the macros implemented in the selected module.

Enter the code in Listing 5 into the module.

Listing 5: Append the text “Hello” at the end of to the current document

Sub AppendHello

Dim oDoc

Dim sTextService$

Dim oCurs

REM ThisComponent refers to the currently active document.

oDoc = ThisComponent

REM Verify that this is a text document.

sTextService = "com.sun.star.text.TextDocument"

If NOT oDoc.supportsService(sTextService) Then

MsgBox "This macro only works with a text document"

Exit Sub

End If

REM Get the view cursor from the current controller.

oCurs = oDoc.currentController.getViewCursor()

REM Move the cursor to the end of the document.

oCurs.gotoEnd(False)

REM Insert text "Hello" at the end of the document.

oCurs.Text.insertString(oCurs, "Hello", False)

End Sub

An example of a macro for Calc

One powerful way to extend the functionalities of LibreOffice Calc is to write macros that automate repetitive tasks. You can use the Basic language to write macros that can do tasks ranging from simple cell handling and formatting to advanced data manipulation.

As a simple example, consider you want to analyze a range of cells to determine if all values are between 0 and 100. Additionally, values ranging from 50 to 100 should be marked in light green whereas cells with values that are greater than or equal to 0 and less then 50 should be marked in light red. If any values outside the allowed range of 0 to 100 are found, a warning message should be displayed and cells should be marked in light gray. Listing 6 shows the Basic code for such a macro.

Listing 6: Calc macro to format ranges based on values

Sub FormatRangeBasedOnValue

'Gets the current selection

Dim oRange as Object, oCell as Object

Set oRange = Thiscomponent.getCurrentSelection()

'Checks if the selected range is a single range

If Not oRange.supportsService("com.sun.star.sheet.SheetCellRange") Then

MsgBox "This macro applies only to single ranges."

Exit Sub

End If

' Number of columns and rows in selection

Dim nCols as Long : nCols = oRange.Columns.getCount()

Dim nRows as Long : nRows = oRange.Rows.getCount()

Dim col as Long, row as Long

Dim cellValue as Long

Dim isError as Boolean : isError = False

' Iterate over all cells in the range

For col = 0 To nCols - 1

For row = 0 to nRows - 1

Set oCell = oRange.getCellByPosition(col, row)

cellValue = oCell.getValue()

If cellValue >= 50 and cellValue <= 100 Then

' Sets background to light green

oCell.CellBackcolor = RGB(144, 238, 144)

ElseIf cellValue >= 0 and cellValue < 50 Then

' Sets background to light red

oCell.CellBackcolor = RGB(255, 127, 127)

Else

' Sets background to light gray

oCell.CellBackcolor = RGB(220, 220, 220)

isError = True

End If

Next row

Next col

' Displays a message indicating that there were errors

If isError Then

MsgBox "Some cells outside the range 0 to 100 were marked in light grey"

End If

End Sub

To add this macro to a library, follow the steps described in “An example of a macro for Writer” on page 502. To run this macro, first create a new Calc sheet and add some numeric values in a range of cells. Then, select the cells and use one of the methods described in “How to run a macro” on page 499 to execute it.

Figure 359 shows an example of the macro being run on a set of cells. Because some of the cells have values that are not between 0 and 100, the message box in Figure 360 will also be displayed.

Figure 359: Cell values after being formatted by the macro

Figure 360: Message box presented if some values are not between 0 and 100

The ScriptForge library

Macro programmers frequently need to perform tasks such as creating and opening files, accessing form controls, reading data from databases embedded in Base documents, and so forth. The objective of the ScriptForge library is to make it easier to execute such commands without having to learn the required LibreOffice APIs (Application Programming Interfaces) and commands, which may be difficult for casual programmers.

The ScriptForge library is organized into a set of services, each of which provides methods and properties related to a specific topic. For example, the Dialog service provides access to dialogs available in script modules and the Database service allows to execute SQL commands in Base documents. The example in Listing 7 shows a macro written in Basic using the ScriptForge library that opens a Calc document, creates a new sheet named NewSheet, and inserts the string “Hello” into cell A1. The macro also saves and closes the document.

Listing 7: Macro using the ScriptForge library

Sub CreateSheetExample

' Loads the ScriptForge library

GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")

' Instantiates the UI service

Dim ui as Object, myDoc as Object

ui = CreateScriptService("UI")

' Opens the file "myfile.ods"

Set myDoc = ui.OpenDocument("/home/user/Documents/myfile.ods")

' Inserts a new sheet named "NewSheet"

myDoc.InsertSheet("NewSheet")

' Inserts the string "Hello" into cell "A1" of the new sheet

myDoc.SetValue("NewSheet.A1", "Hello")

' Shows the sheet "NewSheet"

myDoc.Activate("NewSheet")

' Saves the document

myDoc.Save()

' Closes the document

myDoc.CloseDocument()

End Sub

As seen in the example, the ScriptForge library provides straightforward commands to execute commands, which seeks to simplify the creation of macros.

Tip

To learn more about the ScriptForge library, visit LibreOffice’s online Help at https://help.libreoffice.org/7.4/en-US/text/sbasic/shared/03/lib_ScriptForge.html?DbPAR=BASIC. Each of the 26 supported services have been extensively documented and examples are provided for both Basic and Python programming languages.

UNO Object Inspector

LibreOffice has an extensive API that can be used by macro programmers to automate almost any aspect of its applications. However, one of the main challenges for programmers is to discover object types as well as their supported services, methods, and properties.

The UNO Object Inspector can help macro developers inspect objects and discover how they can be accessed and used in macros. This feature is available in Writer, Calc, Impress, and Draw. To enable it, go to Tools > Development Tools. The Object Inspector will be opened at the bottom of the user interface, as shown in Figure 361.

Figure 361: UNO Object Inspector opened in a Writer document

The left portion of the Object Inspector consists of the Document Object Model (DOM) navigator, which allows the user to navigate through all the objects in the document. When an object is selected, information about the object are shown in the right portion of the Object Inspector window:

The names of all implemented interfaces.

The names of all services supported by the object.

The names and types of all properties available in the object.

The names, arguments and return types of all methods that can be called by the object.

Instead of inspecting objects using the DOM navigator, it is possible to directly inspect the currently selected object in the document by toggling the Current Selection button.

For example, suppose you want to change the background color of the text selected in a Writer document. You can select a portion of text, open the Object Inspector and toggle the Current Selection button. Now, inspect the object properties in search of a property that matches the desired effect. Figure 362 shows the CharBackColor property selected, which is the property used to set text background color.

Figure 362: Using the Object Inspector to find a property

Now it is possible to write a macro using this property to change the background color of the selected text. Listing 8 shows the code for this macro.

Listing 8: Macro that changes the background color of a text range

Sub ChangeTextBGColor

Dim oSel as Object

Set oSel = ThisComponent.getCurrentSelection()

oSel(0).CharBackColor = RGB(255, 127, 127)

End Sub

Note that in Writer it is possible to have multiple ranges selected at once, hence oSel(0) accesses the first range of text.

Overview of Python, BeanShell, and JavaScript macros

Many programmers may not be familiar with LibreOffice Basic, so LibreOffice supports macros written in three other languages that may be more familiar: Python, BeanShell, and JavaScript.

Macros are organized in the same way for all four scripting languages. The LibreOffice Macros container holds all the macros that are supplied in the LibreOffice installation. The My Macros library container holds your macros that are available to any of your LibreOffice documents. Each document can also contain your macros that are not available to any other document.

When you use the recording facility, the macros are created in LibreOffice Basic. To use the other available scripting languages, you must write the code yourself.

When you select to run a macro using Tools > Macros > Run Macro, LibreOffice displays the Macro Selector dialog. This dialog enables selection and running of any available macro, coded in any of the available languages (Figure 363).

When you edit a macro using Tools > Macros > Edit Macros, LibreOffice displays the LibreOffice Basic IDE. This dialog enables selection and editing of any available LibreOffice Basic macro, but not macros in other languages.

Figure 363: Macro Selector dialog

The component model used in LibreOffice is known as Universal Network Objects or UNO. LibreOffice macros in any scripting language use a UNO runtime application programming interface (API). The XSCRIPTCONTEXT interface is provided to macro scripts in all four languages, which provides some means of access to the various interfaces which they might need to perform an action on a document.

Tip

If you want to learn more about the LibreOffice API as well as UNO objects, refer to the official API documentation at https://api.libreoffice.org/

Python macros

Python is a high-level, general-purpose programming language that was first released in 1991.

When you select Tools > Macros > Organize Macros > Python, LibreOffice displays the Python Macros dialog (Figure 364).

Figure 364: Python Macros dialog

Facilities to edit and debug Python scripts are not currently integrated into the standard LibreOffice user interface. However, you can use any Python editor to create scripts and then copy these files into the Scripts folder in your home directory. For more information, refer to “Where are macros stored?” on page 497.

Listing 9 presents an example of a Python macro that writes the text “Hello World from Python” into cell A1 of the first sheet in a Calc spreadsheet.

Listing 9: Sample Python macro

import uno

def HelloWorld():

doc = XSCRIPTCONTEXT.getDocument()

cell = doc.Sheets[0]['A1']

cell.setString('Hello World from Python')

return

Tip

The Alternative Python Script Organizer (APSO) extension makes it easier to edit and organize Python scripts, in particular when embedded in a document. Using APSO you can configure your preferred source code editor, start the integrated Python shell and debug Python scripts. Visit https://gitlab.com/jmzambon/apso to download APSO and learn more about how to use it.

Tip

To learn more about Python scripting in LibreOffice, you can refer to the Wiki “Macros/Python Basics”, where you will find in-depth explanations and examples on how to get started with Python scripting. To learn more, visit https://wiki.documentfoundation.org/Macros/Python_Basics.

BeanShell macros

BeanShell is a Java-like scripting language that was first released in 1999.

When you select Tools > Macros > Organize Macros > BeanShell, LibreOffice displays the BeanShell Macros dialog (Figure 365).

Figure 365: BeanShell Macros dialog

Click the Edit button on the BeanShell Macros dialog to access the BeanShell Debug Window (Figure 366).

Figure 366: BeanShell Debug Window

Listing 10 is an example of a BeanShell macro that inserts the text “Hello World from BeanShell” in cell A1 of the active Calc spreadsheet.

Listing 10: Sample BeanShell macro

import com.sun.star.uno.UnoRuntime;

import com.sun.star.sheet.XspreadsheetView;

import com.sun.star.text.XText;

model = XSCRIPTCONTEXT.getDocument();

controller = model.getCurrentController();

view = UnoRuntime.queryInterface(XSpreadsheetView.class, controller);

sheet = view.getActiveSheet();

cell = sheet.getCellByPosition(0, 0);

cellText = UnoRuntime.queryInterface(XText.class, cell);

textCursor = cellText.createTextCursor();

cellText.insertString(textCursor, "Hello World from BeanShell", true);

return 0;

JavaScript macros

JavaScript is a high-level scripting language that was first released in 1995.

When you select Tools > Macros > Organize Macros > JavaScript, LibreOffice displays the JavaScript Macros dialog (Figure 367).

Figure 367: JavaScript Macros dialog

Click the Edit button on the JavaScript Macros dialog to access the Rhino JavaScript Debugger (Figure 368). Detailed instructions for using this tool can be found on Mozilla’s website at https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Debugger.

Listing 11 is an example of a JavaScript macro that inserts the text “Hello World from JavaScript” in cell A1 of the first sheet in a Calc spreadsheet.

Listing 11: Sample JavaScript macro

importClass(Packages.com.sun.star.uno.UnoRuntime);

importClass(Packages.com.sun.star.sheet.XspreadsheetDocument);

importClass(Packages.com.sun.star.container.XindexAccess);

importClass(Packages.com.sun.star.table.XcellRange);

importClass(Packages.com.sun.star.table.Xcell);

documentRef = XSCRIPTCONTEXT.getDocument();

spreadsheetInterface = UnoRuntime.queryInterface(XSpreadsheetDocument, documentRef);

allSheets = UnoRuntime.queryInterface(XIndexAccess, spreadsheetInterface.getSheets());

theSheet = allSheets.getByIndex(0);

Cells = UnoRuntime.queryInterface(XCellRange,theSheet);

cellA1 = Cells.getCellByPosition(0,0);

theCell = UnoRuntime.queryInterface(XCell,cellA1);

theCell.setFormula("Hello World from JavaScript");

Figure 368: Rhino JavaScript Debugger

Finding more information

Numerous resources are available that provide help with writing macros. Use Help > LibreOffice Help, or press the F1 key, to open the LibreOffice help pages. The upper left corner of the LibreOffice help system contains a drop-down list that determines which help set is displayed. To view the help for Basic, choose Basic from this list.

Included material

Many excellent macros are included with LibreOffice. Use Tools > Macros > Organize Macros > Basic to open the LibreOffice Basic Macros dialog. Expand the Tools library in the LibreOffice library container. Inspect the Debug module; some good examples include WritedbgInfo (document) and printdbgInfo (sheet).

Online resources

The following links and references contain information regarding macro programming:

https://wiki.documentfoundation.org/Macros

https://ask.libreoffice.org/ (a Q&A site where volunteers answer questions related to LibreOffice)

https://wiki.documentfoundation.org/Documentation/Other_Documentation_and_Resources (look in Programmers section for BASIC Programmers’ Guide and Developers’ Guide; the latter contains a detailed explanation)

http://forum.openoffice.org/en/forum/ (Apache OpenOffice community forum; volunteers answer questions about LibreOffice as well)

Printed and ebook materials

Andrew Pitonyak published a free online book OpenOffice.org Macros Explained, which is a great reference for learning the Basic language used in both LibreOffice and OpenOffice. You can download the PDF version at https://www.pitonyak.org/OOME_3_0.pdf.

Dr. Mark Alexander Bain published the book Learn OpenOffice.org Spreadsheet Macro Programming. See https://www.packtpub.com/openoffice-ooobasic-calc-automation/book.

Roberto Benitez's Database Programming with OpenOffice.org Base & Basic is also a great source to learn more about macro programming.

Getting Started Guide 7.5

Chapter 12,
Configuring LibreOffice

Choosing options to suit the way of working

Introduction

This chapter describes some of the setup options found in Tools > Options (macOS LibreOffice > Preferences) on the Menu bar. Additional options, and more details about the options in this user guide, are covered in LibreOffice Help.

Tip

Many options are intended for power users and programmers. If understanding is difficult on what an option does, it is usually best to leave the option on its default setting unless instructions in this user guide recommend changing the setting.

LibreOffice options

This section covers some of the options and settings that apply to all the components of LibreOffice. For information on options or settings that are not discussed in this section, see the LibreOffice Help.

To open the Options LibreOffice dialog for LibreOffice (Figure 369), go to Tools > Options (macOS LibreOffice > Preferences) on the Menu bar. The list in the left-hand box of the Options LibreOffice dialog varies depending on which LibreOffice module is open. The figures in this chapter show this list in the left-hand box as it appears when a Writer document is open. Click the chevron > next to LibreOffice to select a category from the drop-down list and display the relevant page on the right-hand side of the dialog.

Figure 369: Options LibreOffice dialog — User Data page

Notes

If a version of LibreOffice being used is not US English, some field labels may be different from those shown in the following figures.

The Reset button, located at the lower right of the Options dialog, resets the values on that page to the values that were in place when the dialog opened.

User data

On the User Data page of the Options LibreOffice dialog (Figure 369), the details of a LibreOffice user can be entered and stored. These user details are used for several things within LibreOffice; for example created by or last edited by for document properties, author of comments or changes, sender address in mailing lists, and so on.

It is necessary to make sure that the correct user information appears here. Fill in the necessary information if these details are blank, or amend and/or delete any existing information not required.

If user data is not going to be used for document’s properties, deselect the option Apply user data in Properties dialog for the LibreOffice file that is open. Go to File > Properties on the Menu bar to open the Properties dialog for a file.

In Cryptography on the User Data page, set the preferred public keys for OpenPGP encryption and digital signature. These keys are pre-selected in the text boxes for OpenPGP signing key and OpenPGP encryption key when a document is digitally signed or encrypted (for more information, see Chapter 10, Working with File Formats, Security, and Exporting).

General

The options available on the Options LibreOffice dialog — General page (Figure 370) are described as follows.

Help

Extended tips

When Extended tips is active, a brief description of the function of an icon, menu command, or a field on a dialog appears when the cursor is held over the item.

Warn if local help is not installed

Deselect this option to disable a warning when selecting Help, if offline help is not installed.

Show “Tip of the Day” dialog on start-up

Deselect to disable the Tip of the Day dialog.

Open/Save Dialogs

Use LibreOffice dialogs

Select this option to use the Open and Save dialogs supplied with LibreOffice. Deselect to use the standard Open and Save dialogs of the computer operating system. This guide uses the LibreOffice Open and Save dialogs in illustrations.

Document Status

Printing sets “document modified” status

If this option is selected, the next time the document is closed after printing, the print date is recorded in the document properties as a change. There will be prompt to save the document again, even if any other changes have not been made.

Figure 370: Options LibreOffice dialog — General page

Year (Two Digits)

Specifies how two-digit years are interpreted. For example, if the two-digit year is set to 1930, and you enter a date of 1/1/30 or later into your document, the date is interpreted as 1/1/1930 or later. An “earlier” date is interpreted as being in the following century; that is, 1/1/20 is interpreted as 1/1/2020.

Help Improve LibreOffice

Send crash reports to The Document Foundation

Linux only — send usage data to help The Document Foundation improve usability of the software. The usage data is sent anonymously and carries no document contents, only the commands used.

Send crash reports to The Document Foundation

Windows only — if selected, the Error Report Tool starts automatically when a program crash occurs. The tool gathers all necessary information that can help the program developers to improve the code. Include any additional information that may help the developers to localize the error. For more information, see the Help.

LibreOffice Quickstarter

Load LibreOffice during system start-up

Windows only — when selected, the necessary library files are loaded when the computer is started, resulting in a shorter startup time for LibreOffice components. The old menu in the system tray is no longer used.

LibreOffice File Associations

Windows Default apps button

Windows only — opens Default apps dialog in Windows.

Perform check for default file associations on start-up

Windows only — when selected, LibreOffice checks file associations on startup and displays a message if any relevant formats are not registered to be opened by default in LibreOffice.

Figure 371: Options LibreOffice dialog — View page

View

The options available in the View page of the Options LibreOffice dialog (Figure 371) affect how the document window looks and behaves. Set these options to suit user personal preferences. Some options vary with the computer operating system.

Icon style

Choose the icon style for use in toolbars and dialogs. The Automatic option uses an icon set compatible with the operating system and choice of desktop. Several icon sets are available; for example Breeze, Breeze Dark, Colibre, Elementary, Karasa Jaga, Sifr, Sifr Dark, Sakapura, and so on. Other icon sets can be added using extensions (for more information, see Chapter 13, Customizing LibreOffice). Use the Extensions Manager to display installed extensions and locate extensions for installation into LibreOffice.

Icon size

Toolbar, Notebookbar, Sidebar

Choose the display size of toolbar icons: Automatic, Small, Large, Extra Large (toolbars only). The Automatic icon size option uses the setting for the computer operating system. The Toolbar, Notebookbar and Sidebar can have different settings.

Visibility

Menu icons, Shortcuts

Select the visibility mode (Automatic, Hide, Show) to hide or show icons as well as text on the Menu bar and in shortcut items.

Mouse

Positioning

Specifies if and how the cursor is positioned in newly opened dialogs (Default button, Dialog center, No automatic positioning).

Middle button

Defines the function of the middle mouse button (if available)
No function
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.

The Selection clipboard is independent of the normal clipboard used by Edit > Copy/Cut/Paste. The Clipboard and Selection clipboard can contain different contents at the same time as shown in Table 13.

Table 13: Clipboard and Selection clipboard functions

Function	Clipboard	Selection clipboard
Copy content	Edit > Copy or Ctrl+C (macOS ⌘+C)	Select text, table, or object.
Paste content	Edit > Paste or Ctrl+V (macOS ⌘+C) pastes at the cursor position.	Clicking the middle mouse button pastes at the cursor position.
Pasting into another document	No effect on the clipboard contents.	The last marked selection is the content of the Selection clipboard.

Graphics Output

Use hardware acceleration

Directly accesses hardware features of the graphical display adapter to improve the screen display.

Use anti-aliasing

Enables and disables anti-aliasing, which makes the display of most graphical objects look smoother and with fewer artifacts.

Tip

Use Ctrl+Shift+R (macOS ⌘+Shift+R) to restore or refresh the view of the current document after changing the anti-aliasing settings to see the effect.

Use Skia for all rendering

Windows and macOS only — enables and disables the use of the 3D graphics language Skia.

Force Skia software rendering

Windows and macOS only — forces the use of Skia even if the graphics device is blacklisted. A device is blacklisted when it is buggy or may render graphics with poor quality.

Font Lists

Show preview of fonts

When selected — displays the font names shown with an example of the font. When deselected, the font list shows only the font names. The fonts listed are those that are installed on the computer system. Some fonts show an additional preview of some sample text.

Screen font anti-aliasing

Select this option to smooth the screen appearance of text. Enter the smallest font size to apply anti-aliasing.

Run Graphics Tests button

Click this button to run tests and determine the efficiency of LibreOffice graphics rendering. Results are saved in a log, which is displayed in a pop-up window and can be downloaded.

Figure 372: Options LibreOffice dialog — Print page

Print

After installing a printer on a computer, the general printing options for LibreOffice can be selected to suit the most common printing method that is going to be used in the Print page of the Options LibreOffice dialog (Figure 372).

Settings for

Specifies whether the print settings apply to direct printing or to printing to a file.

Defaults

PDF as standard print job format

Linux and macOS only — select this option to change the internal print job format from Postscript format to a PDF format. Using PDF format has a number of advantages over Postscript. For more information, see the following link: https://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdf_as_standard_print_job_format.

Convert colors to grayscale

Specifies that all colors in a document are printed only as greyscale.

Include transparent objects

If selected, the reduction in print quality for bitmaps also applies to the transparent areas of objects.

Reduce bitmaps

Specifies that bitmaps are printed with reduced quality. The resolution can only be reduced and not increased.

Resolution

Specifies the maximum print quality in DPI. The resolution can only be reduced and not increased.

High print quality

High print quality corresponds to a resolution of 300dpi.

Normal print quality

Normal print quality corresponds to a resolution of 200dpi.

Note

Reducing the amount of data sent to the printer increases the print speed because the print files are smaller. This makes it easier for printers with a smaller memory when printing large files. However, reducing print data can result in slightly lower print quality.

Reduce transparency

If selected, transparent objects are printed like normal, non-transparent objects, depending on your selection in the following two option buttons.

Automatically

Specifies that the transparency is only printed if the transparent area covers less than a quarter of the entire page.

No transparency

When selected, a transparency does not print.

Note

Transparencies cannot be sent directly to a printer. Transparencies must be visible to be calculated as bitmaps and sent to the printer. Depending on bitmap size and the print resolution, a large amount of data may result.

Warnings

Defines which warnings appear before printing begins.

Paper size

Select this option if a certain paper size is required for printing the current document. If the paper size used in the document is not provided by the current printer, an error message opens.

Paper orientation

Select this option if a certain paper orientation is required for printing the current document. If the format used by the current document is not available from the printer, an error message opens.

Transparency

Select this option if a warning is required if transparent objects are contained in the document. When printing a document with transparencies, a dialog opens to enable selection if the transparency is to be printed.

Reduce gradient

If selected, gradients are printed with reduced quality.

Gradient stripes

Specifies the maximum number of gradient stripes for printing.

Intermediate color

Specifies that gradients are only printed in a single intermediate color.

Paths

On Paths page in the Options LibreOffice dialog (Figure 373), the location of files associated with, or used by, LibreOffice can be changed to suit the working situation. For example, there may be a requirement to store documents by default somewhere other than in My Documents.

Figure 373: Options LibreOffice dialog — Paths page

To make changes, select an item in Paths used by LibreOffice and click on Edit. This opens the Select Path dialog, or Edit Paths dialog, allowing folders to added, edited, or deleted as required. Click OK to return to the Options dialog. Some items may have two paths listed as follows:

User Paths is a user-specific folder and is normally located on a single computer.

Internal Paths is a shared folder where LibreOffice is installed which is normally on a network.

Tip

Use the entries on the Paths page of the Options LibreOffice dialog to compile a list of files, such as those containing AutoText, that are required to create a back up or copy to another computer.

Fonts

The Fonts page on the Options LibreOffice dialog (Figure 374) allows the definition of any replacements for any fonts that might appear in documents. If a document is received from another source it may contain fonts that that are not installed on the computer system being used. LibreOffice can substitute any fonts it cannot locate using the fonts listed on the Fonts page when required. However, this font replacement does not change the font specified in the document.

Replacement table

Lists the original font and the font that replaces it. Select Always to replace both the screen font and the printer font, even if the original font is installed on a computer system. Select Screen only to replace the screen font only and never replace the font for printing. See Table 14 below for more information

Apply replacement table

Enables the font replacement settings that have been defined.

Figure 374: Options LibreOffice dialog — Fonts page

Table 14: Font replacement options

Always check box	Screen only check box	Replacement action
Checked	Blank	Font replacement on screen and when printing, whether the font is installed or not.
Checked	Checked	Font replacement only on screen, whether the font is installed or not.
Blank	Checked	Font replacement only on screen, but only if font is not available.
Blank	Blank	Font replacement on screen and when printing, but only if font is not available.

Font

Enter, or select, the name of the font that for replacement.

Replace with

Enter or select the name of the replacement font.

Apply

Clicking on the icon applies the selected font replacement.

Delete

Clicking on the icon deletes the selected font replacement.

Font settings for HTML, Basic and SQL Sources

Select the font and font size for the display of HTML and Basic source code.

Fonts

Select the font for the display of HTML and Basic source code. Select Automatic to detect a suitable font automatically.

Non-proportional fonts only

Mark this check box to display only non-proportional fonts in the Fonts list box.

Size

Select a font size for the display of HTML, Basic and SQL Source code.

Security

On the Security page of the Options LibreOffice dialog (Figure 375), the security options for saving documents and for opening documents that contain macros can be selected.

Security Options and Warnings

Click on Options to open the Security and Warning Options dialog giving access to options for restricting what information can be changed or seen in a document. For more information on Security Options and Warnings, see the LibreOffice Help: https://help.libreoffice.org/7.4/en-GB/text/shared/optionen/securityoptionsdialog.html.

Security Warnings

Warns if a restricted document contains any recorded changes, versions, hidden information, or notes when saving, sending, signing, printing, or creating PDF files.

Security Options

Provides options for removing personal information, password protection, how hyperlinks are opened, and to block any links from documents that are not trusted.

Passwords for Web Connections

Enter a master password to enable easy access to websites that require a user name and password.

Persistently save web passwords for web connections

LibreOffice will securely store all passwords used to access files from web servers.

Protected by a master password

Retrieve passwords from a password list after entering the master password.

Macro Security

Click on Macro Security to open the Macro Security dialog where the security level for executing macros and specified trusted sources can be adjusted.

Figure 375: Options LibreOffice dialog — Security page

Figure 376: Options LibreOffice dialog — Personalization page

Certificate Path

Linux and macOS only — users can digitally sign documents using LibreOffice. A digital signature requires a personal signing certificate and most operating systems can generate a self-signed certificate. However, a personal certificate issued by an outside agency (after verifying an individual identity) has a higher degree of trust associated with it than does a self-signed certificate. LibreOffice does not provide a secure method of storing these certificates, but it can access certificates that have been saved using other programs. Click Certificate and select which certificate store to use. For Windows, LibreOffice uses the default Windows location for storing and retrieving certificates.

TSAs

Optionally select a Time Stamping Authority (TSA) URL for PDF documents created by LibreOffice. Recipients of PDF documents with a trusted timestamp can verify when the document was digitally or electronically signed, as well as verify that the document was not altered after the date the timestamp vouches for.

Personalization

On the Personalization page of the Options LibreOffice dialog (Figure 376), the overall appearance of LibreOffice can be changed using themes.

Select Default look, do not use Themes and LibreOffice uses the default in all modules.

Select Preinstalled Theme, then click on a theme thumbnail and click Apply. After a brief pause the appearance of LibreOffice refreshes and reflects the selected theme.

Application colors

On the Application Colors page of the Options LibreOffice dialog (Figure 377), the overall appearance of LibreOffice can be changed by setting the colors used for the LibreOffice user interface. Current settings of a color scheme being used can be saved and reloaded reloaded at a later time.

Changing colors can make using LibreOffice easier, for example when writing, editing, creating page layouts and page margins, inserting page breaks or graphics, and so on. Also, users may prefer different colors from those used as LibreOffice defaults.

Figure 377: Options LibreOffice dialog — Application Colors page

Colour Scheme

Save and delete color schemes.

Scheme

Selects the color scheme for use.

Save

Saves the current settings as a color scheme that can be reloaded later. The name of the color scheme is added to the drop-down list in the Scheme box.

Delete

Deletes the color scheme displayed in the Scheme box. The Default scheme cannot be deleted.

Custom Colors

Select the colors for the user interface elements. To apply a color to a user interface element, make sure that the element is selected. To hide a user interface element, deselect the element.

The Automatic color setting changes the user interface element to the preset color used by the selected color scheme.

The color settings for Visited links and Unvisited links only apply to documents created after the settings are applied.

Notes

Some user interface elements cannot be hidden.

To enhance cursor visibility, set the Application background to between 40% and 60% grey. If the Application background is set to Automatic, 40% grey is used.

Figure 378: Options LibreOffice dialog — Accessibility page

Accessibility

On the Accessibility page of the Options LibreOffice dialog (Figure 378), select accessibility options including, for example, whether to allow animated graphics or text, some options for high contrast display, and a way to change the font for the LibreOffice user interface.

Miscellaneous options

Sets the accessibility options for LibreOffice.

Support assistive technology tools (program restart required)

Windows only — allows use of assistive tools, such as external screen readers, Braille devices, or speech recognition input devices. The Java Runtime Environment (JRE) must be installed on a computer before enabling assistive support.

Use text selection cursor in read-only text document

Displays cursor in read-only documents.

Allow animated images

Previews animated graphics, such as GIF images, in LibreOffice.

Allow animated text

Previews animated text, such as blinking and scrolling, in LibreOffice.

Options for High Contrast Appearance

High-contrast is an operating system setting that changes the system color scheme to improve readability. Users decide how LibreOffice uses the high-contrast settings of the operating system.

Cell borders and shadows are always shown in text color when high-contrast mode is active. The cell background color is ignored then.

High contrast

With Automatic and high contrast mode selected, it switches LibreOffice into high contrast mode when the system background color is very dark.

Use automatic font color for screen display

Displays fonts in LibreOffice using the system color settings. This option only affects the screen display.

Use system colors for page previews

Applies the high contrast settings of the operating system to page previews.

Advanced

On the Advanced page of the Options LibreOffice dialog (Figure 379), the support options are specified for Java applications in LibreOffice, including which Java Runtime Environment (JRE) to use. It also specifies whether to use experimental (unstable) features such as macro recording.

Notes

Users of Windows have a suitable Java Runtime Environment (JRE) already installed on their machines. Linux users may need to get a JRE from the distribution software repository if it is not already installed. Users of macOS need to install Oracle Java Development Kit (JDK), not just JRE. To get the required JDK, select the macOS option at https://www.oracle.com/java/technologies/downloads/.

Some options cannot be reset once edited. Either undo the changes manually, or click Cancel and reopen the Options LibreOffice dialog.

Make sure to install a JRE that is compatible with the LibreOffice architecture being used. That is 64-bit JRE for 64-bit LibreOffice and 32-bit JRE for 32-bit LibreOffice.

Figure 379: Options LibreOffice dialog — Advanced page

Java Options

If a JRE or JDK is installed after installing LibreOffice, or if more than one JRE is installed on a computer, use Java Options to select the JRE for LibreOffice to use.

If LibreOffice finds one or more JREs on a computer, it displays them in the list box. Select one of the JREs listed to use.

A system administrator, programmer, or other person who customizes JRE installations, can use the Parameters and Class Path dialogs to specify this information.

Use a Java runtime environment

Allows running of Java applications in LibreOffice. When a Java application attempts to access a hard drive, a prompt opens.

Java runtime environments (JRE) already installed

Select the JRE that required. On some systems, wait at least a minute until the list is populated. On some systems, LibreOffice has to be restarted to use any changed settings. The path to the JRE is displayed beneath the list box.

The default JRE of the operating system can be overridden with one of the following alternatives:

By setting the environment variable JAVA_HOME.
By adding a JRE to the $PATH variable.
By providing the configuration file for the computer operating system in the folder <instdir>/presets/config.

Add

Add a path to the root folder of a JRE on a computer. The path is set in the Select Path dialog that opens.

Parameters

Opens the Java Start Parameters dialog.

Class Path

Opens the Class Path dialog.

Optional Features

Enable experimental features (may be unstable)

Select this option to enable features that are not yet complete, or contain known bugs. The list of these features is different version by version.

Enable macro recording (may be limited)

This option enables macro recording, with some limitations. Opening a window, switching between windows, and recording in a different window from where the recording began, are not supported. Only actions relating to document contents are recordable, so changes in options or customizing menus are not supported. For more about macro recording, see Chapter 11, Getting Started with Macros.

Open Expert Configuration

Most users will have no need to use this. Select this option to open a new dialog in which the LibreOffice installation can be fine tuned. The dialog offers detailed configuration options for many aspects of the LibreOffice appearance and performance. Double-click on a listed preference to enter a value to configure the preference.

Note

The Expert Configuration dialog lets a user access, edit, and save configuration preferences that can make the user profile of LibreOffice unstable, inconsistent, or even unusable. If there is no knowledge what an option does, it is best to leave the option at its default setting.

Figure 380: Options LibreOffice dialog — Online Update page

Online update

On the Online Update page of the Options LibreOffice dialog (Figure 380), options are specified for the automatic notification and downloading of online updates to LibreOffice.

Online Update Options

Check for updates automatically

Mark to check for online updates periodically, then select the time interval how often LibreOffice checks for online updates. LibreOffice will check Every day, Every week, or Every month, as soon as a working Internet connection is detected. Also, click on Check Now to immediately check for an update.

Connecting to the Internet by a proxy server, set the proxy in Tools > Options > Internet > Proxy (macOS LibreOffice > Preferences > Internet > Proxy).

Download Destination

Displays the selected folder to store the downloaded files.

Download updates automatically

Enable the automatic download of updates to the specified folder.

Change

Click to select the destination folder for downloaded files.

User Agent

Select this option to send information about the LibreOffice version, operating system and basic hardware. This information is used to optimize the download.

OpenCL

OpenCL™ is an open, royalty-free standard for cross-platform, parallel programming of modern processors found in personal computers, servers and hand-held/embedded devices. OpenCL (Open Computing Language) greatly improves speed and responsiveness for a wide spectrum of applications in numerous market categories from gaming and entertainment to scientific and medical software. For more information on OpenCL, visit https://www.khronos.org/opencl/.

With OpenCL enabled, LibreOffice can benefit from the very fast numerical calculations performed in the GPU, which is especially useful in very large spreadsheets with extensive calculations. The computer video card driver must have support for OpenCL to use this feature.

Loading and saving documents

Options for loading and saving documents can be selected in the Options Load/Save dialog to suit working requirements on a computer system. If the Options Load/Save dialog is not already open, go to Tools > Options > Load/Save (macOS LibreOffice > Preferences > Load/Save) on the Menu bar.

General

On the General page of the Options Load/Save dialog (Figure 381), the default settings for saving documents and default file formats can be selected.

Load

Load user-specific settings with the document

A LibreOffice document contains settings that are read from a computer system. When saving a document, these settings are saved with it. Select this option so that when a document loads, it ignores the stored settings in favor of the settings on the computer. If this option is not selected, the following user-specific settings still apply:

Settings in File > Print > Options.
Spacing options for paragraphs before text tables.
Information about automatic updating for links, field functions, and charts.
Information about working with Asian character formats.

The data source linked to the document and its view are always loaded with the document, whether or not this option is selected.

Load printer settings with the document

If enabled, the printer settings are loaded with the document. This can cause a document to be printed on a distant printer (perhaps in an office setting). To prevent this happening, manually change the printer in the Print dialog. If disabled, the default printer will be used to print the document. The current printer settings are stored with the document whether or not this option is selected.

Save

Save AutoRecovery information every __ minutes

Select AutoRecovery and the time period for how often the information used by the AutoRecovery process is saved. AutoRecovery saves information required to restore all open documents if LibreOffice crashes. Setting this option makes recovering a document after a system crash easier.

Edit document properties before saving

Specifies that the Properties dialog opens when a file is saved for the first time and every time that Save As is selected.

Always create backup copy

Saves the previous version of a document as a backup copy whenever a document is saved. Every time LibreOffice creates a backup copy, the previous backup copy is replaced. A backup copy uses the extension BAK.

To change the location of the backup copy, go to Tools > Options > LibreOffice > Paths (macOS LibreOffice > Preferences > LibreOffice > Paths) and then enter a new path for the backup file.

Figure 381: Options Load/Save dialog — General page

Save URLs relative to file system/Save URLs relative to the Internet

Selecting these options specifies the default for relative addressing of URLs in the file system and on the Internet. Relative addressing is only possible if the source document and the referenced document are both on the same drive.

A relative address always starts from the directory in which the current document is located. In contrast, absolute addressing always starts from a root directory. The following table demonstrates the difference in syntax between relative and absolute referencing:

Table 15: Examples of saving URLs

Examples	File system	Internet
relative	../images/img.jpg	../images/img.jpg
absolute	file:///c|/work/images/img.jp	http://myserver.com/work/images/img.jpg

Default File Format and ODF Settings

ODF format version

LibreOffice 7.0 and above support the OpenDocument format (ODF) version 1.3 Extended. This format allows for improved functionality, but there may be backwards compatibility issues. The previous versions of LibreOffice support the file format ODF 1.2. However, previous file formats cannot store all new features of the newer version of LibreOffice. This version of LibreOffice can open and save documents in previous versions of ODF formats.

Document type

Specifies the document type to define the default file format.

Always save as

Specifies that documents of the type selected on the left are always saved as the file type selected from the drop-down list. Another file type for the current document can be selected in the Save as dialog.

Warn when not saving in ODF or default format

When selected, a warning message is displayed when saving a document in a format that is not the selected default format, or ODF format.

Figure 382: Options Load/Save dialog — VBA Properties page

VBA properties

On the VBA Properties page of the Options Load/Save dialog (Figure 382), the general properties for loading and saving Microsoft Office documents with VBA (Visual Basic for Applications) code are specified.

Microsoft Word

Select the settings for Microsoft Word documents.

Load Basic code

Loads and saves the Basic code from a Microsoft document as a special LibreOffice Basic module with the document. When saving the document in OpenDocument format, the Basic code is saved as well. When saving in another format, the Basic code from the LibreOffice Basic IDE is not saved.

Executable code

If selected, the Visual Basic for Applications (VBA) code is loaded ready to be executed. If not selected, the VBA code is commented out so it can be inspected, but not run.

Note

After loading the VBA code, LibreOffice inserts the statement Option VBASupport 1 in every Basic module to enable a limited support for VBA statements, functions and objects.

Save original Basic code

Specifies that the original Microsoft Basic code contained in the document is held in a special internal memory for as long as the document remains loaded in LibreOffice. When saving the document in Microsoft format, the Microsoft Basic code is saved again with the code in an unchanged form.

When saving in a format other than Microsoft Format, the Microsoft Basic Code is not saved. For example, if the document contains Microsoft Basic code and the document is saved in OpenDocument format, a warning is displayed stating that Microsoft Basic code will not be saved.

The Save original Basic code selection takes precedence over the Load Basic code selection. If both options are marked and the disabled Basic code is edited in the LibreOffice Basic IDE, the original Microsoft Basic code is saved when saving in Microsoft format.

To remove any possible Microsoft Basic macro viruses from a Microsoft document, deselect Save original Basic code and save the document in Microsoft format. The document is saved without the Microsoft Basic code.

Microsoft Excel

For information on Load Basic code, Executable code, and Save original Basic code, see Microsoft Word above.

Microsoft PowerPoint

For information on Load Basic code and Save original Basic code, see Microsoft Word above.

Microsoft Office

On the Microsoft Office page of the Options Load/Save dialog (Figure 383), the settings for importing and exporting Microsoft Office and other documents are specified.

Embedded Objects

Embedded Objects specify how Microsoft Office objects, or other OLE objects, are imported and exported. These settings are valid when no Microsoft, or other OLE, server exists (for example, in UNIX), or when there is no LibreOffice OLE server ready for editing the OLE objects.

If an OLE server is active for the embedded object, then the OLE server is used to handle the object.

If no OLE server is active for MathType objects, then embedded MathType objects are converted to LibreOffice Math objects. For this conversion, the embedded MathType objects must not exceed the MathType 3.1 specifications.

Figure 383: Options Load/Save dialog — Microsoft Office page

[L] and [S] Columns

Selecting the [L] and [S] columns displays the entries for OLE objects that can be converted when loading into LibreOffice [L] and/or when saving into a Microsoft format [S].

Select the [L] column in front of the entry if a Microsoft or other OLE object, is to be converted into the specified LibreOffice OLE object when a Microsoft or other document is loaded into LibreOffice.

Select in the [S] column in front of the entry if a LibreOffice OLE object is to be converted into the specified Microsoft OLE object when a document is saved in a Microsoft file format.

Character Highlighting

Microsoft Office has two character attributes similar to LibreOffice character highlighting. Use this control to select the attribute, highlighting or shading, that LibreOffice should use when exporting LibreOffice character highlighting to Microsoft Office file formats.

Highlighting

Exports the closest match between a LibreOffice highlighting color and one of the 16 Microsoft highlighting colors. This character attribute makes it easy for Microsoft Office users to edit with the highlighting tool in Microsoft Office applications.

Shading

Exports all RGB colors to the other Microsoft Office character attribute. This preserves color fidelity between LibreOffice and Microsoft Office documents, but Microsoft Office users must edit this character attribute with a tool that is not commonly used or easy to find in Microsoft Office applications. This is the default setting since LibreOffice 7.0.

Tip

The compatibility filter in the Character Highlighting Color dialog provides the Microsoft Office highlighting colors. Use those colors and choose Highlighting if both color fidelity and ease of editing is required for Microsoft Office users.

Lock files

Select Lock files to generate a Microsoft Office lock file in addition to the LibreOffice lock file. Lock files signal to applications that a resource or file should not be used until the lock is released. LibreOffice can read lock files generated by Microsoft Office.

HTML compatibility

On the HTML compatibility page of the Options Load/Save dialog (Figure 384), define the settings for HTML pages.

Font sizes

Use Size 1 to Size 7 to define the respective font sizes for the HTML <font size=1> to <font size=7> tags.

Import

Defines the settings for importing HTML documents.

Figure 384: Options Load/Save dialog — HTML Compatibility page

Use 'English (USA)' locale for numbers

When importing numbers from an HTML page, the decimal separator and the thousands separator characters differ according to the locale of the HTML page. The clipboard, however, contains no information about the locale. For example, the characters "1.000" copied from a German Web page probably mean “one thousand” because the dot-on-the-line is the thousands separator in a German locale. If copied from an English Web page, the same characters stand for the number 1 as in “one dot zero zero zero”.

If not selected, numbers are interpreted according to the setting in Tools > Options > Language Settings (macOS LibreOffice > Preferences > Language Settings). If marked, numbers are interpreted using the English (USA) locale.

Import unknown HTML tags as fields

Select this option if tags that are not recognized by LibreOffice are to be imported as fields. For an opening tag, an HTML_ON field is created with the value of the tag name. For a closing tag, an HTML_OFF is created. These fields are converted to tags in the HTML export.

Ignore font settings

Select this option to ignore all font settings when importing. The fonts that were defined in the HTML Page Style are the fonts used.

Export

LibreOffice Basic

Select this option to include the LibreOffice Basic instructions when exporting to HTML format.

This option must be selected before creating the LibreOffice Basic Script, otherwise it will not be inserted. LibreOffice Basic scripts must be located in the header of the HTML document. Once the macro is created in LibreOffice Basic IDE, it appears in the source text of the HTML document in the header.

Display warning

If selected, when exporting to HTML a warning is displayed stating that LibreOffice Basic macros will be lost.

Print layout

If selected, the print layout of the current document (for example, table of contents with justified page numbers and dot leaders) is exported as well. It can be read by LibreOffice, Mozilla Firefox, and MS Internet Explorer.

Note

The HTML filter supports CSS2 (Cascading Style Sheets Level 2) for printing documents. These capabilities are only effective if print layout export is activated.

Copy local images to Internet

Select this option to automatically upload the embedded images to the Internet server when uploading using FTP. Use the Save As dialog to save the document and enter a complete FTP URL as the file name in the Internet.

Note

Some options cannot be reset once edited. Either undo the changes manually, or click Cancel and reopen the Options dialog.

Language settings

Go to Tools > Options > Language Settings (macOS LibreOffice > Preferences > Language Settings) on the Menu bar to open dialogs where the properties for languages, writing aids, language tools can be defined.

Note

Searching in Japanese and Asian Layout pages are only visible if the Asian language support option in the Languages page is activated. Complex Text Layout page is only visible if the CTL support is activated.

Languages

On the Languages page of the Options Language Settings dialog (Figure 385), define the default languages and locale settings for documents.

Language of

User interface

Select the language used for the user interface, for example menus, dialogs, and help files. There must be at least one additional language pack installed, or a multi‑language version of LibreOffice installed.

The Default entry selects the language of the user interface used by the computer operating system. If this language is not available in the LibreOffice installation, the language of the LibreOffice installation is the default language.

Formats

Locale setting

Specifies the locale setting of the country setting. This influences settings for numbering, currency and units of measure.

The Default entry selects the locale used by the operating system. A change in this field is immediately applicable.

Default currency

Specifies the default currency used by the currency format and the currency fields. If the locale setting is changed, the default currency changes automatically.

The Default entry applies to the currency format that is assigned by the selected locale setting. A change in Default currency will change all open documents. Also, dialogs and icons that use the currency format also changes.

Figure 385: Options Language Settings dialog — Languages page

Decimal separator key

If Same as locale setting is selected, the decimal separator key that is set in the computer system is used when the respective key on the number pad is pressed. If Same as locale setting is not selected, the character used by the keyboard driver software is inserted.

Date acceptance patterns

Specifies the date acceptance patterns used by the current locale. Calc spreadsheet and Writer table cell input have to match locale dependent date acceptance patterns before being recognized as a valid date.

Type numbers and characters that correspond to the defined date acceptance patterns into a table cell, and then move the cursor outside of the cell. LibreOffice automatically recognizes the data entry and converts the input to the correct date format.

The initial patterns in Date acceptance patterns are determined by the locale setting, but these default patterns can be modified and more patterns added. Use a semi‑colon (;) to separate each pattern.

Note

The spell check for the selected language only functions when the corresponding language module is installed. A language entry has a check mark in front of it if spell checking is activated for the selected language.

Default Languages for Documents

Specifies the languages for spelling, thesaurus, and hyphenation.

Western

Specifies the language used for the spelling check function in western alphabets.

Asian

When selected, activates Asian languages support. The corresponding Asian language settings in LibreOffice can now be defined. For example, when writing Chinese, Japanese or Korean characters, selecting Asian activates the support for these languages in the user interface.

Complex text layout

Specifies the language for the complex text layout spelling check.

For the current document only

When selected, specifies that the settings for default languages are valid only for the current document.

Enhanced language support

Ignore system input language

Indicates whether changes to the system input language, or keyboard, are ignored. If ignored, when new text is typed that text follows the document language or current paragraph, not the current system language.

Note

Some options cannot be reset once edited. Either undo the changes manually, or click Cancel and reopen the Options dialog.

Writing Aids

On the Writing Aids page of the Options Language Settings dialog (Figure 386) the properties of spelling, thesaurus and hyphenation can be specified.

Available Language Modules

Lists the installed language modules in LibreOffice. A language module can contain one, two or three sub-modules: spelling, hyphenation and thesaurus. Each sub-module is available in one or more languages. Selecting a module name activates all available sub‑modules simultaneously. Deselecting a module name, deactivates all available sub‑modules simultaneously. To activate or deactivate individual sub-modules, click on Edit to open the Edit Modules dialog.

Note

The configuration allows two folders: one folder where a user has write permissions, and one folder without write permissions. A user can only edit and delete the user dictionaries that are located in the writeable path. Other dictionaries can be read only.

Edit

To edit a language module, click on Edit to open the Edit Modules dialog. Select, or deselect, each sub-module as required.

User-defined dictionaries

Lists the available user dictionaries. Select the user dictionaries required for spelling and hyphenation.

New

Opens the New Dictionary dialog where the details of a new user-defined dictionary are added and the language specified. Click on Help for more information on the options available for the New Dictionary dialog.

Edit

Opens the Edit Custom Dictionary dialog allowing adding new entries and editing existing entries in a custom dictionary. When a custom dictionary is edited, a check is made on the status of the file. If the file is write-protected, it cannot be changed. New and Delete are deactivated. Click on Help for more information on the options available for the Edit Custom Dictionary dialog.

Figure 386: Options Language Settings dialog — Writing Aids page

Options

Defines the options for spell check and hyphenation.

Check spelling as you type

Automatically checks spelling as text is typed and underlines errors.

Typing errors are highlighted in the document with a red underline. If the cursor is placed over a highlighted word, a context menu opens with a list of suggested corrections. Select a suggested correction to replace the suspect word with the suggestion. If the same mistake is made again while editing the document, the mistake is marked as an error again.

To place a word into the AutoCorrect replacement table, right-click on the word and select AutoCorrect Options from the context menu to open the AutoCorrect dialog. Select from the available options and the word is placed in the AutoCorrect replacement table.

Check grammar as you type

Any errors of grammar as text is typed into a document are highlighted.

Check upper-case words

Specifies that capitalization is checked during a spell check.

Check words with numbers

Specifies that words that contain numbers as well as letters are to be checked.

Check special regions

Specifies that special regions, such as drawing text, text in headers and footers, document tables, and text frames, are checked during a spell check.

Minimal number of characters for hyphenation

Specifies the minimum number of characters required for automatic hyphenation to be applied.

Characters before line break

Sets the minimum number of characters of the word to be hyphenated that must remain at the end of the line.

Characters after line break

Specifies the minimum number of characters of a hyphenated word required at the beginning of the next line.

Hyphenate without inquiry

Specifies that there are no prompts for manual hyphenation. If not selected, when a word is not recognized a dialog with options for entering hyphens.

Hyphenate special regions

Specifies that hyphenation is carried out in footnotes, headers and footers.

Edit

To change a value in an option, select the entry. If applicable, click on Edit to open a dialog allowing a new value to be entered.

Note

Some options cannot be reset once edited. Either undo the changes manually, or click Cancel and reopen the Options dialog.

Installing language dictionaries

LibreOffice automatically installs several language modules when it is installed on a computer. Each language module can contain up to three submodules: spelling dictionary, hyphenation dictionary, and thesaurus. These language modules are usually referred to as dictionaries in LibreOffice.

Additional dictionaries can be installed as extensions. An example of adding another language dictionary is as follows:

Go to Tools > Language > More Dictionaries Online on the Menu bar to open the Extension Dictionaries dialog.

Select the required dictionary from the list of available dictionaries.

If necessary, click on the website link to find out more information on the selected dictionary.

Click on Install below the required dictionary and the dictionary is installed into LibreOffice.

Click on Close to close the Extensions Dictionary dialog.

Make sure all documents are saved and closed, then restart LibreOffice for the new dictionary to register in LibreOffice.

Searching in Japanese

Defines the search options for Japanese. These commands can only be accessed after support for Asian languages is enabled. Go to Tools > Options > Language Settings > Languages (macOS LibreOffice > Preferences > Language Settings > Languages) on the Menu bar to enable these options.

On the Searching in Japanese page of the Options Language Settings dialog (Figure 387) the search properties for Japanese can be specified.

Figure 387: Options Language Settings dialog — Searching in Japanese page

Treat as equal

Specifies the options to be treated as equal during a search.

Ignore

Specifies the characters to be ignored during a search.

Asian layout

Defines the typographic default settings for Asian text after support for Asian languages has been enabled. To enable these options, go to Tools > Options > Language Settings > Languages (macOS LibreOffice > Preferences > Language Settings > Languages) on the Menu bar.

On the Asian Layout page of the Options Language Settings dialog (Figure 388), the properties for Asian Layout can be specified.

Kerning

Defines the default settings for kerning between individual characters.

Western text only

Specifies that kerning is only applied to Western text.

Western text and Asian punctuation

Specifies that kerning is applied to both Western text and Asian punctuation.

Character spacing

Defines the default settings for character spacing in Asian texts, cells, and drawing objects.

No compression

Specifies that no compression occurs.

Compress only punctuation

Specifies that only the punctuation is compressed.

Compress punctuation and Japanese Kana

Specifies that punctuation and Japanese Kana are compressed.

First and last characters

Defines the default settings for first and last characters.

Language

Specifies the language where first and last characters are defined.

Figure 388: Options Language Settings dialog — Asian Layout dialog

Default

When Default is selected, the following two text boxes are filled with the default characters for the selected language:

Not at start of line

Specifies the characters that will not appear alone at the beginning of a line. If a character typed here is positioned at the beginning of a line after a line break, it is automatically moved to the end of the previous line. For example, an exclamation point at the end of a sentence never appears at the start of a line if it is listed in the Not at start of line list.

Not at end of line

Specifies the characters that will not appear alone at the end of a line. If a character typed here is positioned at the end of a line due to a line break, it is automatically moved to the beginning of the next line. For example, a currency symbol that appears in front of an amount never appears at the end of a line if it is listed in the Not at end of line list.

Complex Text Layout

Defines the options for documents that use Complex Text Layouts (CTL). To enable these options, go to Tools > Options > Language Settings > Languages (macOS LibreOffice > Preferences > Language Settings > Languages) on the Menu bar. On the Complex Text Layout page of the Options Language Settings dialog (Figure 389), the options for Complex Text Layout can be specified.

Currently, LibreOffice supports Hindi, Thai, Hebrew, and Arabic as CTL languages.

If the text flow from right to left is selected, embedded Western text still runs from left to right. The cursor responds to the arrow keys. The right arrow key moves the cursor toward the text end and the left arrow key moves the cursor toward the text start.

Change the text writing direction directly be using one of the following keyboard combinations. These keyboard combinations only work when CTL support is enabled.

Switch to right-to-left text entry — Ctrl+Shift+D or Ctrl+Right Shift Key (macOS ⌘+Shift+D or ⌘+Right Shift Key).

Switch to left-to-right text entry — Ctrl+Shift+A or Ctrl+Left Shift Key (macOS ⌘+Shift+A or ⌘+Left Shift Key).

Figure 389: Options Language Settings dialog — Complex Text Layout page

In multicolumn pages, sections, or frames that are formatted with text flow from right to left, the first column is the right column and the last column is the left column.

Sequence Checking

In languages, for example Thai, rules specify that certain characters are not allowed next to other characters. If Sequence Input Checking (SIC) is enabled, LibreOffice will not allow a character next to character if this is forbidden by a rule.

Use sequence checking

Enables sequence input checking for languages.

Restricted

Prevents the use and the printing of illegal character combinations.

Type and replace

When selected, allows typing and replacement of characters.

Cursor control

Select the type of cursor movement and text selection for mixed text (right-to-left mixed with left-to-right text direction).

Logical

Using the Right Arrow key moves the text cursor towards the end of the current text. Using the Left Arrow key moves the text cursor towards the beginning of the current text.

Visual

Using the Right Arrow key moves the text cursor in the right-hand direction. Using the Left Arrow key moves the text cursor in the left-hand direction.

General Options

General Options setting is not saved in the document but in the LibreOffice configuration.

Numerals

Selects the type of numerals used within text, text in objects, fields, and controls, in all LibreOffice modules. Only cell contents of LibreOffice Calc are not affected.

Arabic — all numbers are shown using Arabic numerals. This is the default.

Hindi — all numbers are shown using Hindi numerals.

System — all numbers are shown using Arabic, or Hindi, numerals according to the locale settings defined by the computer system locality.

Figure 390: Options Language Settings dialog — Language Tool Server page

Figure 391: Options Language Settings dialog — English Sentence Checking page

Language tool server

On the Language Tool Server page of the Options Language Settings dialog (Figure 390), select the Enable Language Tool to use a language tool assistant available for LibreOffice. If necessary, click on the link https://languagetool.org/legal/privacy to access the privacy policy for using the language tool assistant.

English sentence checking

On the English Sentence Checking page of the Options Language Settings dialog (Figure 391), the options for checking the language used in a document can be selected.

Chart color options

In the Default Colors page of the Options Charts dialog (Figure 392) the default colors are specified for LibreOffice charts. Any colors changed only apply to newly created charts.

Chart Colors

The color selected in Color Table is assigned to the selected data row.

Color Table

Select a color palette from the drop-down list to use as a source for chart colors.

Figure 392: Options Charts dialog — Default Colors page

Figure 393: Options Internet dialog — Proxy page

Add

Click on Add to add a data series in Chart Colors.

Delete

Click on Delete to remove the selected data series from the Chart Colors list.

Internet options

In the Options Internet dialog (Figure 393) the following Internet settings are located on separate dialog pages, depending on the computer operating system.

Proxy page — enter the proxy settings for use with LibreOffice.

Email page — enter the email program to be used when sending documents as email attachments — Linux and macOS only. On a Windows operating system, the default email program is used.

MediaWiki page — A MediaWiki publisher is included with Windows and Linux. A Java Runtime Environment (JRE) is required for this feature to work.

AutoCorrect functions

The AutoCorrect functions in LibreOffice automatically detect and replace common symbols, spelling mistakes, and grammar mistakes. Occasionally, AutoCorrect changes something that should have been kept. If unexplained changes appear in a document, the AutoCorrect settings are often the cause. For more information on AutoCorrect, refer to the relevant user guides for each module.

Figure 394: AutoCorrect dialog

Go to Tools > AutoCorrect > AutoCorrect Options on the Menu bar to open AutoCorrect dialog (Figure 394). A document must be open for this menu item to appear.

Select each tab in the dialog to add, edit, and delete AutoCorrect options. In Writer, the dialog has five tabs. In the other LibreOffice modules, the dialog only has four tabs.

Click OK to save the changes and close the dialog.

Getting Started Guide 7.5

Chapter 13,
Customizing LibreOffice

Introduction

This chapter describes some common customization that can be carried out, as follows:

Menus, toolbars, keyboard shortcuts, and the tabbed interface in LibreOffice can be customized.

New menus and toolbars, assign macros to events can be added.

Different user interface variants can be selected and used.

Customizations can also be carried out by adding extensions that can be installed from the LibreOffice website or from other providers. For more information, see “Adding extensions” on page 568.

Note

Customized menus and toolbars can be saved in a template. The customized menus and toolbars are created in a document and the document is then saved as a template. For more information, see Chapter 4, Working with Styles, Templates, and Hyperlinks.

Menu customization

Menus and commands on the Menu bar or context menus can be added, rearranged, removed, or other changes made. To customize menus, go to Tools > Customize on the Menu bar and select the Menus page (Figure 395), or the Context Menus page, from the context menu. The Context Menus page is similar to the Menus page.

Customizing existing menus

The following is an example of customizing a menu in LibreOffice Writer. The menus in the other LibreOffice modules are also customized using similar procedures.

Adding commands

Go to Tools > Customize on the Menu bar to open the Customize dialog.

Click on Menus to open the Menus page (Figure 395). In the Scope drop-down list, LibreOffice Writer appears as the selected module.

In Target, select the menu for customization from the drop-down list. This drop‑down list also includes the submenus available in the selected menu.

In Assigned Commands, check that the required command is not already listed for the selected menu. This may require scrolling through the list of commands.

If necessary, enter a command name in the Search text box to locate the command in the Available Commands list.

If necessary, select a command category from the Category drop‑down list. By default, All commands is displayed as the category.

Select the required command in the Available Commands list. This may require scrolling through the list of commands.

Click on the right arrow to add the required command to the Assigned Commands list.

If necessary, click on the up arrow, or down arrow, to move the command into its correct position in the Assigned Commands list.

Figure 395: Customize dialog — Menus page

If necessary, insert a menu separator above the newly inserted command as follows:

Select the newly inserted command in the Available Commands list.

Click on Insert and select Insert Separator from the drop‑down list.

If necessary, insert a submenu as follows:

Select the newly inserted command in the Available Commands list.

Click on Insert and select Insert Submenu from the drop‑down list.

Enter a name for the submenu in the Add Submenu dialog that opens.

Click OK to create the submenu and close the dialog.

If necessary, rename the newly inserted command as follows:

Select the newly inserted command in the Available Commands list.

Click on Modify and select Rename from the drop‑down list.

Enter a new name for the command in the Rename Menu dialog that opens.

Click OK to rename the command and close the dialog.

Click OK to save the changes to the menu and close the Customize dialog.

Removing commands

Go to Tools > Customize on the Menu bar to open the Customize dialog.

Click on Menus to open the Menus page. In the Scope drop-down list, LibreOffice Writer appears as the selected module.

Select the command for removal in the Assigned Commands list.

Click on the left arrow to move the selected command to the Available Commands list.

Click OK to save the changes to the menu and close the Customize dialog.

Creating new menus

The following is an example of creating a new menu in LibreOffice Writer. The menus in the other LibreOffice modules are also created using a similar procedure.

Figure 396: Adding new menu

Go to Tools > Customize on the Menu bar to open the Customize dialog.

Click on Menus to open the Menus page.

Click on the three bars Ξ next to the Target drop‑down list to open a context menu (Figure 396).

Select Add from the context menu to open the New Menu dialog (Figure 397).

Enter a name for the new menu in the Menu name text box. The name of the new menu appears at the bottom of the menu list in Menu position.

Select the new menu and use the up and down arrows to reposition the new menu in the Menu position list.

Click OK to close the New Menu dialog and the new menu name appears in Target with the Assigned Commands box empty.

Add commands to the new menu. See “Adding commands” on page 558 on how to add menu commands.

Figure 397: New Menu dialog

Click OK to close the Customize dialog.

Creating a shortcut character

In Windows only, a character can be assigned as a keyboard shortcut for menu commands. The character is underlined in the name of the menu command. For example, the character O is used to open the Format menu on the Menu bar when the key combination Alt+O is used.

Adding a character as a keyboard shortcut to a menu command is as follows:

Go to Tools > Customize on the Menu bar to open the Customize dialog.

Click on Menus to open the Menus page.

Select the menu from the Target drop‑down list.

Select the menu command from the Assigned Commands list.

Click on the three bars Ξ ("hamburger menu") next to the Target drop‑down list to open a context menu.

Click on Rename from the context menu to open the Rename dialog.

Add a tilde (~) before the character to be used as the keyboard shortcut.

Click OK to save the change and close the Rename dialog.

Click OK to close the Customize dialog. The character appears with an underline in the menu item name.

Note

When assigning a character as a keyboard shortcut, make sure the character used is NOT already assigned to another menu command.

Toolbar customization

Toolbars can be customized in several ways, such as locking the position of a docked toolbar, and adding or deleting tools available on a toolbar. Also new toolbars can be created if required. This section describes how to create new toolbars and add or delete icons on existing toolbars.

Figure 398: Customize dialog — Toolbars page

The Toolbars page on the Customize dialog (Figure 398) is used to customize a toolbar, or create a new toolbar, it is opened using one of following methods:

Right-click in an empty space on a toolbar and select Customize Toolbar from the context menu.

Go to View > Toolbars > Customize on the Menu bar.

Go to Tools > Customize on the Menu bar and click on the Toolbars tab when the dialog opens.

Note

When customizing or creating toolbars in LibreOffice, make sure that there is a LibreOffice module open, for example Writer, and at least one document open. If there is no LibreOffice module, or document, open, then toolbar customization or creation cannot be carried out.

Toolbar customization

Adding tools

Open the Customize dialog and click on Toolbars to open the Toolbars page.

In the Scope drop‑down list, select the LibreOffice module displayed, or one of the listed documents.

Note

If a listed document is selected in the Scope drop‑down list, then any customization to a toolbar is only available for that selected document.

In the Target drop‑down list, select the toolbar for customization. The tools on the selected toolbar are displayed in the Assigned Commands list.

Select a tool in the Available Commands list. By default, all available tools are displayed in the Available Commands list.

Alternatively, and to reduce the number of tools listed in Available Commands, use one of the following methods:

Enter a search term in the Search box

Select a category in the Category drop‑down list.

Select the required tool and click on the right arrow to add the selected tool at the bottom of the Assigned Commands list for the toolbar.

Use the up and down arrows in Assigned Commands to position the tool in its required position on the selected toolbar.

If necessary, insert a separator bar above the newly inserted tool as follows:

Select the newly inserted tool in the Available Commands list.

Click on Insert and select Insert Separator from the drop‑down list.

If necessary, to remove a separator bar, right‑click on the separator bar and select Remove from the drop‑down list.

If necessary, rename the newly inserted tool as follows:

Select the newly inserted tool in the Available Commands list.

Click on Modify and select Rename from the drop‑down list.

Enter a new name for the tool in the Rename Menu dialog that opens.

Click OK to rename the tool and close the dialog.

Click OK to save the changes to the toolbar and close the Customize dialog.

Removing tools

Open the Customize dialog and click on Toolbars to open the Toolbars page.

In the Scope drop-down list, the LibreOffice module that is open appears as the selected module.

In the Target drop‑down list, select the toolbar that has the tool that is going to be removed.

Select the tool for removal in the Assigned Commands list.

Click on the left arrow to move the selected tool into the Available Commands list and remove the tool from the selected toolbar.

Click OK to save the changes to the toolbar and close the Customize dialog.

Figure 399: Name dialog

Creating new toolbars

Open the Customize dialog and click on Toolbars to open the Toolbars page.

In the Scope drop‑down list, select the LibreOffice module displayed, or one of the listed documents.

Click on the three bars Ξ next to the Target drop‑down list to open a context menu (Figure 396 on page 560).

Select Add from the drop‑down list to open the Name dialog (Figure 399).

Type a name for the new toolbar in the Toolbar name box.

In the Save in box select where to save the new toolbar. This can be a LibreOffice module, or one of the listed documents.

Click OK to save the new toolbar and close the Name dialog.

Add the required tools to the new toolbar. Refer to “Toolbar customization” on page 563 for information on how to add tools.

Click OK to save the new toolbar and close the Customize dialog.

Changing tool icons

Tools on a toolbar are indicated by icons and can be changed as follows:

Open the Customize dialog and click on Toolbars to open the Toolbars page.

In the Target drop‑down list, select the toolbar where icons are going to be customized.

In Assigned Commands, select the tool where the icon is going to be changed.

Click on Modify, or right-click on the selected tool, and select Change Icon from the context menu to open the Change Icon dialog (Figure 400).

Select an icon from the available icons shown in the Icons preview box.

Click OK to change the icon for the selected tool and close the Change Icon dialog. There is no confirmation message when changing icons.

Click OK to save the changes to the toolbar and close the Customize dialog.

Note

Icons can be created using a graphics program and imported into LibreOffice. The recommended icon size is 16X16 pixels for best quality. Different sized icons are scaled automatically.

Figure 400: Change Icon dialog

Keyboard shortcuts

Using keyboard shortcuts

A great deal of LibreOffice functionality can be done without using a mouse or other pointing device, but by using keyboard shortcuts. For example, the keyboard shortcut Ctrl+O (macOS ⌘+O) is displayed next to the Open command in the File menu on the Menu bar. To use this keyboard shortcut, press and hold down the Ctrl (macOS ⌘) key and then press the O key to open the Open dialog. Release both keys after the Open dialog opens and displays. For more information on keyboard shortcuts, see Appendix A, Keyboard Shortcuts.

Creating keyboard shortcuts

In addition to using the keyboard shortcuts available in LibreOffice, custom keyboard shortcuts can be created. These custom keyboard shortcuts can be allocated to LibreOffice functions or macros, and saved for use with the LibreOffice suite of applications.

Note

Some of the keyboard shortcuts available may be assigned as functions or commands for use by the computer system. These keyboard shortcuts assigned to the computer system should not used as a custom keyboard shortcut within LibreOffice. It is possible to change keyboard shortcuts already assigned to the computer system, but is definitely NOT recommended. Changing the keyboard shortcuts used by the computer system may create problems in the operation of a computer system.

Open the Customize dialog using one of following methods:

Right-click in an empty space on a toolbar and select Customize Toolbar from the context menu.

Go to View > Toolbars > Customize on the Menu bar.

Go to Tools > Customize on the Menu bar and click on the Toolbars tab when the dialog opens.

Click on Keyboard to open the Keyboard page (Figure 401).

Figure 401: Customize dialog — Keyboard page

Assign a new keyboard shortcut to a command as follows:

Keyboard shortcut available in all LibreOffice modules, select LibreOffice at the upper right of the dialog.

Keyboard shortcut available in a selected LibreOffice module, select the LibreOffice module at the upper right of the dialog. Figure 401 shows that Writer has been selected.

Select the required category for the keyboard shortcut from the Category list.

Select the required function for the keyboard shortcut from the Function list.

Select the required shortcut key in the Shortcut Keys list and click on Modify. The selected shortcut key in Shortcut Keys is assigned to the selected Category and Function, and appears in Keys.

Click OK to save the new keyboard shortcut and close the Customize dialog.

Note

Any keyboard shortcut that is already assigned to a function appears in the Keys list. This is shown by the example of Ctrl+F10 (macOS ⌘+F10) in Figure 401 for the View category and Formatting Marks function. It is not recommended to change a keyboard shortcut that has already been assigned.

Any Shortcut Keys that are grayed-out in the list on the Customize dialog cannot be used or reassigned, for example F1, F6, and F10.

Figure 402: Example of Save Keyboard Configuration file browser

Saving keyboard configurations

Changes to the assignments of keyboard shortcuts can be saved as a keyboard configuration file. This allows the creation and application of different keyboard configurations as and when necessary. Also, a keyboard configuration file can be distributed among several users.

After making adjustment and changes to keyboard shortcut assignments, click on Save at the right side of the Customize dialog to open the file browser for Save Keyboard Configuration (example shown in Figure 402).

Navigate to the folder to be used for keyboard configuration files.

In the Save Keyboard Configuration file browser, enter a file name in the File name text box, or select a keyboard configuration file in the file list. The file name extension used for a keyboard configuration file is CFG, as shown by the example in the File type text box.

Click on Save to save the keyboard configuration file and close the Save Keyboard Configuration file browser.

Click OK to save the changes and close the Customize dialog.

Loading keyboard configurations

To load a saved keyboard configuration file and replace the existing keyboard configuration:

Click on Load at the right side of the Customize dialog to open the Load Keyboard Configuration file browser. This is similar to the Save Keyboard Configuration file browser.

Navigate to the folder to be where keyboard configuration files are located.

Click on Open to load the selected keyboard configuration into LibreOffice and close the Load Keyboard Configuration file browser.

Click OK to save the changes and close the Customize dialog.

Restart LibreOffice to make sure the new keyboard configuration is active.

Resetting keyboard configuration

Resetting all of keyboard shortcuts to their default values in LibreOffice is as follows:

Open the Customize dialog using one of following methods:

Right-click in an empty space on a toolbar and select Customize Toolbar from the context menu.

Go to View > Toolbars > Customize on the Menu bar.

Go to Tools > Customize on the Menu bar and click on the Toolbars tab when the dialog opens.

Click on Keyboard to open the Keyboard page

Click on Reset at the right side of the Customize dialog. There is no confirmation dialog displayed when resetting keyboard configuration to its default setting.

Click OK to save the changes and close the Customize dialog.

Restart LibreOffice to make sure the default keyboard configuration is active.

Assigning macros

Macros can be assigned to events in LibreOffice. The assigned macro automatically runs each time the associated event occurs. For example, an event could be when a document is opened, a key is pressed, or the cursor is moved. To associate a macro with an event, the Events page in the Customize dialog is used. For more information on assigning events to macros, see Chapter 11, Getting Started with Macros.

Adding extensions

An extension is a program that can be installed into LibreOffice to increase the functionality of LibreOffice. For example, templates, dictionaries, clip-art galleries, macros, and dialog libraries can be added to LibreOffice as extensions.

Several extensions are installed when LibreOffice is installed onto a computer. More extensions can be downloaded free of charge from the official extension repository located at https://extensions.libreoffice.org/.

Extensions can also be downloaded from other sources. Some of these extensions are free of charge; other extensions are available for a fee. Check the descriptions to see what licenses and fees apply to extensions from other sources.

Installing extensions

Installing an extension that is listed in the official extension repository is as follows:

Go to Tools > Extension Manager on the Menu bar to open the Extension Manager dialog (Figure 403).

Click on Get more extensions online link. The official extension repository for LibreOffice opens in a web browser.

Enter a search term in What are you looking for? text box in the web browser and click on Search.

If necessary, select a tag filter before searching to reduce the number of extensions in the search result.

Figure 403: Extension Manager dialog

Locate the extension required and click on it to open the web page for the selected extension.

Check the extension description and its compatibility for the LibreOffice version and computer operating system being used.

For the correct extension version, click on Download and the extension is downloaded into the Downloads folder on the computer.

In the Extension Manager dialog, click on Add to open the Add Extension(s) browser window.

Navigate to the folder where the extension is located.

Select the extension and click on Open.

If necessary, agree to accepting the license agreement and the extension is installed and listed in the Extension Manager dialog.

If necessary, restart LibreOffice for the extension to become effective.

Note

To install an extension that is not listed in the official extension repository, download the extension from its source, then continue from Step 7 above to install the extension.

Updating extensions

It is necessary to check for updates to extensions on a regular basis. Checking for extension updates is as follows:

Go to Tools > Extension Manager on the Menu bar to open the Extension Manager dialog.

Click on Check for Updates to open the Extension Update dialog.

Select any extension that is listed in Available extension updates and click on Install to update the extension.

Close the Extension Update and Extension Manager dialogs.

If necessary, restart LibreOffice for the extension update to become effective.

Removing extensions

To remove and completely uninstall an extension no longer required is as follows:

Go to Tools > Extension Manager on the Menu bar to open the Extension Manager dialog.

Select the extension for removal in the Extension Manager dialog.

Click on Remove and confirm the removal of the extension.

Close the Extension Manager dialog.

Disabling extensions

To disable an extension without removing the extension from LibreOffice is as follows:

Go to Tools > Extension Manager on the Menu bar to open the Extension Manager dialog.

Select the extension being disabled in the Extension Manager dialog.

Click on Disable. The Disable button changes to Enable.

When necessary, click on Enable and the extension can be used again in LibreOffice.

Close the Extension Manager dialog.

Note

If Remove and Disable are grayed out in the Extension Manager dialog, the extension cannot be removed or disabled. For example, when an extension is part of the LibreOffice installation, it must not be removed or disabled.

Creating custom colors

Custom colors can be created and added to LibreOffice custom palette. For example, custom colors may be required to exactly match a corporate color scheme when creating documents. Custom colors are created by changing the values in one of the following color notations.

RGB notation of Red (R), Green (G), and Blue (B)

Hex # number

Hue (H), Saturation (S), and Brightness (B)

CMYK percentages of Cyan (C), Magenta (M), Yellow (Y), and Black (K).

The following procedures for creating custom colors are examples of creating a color area fill for an object. Custom colors created for area fills are saved into the Custom palette, which makes custom colors available for use with lines, arrows, or text. The dialogs can be used to create custom colors are as follows:

Pick A Color dialog.

Color page in the Area dialog.

Line page in the Line dialog.

Font Color on the Font Effects page in the Character, or Character Style dialog.

Font Color on the Font Effects page in the Paragraph Style dialog.

Fill Color in Area panel in Properties deck on the Sidebar.

Line Color in Line panel in Properties deck on the Sidebar.

Font Color in Character panel in Properties deck on the Sidebar.

Using Area dialog for objects

Insert a filled object into a document, for example a square, and make sure it is selected.

Right-click on the selected object and select Area from the context menu to open the Area dialog (Figure 404).

Click on Color to open the options available for a color fill.

Specify the values in New for the Red (R), Green (G), and Blue (B) on a 0 to 255 scale, or enter the Hex # number for the custom color, if known.

Click on Add in Custom Palette and enter a name for the color in the Name dialog that opens.

Click OK to close the Name dialog and the color is added to the Custom palette.

Click OK to close the Area dialog and save the changes. The new custom color appears as a fill in the selected object and is available for use in other documents.

Figure 404: Area dialog — Color page

Figure 405: Pick A Color dialog

Note

The color notations are linked and changing the value in one notification set automatically changes the values in the other notification sets.

Using Pick a Color dialog for objects

Insert a filled object into a document, for example a square, and make sure it is selected.

Open the Pick a Color dialog (Figure 405) using one of the following methods:

Click on Pick on the Color page of the Area dialog.

Click on the triangle ▼ next to Fill Color on the Line and Filling toolbar and select Custom Color from the context menu.

Click on the triangle ▼ next to Fill Color in the Area panel of the Properties deck on the Sidebar and select Custom Color from the context menu.

Create a custom color using one of the following methods. A preview of the color being created is shown on the left side of the original color box below the color selection box.

Select a color range from the colored bar, then, using the cursor, move the target in the colored box until the cursor is on the color required.

Enter values for Red (R), Green (G), and Blue (B) in the RGB text boxes.

Enter values for Cyan (C), Magenta (M), Yellow (Y), and Key (K) (black) in the CMYK text boxes.

Enter values for Hue (H), Saturation (S), and Brightness (B) in the HSB text boxes. HSB values do not change the color, but how a color looks.

If known, enter the Hex # number in the text box. Hex numbers are normally used when a specific color has been created for a company logo or company name.

Click OK to close the Pick a Color dialog and save the color. The color appears as a fill in the selected object.

Open the Color page of the Area dialog.

Click on Add in Custom Palette and enter a name for the color in the Name dialog that opens.

Click OK to close the Name dialog and the color is added to the Custom palette.

Click OK to close the Area dialog. The new color is now available for use in other documents.

Adding fonts

LibreOffice supports PostScript (.pfb), TrueType (.ttf), and OpenType (.otf) font file formats. Other font formats are available and may be supported by the computer operating system. However, these font formats may be limited in character selection and quality.

Administration privileges are required to install additional fonts. After installation onto a computer operating system, any additional fonts are available for use by all modules in LibreOffice.

In addition to proprietary fonts from sources like Adobe, hundreds of free license fonts are available. Most free license fonts are available at no cost and can be used, shared, and edited. Many of these fonts are clones, or close variations of classic fonts, but several fonts are original fonts.

Many Linux distributions include some free license fonts in their package repositories. There are several places where free license fonts are available, for example, The League of Movable Type (https://www.theleagueofmoveabletype.com), Open Font Library (https://fontlibrary.org).

User interface variants

By default, commands and functions in LibreOffice are grouped in cascading menus with tools available on toolbars, called the Standard Toolbar user interface. Other user interface variants, are available, displaying contextual groups of commands and contents. With each LibreOffice module having different requirements, refer to the specific user guide for each LibreOffice module for a full description of user interface variants and how to use the user interface.

Figure 406: Select Your Preferred User Interface dialog

Select a preferred user interface variant as follows:

Open a LibreOffice module to change the user interface.

Go to View > User Interface on the Menu bar to open the Select Your Preferred User Interface dialog (Figure 406).

Select the preferred user interface from the options available in UI variants. A preview of the selected user interface is displayed in the dialog.

To use the selected user interface for all LibreOffice modules, click on Apply to All.

To only use the selected user interface for the LibreOffice module that is open, click on Apply to {Module}, for example Apply to Writer.

Click on Close to close the dialog.

Getting Started Guide 7.5

Appendix A,
Keyboard Shortcuts

Introduction

LibreOffice can be used without requiring a pointing device, such as a mouse or trackball, by using the keyboard shortcuts that are available in Draw. 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 using keyboard shortcuts. Although LibreOffice has an extensive set of keyboard shortcuts, each LibreOffice module has keyboard shortcuts that are specific to that module.

This appendix lists some of the more common keyboard shortcuts that apply to multiple components of LibreOffice. For shortcuts specific to Writer, Calc, Impress, Draw, Math, or Base, refer to the relevant user guide for each module, or search the LibreOffice Help.

To assist a user with identifying keyboard shortcuts, shortcuts are indicated by text next to menu items and in tooltips for some tools on toolbars. In Writer, for example, some commonly used keyboard shortcuts, for example, are as follows:

File > Open on the Menu bar includes text indicating that Ctrl+O (macOS ⌘+O) is a keyboard shortcut.

Align Left tool in the Formatting toolbar has a tooltip indicating that Ctrl+L (macOS ⌘+L) is a keyboard shortcut.

A list of the available keyboard shortcuts in LibreOffice can be found on the Keyboard page of the Customize dialog. Go to Tools > Customize on the Menu bar and click on Keyboard to open the Keyboard page. Examples of keyboard shortcuts for Linux/Windows see Figure 407 and for macOS see Figure 408.

Figure 407: Customize dialog — Keyboard page for Linux/Windows

Figure 408: Customize dialog — Keyboard page for macOS

Note

Some keyboard shortcuts listed may not be available if the computer operating system uses the same shortcuts as LibreOffice for other tasks. To resolve any conflicts, assign different keys to these shortcuts by reconfiguring either LibreOffice (see Chapter 13, Customizing LibreOffice), or the computer operating system (see operating system documentation or help).

LibreOffice assistive tools

In addition to keyboard shortcuts, LibreOffice supports some assistive technology tools like screen magnification software, screen readers, and on-screen keyboards. Please note that except for the Windows platform, accessibility support relies on Java technology for communications with assistive technology tools. This means that the first program startup may take a few seconds longer, because the Java runtime environment has to be started as well.

The current list of supported assistive tools can be found on at https://wiki.documentfoundation.org/Accessibility.

macOS keyboard shortcuts

Some keystrokes and menu items are different on a macOS computer from those used in Windows or Linux computers. This due to the way the different operating systems work and the different types of keyboards used. Also, the labelling on the keyboards may vary depending on the age of the computer and style of keyboard being used.

Tables 16, 17 and 18 show the most common variations in keyboard shortcuts and keyboard labelling. Table 19 shows examples of using macOS keyboard shortcuts. For more information on keyboard shortcuts, see LibreOffice Help.

Table 16: Shift, Control and Alt keys

Windows or Linux	macOS
Control or Ctrl	⌘ or Cmd or Command
Alt	⌥ or Option or Alt
Shift or ⇧	Shift or ⇧
Caps Lock	⇪ or Caps Lock
Control or Ctrl	⌃ or Control or Ctrl

Table 17: Home and End keys

Windows or Linux	macOS
Home	Fn+Left Arrow
End	Fn+Right Arrow

Table 18: Page Up and Page Down

Windows or Linux	macOS
Screen Up	Fn+Up Arrow
Page Up	⌥ or Option or Alt+Fn+Up Arrow
Screen Down	Fn+Down Arrow
Page Down	⌥ or Option or Alt+Fn+Down Arrow

Table 19: Example of using macOS keyboard shortcuts

Windows or Linux	macOS equivalent	Effect
Tools > Options	LibreOffice > Preferences	Access setup options
Right-click	Control+click or right‑click depending on computer setup	Opens a context menu
Ctrl (Control)	⌘ (Command)	Used with other keys
Alt	⌥ (Option) or Alt, depending on keyboard	Used with other keys
F11	⌘+T	Open Styles deck in Sidebar

Note

Actual keys available on a macOS keyboard depend on the type of keyboard being used. For example, a macOS laptop keyboard does not have a Delete key, but a macOS keyboard with a numeric keypad does have a Delete key.

Keyboard shortcuts

Note

In computers using macOS, some keyboard shortcuts are not available and these unavailable keyboard shortcuts are indicated in the following tables with a blank cell.

Some of the shortcut keys may be assigned to the computer operating system and are not available for LibreOffice. Either assign different keys in LibreOffice using Tools > Customize > Keyboard on the Menu bar, or in the computer operating system. For more information, see Chapter 13, Customizing LibreOffice or the documentation/help for the computer operating system.

Using keyboard shortcuts

LibreOffice functions can be used by using keyboard shortcuts. For example, the Ctrl+O (macOS ⌘+O) keyboard shortcut is shown next to Open in the File menu on the Menu bar. To use this keyboard shortcut, press and hold down the Ctrl (macOS ⌘) key and then press the O key. Release both keys together after the dialog opens.

Opening menus and menu items

Table 20: Keyboard shortcuts for opening menus and menu items

Windows Linux	macOS	Effect
Alt+<?> (Windows only)	Opens a menu where <?> is an underlined character of the menu being opened. For example, Alt+F opens the File menu. When a menu is opened, there may be submenu items with underlined characters. Press the underlined character directly to carry out the action or option. Where two menu items have the same underlined character, press the character key again to move to the next menu item. Menu items that have no underlined character have to be clicked on directly.
Esc	Esc	Closes an open menu.
F6	Repeatedly pressing F6 switches the focus through the following objects: Menu bar. Every toolbar from top to bottom and from left to right. Every free window from left to right. Document.
F6	Repeatedly pressing F6 switches the focus through the following objects: Each toolbar from top to bottom and from left to right. Sidebar. Document.
Shift+F6	Shift+F6	Switches focus through objects in the opposite direction.
Ctrl+F6	⌘+F6	Switches the focus to the document.
F10	Switches focus to the Menu bar and back.

Accessing menu commands

Press Alt, F6, or F10 to select the first item on the Menu bar (normally the File menu). In macOS, selection is the first tool on the Standard toolbar and this tool is normally New.

Press the right, or left arrow, to move the selection right, or left.

Press the Home key (macOS Fn+left arrow) or End key (macOS Fn+right arrow) to move menu selection to the first or last item on the Menu bar.

Press the down, or up arrow, to move the selection down, or up, the list of menu commands.

If necessary, press the right arrow to open any submenus on the selected menu. Submenus are indicated by a triangle ► or chevron > next to the name of a selected menu item.

If necessary, press the down, or up, arrow to move the selection down or up the list of submenu commands.

If necessary, press the left arrow to close a submenu.

Press Enter to run the selected menu, or submenu command.

Accessing toolbar commands

Press F6 repeatedly until the first icon on a toolbar is selected.

On a horizontal toolbar, press the right or left arrows to move tool selection to the right or left.

On a vertical toolbar, press the up or down arrows to move tool selection upward or downward.

Press the Home key (macOS Fn+left arrow) or End key (macOS Fn+right arrow) to move tool selection to the first or last tool on a toolbar.

Press Enter to action the selected tool on the toolbar.

To insert an object into a drawing or presentation after selecting the required object on the Drawing toolbar, use the key combination Ctrl+Enter (macOS ⌘+Enter) to insert the object in the center of the drawing page or slide.

Note

If a tool on a toolbar has an editable text field, for example Load URL or Line Width, the Tab or Shift+Tab keys are then used to move the selection right or left onto the next tool on the toolbar.

Navigation

Navigate through a document using keyboard shortcuts as shown in Table 21.

Table 21: Keyboard shortcuts for navigation

Windows Linux	macOS	Effect
Left Arrow	Left Arrow	Moves the cursor one character to the left.
Shift+Left Arrow	Shift+Left Arrow	Moves the cursor one character to the left and selects the character.
Ctrl+Left Arrow	⌥+Left Arrow	Moves the cursor to the beginning of the previous word.
Right Arrow	Right Arrow	Moves the cursor one character to the right.
Shift+Right Arrow	Shift+Right Arrow	Moves the cursor one character to the right and selects the character.
Ctrl+Right Arrow	⌥+Right Arrow	Moves the cursor to the beginning of the next word.
Up Arrow	Up Arrow	Moves the cursor up one line.
Shift+Up Arrow	Shift+Up Arrow	Moves the cursor up one line in the text and selects the lines of text.
Ctrl+Up Arrow	⌥+Up Arrow	Moves the cursor to the beginning of the paragraph.
Down Arrow	Down Arrow	Moves the cursor down one line.
Ctrl+Down Arrow	⌘+Down Arrow	Moves the cursor to the end of the paragraph.
Ctrl+Shift+Down Arrow	⌥+Shift+Down Arrow	Moves the cursor to the end of the paragraph. Selects the text in the paragraph from the cursor position to the end of the paragraph.
Home	Fn+Left Arrow or Ctrl+A	Moves the cursor to the beginning of the current line.
Shift+Home	Moves the cursor to the beginning of the line and selects the text from the cursor position.
Ctrl+Home	⌘+Up Arrow	Moves the cursor to the beginning of the document.
End	Fn+Right Arrow or Ctrl+E	Moves the cursor to the end of the current line.
Shift+End	Moves the cursor to the end of the line and selects the text from the cursor position.
Ctrl+End	⌘+Down Arrow	Moves the cursor to the end of the document.
Page Up	Fn+Up Arrow	Scrolls up one page.
Ctrl+Page Up	⌘+Fn+Up Arrow	Moves the cursor to the header.
Page Down	Fn+Down Arrow	Scrolls down one page.
Ctrl+Page Down	⌘+Fn+Down Arrow	Moves the cursor to the footer.

Text selection and deletion

Select and delete text using keyboard shortcuts as follows:

Select text while moving the cursor, hold down the Shift key as the cursor is moved.

Double‑click on a word with the cursor to select the word.

Triple‑click in a sentence with the cursor to select the whole of the sentence.

Click four times in a paragraph with the cursor to select the whole of the paragraph.

Select all of the text or objects in a document, use Ctrl+A (macOS ⌘+A).

Use Ctrl+Delete to delete everything from the cursor position to the end of the word.

Use Ctrl+Backspace to delete everything from the cursor position to the beginning of the word.

For macOS, use ⌘+Delete (if the keyboard has a Delete key) to delete everything from the cursor position to the end of the word.

For macOS, use ⌘+Backspace to delete everything from the cursor position to the beginning of the line.

Controlling dialogs

When opening any dialog, one element or option is highlighted indicating that the element or option has focus on it. For example, a button, option field, entry in a list box, or checkbox. How the element or option is highlighted depends on the computer operating system and how the computer is setup.

Table 22: Keyboard shortcuts for controlling dialogs

Shortcut Keys	Result
Enter	Activates selected button. When no button is selected, Enter is equivalent to clicking OK.
Esc	Closes dialog without saving any changes made while the dialog was open. Esc is also equivalent to clicking Cancel. When a drop-down list is open and selected, Esc closes the list.
Spacebar	Checks or clears an empty checkbox.
Up or Down Arrow	Moves focus up or down a list. Increases or decreases value of a variable. Moves focus vertically within a section of dialog.
Left or Right Arrow	Moves focus horizontally within a section of a dialog.
Tab	Advances focus to the next section or element of a dialog.
Shift+Tab	Returns focus to the previous section or element in a dialog.
Alt+Down Arrow (macOS ⌥+Down Arrow)	Shows items in a drop-down list.

Controlling documents and windows

The keyboard shortcuts for controlling documents and windows in LibreOffice are shown in Table 23.

Table 23: Keyboard shortcuts for controlling documents and windows

Windows Linux	macOS	Effect
Ctrl+O	⌘+O	Opens the Open dialog to select and open a document.
Ctrl+S	⌘+S	Saves the current document. If the document is a previously unsaved file, the shortcut opens the Save As dialog.
Ctrl+N	⌘+N	Creates a new document.
Shift+Ctrl+N	⌘+Shift+N	Opens the Templates dialog.
Ctrl+P	⌘+P	Opens the Print dialog to print the document.
Ctrl+F	⌘+F	Opens the Find toolbar.
Ctrl+H	⌥+⌘+F	Opens the Find and Replace dialog.
Ctrl+Shift+F	Searches for the last entered search term.
Ctrl+Shift+J	Toggles the view between full-screen mode and normal mode in Writer or Calc.
Ctrl+Shift+R	⌘+Shift+R	Opens and closes the rulers.
F1	F1	Opens the LibreOffice Help contents in your default browser. If the local Help package is not installed, LibreOffice opens the online Help located at https://help.libreoffice.org.
Shift+F1	Shift+F1	Turns the cursor into a What’s This? question mark. Shows the tip for an item underneath the cursor. The shortcut does not work with the online help.
Shift+F2	Shift+F2	Turns on Extended Tips for the currently selected command, icon or control. The shortcut does not work with the online help.
Ctrl+Shift+F10	⌘+Shift+F10	Docks and undocks floating toolbars, Sidebar and Navigator.
Ctrl+F4 or Alt+F4	⌘+F4	Closes the current document. Closes LibreOffice when the last open document is closed.
Ctrl+Q	⌘+Q	Exits LibreOffice.

Editing or formatting documents

The keyboard shortcuts for editing and formatting documents in LibreOffice are shown in Table 24.

Table 24: Keyboard shortcuts for editing and formatting documents

Windows Linux	macOS	Effect
Enter	Enter	When an OLE object is selected, activates the software used to create the OLE object. When a drawing object is selected, activates text mode.
Ctrl+X	⌘+X	Cuts selected text or objects from a document and places them in the clipboard.
Ctrl+C	⌘+C	Copies selected text or objects and places them in the clipboard.
Ctrl+V	⌘+V	Places text or objects from the clipboard that have copied or cut into the document.
Ctrl+Alt+ Shift+V	⌘+⌥+Shift+V	Pastes unformatted text from the clipboard. The text is pasted using the format that exists at the insertion point.
Ctrl+Shift+V	⌘+Shift+V	Opens the Paste Special dialog.
Ctrl+A	⌘+A	Selects all text and objects in a document.
Ctrl+Z	⌘+Z	Undoes last action.
Ctrl+Y	⌘+Y	Redoes last action.
Ctrl+Shift+Y	⌘+Shift+Y	Repeats last command.
Ctrl+I	⌘+I	Applies the Italic attribute to selected characters and text.
Ctrl+B	⌘+B	Applies the Bold attribute to selected characters and text.
Ctrl+U	⌘+U	Applies the Underline attribute to selected characters and text.
Ctrl+M	⌘+M	Removes direct formatting from selected text or objects. This command is also available in Format > Clear Direct Formatting in the Menu bar.

Sidebar keyboard shortcuts

General

The general keyboard shortcuts for using the Sidebar in LibreOffice are shown in Table 25.

Table 25: General keyboard shortcuts for Sidebar

Windows Linux	macOS	Effect
Tab	Tab	Moves the focus in the Sidebar.
Shift+Tab	Shift+Tab	Moves the focus in the reverse direction in the Sidebar.
Shift+F10	Shift+F10	Opens a context menu for the selected element in the Sidebar.
Home	Fn+Left Arrow	Moves focus to first entry.
End	Fn+Right Arrow	Moves focus to last entry.
Up or Down Arrow	Up or Down Arrow	Moves the selection up or down and opens the panels in the selected deck.
Right Arrow	Right Arrow	Opens any sub-elements in the selected element.
Left Arrow	Left Arrow	Closes any sub-elements in the selected element.
Ctrl+Enter	⌘+Enter	Opens the Properties dialog for the selected element.

Gallery

The keyboard shortcuts for the Gallery on the Sidebar in LibreOffice are shown in Table 26.

Table 26: Keyboard shortcuts for the Gallery

Windows Linux	macOS	Effect
Ctrl+R	Opens the Enter Title dialog. Only themes added to LibreOffice can be renamed. Themes installed with LibreOffice cannot be renamed.
Ctrl+D	⌘+D	Deletes themes that have been added to LibreOffice. Themes installed with LibreOffice cannot be deleted.
Insert	Inserts a new theme into the Gallery and opens the Insert of New Theme dialog.
Ctrl+Shift+Insert	⌘+Shift+ Insert	Inserts the selected object as a linked object into the current document.
Ctrl+I	Ctrl+I	Inserts a copy of the selected object into the current document.
Ctrl+P Spacebar Enter	Ctrl+P Spacebar Enter	Switches between a view of a list of object previews and a selected object.

Database table keyboard shortcuts

The keyboard shortcuts for using a database table in LibreOffice are shown in Table 27.

Table 27: Keyboard shortcuts for a database table

Windows Linux	macOS	Effect
Ctrl+Shift+F4	⌘+Shift+F4	Opens and closes a database table in a document for editing.
Spacebar	Spacebar	Toggles row selection, except when the row is in edit mode.
Ctrl+ Spacebar	⌘+Spacebar	Toggles row selection.
Shift+ Spacebar	Shift+ Spacebar	Selects the current column.
Ctrl+Page Up	⌘+⌥ + Fn+ Up Arrow	Moves the cursor to the first row.
Ctrl+Page Down	⌘+⌥ + Fn+ Down Arrow	Moves the cursor to the last row.

Controlling macros

Keyboard shortcuts for controlling macros in LibreOffice are shown in Table 28. For more information on macros, see Chapter 11, Getting Started with Macros.

Table 28: Keyboard shortcuts for controlling macros

Windows Linux	macOS	Effect
Ctrl+*	⌘+*	Runs a macro field. The multiplication sign is only available on a numeric keypad.
Shift+Ctrl+Q	⌘+Ctrl+Q	Stops a running macro.

Entering Unicode numbers

Each character in LibreOffice can be entered into a document by typing its Unicode hexadecimal number and then the keyboard shortcut Ctrl+Alt+X (mac OS ⌘+⌥+X) to create the character. For example, to enter the copyright sign into text, type U+00A9 followed immediately by Ctrl+Alt+X (mac OS ⌘+⌥+X) and the copyright sign © appears at the cursor position in the text.

Note

Unicode hexadecimal numbers in the range U+0000 to U+0020 are not converted into characters using the keyboard shortcut Ctrl+Alt+X (mac OS ⌘+⌥+X).

Defining keyboard shortcuts

In addition to using the built-in keyboard shortcuts listed in this Appendix, custom keyboard shortcuts can be defined. For more information, see Chapter 13, Customizing LibreOffice.

To check if a keyboard shortcut is is already in use, open the Keyboard page in the Customize dialog and scroll though the listed keyboard shortcuts. Go to Tools > Customize on the Menu bar to open the Customize dialog.

Further reading

For help with keyboard shortcuts, or using LibreOffice with a keyboard only, search LibreOffice Help using the keywords “shortcut keys” or “accessibility”.

Getting Started Guide 7.5

Appendix B, Open Source, Open Standards, Open Document

Introduction

LibreOffice is a productivity suite that is compatible with other major office suites and available on a variety of platforms. It is open source software and therefore free to download, use, and distribute. If you are new to LibreOffice, this appendix will provide some information regarding its history, its community, and some of its technical specifications.

A short history of LibreOffice

The OpenOffice.org project began when Sun Microsystems released the source code (“blueprints”) for its StarOffice® software to the open source community on 13 October 2000. OpenOffice.org 1.0, the product, was released on 30 April 2002. Major updates to OpenOffice.org included version 2.0 in October 2005 and version 3.0 in October 2008. On 26 January 2010, Oracle Corporation acquired Sun Microsystems.

On 28 September 2010, the community of volunteers who develop and promote OpenOffice.org announced a major change in project structure. After ten years successful growth with Sun Microsystems as founding and principle sponsor, the project launched an independent foundation called The Document Foundation, to fulfill the promise of independence written in the original charter. This foundation is the cornerstone of a new ecosystem where individuals and organizations can contribute to and benefit from the availability of a truly free office suite.

Unable to acquire the trademarked OpenOffice.org name from Oracle Corporation, The Document Foundation named its product LibreOffice. Continuing the version numbers from OpenOffice.org, LibreOffice 3.3 was released in January 2011 and version 7.5 was released in February 2023.

In February 2012, The Document Foundation was incorporated in Berlin as a German Stiftung. You can read more about The Document Foundation at: www.documentfoundation.org.

The LibreOffice community

The Document Foundation’s mission is:

“...to facilitate the evolution of the OpenOffice.org Community into a new open, independent, and meritocratic organizational structure within the next few months. An independent Foundation is a better match to the values of our contributors, users, and supporters, and will enable a more effective, efficient, transparent, and inclusive Community. We will protect past investments by building on the solid achievements of our first decade, encourage wide participation in the Community, and co-ordinate activity across the Community.”

Some of our corporate supporters include GNOME Foundation, Google, Red Hat, and Collabora. Additionally, over 450,000 people from nearly every part of the globe have joined this project with the idea of creating the best possible office suite that all can use. This is the essence of an “open source” community!

With its open source software license, LibreOffice is key in the drive to provide an office suite that is available to anyone, anywhere, for commercial or personal use. The software has been translated into many languages and runs on all major operating systems. New functionality can be added in the form of extensions.

The LibreOffice community invites contributors in all areas, including translators, software developers, graphic artists, technical writers, editors, donors, and end-user support. Whatever you do best, you can make a difference in LibreOffice. The community operates internationally in all time zones and in many languages, linked through the internet at www.libreoffice.org and www.documentfoundation.org.

How is LibreOffice licensed?

LibreOffice is distributed under both the Mozilla Public License (MPL) 2.0 (www.libreoffice.org/about-us/licenses/) and the GNU Lesser General Public License (LGPL) 3.0+ (www.gnu.org/licenses/lgpl-3.0.en.html).

What is open source?

The four essential rights of open-source software are embodied within the Free Software Foundation family of the GNU General Public License (GPL):

The right to use the software for any purpose.

Freedom to redistribute the software for free or for a fee.

Access to the complete source code of the program (that is, the “blueprints”).

The right to modify any part of the source, or use portions of it in other programs.

The basic idea behind open source is very simple: when programmers can read, redistribute, and modify the source code for a piece of software, the software evolves. People improve it, people adapt it, people fix bugs.

For more information on Free and Open Source software, visit these websites:

Open Source Initiative (OSI): www.opensource.org.

Free Software Foundation (FSF): www.fsf.org.

What are open standards?

An open standard provides a means of doing something that is independent of manufacturer or vendor, thus enabling competing software programs to freely use the same file formats. HTML, XML, and ODF are examples of open standards for documents.

An open standard meets the following requirements:

It is well documented with the complete specification publicly available, either free or at a nominal charge.

It can be freely copied, distributed, and used. The intellectual property of the standard is made irrevocably available on a royalty-free basis.

It is standardized and maintained in an independent, open forum (also called “standards organization”) using an open process.

What is OpenDocument?

OpenDocument (ODF) is an XML-based file format for office documents (text documents, spreadsheets, drawings, presentations, and more), developed at OASIS (https://www.oasis-open.org/), an independent, international standards group. OpenDocument version 1.2 was adopted by the International Standards Organization and named ISO/IEC 26300:2015 standard. In December 2019, ODF 1.3 was approved as a committee specification.

Tip

https://www.iso.org/standard/66363.html, https://www.iso.org/standard/66375.html, and https://www.iso.org/standard/66376.htmll.

Unlike other file formats, ODF (ISO/IEC 26300:2015) is an open standard. It is publicly available, royalty-free, and without legal or other restrictions; therefore ODF files are not tied to a specific office suite and anybody can build a program that interprets these files. For this reason ODF is quickly becoming the preferred file format for government agencies, schools and other companies who prefer not to be too dependent on any one software supplier.

LibreOffice 7.5 saves documents in ODF 1.3 Extended by default. LibreOffice can also open and save in earlier versions of the ODF standard, as well as many other file formats, as summarized below.

For a full list of file formats that LibreOffice can read and write, see this Help page:

https://help.libreoffice.org/latest/en-US/text/shared/guide/convertfilters.html

OpenDocument filename extensions

The most common filename extensions used for OpenDocument documents are:

*.odt for word processing (text) documents

*.ods for spreadsheets

*.odp for presentations

*.odb for databases

*.odg for graphics (vector drawings)

*.odc for charts

*.odf for formulas (scientific formulas and equations)

Getting Started Guide Introduction to LibreOffice About this book: If you have never used LibreOffice before, or you want an introduction to all of its components, this book is for you. Anyone who wants to get up to speed quickly with LibreOffice will find this book valuable You may be new to office software, or you may be familiar with another office suite. This book introduces LibreOffice and its components: Writer (word processing)	Calc (spreadsheet)	Impress (presentations) Draw (vector Graphics)	Math (equation editor)	Base (database) It also covers features common to all components, including: Styles Templates Clip art galleries Macros Printing About the authors: This book was written by volunteers from the LibreOffice community. A PDF version of this book can be downloaded free from: https://documentation.libreoffice.org About LibreOffice: LibreOffice is the free, libre, and open source personal productivity suite from The Document Foundation.
It runs on Windows, macOS, and GNU/Linux. Support and documentation are free from our large, dedicated community of users, contributors, and developers. You too can get involved with volunteer work in many areas: development, quality assurance, documentation, translation, user support, and more. You can download the free Community release of LibreOffice from: https://libreoffice.org/download/ For commercial use: You are encouraged to work with a certified LibreOffice professional for your business needs, from deployment or conversion from other office suites, staff training, or custom development needs. For information on professional support services, https://www.libreoffice.org/get-help/professional-support/