LibreOffice GS76 GettingStarted

Download as pdf or txt
Download as pdf or txt
You are on page 1of 517

Copyright

This document is Copyright © 2024 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
Rob Thornton Vlada Slavitskaya Peter Schofield
Jean Hollis Weber B. Antonio Fernández Olivier Hallot
To previous editions
Skip Masonsmith flywire Nay Catina Dia-Schneebeli
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 January 2024. Based on LibreOffice 7.6 Community.
Other versions of LibreOffice may differ in appearance and functionality.

Documentation for LibreOffice is available at https://documentation.libreoffice.org/en/


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................................................................................................................................13
Where to get more help............................................................................................................13
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 7.6?................................................................................................20
Chapter 1, LibreOffice Basics.......................................................................................23
Installation and starting LibreOffice..........................................................................................24
Main LibreOffice window...........................................................................................................25
Working with documents...........................................................................................................33
Printing......................................................................................................................................38
Using Safe Mode......................................................................................................................49
Chapter 2, Getting Started with Writer.........................................................................51
What is Writer?.........................................................................................................................52
The Writer interface..................................................................................................................52
Changing document views........................................................................................................57
Working with documents...........................................................................................................57
Working with text......................................................................................................................59
Formatting text..........................................................................................................................69
Formatting pages......................................................................................................................77
Adding comments to a document.............................................................................................82
Using built-in language tools....................................................................................................83
Creating a table of contents......................................................................................................84
Creating indexes and bibliographies........................................................................................85
Using footnotes and endnotes..................................................................................................85
Inserting material from other documents..................................................................................86
Working with images (graphics)................................................................................................86
Working with tables...................................................................................................................86
Printing and exporting to PDF or EPUB...................................................................................87

Getting Started 7.6 | 3


Using mail merge......................................................................................................................87
Tracking changes to a document..............................................................................................87
Using fields...............................................................................................................................88
Linking and cross-referencing within a document....................................................................88
Using master documents..........................................................................................................90
Creating fill-in forms..................................................................................................................90
Using content controls..............................................................................................................90
Determining document accessibility.........................................................................................90
Chapter 3, Getting Started with Calc............................................................................91
What is Calc?............................................................................................................................92
Compatibility with other spreadsheet applications....................................................................92
Spreadsheets, sheets, and cells...............................................................................................93
Calc main window.....................................................................................................................93
Opening and importing a CSV file............................................................................................97
Saving spreadsheets................................................................................................................98
Importing external data – Web Query.....................................................................................101
Navigating within spreadsheets..............................................................................................102
Selecting items in a spreadsheet............................................................................................105
Working with columns and rows.............................................................................................106
Working with sheets................................................................................................................108
Viewing a spreadsheet............................................................................................................111
Entering data using the keyboard...........................................................................................113
Speeding up data entry...........................................................................................................117
Sharing content between sheets............................................................................................120
Validating cell contents...........................................................................................................120
Editing data.............................................................................................................................121
Formatting data.......................................................................................................................123
Using AutoFormat on cells......................................................................................................127
Using themes..........................................................................................................................128
Using conditional formatting...................................................................................................129
Filtering data...........................................................................................................................129
Cell protection.........................................................................................................................130
Sorting records.......................................................................................................................131
Cell comments........................................................................................................................132
Using formulas and functions.................................................................................................132
Analyzing data........................................................................................................................133
Pivot tables and pivot charts...................................................................................................133
Printing....................................................................................................................................134
Chapter 4, Working with Styles, Templates, and Hyperlinks...................................139
Introduction.............................................................................................................................140
Styles......................................................................................................................................140
Templates...............................................................................................................................151
Hyperlinks...............................................................................................................................158

4| Getting Started 7.6


Chapter 5, Working with Images and Graphics.........................................................163
Introduction.............................................................................................................................164
Images and graphics..............................................................................................................164
Editing images or graphics.....................................................................................................168
LibreOffice Gallery..................................................................................................................174
Creating image maps..............................................................................................................178
LibreOffice drawing tools........................................................................................................180
Grouping objects.....................................................................................................................182
Fontwork.................................................................................................................................184
Barcodes and QR codes.........................................................................................................187
Chapter 6, Getting Started with Impress....................................................................189
What is Impress?....................................................................................................................190
Starting Impress......................................................................................................................190
Main Impress window.............................................................................................................191
Workspace views....................................................................................................................197
Creating presentations............................................................................................................201
Adding and formatting text......................................................................................................207
Inserting images, tables, charts, or media..............................................................................216
Working with master slides.....................................................................................................221
Adding comments...................................................................................................................228
Printing handouts....................................................................................................................229
Creating a photo album..........................................................................................................232
Presentations (slide shows)....................................................................................................233
Chapter 7, Getting Started with Draw.........................................................................241
Introduction.............................................................................................................................242
Draw main window..................................................................................................................242
Drawing basic shapes.............................................................................................................246
Gluepoints and connectors.....................................................................................................254
Geometric shapes...................................................................................................................255
Adding and formatting text......................................................................................................258
Selecting objects.....................................................................................................................262
Positioning and adjusting objects...........................................................................................263
Grouping and combining multiple objects...............................................................................268
Inserting and exporting images..............................................................................................271
Working with 3D objects.........................................................................................................271
Working with layers.................................................................................................................272
Selecting colors......................................................................................................................273
Adding comments to a drawing..............................................................................................275
Chapter 8, Getting Started with Base.........................................................................277
Introduction.............................................................................................................................278
Planning a database...............................................................................................................279
Creating a new database with the Database Wizard..............................................................280
Creating database tables........................................................................................................282
Creating a database form.......................................................................................................292

Getting Started 7.6 | 5


Modifying a form.....................................................................................................................297
Entering data in a form...........................................................................................................309
Creating queries.....................................................................................................................312
Creating reports......................................................................................................................321
Accessing other data sources................................................................................................324
Using data sources in LibreOffice...........................................................................................326
Chapter 9, Getting Started with Math.........................................................................331
Introduction.............................................................................................................................332
Getting started........................................................................................................................332
Creating formulas...................................................................................................................334
Editing formulas......................................................................................................................338
Formula layout........................................................................................................................339
Changing formula appearance...............................................................................................345
Building a formula library........................................................................................................353
Formulas in Writer..................................................................................................................354
Formulas in Calc, Draw, and Impress.....................................................................................359
Customization.........................................................................................................................361
Exporting and Importing..........................................................................................................365
Chapter 10 Working with File Formats, Security, and Exporting.............................367
File formats.............................................................................................................................368
File formats for saving............................................................................................................370
Exporting files.........................................................................................................................371
EPUB format export (Writer only)...........................................................................................381
Creating HTML files................................................................................................................384
HTML files using Writer/Web..................................................................................................392
Emailing documents...............................................................................................................395
Files on remote servers..........................................................................................................396
Digital signatures....................................................................................................................397
Document properties..............................................................................................................400
Document classification..........................................................................................................404
User and personal data..........................................................................................................405
Redaction................................................................................................................................407
Password protection and OpenPGP encryption.....................................................................410
Chapter 11, Getting Started with Macros...................................................................415
Introduction.............................................................................................................................416
Your first macros.....................................................................................................................416
Creating a macro....................................................................................................................424
Limitations of the macro recorder...........................................................................................429
Macro organization.................................................................................................................429
How to run a macro................................................................................................................433
Using extensions....................................................................................................................435
Writing macros without the recorder.......................................................................................436
The ScriptForge library...........................................................................................................438
UNO Object Inspector.............................................................................................................439

6| Getting Started 7.6


Overview of Python, BeanShell, and JavaScript macros.......................................................441
Finding more information........................................................................................................446
Chapter 12, Configuring LibreOffice..........................................................................449
Introduction.............................................................................................................................450
LibreOffice options..................................................................................................................450
Loading and saving documents..............................................................................................466
Language settings..................................................................................................................472
Chart color options..................................................................................................................480
Internet options.......................................................................................................................481
AutoCorrect functions.............................................................................................................481
Chapter 13, Customizing LibreOffice.........................................................................483
Introduction.............................................................................................................................484
Menu customization................................................................................................................484
Toolbar customization.............................................................................................................488
Keyboard shortcuts.................................................................................................................491
Assigning macros...................................................................................................................494
Adding extensions..................................................................................................................494
Creating custom colors...........................................................................................................496
Adding fonts............................................................................................................................499
User interface variants............................................................................................................500
Appendix A, Keyboard Shortcuts...............................................................................501
Introduction.............................................................................................................................502
LibreOffice assistive tools.......................................................................................................503
macOS keyboard shortcuts....................................................................................................503
Keyboard shortcuts.................................................................................................................504
Sidebar keyboard shortcuts....................................................................................................510
Database table keyboard shortcuts........................................................................................510
Controlling macros..................................................................................................................511
Entering Unicode numbers.....................................................................................................511
Defining keyboard shortcuts...................................................................................................511
Further reading.......................................................................................................................512
Appendix B, Open Source, Open Standards, Open Document...............................513
Introduction.............................................................................................................................514
A short history of LibreOffice...................................................................................................514
The LibreOffice community.....................................................................................................514
How is LibreOffice licensed?..................................................................................................515
What is open source?.............................................................................................................515
What are open standards?.....................................................................................................515
What is OpenDocument?........................................................................................................515

Getting Started 7.6 | 7


Getting Started Guide 7.6

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.

10 | Preface
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.

Advantages of LibreOffice | 11
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 SP1 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.

12 | Preface
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
Functionality can be added to LibreOffice with extensions. 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.

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.

Where to get more help | 13


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.

14 | Preface
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
Answers to frequently asked questions
FAQs
https://wiki.documentfoundation.org/Faq
Free community support is provided by a network of experienced
Mailing lists users
https://www.libreoffice.org/get-help/mailing-lists/
Free community assistance is provided in a Question & Answer
Questions & Answers formatted web service. Search similar topics or open a new one in
and https://ask.libreoffice.org/en/questions
Knowledge Base 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.
The LibreOffice website in various languages
https://www.libreoffice.org/community/nlc/
Native language Mailing lists for native languages
support https://wiki.documentfoundation.org/Local_Mailing_Lists
Information about social networking
https://wiki.documentfoundation.org/Website/Web_Sites_services
Information about available accessibility options.
Accessibility options
https://www.libreoffice.org/get-help/accessibility/
Another forum that provides support for LibreOffice, among other
OpenOffice Forum
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/.

Where to get more help | 15


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:
1) On Linux and Windows operating systems, go to Tools > Options > LibreOffice >
General on the Menu bar to open the dialog for general options.
2) On a Mac operating system, go to LibreOffice > Preferences > LibreOffice > General
on the Menu bar to open the dialog for general options.
3) Select Use LibreOffice dialogs in Open/Save dialogs to display the LibreOffice dialogs
on a computer display, as shown in Figure 1.
4) Click OK to save the settings and close the dialog.

16 | Preface
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:
1) On Linux and Windows operating systems, go to Tools > Options > LibreOffice > View
on the Menu bar to open the dialog for view options.
2) On a Mac operating system, go to LibreOffice > Preferences > LibreOffice > View on
the Menu bar to open the dialog for view options.
3) In Icon Style, select a font from the options available in the drop-down list as shown in
Figure 2.
4) In Icon Size, select the required size from the drop-down lists for Toolbar, Notebookbar
and Sidebar, as shown in Figure 2.
5) 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

What you see may be different | 17


Using LibreOffice on macOS
LibreOffice 7.6 requires macOS 10.15 or newer to run.
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 LibreOffice > Preferences
Access to setup options
Menu bar on Menu bar
Ctrl+click and/or right-click
Right-click Opens a context menu
depending on computer setup
⌘ and/or Cmd or Command,
Ctrl or Control Used with other keys
depending on keyboard
⌥ and/or Alt or Option
Alt Used with other keys
depending on keyboard

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.
1) Tabbed page (not strictly speaking a control).
2) Radio buttons (only one can be selected at a time).
3) Checkbox (more than one can be selected at a time).
4) Spin box (click the up and down arrows to change the number shown in the adjacent text
box, or type in the text box).
5) Thumbnail or preview.
6) Drop-down list from which to select an item.
7) 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.

18 | Preface
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.

Frequently asked questions | 19


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 7.6?


The LibreOffice Release Notes are available at this link
https://wiki.documentfoundation.org/ReleaseNotes/7.6
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:
• The accessibility was moved to the Sidebar to allow easier usage.
• Added Spotlighting for used Paragraph and Character styles and highlighting for used
Direct Formatting in text.

20 | Preface
• Track changes for tables.
• Page number wizard in Insert menu for easy one-step insertion of the page number in the
header/footer.
• Support for drawing styles for shapes and comments in Calc spreadsheets.
• Sorting by color is now possible in spreadsheet's AutoFilter.
• Spreadsheet's Import Text dialog (as CSV file or as Unformatted Text) have a new option
to not detect number in scientific notation. This option is only available if "Detect special
numbers" is off.
• Import and export of theme definition for OOXML format
• Added support for multicolor gradients
• Documents in the Start Center can now be pinned to show them at the beginning of the
recently opened document list

What is new in LibreOffice 7.6? | 21


Getting Started Guide 7.6

Chapter 1,
LibreOffice Basics
Installation and starting LibreOffice
Installation
When LibreOffice is installed, the process is different depending on your operating system. Refer
to the manufacturer’s information if necessary. After LibreOffice is installed, it will add the
following items to your computer depending on the 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
New users should start with the LibreOffice Start Center, which will allow you to select individual
modules of LibreOffice or any previously opened files. The Center can be accessed by clicking
on LibreOffice in your Applications folder or clicking on the desktop icon (Figure 4). If you wish, a
LibreOffice module can be opened in the Center using one of the following methods:
• Clicking on the name of a LibreOffice module.

Figure 4: LibreOffice Start Center


• Clicking on a file that is displayed in the Start Center, which will activate the module
associated with that file.

24 | Chapter 1, LibreOffice Basics


• Selecting Templates in the Start Center and choosing a template for a new file, which will
open the LibreOffice module associated with that template.
• Selecting Open File, which will allow you to navigate to the chosen file’s location, select
it, then click on the Open button to open the file and the applicable LibreOffice module.
• Select Remote File, which will open the Remote Files file browser and allow you to
navigate to the file location, select it, then click on the Open button. When you open the
file, LibreOffice will also open 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.

TIP
To pin a document in the Start Center so it can be always visible, hover the
corresponding document and click on the pin icon in the top left corner. The
selected document will then be shown in a separate line at the beginning of the
list, along with other pinned documents.

Note
A LibreOffice module will become active if you double-click the filename of an
ODF document in a folder, or file browser. The document opens in the appropriate
LibreOffice module. For more information on opening files, see “Opening existing
documents” on page 37.

Closing LibreOffice
There are multiple methods for closing LibreOffice:

Windows and Linux


• Go to File > Exit LibreOffice on the Menu bar.
• Use the keyboard shortcut Ctrl+Q.
• If only one LibreOffice document is open, click on the X on the right of the title bar to
close the entire application.

macOS
• Go to LibreOffice > Quit LibreOffice on the Menu bar.
• 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


Each LibreOffice module’s user interface is based on the main LibreOffice window. Each module
has various details depending on the module’s functions.

Main LibreOffice window | 25


Every module has the Title bar, Menu bar, and Standard toolbar at the top of the window and the
Status bar at the bottom of the window, while the tools and information vary between each
LibreOffice module.

Note
By default, LibreOffice commands are grouped in the Standard Toolbar user
interface. Other user interface variants are available.. 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 and it shows the file name of the
current document. When a document is created the document name will be Untitled X, where X
is a number. New 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 desktop in macOS. When selecting one of the menus in the Menu bar, a
specific submenu will appear. They feature commands that can do one of these commands:
• Directly cause an action, for example File > Close or Save.
• Open a dialog. Any command that opens a dialog has three dots following that command,
for example: the command Edit > Find and Replace… on the Menu bar will open a
dialog.
• Open another submenu. Any command that opens yet another submenu has a right-
pointing chevron ˃ that follows the command’s name. Moving the mouse’s arrow over
one of these commands opens another submenu that contains additional commands, for
example View > Rulers > Rulers, or Vertical Rulers.
• Contains keyboard shortcuts for some commands.
For example, the default Menu bar for LibreOffice Writer contains these menu items:
File
Lists commands that apply to the entire document, for example Open, Save, and Print.
Edit
Has commands for editing a document, including Undo, Find and Replace, Cut, Copy,
Paste, and Track Changes.
View
Lists commands that control how a document is displayed, such as User Interface,
Toolbars, Text Boundaries, Rulers, and Zoom.
Insert
Has commands that insert elements into a document, for example Image, Comment,
Header and Footer, and Table of Contents and Index.
Format
Lists commands that are used to format a document’s layout.
Styles
Has commands that handle type styles. It includes commands that apply common styles
and manage styles as well as commands for editing, loading, and creating styles.

26 | Chapter 1, LibreOffice Basics


Table
Lists commands that allow you to insert and edit tables with text.
Form
Has commands that create fill-in forms.
Tools
Lists Writer functions that handle specific tasks, including Spelling, AutoCorrect,
Customize, and Options.
Window
Has commands that affect the display window.
Help
Links to the LibreOffice Help, What’s This?, and information about LibreOffice.

Toolbars
LibreOffice’s toolbars can be in one of two states: docked and floating. A docked toolbar is
attached to the document’s main window, while floating toolbars are independent of the main
window and can be moved anywhere on your screen.
In the default LibreOffice installation, the Standard toolbar is docked at the top of the window
across all of the LibreOffice modules and the second toolbar is in a docked to the top of the
window. The second toolbar changes depending on which LibreOffice module is open. For
example, if Writer or Calc are opened, the second docked toolbar is the Formatting toolbar.
Usually, the module’s second toolbar is context-sensitive and usually its set of tools change
depending on which object is selected. So when a graphic object is selected in Writer, the
Drawing Object Properties toolbar, which provides tools for formatting graphics, replaces the
Formatting toolbar. When you deselect the graphic object, 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. All active toolbars have a check-mark next to their name.
To close a toolbar, you can either:
• Go to View > Toolbars on the Menu bar and deselect the toolbar, or
• Right-click in an empty space between the icons on a toolbar and select Close Toolbar
from the context menu.

Note
The View menu does not include floating toolbars that were created from tool
palettes, but they are displayed in the LibreOffice window.

Main LibreOffice window | 27


Submenus and tool palettes
If a toolbar item has submenus, there will be a small triangle ▼ to the right of the tool’s icon.
Clicking on the triangle will display 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 5: Example of creating floating sub-toolbar from a tool palette


1) Click on Basic Shapes on the Drawing toolbar to open the tool palette.
2) Click on the toolbar handle (highlighted in Figure 5) and drag the tool palette onto the
open document.
3) 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


If you want to lock all toolbars into place, which will prevent all toolbars from being moved, select
View > Toolbars on the Menu bar and select Lock Toolbars on the submenu. LibreOffice has to
be restarted to lock all toolbars. If the command Lock Toolbars has a check mark next to it, all
toolbars will be locked.
To unlock all toolbars and allow all toolbars to be repositioned, or turned into floating toolbars, go
to View > Toolbars on the Menu bar and select Lock Toolbars on the submenu. To finish
unlocking all toolbars, LibreOffice has to be restarted to complete this task. Once you have
finished unlocking the toolbars, the check mark will removed from the command Lock Toolbars.
However, if you 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


If a toolbars is docked and not locked, it will have a toolbar handle at the left end of the toolbar.
This dotted toolbar handle is highlighted in Figure 6. This handle is used to control the location of
the toolbar.

28 | Chapter 1, LibreOffice Basics


Figure 6: Example of toolbar handles
1) Move the cursor over the toolbar handle (the small vertical bar of dots to the left of a
docked toolbar). The cursor will change shape to the moving shape used by the computer
system.
2) Click on the toolbar handle and drag the toolbar to a new docked position, or create a
floating toolbar, then release the toolbar. When the toolbar becomes a floating toolbar, the
toolbar handle disappears.
To move a floating toolbar, use 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 drop the toolbar.
• Select the toolbar title bar and drag the toolbar into a location in which it can be docked.
You can dock a toolbar at the top, the left side, and the bottom of the main window.
• Select the downward triangle ▼ on the toolbar title bar, then 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
When you are moving a toolbar into a docked location, LibreOffice will indicate
that the toolbar is in a docked position when you see a hashed border around the
toolbar. Once the 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. For example:
• 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
To customize a toolbar, you can add tools listed in Visible Buttons, or add new tools to a toolbar.
Also, you can access the customization options for a toolbar by right-clicking in an empty space
on a docked toolbar or clicking on the downward triangle ▼ on the title bar of a floating toolbar to
open a context menu:
• To open the Customize dialog an add more tools to the toolbar, select Customize
Toolbar. If you need more information on customization, see Chapter 13, Customizing
LibreOffice.
• To dock the selected floating toolbar in its default position, select Dock Toolbar. The
toolbar can be moved to a different docked position.

Main LibreOffice window | 29


• To dock all floating toolbars in their default positions, select Dock All Toolbars. The
toolbars can be moved to different docked positions.
• To lock a docked toolbar into its docked position, select Lock Toolbar Position.
• To close the selected toolbar, click on the X on the right of the toolbar title bar or select
Close Toolbar.
• Finally, you can 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, which provide quick access to many menu functions, can be opened by right-
clicking on a paragraph, graphic, or other object. When a context menu is opened, 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 also include 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.
The Impress Status bar is shown in Figure 7 and it has the following components:
Slide number
The slide number currently displayed in the Impress Workspace and the total number of
slides in the presentation.
Information area
Changes depending on the object selected on the current Impress 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

30 | Chapter 1, LibreOffice Basics


Figure 7: The Impress Status bar
1) Slide number 5) Object size 9) Fit slide
2) Information area 6) Unsaved changes 10) Zoom slide
3) Master slide 7) Digital signature 11) Zoom percentage
4) Cursor position 8) Text language
Master slide
The master slide associated with the slide or notes pages in the Workspace. You can
right-click this area to view a list of available master slides in Impress. If necessary you
can select a master slide and apply it to the current slide. Double-click to open the
Available Master Slides dialog.
Cursor position/Object size
Shows different information depending on which Impress objects are selected or not:
– When no object is selected, Impress displays the current position (X and Y
coordinates) of the cursor.
– When an object is selected and being resized, this area of the Impress Status bar
shows the size of the object (width and height).
– If an object is currently selected in Impress, 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 these areas opens the Position and Size
dialog.
Unsaved changes
Indicates if there are any unsaved changes in the Impress 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 Impress presentation has a digital signature.
Text language
Indicates the language used for any text in an Impress presentation.
Fit slide
When this icon is selected, the displayed slide in the Impress Workspace zooms to fit in
the Workspace.
Zoom slider
When this slider is moved, the slide displayed in the Impress Workspace will adjusts how
the document is viewed (by percentage) in the Workspace.

Main LibreOffice window | 31


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

Sidebar
By default, the Sidebar is on the right side of a LibreOffice module’s Workspace. An example of
the Writer Sidebar is shown in Figure 8. Go to View > Sidebar on the Menu bar to display or hide
the Sidebar.
The Sidebar contains several decks and each deck contains tools and options for formatting a
document. The number and type of decks used in the Sidebar depend on the type of document
and the current LibreOffice module. Decks are organized into panels and an icon bar on the right
side of the Sidebar allows switching between the different decks.

Figure 8: Example of Properties deck in Writer Sidebar


For all LibreOffice modules, each Sidebar contains Properties, Styles, Gallery, and Navigator
decks. Some LibreOffice modules also have additional decks:
Page and Style Inspector for Writer
Master Slides, Animation, Shapes, and Slide Transition for Impress
Shapes for Draw
Functions for Calc
In LibreOffice, menus, toolbars, and Sidebar panels share many functions across modules. For
example, text can be made bold or italic with 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 options available on the Sidebar, see the
guides for each LibreOffice module.

32 | Chapter 1, LibreOffice Basics


To hide the Sidebar, click on Hide/Show button on the left of the Sidebar (highlighted in
Figure 8). To show the Sidebar, click on the Hide/Show button again.
To undock the Sidebar and make it floating, do the following:
1) Click on Sidebar Settings at the top right, do the Sidebar.
2) Select Undock from the options available, or use the keyboard shortcut
Ctrl+Shift+F10 (macOS ⌘+Shift+F10).
To dock the Sidebar into its usual position on the main window, do the following:
1) Click on Sidebar Settings at the top right of the Sidebar.
2) Select Dock from the options available, or use the keyboard shortcut Ctrl+Shift+F10
(macOS ⌘+Shift+F10).

Working with documents


New documents
LibreOffice has multiple methods for creating a new document:
• Open the LibreOffice Start Center then click on the name of a LibreOffice module. 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 LibreOffice module
opens with a new document.
• 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 that context menu. 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 by the LibreOffice
module. For example, if Writer is open and active, this icon will create a new Writer
document.
• 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


To open an existing LibreOffice document in the appropriate module, use one of the following
methods. .
• Click Open File in the Start Center and select the file.
• Go to File > Open on the Menu bar and select the file.
• Click on Open on the Standard toolbar and select the file.
• Use the keyboard shortcut Ctrl+O (macOS ⌘+O) and select the file.
• Click Recent Documents in the Start Center and select a recent file from the Center.

Working with documents | 33


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

Notes
Note that the previous names or locations of files that have been renamed or
relocated may still be in the Start Center, and clicking on those types of filenames
will generate an error. 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.
When you are selecting a LibreOffice file from the Start Center, Open dialog, or
file browser you can limit the files seen by file type. For example, you select Text
Documents as the file type, only documents that Writer can open are displayed.
If you need to work with files on remote servers, see Chapter 10, Working with
File Formats, Security, and Exporting.
Also, LibreOffice can open files compatible with the Open Document Format
(ODF), which includes many formats from Microsoft. For example, LO can open
MS Word files (*.doc or *.docx) in Writer, MS Excel files (*.xls or *.xlsx) can be
opened in Calc; MS PowerPoint files (*.ppt or *.pptx) can be 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
LibreOffice documents can be saved with one of the following methods:
• Save — can 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 — can 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 — can 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 — can 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.

34 | Chapter 1, LibreOffice Basics


Saving documents automatically
If you need LibreOffice to save files automatically, you can use the AutoRecovery function. When
files are saved automatically, LibreOffice will overwrite the last saved state of the file. To set up
automatic file saving, do the following:
1) Go to Tools > Options > Load/Save > General (macOS LibreOffice > Preferences >
Load/Save > General) on the Menu bar.
2) In Save, select the option AutoRecovery information every and set the time interval in the
box, for example 10 minutes.
3) Click OK to save the selection and close the dialog.

Using the Navigator


The Navigator is available as a dialog or Sidebar deck, and it lists all objects contained in a
document in categories. Examples can be seen in examples from Impress and Writer (Figure 9
and Figure 11). The Navigator can be opened with 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.

Figure 9: Example of Impress Navigator dialog


The Navigator provides an easy method of locating and selecting objects in a document. If
possible you should give each object an easily identified name so you can easily locate an
object, instead of using 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.

Working with documents | 35


Figure 10: Example of separate windows list

Figure 11: Example of Navigator deck in Writer Sidebar

Displaying multiple view of a document


Users can open multiple views of the same document in LibreOffice. Each view can be displayed
in their own windows and LibreOffice can show different pages, use different zoom levels, or use
other settings. When a user makes a change to the document in one window, it will be 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 open
window, the filename of the document will be displayed in the title bar. Figure 10 shows how
separate views of one document can be open at the same time. If other LibreOffice documents
are open at the same time, the LibreOffice windows list also includes these other documents and
the active window has a check mark by its filename. You can 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).

36 | Chapter 1, LibreOffice Basics


Undoing and redoing changes
Undoing
To undo the most recent change in a document, use one of these 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. LibreOffice can select multiple consecutive undo
commands and redo them 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
If you reload a document in LibreOffice, all the changes made in an editing session after the last
save are discarded. To reload a document, go to File > Reload on the Menu bar.

Note
If you reload a document, a confirmation dialog will open and warn the user that
reloading will discards the last unsaved changes.

Closing documents
Close a LibreOffice document with 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 to be closed is the only document that is 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.

Working with documents | 37


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
Here are examples of how to setup a default printer on a computer in LibreOffice. The method
will vary depending on the computer and its operating system.

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
1) Open Settings, then go to Devices > Printers & scanners.
2) Select a printer from the displayed list.
3) Select Manage > Set as default and then close Settings.

Linux
1) Open Settings, then go to Printers.
2) Select a printer from the displayed list.
3) Click on the settings icon on the right of the printer name.
4) Select Use Printer by Default from the drop-down list and close Settings.

macOS
1) Open System Settings, then open Printers & Scanners.
2) In Default printer select the printer to use as default printer from the drop-down list, then
close Settings.

Figure 12: Draw Standard toolbar with Print Directly installed

Quick printing
LibreOffice can do “quick printing,” which prints an entire open document is printed using the
computer’s default printer. To quick print, click on Print Directly on the Standard toolbar.
If Print Directly is not visible on the Standard toolbar, it can be installed as follows:
1) Right-click in a blank area on the Standard toolbar to open a context menu.

38 | Chapter 1, LibreOffice Basics


2) Select Visible Buttons from the context menu.
3) Select Print Directly from the list of available tools to install it on the Standard toolbar, as
shown by the highlighted example in Figure 12.

Printer setup
LibreOffice’s Printer Setup dialog has the following options:
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.

Here is an example of setting up a printer on a computer for LibreOffice:


1) Connect the printer to the computer. Refer to the printer and computer user guides for
more information on connecting printers.
2) Go to File > Printer Settings on the Menu bar to open a Printer Setup dialog. Figure 13
shows an example of a Printer Setup dialog.
3) Click on Options in Printer Setup dialog to open the Printer Options dialog. Figure 14
shows an example of a Printer Options dialog.
4) Select the required printer options, then click on OK to save the selection and close the
Printer Options dialog.

Printing | 39
Figure 13: Example of a Printer Setup dialog

Figure 14: Example of Printer Options dialog


5) If necessary, click on Properties in the Printer Setup dialog to open a properties dialog
for the default printer.
6) Select the required properties, then click on OK to save the selection and close the
properties dialog.
7) Click OK to save the printer setup and close the Printer Setup Dialog.

40 | Chapter 1, LibreOffice Basics


LibreOffice printing options
General printing options
After you install a printer on a computer, the general printing options for LibreOffice can be
customized. Go to Tools > Options > LibreOffice > Print (macOS LibreOffice > Preferences >
LibreOffice > Print) to open the Options LibreOffice Print dialog (Figure 15). 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 15: 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.

Printing | 41
Note
Reducing the amount of data sent by LibreOffice 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 by LibreOffice as bitmaps and sent to the printer.
Depending on bitmap size and the print resolution, a large amount of data may be
generated.

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


To open the printing options dialog for each LibreOffice module, go to Tools > Options >
LibreOffice module name > Print (macOS LibreOffice > Preferences > LibreOffice module
name > Print). 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.

42 | Chapter 1, LibreOffice Basics


Table 4: Print options in LibreOffice modules
Feature Writer Calc Impress Draw Math
Select pages, sheets, or slides
Yes Yes Yes Yes Yes
to print
Print multiple pages, sheets, or
Yes Yes Yes Yes No
slides on one page
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
Yes Yes No No No
printing

Controlling printing
For more control over printing, open the Print dialog with 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


These printing options are available in the Impress Print dialog’s General page for Windows or
Linux (Figure 16).
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.
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.

Printing | 43
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.

Figure 16: Impress Print dialog — Impress General page — Windows or Linux
Page Layout
Paper size
Select the paper size to use from the 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 17).

44 | Chapter 1, LibreOffice Basics


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
If the printer selected is capable of color printing, this selection can be switched off to print
the presentation in monochrome.
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
Allows you to select which paper tray to use from a drop-down list (if the printer has
more than one paper tray).
Media Type
Select the paper type that has been loaded into the paper tray from the drop-down list ,
(for example Envelope, Photo, Plain Paper).
Quality
Select the required level of printing quality.
Layout
Pages per sheet
Select how many slides are printed on one sheet of paper rom the drop-down list.
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
Determine how a multi-page document will be bound from a drop-down list: 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.

Printing | 45
Figure 17: Print dialog — Impress General page — macOS
Paper Handling
Collate sheets
Allows selected multiple printed copies to be 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
Selects 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
Only available if Scale to fit paper size has been selected. Selects a paper size from
the options available in the included drop-down list.
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.

46 | Chapter 1, LibreOffice Basics


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 for:
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 in the correct order to form a booklet or
brochure. Below are some examples. Actual brochure printing procedure depends on the
computer operating system and type of printer being used. You may need to experiment to find
the correct method for brochure printing.

Single sided printing


This is an example of how you can create a brochure or booklet with a printer that can only print
single sided pages.
1) 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.
2) 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.
3) 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.
4) Click OK to close the properties dialog and return to the Print dialog.
5) In Range and Copies, select All Slides. A minimum of four slides is required to create a
brochure.
6) In Range and Copies, select the Number of copies required to match the required
number of brochures.
7) In Layout, select Brochure.
8) In Range and Copies, select Even slides option in Include.
9) Click OK to print the even slides in the presentation.
10) 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.
11) In Range and Copies, select Odd slides option in Include.
12) In Range and Copies, select the same Number of copies used for printing the even
slides.
13) Click OK to print the odd slides in the presentation and close the Print dialog.
14) Assemble the brochures and bind them, if necessary.

Printing | 47
Double sided or duplex printing
Printing a brochure with a printer that is capable of double sided, or duplex printing, makes the
task of creating brochures simpler.
1) 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.
2) 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.
3) 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). Page orientation is especially important for brochures.
4) Click OK to close the properties dialog and return to the Print dialog.
5) In Range and Copies, select All Slides. A minimum of four slides is required to create a
brochure.
6) 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.
7) In Range and Copies, select the Number of copies required to match the required
number of brochures.
8) In Range and Copies, select the Collate option. This option is only active when printing
multiple copies of the same document.
9) In Layout, select Brochure.
10) Click OK to close to the Print dialog and print the required number of pages for the
brochures.
11) If necessary, bind the brochures to match either long edge or short edge binding.

Figure 18: Print Preview toolbar

Print previewing
A document can be previewed before it is printed in the Writer and Calc modules. 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:
1) Open Print Preview using one of the following methods. The Print Preview toolbar
(Figure 18) 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).
2) Select the required preview from Single Page Preview, Two Pages Preview, Book
Preview, or Multiple Pages Preview.

48 | Chapter 1, LibreOffice Basics


3) 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).
4) 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 mode, the document cannot be edited. If
necessary, 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 restore LibreOffice after it has stopped working, fails to launch correctly, or
a file has become corrupted. It starts LibreOffice with a fresh user profile and disables hardware
acceleration.
Go to Help > Restart in Safe Mode on the Menu bar to open the Safe Mode dialog (Figure 19).

Note
It is recommended to use Safe Mode options from the top down (Figure 19)
because the options get more extreme from the top down.

Restore from backup


If you suspect that the problems were caused by recent changes to LibreOffice’s working
state, this option may help you. Since LibreOffice keeps backups of previous
configurations and activated extensions, Restore from backup will allow you to restore the
user configuration, installed extensions (or both), to a previous known working state.
Configure
This Safe Mode option disables either all user extensions, hardware acceleration, or both
functions. This may help you if there are crashes on startup or visual glitches that are
often related to hardware acceleration.
Extensions
If you think that a corrupted extension is blocking or causing LibreOffice to crash, this
option will 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, this function will reset the settings and user interface modifications
(or the entire user profile) back to factory defaults.
Reset settings and user interface modifications
This function resets any user interface and configuration changes, but keeps items such
as personal dictionary, templates, and so on.
Reset entire user profile
This function erases all customized options and returns a user profile to the factory
default state.

Using Safe Mode | 49


Continue in Safe Mode
If you need to continue in Safe Mode, it allows you to work in LibreOffice with a temporary
profile that was created on startup. Any extensions or configuration options set up
previously have to be reconfigured before using. Keep in mind that any changes made to
the temporary user profile are lost after a restart.

Figure 19: Safe Mode dialog


Restart in Normal Mode
If you have started Safe Mode 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.
Advanced can allow you to create a zip file of a corrupted user profile, and this
file can be uploaded to the bug tracking system for further investigation by the
LibreOffice developers. Remember that an uploaded user profile may also contain
sensitive information such as installed extensions, personal dictionaries, and
user-specific settings.

50 | Chapter 1, LibreOffice Basics


Getting Started Guide 7.6

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

52 | Chapter 2, Getting Started with Writer


Figure 20: 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 21: Writer Status bar, left end

Figure 22: 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.

The Writer interface | 53


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 A block of text can be selected.
(Alt+Shift+F8)
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.

54 | Chapter 2, Getting Started with Writer


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 23). 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 23: 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, Manage Changes, and Accessibility Check. 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.

The Writer interface | 55


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, create new gallery themes, or add a new image to the new category,
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 67 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.

56 | Chapter 2, Getting Started with Writer


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.
Accessibility Check deck: Lists accessibility issues found in the document. Each entry in this
deck represents an accessibility problem and to jump to the location of the problem, double-click
on that particular entry. More information about this deck can be found in the Writers Guide
(Chapter 7, Printing and Publishing).

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:

Working with documents | 57


1) 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.
2) Then choose File > Save As.
3) 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.
4) 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 24).
• 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.

58 | Chapter 2, Getting Started with Writer


Figure 24: 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 25), 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 25: 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 26) using the mouse:
1) Select the first piece of text.
2) Hold down the Ctrl key and use the mouse to select the next piece of text.

Working with text | 59


3) Repeat as often as needed.
To select non-consecutive items using the keyboard:
1) Select the first piece of text.
2) Press Shift+F8. This puts Writer in “Adding selection” mode.
3) 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.
4) 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 26: 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 27: Selection icon


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

Figure 28: Selecting a vertical block of text

60 | Chapter 2, Getting Started with Writer


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 29, 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.

Working with text | 61


Figure 29: 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 30), 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.
1) Type the text you want to find in the Find box.
2) To replace the text with different text, type the new text in the Replace box.
3) You can select various options such as matching the case or matching whole words only.
4) 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).
5) 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.

62 | Chapter 2, Getting Started with Writer


Figure 30: 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 31). You can
also open the Special Characters dialog (Figure 32) by clicking the More Characters
button.

Figure 31: Insert Special Characters icon in the standard toolbar


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

Working with text | 63


Figure 32: The Special Characters dialog
The Special Characters dialog (Figure 32) 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.

64 | Chapter 2, Getting Started with Writer


– 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 75.
At any time, you can right-click on an unrecognized word to open a context menu (Figure 33),
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
34).

Figure 33: 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.

Working with text | 65


Figure 34: 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 92 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.

66 | Chapter 2, Getting Started with Writer


Figure 35: 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 34). 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.

Working with text | 67


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:
1) Type the text into your document, then select the text.
2) Choose Tools > AutoText on the Menu bar (or press Ctrl+F3).
3) In the AutoText dialog (Figure 36), type a name for the AutoText in the Name box. Writer
will suggest a one-letter shortcut, which you can change.
4) Choose the category for the AutoText entry, for example My AutoText.
5) 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.
6) Click Close to return to your document.
To insert AutoText, type the shortcut and press F3.

68 | Chapter 2, Getting Started with Writer


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.

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

Figure 36: Creating an AutoText entry

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.

Formatting text | 69
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 37.

Figure 37: 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

70 | Chapter 2, Getting Started with Writer


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.

Formatting text | 71
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 38).

72 | Chapter 2, Getting Started with Writer


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 38: 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.

Formatting text | 73
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.

74 | Chapter 2, Getting Started with Writer


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 39: 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 40: 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:
1) 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.
2) On the Paragraph Style dialog (Figure 41), go to the Text Flow tab.
3) 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.

Formatting text | 75
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 41: 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 42: 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.

76 | Chapter 2, Getting Started with Writer


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 43), and then click on the + sign.

Figure 43: 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 44).
Alternatively, you can choose Insert > Header and Footer > Header > Default Page Style (or
some other page style, if not Default Page Style).

Formatting pages | 77
Figure 44: 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 44 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 45: 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:

78 | Chapter 2, Getting Started with Writer


1) Choose File > Properties. On the Description tab, type a title for your document, and
click the OK button.
2) Place the cursor in the header area at the top of the page.
3) 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:
1) Insert a header or footer as described in “Creating headers and footers” on page 86.
2) Place the cursor in the header or footer where you want the page number to appear and
choose Insert > Page Number.
3) 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”):
1) Type the word “page” and a space, then insert the page number as above.
2) 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.
1) Choose Format > Paragraph.
2) On the Text Flow tab of the Paragraph dialog (Figure 41 on page 85), select Insert in the
Breaks area, and then select With page style and specify the page style to use.
3) 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.

Formatting pages | 79
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:


1) 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.
2) 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 46 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.

80 | Chapter 2, Getting Started with Writer


Figure 46: Moving the margins
To change margins using the Page Style dialog:
1) Right-click anywhere in the text area on the page and select Page Style in the context
menu.
2) 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:
1) On the Sidebar, open the Page deck.
2) 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:
1) Choose Format > Watermark.
2) In the Watermark dialog (Figure 47), 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.

Formatting pages | 81
Figure 47: 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 48 shows an example of
text with comments from two different authors.

82 | Chapter 2, Getting Started with Writer


Figure 48: 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 built-in language tools | 83


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:

84 | Chapter 2, Getting Started with Writer


1) 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.
2) Place the cursor where you want the table of contents to appear.
3) Choose Insert > Table of Contents and Index > Table of Contents, Index or
Bibliography.
4) 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.

Using footnotes and endnotes | 85


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

86 | Chapter 2, Getting Started with Writer


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 91.
1) Open the document and choose Edit > Track Changes > Record before starting to edit.
2) 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.

Tracking changes to a document | 87


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


Writer provides three ways to manage references within a document: hyperlinks, cross-
references, and bookmarks
• Hyperlinks: Refers the user or the document to specific files. A hyperlink can direct the
user to a URL that is opened with the default browser or allow the document to open files
from a filesystem. Additional information on hyperlinks is available in the Writer Guide
and Chapter 4, Working with Styles, Templates, and Hyperlinks.
• Cross-references: Uses fields to manage the automatic numbering of figures, tables,
headings, and other elements; and a wide range of other functions. See the Writer Guide
for details.
• Bookmarks: Allows users to move quickly between different parts of a document. You can
cross-reference to bookmarks and create hyperlinks to bookmarks, as described in the
Writer Guide.
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:
1) In the document, place the cursor where you want the cross-reference to appear.

88 | Chapter 2, Getting Started with Writer


2) If the Fields dialog is not open, click Insert > Cross-reference. On the Cross-references
tab (Figure 49), in the Type list, select the type of item to be referenced (for example,
Headings or Figure).
3) 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 49: The Cross-references tab of the Fields dialog


4) 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).
5) 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:
1) Select the text you want to bookmark. Click Insert > Bookmark.
2) 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.

Linking and cross-referencing within a document | 89


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.

Determining document accessibility


Writer can analyze a document and determine whether it has accessibility problems. To obtain
this information, open the Status bar and click on the Accessibility Check deck in the Status bar.
For more information about accessibility, go to Chapter 7 of the Writer Guide.

90 | Chapter 2, Getting Started with Writer


Getting Started Guide 7.6

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 discover results.
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 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.

92 | Chapter 3, Getting Started with Calc


Spreadsheets, sheets, and cells
Calc uses spreadsheets, which consist of a number of individual sheets. Each sheet contains
cells arranged in rows and columns, and each 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 50). 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 50: 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.

Calc main window | 93


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. If you are using the macOS, go to
LibreOffice > Preferences > Application Colors.
Show Formula (Ctrl+`) – when active, Calc shows formulas instead of calculated
results.

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

Formula bar
The Formula Bar (Figure 51) 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 51: Formula Bar


From left to right, the Formula Bar includes the following:
Name Box – displays 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 jump to a specific type a cell
reference in the Name Box. 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 52).

94 | Chapter 3, Getting Started with Calc


Figure 52: 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 53 and 54) 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 53: Calc Status bar (left)

Figure 54: Calc Status bar (right)

Calc main window | 95


The Status bar can allow you to do quick math operations on selected cells. 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 55).

Figure 55: Selecting math operations on Status bar

Sidebar
The Calc Sidebar (View > Sidebar or Ctrl+F5) is located on the right side of the window. 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.

96 | Chapter 3, Getting Started with Calc


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 alphabetic character beginning 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 51). 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, which are displayed as tabs at the bottom of
each spreadsheet window. Each new spreadsheet is created with one sheet named Sheet1.
When you create additional sheets, the 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 and importing a CSV file


A comma-separated values (CSV) spreadsheet is a file containing data in tabular format. In most
cases the contents is a download of a database table or query, which result in a text file in which
each line is a record in the table or query. The file stores data in a text format that separates cell
contents with a specific character that is called a “delimiter,” such as a comma or semicolon or
any other character (such as a vertical bar “|”). Before you open a CSV file in Calc, make sure
you know which character is the delimiter. Each line in a CSV text file represents a row in a
spreadsheet and data is stored in the following formats:
• Text is entered in quotation marks
• Numbers are entered without quotation marks
• Formulas begin with an equal sign (=)

Note
Most CSV files come from database tables, queries, or reports for further
calculations and charting.

To open a CSV file in Calc:


1) Choose File > Open on the Menu bar and locate the CSV file. Most CSV files have the
extension .csv but some CSV files may have a .txt extension.
2) Select the file and click Open.
3) On the Text Import dialog (Figure 56), 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.
4) Click OK to import the file.

Opening and importing a CSV file | 97


Figure 56: Text Import dialog

Caution
Know how your CSV file is formatted before you open it in Calc. Not knowing how
the CSV is structured 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 files in different formats


You can save a spreadsheet in another format:
1) Save the spreadsheet in Calc spreadsheet file format (*.ods).
2) Select File > Save As on the Menu bar to open the Save As dialog.
3) In the File name field, you can enter a new file name for the spreadsheet.
4) In the File type drop-down list, select the type of spreadsheet format you want to use.
5) 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.
6) Click Save.

98 | Chapter 3, Getting Started with Calc


When a spreadsheet file is saved in a format other than .ods, the Confirm File Format dialog
opens (Figure 57). 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 57: Confirm File Format dialog


If you select Text CSV format (*.csv) for your spreadsheet, the Export Text File dialog (Figure
58) opens. Here you can set the CSV format for your file, including the character set, the field
delimiter, and the string (text) delimiter.

Figure 58: 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 be in that format. For example, 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.

Saving spreadsheets | 99
Exporting values and formulas as a CSV file
Calc can export raw data and calculated data into a CSV file. Figure 59 contains an example of
data for export, and Figure 60 shows the resulting CSV file.
The steps to export are:
1) Click the sheet to be written as a CSV file.
2) Choose Tools > Options > LibreOffice Calc > View on the Menu bar.
3) Under Display, mark the Formulas check box. Click OK.
4) Choose File > Save as.
5) On the Save as dialog, select Text CSV in the File type field.
6) Enter a filename and click Save.
7) 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 59: Exporting raw and calculated values

Figure 60: CSV file containing raw and calculated values

Exporting contents as an image


If you need to export a range selection or a selected group of shapes (images) into a graphics
format, do the following
1) Select the cell range or the group of shapes, then select File > Export.
2) In the Export dialog, type a name for the image, select the graphics file format (PNG or
JPG or WebP), and mark the Selection checkbox.
3) Click Export or Save, as appropriate.
If necessary, Calc may give you additional options to configure the settings associated with the
graphics format.

100 | Chapter 3, Getting Started with Calc


Exporting a whole sheet as one page
If you need to view an entire sheet, Calc can export a sheet as a PDF in one page.
The steps to export the contents to one page:
1) From the Menu bar, select File > Export as PDF.
2) On the General tab of the PDF options dialog (Figure 61), select the option Whole sheet
export.
3) Click the Export button, and choose a location for the PDF.

Figure 61: Exporting sheets to PDF as one page

Importing external data – Web Query


Calc can import data from HTML linking to an external data source with web query. You can filter
or choose the table to import by HTML caption:
1) Position the cursor in the cell where you want the new content to be imported.
2) Choose Sheet > Link to External Data to open the External Data dialog (Figure 62).
3) 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.
4) 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 can be updated every n seconds.
These tables are now listed in the order they appear in the source. Click OK to finish.

Importing external data – Web Query | 101


Figure 62: Link to external data

Navigating within spreadsheets


Calc provides many ways to navigate within a spreadsheet, including methods for moving from
cell to cell and sheet to sheet.

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 colors 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 51 on page 109). Type the new cell reference and press Enter. Cell references
are case-insensitive.
Navigator: Press F5 to open the Navigator (Figure 63) 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.
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 119.
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: Use these keys to move the cell focus in the direction of the arrow pressed.
Home, End, Page Up, and Page Down keys perform the following actions:
– 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.

102 | Chapter 3, Getting Started with Calc


Figure 63: Calc Navigator

Sheet navigation
Each sheet in a spreadsheet is independent of the other sheets, though references can create
links between 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 multiple 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
64).
• Right-clicking on any of the arrows, or the +, opens a context menu where you can select
a sheet (Figure 65).

Figure 64: Navigating sheet tabs

Navigating within spreadsheets | 103


Figure 65: 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. To improve navigation, 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 how the Enter key moves the cell focus by going to Tools > Options >
LibreOffice Calc > General. Use the first two options under Input Settings (Figure 66) to change
the Enter key settings.

Figure 66: 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.

104 | Chapter 3, Getting Started with Calc


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 51 on page 109).
Range of contiguous cells
A range of cells can be selected using the keyboard or the mouse.
To select a range of cells with the mouse:
1) Click in a cell.
2) Press and hold down the left mouse button.
3) Move the mouse to highlight the desired block of cells, then release the mouse button.
To select a range of cells without using the mouse:
1) Click in the cell that is to be one corner of the range of cells.
2) Hold down the Shift key and click in the opposite corner cell of the block of cells.

Tip
You can choose a contiguous range of cells by selecting Selection mode field on
the Status bar (Figure 54 on page 110) and selecting Extending selection before
clicking in the opposite corner of the range of cells. Once you are done, 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:


1) Select the cell that will be one of the corners in the range of cells.
2) 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 51 on page 109). 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.

Selecting columns and rows


Single column or row
To select a single column, click on the column header (Figure 50 on page 108). To select
a single row, click on the row header.
Multiple columns or rows
To select multiple columns or rows that are contiguous:
1) Click on the first column or row in the group.
2) Hold down the Shift key.
3) Click the last column or row in the group.

Selecting items in a spreadsheet | 105


To select multiple columns or rows that are not contiguous:
1) Click on the first column or row in the group.
2) Hold down the Ctrl key.
3) 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 67), or use the key combination Ctrl+Shift+Space to select the
entire sheet, or use Edit > Select All on the Menu bar.

Figure 67: Select All box

Selecting sheets
If you want to make changes to many sheets at once you can select one or multiple sheets in
Calc.
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:
1) Click on the sheet tab for the first desired sheet.
2) Hold down the Shift key and click on the sheet tab for the last desired sheet.
3) 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:
1) Click on the sheet tab for the first desired sheet.
2) Hold down the Ctrl key and click on the sheet tab for the each additional desired sheet.
3) 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:
1) Select the location where you want the new column or row inserted.

106 | Chapter 3, Getting Started with Calc


2) 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:
1) Select a column or row where you want the new column or row inserted.
2) Right-click the column or row header.
3) Select Insert Columns Before, Insert Columns After, Insert Rows Above, or Insert
Rows Below in the context menu.
Multiple columns or rows
To insert multiple columns or rows can be inserted at once: .
1) 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.
2) Proceed as for inserting a single column or row above.

Hiding and showing columns and rows


To hide columns or rows:
1) Select the row or column you want to hide.
2) Go to Format on the Menu bar and select Rows or Columns.
3) 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:
1) Select the rows or columns on each side of the hidden row or column.
2) Go to Format on the Menu bar and select Rows or Columns.
3) 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


1) Select the columns or rows you want to delete.
2) 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
1) Select the cells you want to delete. Choose the Sheet > Delete Cells command, press
Ctrl+-, or right-click on a cell and select Delete in the context menu.
2) When the Delete Cells dialog (Figure 68) appears, select the appropriate items and click
OK.

Working with columns and rows | 107


Figure 68: Delete Cells dialog

Working with sheets


Inserting new sheets
If you need to insert a new sheet after the last sheet in a spreadsheet without opening the Insert
Sheet dialog window, click on the Add Sheet (+) icon next to the sheet tabs. After clicking on the
icon, the Insert Sheet dialog (Figure 69) appears. It allows you to 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 69: Insert Sheet dialog

Moving and copying sheets


If you need to move or copy sheets within the same spreadsheet, drag and drop the chosen
sheet or use the Move/Copy Sheet command. This command also allows you to move a sheet
into a different spreadsheet.

108 | Chapter 3, Getting Started with Calc


Tip
To copy a sheet within the current spreadsheet, use the Duplicate Sheet
command.

The Move/Copy Sheet command (Figure 70), allows you to determine where the new sheet will
be in the same or a different spreadsheet, where it will be in the spreadsheet, and decide what
the new sheet’s name will be.
1) In the current document, right-click on the sheet tab you wish to move or copy then select
Move or Copy Sheet in the context menu or choose Sheet > Move or Copy Sheet on
the Menu bar.
2) In the Action area, select Move to move the sheet or Copy to copy the sheet.

Figure 70: Move/Copy Sheet dialog


3) Select which spreadsheet where you want the sheet to be placed from the To document
drop-down list.
4) Choose the position in Insert before where you want to place the sheet.
5) Enter a name in the New name box if you want to rename the sheet after it is moved or
copied. If you do not enter a name, Calc creates a default name (Sheet2, Sheet3, ...).
6) Click Move or Copy to confirm the move or copy and close the dialog.

Caution
When you move or copy a spreadsheet into a new spreadsheet, a conflict may
occur with formulas linked to other sheets in the previous location.

Working with sheets | 109


Hiding and showing sheets
If you need to hide one or more sheets from viewing, right-click on the sheet tab and select Hide
Sheet from the context menu. To display hidden sheets, right-click any sheet tab and select
Show Sheet in the context menu to display a dialog with all hidden sheets listed. Select the
desired sheets to be revealed 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 not visible to users or printed when a spreadsheet is printed.
However, any hidden elements will be copied if you select the elements around
them. For example, if column B is hidden, it is copied when you select columns A
to C. If a hidden row or column is copied, you can reverse the process and show
the element.

Renaming sheets
Every time a new sheet is created, it is named Sheet X (where X is the number of the sheet as
counted by Calc). When Calc is started, the first sheet is named Sheet 1.
A sheet can be renamed with one of the following methods:
• Enter a new name in the Name text box when the new sheet using the Insert Sheet
dialog (Figure 69 on page 123).
• 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
A sheet’s name must start with either a letter or a number and 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 one sheet, perform one of the following actions:
Right-click on the tab of the sheet that you want to delete and select Delete Sheet in the context
menu
Go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.
If you need to delete multiple sheets, select all of the sheets (see “Selecting sheets” on page
121), then right-click on one of the tabs in the group and select Delete Sheet in the context
menu, or go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.

110 | Chapter 3, Getting Started with Calc


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


If you need to lock rows across the top of a spreadsheet or to lock columns on the left of a
spreadsheet, select those rows and use the Freeze command. Then the frozen rows and
columns will remain in view as you move around inside the spreadsheet.
In Figure 71, this sheet has frozen rows and columns from columns A through F and rows 1
through 3 which are outlined by heavy lines. The rows from 23 down and the columns between F
and Q are scrolled off the page.

Figure 71: Frozen rows and columns


To quickly freeze the first row and column, you can do the following:
Select the Freeze Rows and Columns icon on the Standard toolbar for both the first row and the
first column, or
Use the Freeze First Row and Freeze First Column for commands in the drop-down menu of
the Freeze Rows and Columns icon.
To freeze a set of rows or a set of columns (single or multiple):
1) Click on the header of the row below all of the rows that will be frozen or click on the
header of the column to the right of the columns where you want the freeze, then
2) Right-click and choose Freeze Rows and Columns from the drop-down 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):
1) 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.
2) 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, select the frozen rows and columns then use View > Freeze Rows
and Columns on the Menu bar, or click on the Freeze Rows and Columns icon on the
Standard toolbar. The heavy lines that indicate frozen rows and columns will disappear.

Viewing a spreadsheet | 111


Splitting the screen
Calc also allows you to view different sections of a spreadsheet simultaneously by splitting the
screen into separate sections. Each section provides you with a view of one part of the sheet.
The user can scroll through each section independently of the others. This feature is also known
as “splitting the window.” The screen can be split horizontally, vertically, or both at once (which
would give you up to four sections of the spreadsheet in view at one time). Figure 72 provides an
example of a spreadsheet split into two sections. The split is indicated by the dark grey line
separating window borders within the sheet.
This feature is especially useful when a large spreadsheet has one cell containing a number that
is used by three formulas in different cells. When you the split 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 72: Split screen example

Splitting horizontally or vertically


There are two ways to split a screen horizontally or vertically.
Method 1
To split only horizontally or only vertically:
1) Click on the row header below the place where you want to split the screen horizontally or
click on the column header to the right of the place where you want to split the screen
vertically.
2) 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 72.
To split the screen horizontally and vertically at the same time:
1) Click in the cell that is below the place where you want to split the screen horizontally and
immediately to the right of the place where you want to split the screen vertically.
2) Choose View > Split Window on the Menu bar.
Method 2
To split the screen horizontally, click on the thick black line at the top of the vertical scroll
bar (Figure 73) and drag the split line below the row where you want the horizontal split
positioned.
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.

112 | Chapter 3, Getting Started with Calc


Figure 73: 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 is done with 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, Calc right-aligns the numbers 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(1234). The negative number will be displayed as follows: –1234.

Leading zeroes
If a number is entered with leading zeroes (i.e. 01481), Calc will drop the leading zero by default.
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 two methods to add leading zeroes:
Method 1
1) Select the cell that will retain leading zeroes, then access the Format Cells dialog by
doing one of the following:
2) Right-click on the selected cell then choose Format Cells in the context menu
3) Go to Format > Cells on the Menu bar
4) Press Ctrl+1 to open the Format Cells dialog (Figure 74). Then select the Numbers tab
and select Number from the Category list.
5) Find the Options area and choose the Leading zeroes field, then enter the minimum
number of characters required within the selected cell. If you need four characters, enter
4. Any number less than four characters will have leading zeroes added, for example 12
becomes 0012.
6) Click OK. The number in the selected cell retains its number format and any formula used
in the spreadsheet will treat the entry as a number in formula functions.

Entering data using the keyboard | 113


Figure 74: Format Cells dialog – Numbers tab
Method 2
1) Select the cell.
2) On the Sidebar, go to the Properties deck.
3) In the Number Format panel (Figure 75), select Number in the drop-down list, and enter 4
in the Leading zeroes box. Formatting is applied immediately.

Figure 75: Set leading zeroes in Sidebar

Tip
To format numbers with decimal places and prevent a leading zero (for example,
“.019” instead of “0.019”), go to the Format code box then type a period or full
stop and add one or more question marks (“?”) For an example of this case, refer
to Figure 74. Each question mark represents a decimal place. For example, for 3
decimal places, type one period and three question marks [.???] and click OK.
Any number with only decimal places will then have no leading zero.

114 | Chapter 3, Getting Started with Calc


Tip
If a number does not need to be treated as numbers in calculations (for example
when entering zip codes), you can type an apostrophe (') before the number, i.e. “
'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
1) Select the cell which contains the number, right-click on the cell, and select Format Cells
from 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 74).Make sure the Numbers
tab is selected, then select Text in the Category list.
2) Click OK. The number is converted to text and, by default, left-aligned.
Method 2
1) Select the cell.
2) 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 75).
3) Select Text in the category drop-down list. Formatting is applied to the cell immediately.

Note
If a number has been formatted as text in a spreadsheet, it will be treated as a
zero by any formulas 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
To enter text in a cell, click in the cell and type. 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.
if you are entering several lines of text, extend the Input line by clicking on the Expand Formula
Bar icon, which is located on the right-hand end of the Formula bar, and then 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) and the time
format automatically changes to the selected format used by Calc.
To change the date or time format used by Calc:
1) With the cell selected, open the Format Cells dialog (Figure 74).
2) Make sure the Numbers tab is selected, then select Date or Time in the Category list.

Entering data using the keyboard | 115


3) Select the date or time format you want to use in the Format list. Click OK.

Cell fields
If you wish to insert a date, the sheet name, or the document name in a cell, do the following:
1) Select a cell and double-click to activate edit mode.
2) Right-click and select Insert Field > Date, or Sheet Name, or Document Title in the
context menu.
3) Other Date and Time buttons 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. It does not insert 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. For more information, refer to Chapter 2, Entering and
Editing Data, in the Calc Guide.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 automatic correction with what you want.
To change how AutoCorrect works (Figure 76), go to Tools > AutoCorrect Options on the Menu
bar:
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.

116 | Chapter 3, Getting Started with Calc


Figure 76: 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


Calc provides multiple tools for removing some of the drudgery from input. The most common
tool is to drag and drop the contents of one cell to another with a mouse. Other tools include
AutoInput, the Fill tool, selection lists, and the ability to input information into multiple sheets of
the same document. For more information, see below.

AutoInput tool
The AutoInput tool in Calc automatically completes entries, based on other entries in the same
column. By default, AutoInput is activated in Calc. To turn it off, go to Tools on the Menu bar and
deselect AutoInput. When AutoInput attempts to complete a cell entry for you, do the following:
1) If you agree with the suggestion, press Enter or F2 or click the left mouse button and
AutoInput will complete the cell entry for you.
2) If you wish to see how AutoInput would complete the entire column, use the key
combinations Ctrl+Tab to scroll forward, or Ctrl+Shift+Tab to scroll backward.
3) To see a list of all available AutoInput items for the current column, use the keyboard
combination Alt+Down Arrow.
If you are entering a formula that matches 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.

Speeding up data entry | 117


Filling cells
This tool allows you to duplicate existing content or create a series across a range of cells
(Figure 77) using one of three methods.

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.

Method 1
1) Select one or more cells that contain the contents you want to copy.
2) Drag the mouse pointer to copy the cell in any direction you desire or hold down the
Shift key and click in the last cell you want to fill.
Method 2
1) Select the cell containing the contents you want to copy or start the series from.
2) Move the mouse pointer over the small square in the bottom right corner of the selected
cell. The mouse pointer will change shape.
3) 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.
Method 3
1) Select one or more cells that contain the contents you want to copy.
2) 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
Ctrl+D is an alternative to selecting Sheet > Fill Cells > Fill Down on the Menu
bar.

Figure 77: Using the Fill tool

Using a fill series


When you select a series fill from Sheet > Fill Cells > Fill Series, the Fill Series dialog (Figure
78) opens. Here you can select the type of series you want.

118 | Chapter 3, Getting Started with Calc


Figure 78: 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:
1) Go to Tools > Options > LibreOffice Calc > Sort Lists to open the Sort Lists dialog
(Figure 79). This dialog shows the previously-defined series in the Lists box and the
contents of the highlighted list in the Entries box.
2) Click New and the Entries box is cleared.
3) Type the series for the new list in the Entries box (one entry per line).
4) Click Add and the new list will now appear in the Lists box.
Click OK to save the new list.

Filling text cells with selection lists


Selection lists are limited to using only text that has already been entered in the same column.
1) Select a blank cell in a column that contains cells with text entries.
2) Right-click and select Selection Lists in the context menu, or press Alt+Down Arrow. A
context menu appears listing any cell in the same column that either has at least one text
character or whose format is defined as text.
3) Click on the text entry you require and it is entered into the selected cell.

Speeding up data entry | 119


Figure 79: Sort Lists dialog

Sharing content between sheets


You might want to share 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.
1) Go to Edit > Select > Select Sheets on the Menu bar to open the Select Sheets dialog.
2) Select the individual sheets where you want the information to be repeated.
3) Click OK to select the sheets and the sheet tabs will change color.
4) 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 a spreadsheet, you may want to restrict users to entering data that is valid and
appropriate for the cell or prevent yourself from entering data that is either complex or rarely
used. Fill tools and Selection lists can handle some types of data, but are limited to predefined
information.

120 | Chapter 3, Getting Started with Calc


To add data validation to a cell, select that cell and use Data > Validity on the Menu bar to define
which types of contents that can be entered in the cell. The Validity tool can:
Define the range of contents that can be entered
Provide help messages explaining the content rules set up for the cell, and
Determine what happens if a user enters invalid content. You can 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
Calc has multiple tools for data editing, including the ability to delete data, replace data, and
change data.

Replacing data
To completely replace data in a cell, 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 51 on page
109), then double-click on the data to highlight it completely and type the new data.

Changing data
Calc can allow you 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


1) Click in the cell to select it.
2) Press F2 to switch the cell to edit mode. The cursor is placed at the end of the content in
the cell.
3) 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.
4) 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. If you are using macOS, select this option from
the Preferences menu. 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


1) 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.
2) 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.

Editing data | 121


3) 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:
1) Select the source cell or cell range and copy the data by pressing Ctrl+C or using Edit
> Copy on the Menu bar.
2) Select the target cell or cell range.
3) 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.
4) 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:
1) Select a cell or a cell range.
2) Go to Edit > Copy on the Menu bar, or press Ctrl+C, or right-click and select Copy in
the context menu.
3) Select the target cell or cell range.
4) 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 80).
5) 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, in the
Calc Guide.
6) Click OK to paste the data into the target cell or range of cells and close the dialog.

Figure 80: Paste Special dialog

122 | Chapter 3, Getting Started with Calc


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.

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

Deleting data and formatting


Data and cell formatting can be deleted from a cell at the same time. To do this:
1) Select a cell or a range of cells.
2) 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.
3) In the Delete Contents dialog (Figure 81), choose any of the options or Delete all.
4) Click OK.

Figure 81: Delete Contents dialog

Formatting data
Note
All the settings discussed here can 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.

Automatic wrapping
To automatically wrap multiple lines of text in a cell, use one of the following methods:
Method 1
1) Right-click on the cell and select Format Cells in the context menu to open the Format
Cells dialog.

Formatting data | 123


2) On the Alignment tab (Figure 82), under Properties, select Wrap text automatically and
click OK.

Figure 82: Format Cells dialog – Alignment tab


Method 2
1) Select the cell.
2) On the Properties deck of the Sidebar, open the Alignment panel (Figure 83).
3) Select the Wrap text option to apply the formatting immediately.

Figure 83: Wrap text formatting

Manual line breaks


To insert a manual line break 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 may need 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 82).

124 | Chapter 3, Getting Started with Calc


Merging cells
You can select contiguous cells and merge them into one large cell by:
1) Selecting the range of contiguous cells you want to merge.
2) Performing one of these steps:
3) Right-clicking on the selected cells and select Merge Cells in the context menu
4) Going to Format > Merge Cells > Merge Cells or Merge and Center Cells on the Menu
bar,
5) Clicking on the Merge and Center Cells icon on the Formatting toolbar. Using Merge
and Center Cells will center align any contents in the cells.
6) If the cells contain any data, a small dialog (Figure 84) 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 84: Merge choices for non-empty cells

Splitting cells
You can split a cell that was created from several cells by selecting a merged cell and doing the
following:
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
Calc allows you to apply number formats 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 74 on page 129):
• 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.

Formatting data | 125


• 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:


1) Select a cell or cell range.
2) Click the small triangle on the right of the Font Name box on the Formatting toolbar and
select a font in the , or use the Font Name box in the Character panel of the Properties
deck on the Sidebar.
3) 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.
4) 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.
5) 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.
6) 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.
7) To specify the language used in the cell: use the Font tab on the Format Cells dialog.
8) Use the Font Effects tab on the Format Cells dialog to set other font characteristics.

Formatting cell borders


If you want to format the borders of a cell or a group of cells, select them then 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.
To change 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.

126 | Chapter 3, Getting Started with Calc


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 doing one of the following:
Selecting Styles > New Style from Selection on the Menu bar
Clicking the New Style from Selection icon on the Styles deck of the Sidebar, or
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.

Using AutoFormat on cells


Using AutoFormat
You can use Calc’s AutoFormat feature to format a table (range of cells) quickly and easily. All
formatting applied is direct formatting.
1) Select the cells in at least three columns and rows, including column and row headers,
that you want to format.
2) Go to Format > AutoFormat Styles on the Menu bar to open the AutoFormat dialog
(Figure 85).
3) Select the type of format and format color in the list.
4) Select the formatting properties to be included in the AutoFormat style. Click OK.

Using AutoFormat on cells | 127


Figure 85: AutoFormat dialog

Defining a new AutoFormat


You can define a new AutoFormat so that it becomes available for use in all spreadsheets.
1) Format the data type, font, font size, cell borders, cell background, and so on for a range
of cells.
2) Select the range, of at least 4x4 cells.
3) Go to Format > AutoFormat Styles to open the AutoFormat dialog. Click Add.
4) In the Name box of the Add AutoFormat dialog that opens, type a meaningful name for
the new format.
5) 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
a common style from a table range in the spreadsheet and defining it as a new
AutoFormat.

Using themes
Calc comes with a predefined set of formatting themes (set of styles) that can be applied to
spreadsheets. You cannot add new themes to Calc, but you can modify a theme’s styles after the
theme is applied to the spreadsheet. All modified styles are only available for use in that
spreadsheet.
To apply a theme to a spreadsheet:
1) 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 86).
2) Select the theme that you want to apply. The theme styles are immediately visible on the
underlying spreadsheet.
3) Click OK.

128 | Chapter 3, Getting Started with Calc


6) 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 86: Theme Selection dialog

Using conditional formatting


Calc can change cell formats depending on user-specified conditions, and those conditions can
be imposed in a specified order. For example, a table can show all the values above a specific
average in green and all those below that average in red. Conditional formatting also allows you
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
When Calc filters values, it matches them against a list of conditions. If the value meets those
conditions, it is displayed on the spreadsheet. Calc provides three types of filters:
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.

Filtering data | 129


Setting up and using filters are explained in Chapter 2, Entering and Editing Data, in the Calc
Guide.

Cell protection
Cells can be password-protected to prevent unauthorized users from making changes to them.
Protected cells can optionally be hidden. Use the Cell Protection tab of the Format Cells dialog
(Figure 87) to set up cell protection and toggle the hidden status of protected cells.

Figure 87: Cell Protection tab in Format Cells dialog


Once have all desired cells have been flagged with either a protected or unprotected status:
1) 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 88).
2) Select Protect this sheet and the contents of protected cells.
3) Type a password and then confirm the password.
4) Select or deselect the user selection options for cells.
5) Click OK.

Figure 88: Protect Sheet dialog


Any cells that had been toggled as protected will no longer be editable by anyone that does not
have the password.

130 | Chapter 3, Getting Started with Calc


The protected sheet has a lock icon in its tab, as shown in Figure 89.

Figure 89: The lock icon in a protected sheet


Alternatively, the entire spreadsheet can be password-protected by selecting Tools > Protect
Spreadsheet Structure on the Menu bar. When this option is chosen, unauthorized users
cannot add, delete, move, or rename any sheets in the document.

Sorting records
When Calc sorts cells in a sheet, they are arranged by multiple user-specified criteria that are
sorted in a specified order. Sorts are useful when you are searching for a particular item and
become even more useful after you have filtered data.
Also, sorting allows you to add new information to the bottom of your spreadsheet then use a sort
to put the values in their proper order. 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 sorting records and the sorting options available, see Chapter 2,
Entering and Editing Data, in the Calc Guide.
To use the Sort dialog on cells in a spreadsheet:
1) Select the cells to be sorted.
2) Go to Data > Sort on the Menu bar, or click the Sort icon on the Standard toolbar, to
open the Sort dialog (Figure 90).

Figure 90: Sort dialog, Sort Criteria tab


3) On the Sort Criteria tab, select the sort criteria in the drop-down lists. The selected lists
are populated from the selected cells.
4) Select either ascending order (A-Z, 0-9) or descending order (Z-A, 9-0).
5) Adjust the settings as required on the Sort Criteria and Options tabs. For details, see the
Help or Chapter 2, Entering and Editing Data, in the Calc Guide.
6) Click OK and the sort is carried out on the spreadsheet.

Sorting records | 131


Cell comments
Users can also add comments to a cell or a specific set of cells. These comments are small
notes and text that provide extra information about the spreadsheet. They are not considered a
part of the spreadsheet for calculation or printing purposes, and will only appear when the user
hovers the mouse over the particular cell that has been commented.
You can insert a comment by:
Right-clicking on the desired cell and selecting Insert Comment in the context menu
Select Insert > Comment on the Menu bar
Use Ctrl+Alt+C, or
Click the Insert Comment icon on the Standard toolbar.
Cells that contain comments are marked with a red square in the upper right corner. By default,
comments will remain hidden and only appear when you hover the mouse over the cell (or cells)
that contain the comment. 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. Any cell can contain a formula. 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 using 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 choose from the many built-in Calc functions available.
When you search for a term in the Function Wizard, function descriptions are provided 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 allow you to enter the information required by that function and a result window will
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, including
Database, Date & Time, Financial, Information, Logical, Mathematical, Array, Statistical,
Spreadsheet, Text, and Add-in functions.

132 | Chapter 3, Getting Started with Calc


For a more in-depth introduction to formulas and the Function Wizard, see Chapter 8, Using
Formulas and Functions, in the Calc Guide.

Figure 91: Function Wizard

Analyzing data
Calc includes many tools to help you analyze information, including features for copying and
reusing data, for automatically creating subtotals, and other ways to vary information and 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, and they can help 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 these tools.

Pivot tables and pivot charts


One of the most useful tools for analyzing data is the pivot table, which allows you to organize,
manipulate, and summarize large amounts of data to make it much easier to read and
understand. They also allow you to answer different questions about a spreadsheet by
rearranging – or pivoting – the data in it, which includes the ability to view different summaries of
the source data, display the details of areas of interest, and create reports. You can also create a
pivot chart that allows you to view a graphical representation of the data in a pivot table.

Pivot tables and pivot charts | 133


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. Instead of manually calculating that amount by using the sorting
and formatting options, you could arrange a pivot table which makes 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, a pivot chart includes field buttons, which are graphical elements that allow you to filter
the content of the pivot table from within its pivot chart.
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 similar to printing from other LibreOffice components (see Chapter 1,
LibreOffice Basics), but some details in 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 can be used to print a specific part of the data and print 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:
1) Select the range of cells to be included in the print range.
2) Go to Format > Print Ranges > Define on the Menu bar. Automatic page break lines are
displayed on screen.
3) 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.

134 | Chapter 3, Getting Started with Calc


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.
1) After defining a print range, select an extra range of cells for adding to the print range.
2) 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.
3) 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:
1) Go to Format > Page Style on the Menu bar to open the Page Style dialog (Figure 92).
2) Select the Sheet tab and make your selections from the available options. Click OK.

Printing | 135
Figure 92: 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:
1) Go to Format > Print Ranges > Edit on the Menu bar to open the Edit Print Ranges
dialog (Figure 93).
2) 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 -.
3) 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 -.
4) Click OK.
For more information on editing print ranges, see Chapter 7, Printing, Exporting, E-mailing, and
Signing, in the Calc Guide.

Figure 93: Edit Print Ranges dialog

136 | Chapter 3, Getting Started with Calc


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:
1) Navigate to the cell where the page break will begin.
2) Go to Sheet > Insert Page Break on the Menu bar.
3) 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:
1) Navigate to a cell that is next to the break you want to remove.
2) Go to Sheet > Delete Page Break on the Menu bar.
3) 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 text that can be printed at the top or bottom of a page when a you print
a spreadsheet. 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:
1) Select the sheet that you want to set the header or footer for.
2) Go to Format > Page Style on the Menu bar to open the Page Style dialog (Figure 94)
and select the Header or Footer tab (Figure 94).
3) Select the Header on or Footer on option.
4) Select Same content on left and right pages if you want the same header or footer to
appear on all the printed pages.
5) 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.

Printing | 137
6) To change the appearance of the header or footer, click on More to open the Border /
Background dialog.
7) 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 94: Header tab of Page Style dialog

138 | Chapter 3, Getting Started with Calc


Getting Started Guide 7.6

Chapter 4,
Working with Styles,
Templates, and Hyperlinks
Using consistent formatting in documents
Introduction
To ensure formatting consistency in LibreOffice documents, users can control text and other
elements by using templates, styles and direct formatting. Direct formatting is also known as
manual formatting. Understanding how to format documents unlocks the power of LibreOffice.
Styles
A style in LibreOffice is a collection of formatting attributes that can be applied to text and
other objects. If text or object shares a style in LibreOffice, then that text or object shares
the chosen attributes of that style. For example, a paragraph style can include settings
such as font type and size, indents, spacing between lines, alignment on a page, and so
on.
All LibreOffice installations share a default set of styles that cannot be deleted, but can be
modified to suit the user’s formatting requirements. Also, new styles can be created and
these styles can be deleted.
Templates
A template is a document that allows users to generate new documents that has pre-
existing contents and a set of specific formatting styles, graphics, tables, objects, and so
on. 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. Then the command New >
Templates… can be used to create a new document with the same look and feel of that
template.
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 allows you to apply a set of common formatting elements to pages, text, frames, cells,
graphic objects, and so on. Each style has a name such as “Body Text” and “Document Title.”
Using styles can quickly change the format, or appearance, of selected elements.
If you do not use styles and manually format paragraphs, words, tables, page layouts, and other
elements in documents, this can increase user workload and introduce format errors into a
document. Styles provide consistency in documents. LibreOffice recommend the use of styles to
reduce the workload and increase the accuracy of producing good documents with ease.
Since LibreOffice styles may work differently from other office software programs, some planning
may be needed, but that effort will save time and effort over the longer term. Also, Writer relies on
heading styles (or other styles if specified) when compiling a table of contents.

140 | Chapter 4, Working with Styles, Templates, and Hyperlinks


Note
Manual formatting overrides any applied styles and once an element has been
formatted manually, it cannot be modified by a style. To remove direct formatting,
select the text, then right-click and select Clear Direct Formatting from the
context menu. Alternatively, use the keyboard shortcut Ctrl+M (macOS ⌘+M) to
clear direct formatting from selected text, or go to Format > Clear Direct
Formatting on the Menu bar.

Style categories
See Table 5 on which style categories are available for each module. For more information, see
the specific user guide for each LibreOffice module. All the styles are defined as:
Page styles
Controls margins, headers and footers, borders and backgrounds. In Calc, page styles
also define the sequence for printing sheets.
Paragraph styles
Controls all the formatting elements of a paragraph, such as text alignment, tab stops, line
spacing, and borders, and can include character formatting.
Character styles
Affects the formatting of text within a paragraph, such as the font and size of text, or
modifies elements such as bold and italic.
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

Styles | 141
Style types
See Table 6 on which style types are available for each module. For more information on styles,
see the user guide for that LibreOffice module. Generally, the LibreOffice style types are:
Hierarchical
Displays the styles in the selected category in a hierarchical list. To view the styles inside
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

142 | Chapter 4, Working with Styles, Templates, and Hyperlinks


Applying styles
LibreOffice provides several ways to select and apply styles, as seen below:test
• Select the Styles deck in the Sidebar.
• Use View > Styles on Menu bar.
• Select Styles on the Menu bar (Writer and Calc).
• Choose Set Paragraph Style on the Formatting toolbar (Writer).
• Select Apply Style on the Formatting toolbar (Calc).
• Right-click to bring up the context menu and select Character, Paragraph, or List
(Writer).
• Right-click to bring up the context menu and select Styles (Calc).
• Fill Format Mode in Styles deck on Sidebar (Writer and Calc).
• Keyboard shortcuts where available.

Styles deck on Sidebar


The Styles deck allows you to view all available styles for a document (Figure 95). To access the
deck, perform these steps:

Figure 95: Styles deck on Sidebar — Writer


1) Open the Styles deck on the Sidebar using one of the following methods:
– Go to View > Styles on the Menu bar.

Styles | 143
– 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.
2) To display a preview of styles in the Styles deck, select Show previews at the bottom of
the Styles deck.
3) 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 161 for more
information on available style categories for each LibreOffice module.
4) 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 162 for more information on
available style types for each LibreOffice module.
5) 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.

Splotlighting styles
LibreOffice Styles deck on the sidebar also provides a tool to spotlight paragraph and character
styles as well as direct formatting present in the document. The Spotlight tool is handy to assist in
housekeeping the document with respect to the styles in use and direct formatting. To enable the
spotlight feature proceed as follow:
1) Open the Styles deck on the Sidebar as indicated above.
2) Mark the Spotlight checkbox at the bottom of the Styles deck (Figure 95).
• The paragraph spotlight indicator is codified using numbers and colors displayed in the
left margin. They correspond to the numbers and colors displayed in the Styles deck.
• The character spotlight indicator is codified using number and colors displayed in a call-
out. They also correspond to the numbers and colors displayed in the Styles deck.
• Paragraphs with direct formatting are indicated by a hatch pattern in the Spotlight colored
indicators on the margin.

Figure 96: Spotlighting paragraphs and characters styles.

144 | Chapter 4, Working with Styles, Templates, and Hyperlinks


• Characters direct formatting are indicated by a call-out with string "df" next to the text
(Figure 96).

Note
Choose Format > Spotlight Character Direct Formatting to activate the
character direct formatting visual indicator.

Styles menu
The Styles menu is available in LibreOffice's Writer and Calc modules. It displays the default set
of styles available in the Styles deck on the Sidebar (Figure 97 for Writer and Figure 98 for Calc).
These styles are factory set and available in all LibreOffice installations.
1) Locate the text or element where the style will be applied. If necessary, select it.
2) Go to Styles on the Menu bar.
3) 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

Applying styles with the context menu


Writer
This module’s context menu can apply styles to selected text. Right-click on text to bring up the
context menu. Then select either Paragraph, Character, or List and choose the appropriate style
from a sub-context menu.

Calc
In this module, select cells, right-click to bring up the context menu, then select Styles to apply a
style to those cells.

Styles | 145
Formatting toolbar
Writer
If a paragraph style has been created and applied to text, the style name will appear in the Set
Paragraph Style drop-down list at the left-hand end of the Formatting toolbar.
1) Click in a paragraph to select that style.
2) Click on Set Paragraph Style on the Formatting toolbar to open the drop-down list.
3) Select the required paragraph style from the options available in the drop-down list to
apply it to the selected paragraph.

Calc
After a style has been created in Calc and applied to one or more cells, the style name appears
in the Apply Style drop-down list at the left-hand end of the Formatting toolbar.
1) Click in a cell to select it.
2) Click on Apply Style on the Formatting toolbar to open the drop-down list.
3) Select the required cell style from the options available in the drop-down list to apply it to
the selected cell.

Fill Format Mode


If you need to apply a style to multiple elements in the Writer and Calc modules without using the
Styles deck and double-clicking, the Fill Format Mode is available.
1) Open the Styles deck on the Sidebar and select the required style.
2) Click on Fill Format Mode at the top of the Styles deck and the cursor changes shape to
indicate Fill Format Mode.
3) Position the cursor on the element where a style is going to be applied.
4) 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.
5) Repeat step 4 until the style has been applied to all required elements.
6) To quit Fill Format Mode, click on Fill Format Mode again, or press the Esc key.

Keyboard shortcuts
In Writer, keyboard shortcuts can apply paragraph styles to selected paragraphs and also allow
users to perform some edits on styles, as shown in Table 98.
Table 7: Paragraph style and style editing keyboard shortcuts
Style name & editing function Windows & Linux macOS
Body Text 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

146 | Chapter 4, Working with Styles, Templates, and Hyperlinks


Creating new styles
Using a styles dialog
A style can be created with the Styles deck. For more information on creating styles, refer to the
guide for that LibreOffice module.
1) Open the Styles deck on the Sidebar.
2) 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.
3) 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.
4) Click on Organizer to open the Organizer page in the styles dialog.
5) In Name, enter a name for the new style.
6) For text documents paragraph styles only, select a style from the Next Style drop-down
list that will be available after you press Enter closing a paragraph.
7) 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.
8) 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.
9) 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.
10) 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 a selection


LibreOffice can use the format of selected text or a selected cell to create a new style. Styles
created with this method are only available in the document it was created. Also, those styles will
not be included in a template created from that document.
For more information on creating styles with this method, refer to the user guide for the
appropriate LibreOffice module.
1) Open the Styles deck on the Sidebar if it is not already open.
2) 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.
3) In the document, select the element to be used as a basis for a new style.
4) 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.

Styles | 147
5) In the New Style from Selection dialog, enter a name for the new style in Enter new style
name text box.
6) 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, users can create a style by dragging and dropping a selected element into the
Styles deck on the Sidebar. The new style is based on the formatting of the selected text or the
selected cell. To use this method, perform the following steps:
1) Open the Styles deck on the Sidebar.
2) Open the list of styles in the style category by clicking on the icon for the required style
category at the top of the Styles deck.
3) Select text or a cell in the open document, then drag and drop that element onto the
Styles deck on the Sidebar.
4) Open the New Style from Selection dialog and enter a name for the new style in Enter
new style name text box.
5) Click OK to create the new style in the selected style category and close the dialog. The
new style is based on the formatting of the selected element and it is placed in Custom
Styles.

Editing styles
When LibreOffice is installed onto a computer, a default set of styles is included. It provides a
starting point for creating documents with styles. These default styles cannot be deleted, but can
be edited to match the formatting requirements for documents.
All user-created styles can be edited or deleted. For more information on creating styles, see
“Creating new styles” on page 167.
Styles can be edited using one of the following methods:
• Dragging and dropping a formatted element into the Styles deck in the Sidebar.
• Select a formatted element and edit its style.
• Use AutoUpdate to edit paragraph and frame styles only.
• Add styles from another document or template into a document.

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


A style can be edited with the Styles dialog. For more information on editing styles in a module,
refer to the appropriate LibreOffice user guide.
1) Open the Styles deck on the Sidebar.

148 | Chapter 4, Working with Styles, Templates, and Hyperlinks


2) 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.
3) 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.
4) 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.
5) When changes are complete, click on OK to save the changes and close the dialog.

Set Paragraph Style or Apply Style


A style can also be edited with Set Paragraph Style for Writer or Apply Style for Calc on the
Formatting toolbar by performing the following steps:
1) Select a paragraph in Writer or a cell in Calc.

Figure 99: Paragraph Style dialog


2) On the Formatting toolbar, open a drop-down list of styles by clicking on the chevron ˅ or
triangle ▼ next to Set Paragraph Style for Writer or Apply Style for Calc.
3) 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).
4) Edit the selected style by using various options available on the dialog pages. Changes to
a style can be checked in the preview box on the dialog page.
5) When changes have been completed, click on OK to save the changes and close the
dialog.

Updating styles from selection


1) Open the Styles deck on the Sidebar.
2) Select the element that is formatted with the attributes of the desired style.
3) On the Styles deck, select the style that is going to be updated from the selection.

Styles | 149
4) 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
When the AutoUpdate option is selected on the Organizer page of the Paragraph Style, or
Frame Style dialog, a style is updated whenever you directly format a paragraph or frame that is
in that style. In Writer, AutoUpdate only applies to paragraph and frame styles. See the Writer
Guide for more information on AutoUpdate.

Renaming styles
In LibreOffice, only custom styles can be renamed.
1) Open the Styles deck on the Sidebar.
2) In the Styles drop-down list at the bottom of the Sidebar, select Custom Styles so you
can see any custom styles that are available in the document.
3) Select the style that is going to be renamed from the displayed list of custom styles.
4) 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.

5) Click on Organizer to open the Organizer page in the style dialog.


6) In the Name text box, enter a new name for the selected style.
7) Click on Apply to rename the selected style, then click OK to close the style dialog.

Deleting styles
Only custom styles can be deleted.
1) If not already open, open the Styles deck on the Sidebar.
2) 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.
3) 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.
4) Right-click on the selected style and select Delete from the context menu.
5) 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.

150 | Chapter 4, Working with Styles, Templates, and Hyperlinks


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 Writer or Calc. For more information on page styles, see the Writer
Guide and the Calc Guide. For example, you can create a style that is only applied to the first
page.
To create a new page style in Writer, do the following:
1) Open a new text document and open the Styles deck on the Sidebar.
2) Open the Page Styles panel and select Page Styles at the top of the Styles deck.
3) 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
4) Add the name of 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.
5) Right-click on the new page style in the Page Styles panel and select Modify from the
context to open the Page Style dialog.
6) Modify and format the page with the options available on the Page Style dialog.
7) Click OK to save the changes and close the Page Style dialog.
8) To apply the new page style, double-click on the required page style.

Templates
A template is a document that contains user-specified formatting styles, graphics, tables, objects,
and other information. LibreOffice can use a template to generate new documents with a
common content and a common format. For example, you can add the outline of a report and
also 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 report outline and styles.
All documents in LibreOffice are based on templates. The software has a number of predefined
templates that can be used to create different types of documents, including business letters,
presentations, or drawings. Templates can be created to suit your requirements. Also, templates
can be downloaded from the LibreOffice website using the following link:
https://extensions.libreoffice.org.
If a blank document is created in LibreOffice, then the software uses the appropriate LibreOffice
default template. If required, this default template can be replaced by a custom template to suit
user requirements, see “Setting default template” on page 174 for more information.

Custom LibreOffice templates


User-created templates are located in the My Templates folder and the next time LibreOffice is
started, those templates appear in the LibreOffice startup window and the Select a Template
dialog.

Templates | 151
Figure 100: Templates dialog

Creating new documents from a template


A new document can be created in the Templates dialog by doing these steps:
1) Open the Templates dialog (Figure 100) by:
– Select File > New > Templates on the Menu bar.
– Select 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.
2) Determine where to display the template and select the LibreOffice application and
template category in the Filter drop-down lists.
3) Generate a document with the template with one of the following methods:
– 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 a template
Any formatting element 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 and graphics can be added to a
template.

152 | Chapter 4, Working with Styles, Templates, and Hyperlinks


1) Open an existing document, or create a new document of the type required for a
template.
2) 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


3) Format any content added to the template requirements.
4) Create, or modify, any styles required for the new template.
5) Go to File > Templates > Save as Template on the Menu bar to open the Save As
Template dialog (Figure 101).
6) Enter a name for the new template in the Enter Template Name text box.
7) Select a template category, from the categories available in Select Template Category.
8) If necessary, select Set as default template to change the default template for the
required document type.
9) Click on Save to save template and close the Save As Template the dialog.

Template wizard
Writer has a Template Wizard which speeds up the template creation process. For more
information on the Template Wizard, see the Writer Guide.
1) Go to File > Wizards on the Menu bar and select Letter, Fax, or Agenda to start a
template for one of those types of documents. The Letter Wizard dialog is shown in
Figure 102.
2) Go through the wizard and go through the steps as the wizard instructs.
3) Click on Finish and a Save as dialog opens.
4) Navigate to the required folder where the template is going to be saved.
5) Enter a file name in the text box using the file extension OTT for document templates.
6) Click on Save to save the new template and close the Save as dialog. The new template
appears in the list of templates available.

Templates | 153
Figure 102: Letter Wizard dialog

Setting default template


LibreOffice allows you to specify a specific template as the default document. The template has
to be in a location visible in the Save as Template dialog so that LibreOffice can find it, and you
can always reset to the original LibreOffice default template if necessary.

Changing default template


1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Select the document type from the Filter drop-down list.
3) Select the template to use as the default LibreOffice template for the selected document
type.
4) 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.
5) Click on Open and a new document opens using the new default template. The next time
a new document is created without selecting a different template, that document uses th
new default template.

Resetting default template


1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Select the presentation template that is being used as the default presentation template in
the Select a Template dialog.
3) Right-click on the template and select Reset Default from the context menu.
4) Click on Close to close the Templates dialog. The next time that a new document is
created and a specific template is not selected, the document is created using the original
default LibreOffice template for that document type.

Editing templates
Default LibreOffice templates cannot be edited. Only templates that are created or imported can
be edited.

154 | Chapter 4, Working with Styles, Templates, and Hyperlinks


1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Right-click on the template to be edited and select Edit from the context menu and the
template opens in the relevant LibreOffice module.
3) Edit and update the styles, text and/or objects on the selected template.
4) Go to File > Save on the Menu bar or use the keyboard shortcut Ctrl+S (macOS ⌘+S)
to save the changes.
5) 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 templates must be in specific LibreOffice 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


1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Click on Manage at the top right of the Templates dialog and select New Category from
the context menu.
3) Enter a category name in Enter new category name box in the New Category dialog
(Figure 103).
4) 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


1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Select the custom category for deletion from the drop-down list of categories at the top of
the Templates dialog.
3) Click on Manage at the top right of the Template dialog and select Delete Category from
the context menu.
4) Click Yes to confirm the deletion of the custom category.

Templates | 155
Figure 103: New Category dialog

Figure 104: Select Category dialog

Note
LibreOffice’s default template categories or categories using the Extension
Manager cannot be deleted. Only custom categories that have been created in
Impress can be deleted.

Moving templates
1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Right-click on the template that is going to be moved and select Move from the context
menu.
3) 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.
4) Click OK to move the template to its new category and close the Select Category dialog.

Note
Only custom templates can be moved between categories. Templates supplied
with LibreOffice or installed with the Extension Manager cannot be moved.

Deleting templates
1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Right-click on the template being deleted and select Delete from the context menu.

156 | Chapter 4, Working with Styles, Templates, and Hyperlinks


3) 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
1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog .
2) Right-click on the template being renamed and select Rename from the context menu.
3) 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 with 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 uses the term “repositories” when it refers to sources for templates. A repository can
be a directory on a computer or a location on the internet. The community-created template
repository for LibreOffice is 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.
1) To import a template onto the computer, go to https://extensions.libreoffice.org/ or another
internet location and download the required template to your computer.
2) Open the Templates dialog by selecting File > New > Templates or File > Templates >
Manage Templates on the Menu bar.
3) Find the Filter drop-down lists then select the required document type and template
category.
4) Click on Manage at the top right of the Template dialog and open the Open dialog by
selecting Import from the context menu.
5) Use the Open dialog, to find the folder where the template is located on the computer.
6) Display the available templates by selecting the Templates in the File type box.
7) Select the template and click Open toimport template into the selected category.

Exporting templates
1) Open the Templates dialog by selecting File > New > Templates or File > Templates >
Manage Templates on the Menu bar.
2) Activate the context menu by right-clicking on the template to be exported then select
Export from the menu. A file browser window will appear.
3) Navigate to the folder where the template will be exported and click on OK. The template
is exported to the selected location and the browser closes.

Templates | 157
Hyperlinks
In LibreOffice, hyperlinks allow you to create references to web pages and other elements in
remote locations.

Absolute and relative hyperlinks


There are two types of hyperlinks: absolute and relative.
• An absolute hyperlink links to a web page, or file, that is outside the current domain or file
location. It must contain the full address of the target file, or web site, such as
https://libreoffice.org. An absolute hyperlink will stop working if its target is moved to a
new location in the internet.
• A relative hyperlink contains an address that is relative to the document’s current file
location. A relative hyperlink stops working if the document is removed from the current
location.

Inserting hyperlinks
1) Select the location where the hyperlink will be inserted.
2) Go to Insert > Hyperlinks on the Menu bar or use the keyboard shortcut Ctrl+K
(macOS ⌘+K) to open the Hyperlink dialog (Figure 105).
3) On the left hand side, determine whether the hyperlink will be absolute or relative.
4) Click Apply to insert the hyperlink into the document.
5) Click Close or OK to close the dialog.

Tips
LibreOffice automatically converts website URLs into hyperlinks. To turn off this
function, 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), and scroll to the Unvisited links and/or Visited links
checkboxes. Select them, choose 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 Writer and Calc, the Navigator can be used to insert hyperlinks. For
information, see the Writer Guide and Calc Guide.

Hyperlink types
To choose a hyperlink type, go to Insert > Hyperlinks on the Menu bar or use the
keyboard shortcut Ctrl+K (macOS ⌘+K) to open the Hyperlink dialog.
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).

158 | Chapter 4, Working with Styles, Templates, and Hyperlinks


Mail
Go to Insert > Hyperlinks on the Menu bar or use the keyboard shortcut Ctrl+K
(macOS ⌘+K) to open the Hyperlink dialog. 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

Hyperlinks | 159
Figure 107: Hyperlink dialog — Document page

Figure 108: Hyperlink dialog — New Document page


Document
Links 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.

160 | Chapter 4, Working with Styles, Templates, and Hyperlinks


New Document
Links 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
These settings are common to all hyperlink types, though 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
1) Select a hyperlink using one of the following methods (depends on the module):
– 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.
2) 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.
3) Modify the link in the Hyperlink dialog then click Apply to save the changes. The
Hyperlink dialog remains open.
4) Once you have finished editing hyperlinks, click on OK to close the Hyperlink dialog.

Removing hyperlinks
To turn a hyperlink into plain text, right-click on the link and select Remove Hyperlink from the
context menu. To delete a hyperlink, select the hyperlink and press the Delete or Backspace
key.

Hyperlinks | 161
Getting Started Guide 7.6

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.

164 | Chapter 5, Working with Images and Graphics


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.
1) Open a file browser window and locate the file to be inserted.
2) 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


1) Open a LibreOffice document and click on the page where the image, or graphic, is to be
inserted.
2) 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.
3) 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.
4) Click on Open and the image, or graphic, is embedded into the document and Insert
Image dialog closes.

Figure 109: Insert Image dialog


5) If the image, or graphic, is going to be linked and not embedded, select the Link option
before clicking Open.

Images and graphics | 165


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


1) Open both the source and target documents.
2) In the source document, select the image to be copied and copy the image to the
clipboard. Keyboard shortcut Ctrl+C or Ctrl+Ins (macOS ⌘+C)
3) In the target document, click at the position where the image is to be placed.
4) Paste the image from the clipboard into the document. Keyboard shortcut Ctrl+V or
Shift+Ins (macOS ⌘+V)

Note

Embedding
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 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:
1) Open a document in LibreOffice and go to Edit > External Links on the Menu bar to
open the Edit Links dialog (Figure 110).

Figure 110: Edit Links dialog


2) Select the files that are going to be embedded.
3) Click on Break Link, then click Yes to confirm embedding the files.

166 | Chapter 5, Working with Images and Graphics


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.
1) Go to Insert > Media > Scan > Select Source on the Menu bar and select the scanning
source from the list of available devices.
2) Click in the document where the scanned media is to be inserted.
3) Place the media for scanning onto the selected scanner.
4) Go to Insert > Media > Scan > Request on the Menu bar to open the scanning software.
5) Click on Preview in the scanning software to scan the media and a preview image
appears in the scanning software.
6) Adjust settings for image quality, size, and other attributes in the scanning software.
7) Click on Scan in the scanning software and the media is scanned. A scanned copy of the
media is inserted into the LibreOffice document.
8) 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.

Images and graphics | 167


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 198 for more information.
1) 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.
2) Select a Gallery theme from the list provided.
3) Select the required image from the displayed images with a single click.
4) 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.
5) 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.

168 | Chapter 5, Working with Images and Graphics


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

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.
1) Click on an image, or graphic, to display the selection handles.

Figure 112: Example of resizing an image

Editing images or graphics | 169


2) 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.
3) 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).
4) 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.
1) Select an image, or graphic, to display the selection handles.
2) 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.
3) Click and drag the selected image, or graphic, to the desired position. During movement,
a ghost image appears helping with repositioning (Figure 113).
4) 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

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.
1) Click on an image, or graphic, to display the selection handles.
2) Click again (NOT double-click) on the selected image, or graphic, switching on rotation
mode, or go to Format > Rotate on the Menu bar.

170 | Chapter 5, Working with Images and Graphics


Note
Using a double-click on an image, or graphic, switches on text editing mode for
the selected image, or graphic.

3) Move the cursor over one of the corner handles and the cursor changes shape indicating
the movement direction.
4) 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.
5) When satisfied with the rotation, release the cursor.
6) 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.
7) 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.

Figure 114: Example of rotating an image

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.

Editing images or graphics | 171


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

172 | Chapter 5, Working with Images and Graphics


– 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.
1) Right-click on the image, or graphic.
2) Select Save from the context menu to open the Image Export dialog (Figure 115).
3) Navigate to the folder where the image, or graphic, is going to be exported to.
4) 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.
5) Click on Save to export the file and close the dialog.
6) Open the graphics program, then navigate to the folder where the file is located.
7) 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

Editing images or graphics | 173


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.
1) Right-click on the image, or graphic.
2) Select Compress from the context menu to open the Compress Image dialog
(Figure 116).
3) Use options available in Compression and Resolution to compress the image, or
graphic.
4) If necessary, click on Calculate New Size and check the file file size of the compressed
image, or graphic.
5) Click on OK to save the changes and close the dialog.
6) 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 192), 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.

174 | Chapter 5, Working with Images and Graphics


1) 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


2) Select a theme from the available themes and the images and graphics for that theme are
displayed.
3) Scroll through the available images and graphics and select the required image or
graphic.
4) 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.
5) 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.

LibreOffice Gallery | 175


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
1) 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.
2) Click New at the bottom of the Gallery deck and the Properties of New Theme dialog
opens (Figure 118).
3) Click on General and type a name for the new theme in the text box.
4) 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

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


1) 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.
2) Click on Files to open the Files page (Figure 119), then click on Find Files to open a
Select Path dialog.
3) Navigate to the folder that contains the images and graphics required and select the
folder.
4) Click OK to close the Select Path dialog. The files contained in the folder appear in the
Properties of New Theme dialog.

176 | Chapter 5, Working with Images and Graphics


5) If necessary, select Preview and any image or graphic selected appears in the preview
box.

Figure 119: Properties of New Theme dialog — Files page


6) 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.
7) 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.
8) 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.
1) Open the Gallery deck and select a custom theme.
2) Right-click on the image or graphic and select Delete from the context menu.
3) 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.
1) Open the Gallery deck and select a custom theme that contains at least one image or
graphic.

LibreOffice Gallery | 177


2) Right-click on the name of the selected custom theme.
3) 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).

178 | Chapter 5, Working with Images and Graphics


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


1) In a LibreOffice document, select the image where hotspots are going to be defined.
2) 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.
3) 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.
4) Click on Apply to apply the settings.
5) 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.

Creating image maps | 179


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.

180 | Chapter 5, Working with Images and Graphics


Figure 121: Drawing toolbar — Writer module
Drawing tools numbered from left to right for Figure 121
1) Select 10) Ellipse 19) Flowchart
2) Insert Line 11) Circle 20) Callouts
3) Lines and Arrows 12) Isosceles Triangle 21) Vertical Callouts
4) Curves and Polygons 13) Right Triangle 22) Insert Text Box
5) Curve 14) Basic Shapes 23) Insert Vertical Text
6) Polygon 15) Symbol Shapes 24) Insert Fontwork Text
7) Rectangle 16) Block Arrows 25) Points
8) Rectangle, Rounded 17) Stars and Banners 26) Toggle Extrusion
9) Square 18) Callout Shapes

Figure 122: Drawing Object Properties toolbar


Drawing object properties numbered from left to right for Figure 122
1) Select anchor for object 11) Back One 20) Fill Color
2) None 12) Send to Back 21) Rotate
3) Parallel 13) To Foreground 22) Points
4) Optimal 14) To Background 23) Group
5) Before 15) Select start and end 24) Enter Group
6) After arrowheads for lines 25) Exit Group
7) Through 16) Line Style 26) Ungroup
8) Align Objects 17) Line Width 27) Insert Caption
9) Bring to Front 18) Line Color
10) Forward One 19) Area Style/Filling

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


1) Click in the document at the position where the drawing is to be placed.
2) 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).

LibreOffice drawing tools | 181


3) Click and drag to create the drawing object using the default properties.
4) Release the cursor and the selected drawing tool remains active. This allows drawing
another object of the same type.
5) If necessary, select another drawing object to draw a different shape of drawing object.
6) Press the Esc key, or deselect the drawing object to cancel drawing mode.

Changing properties
1) Click on Select on the Drawing toolbar, then select the drawing object.
2) On the Drawing Object Properties toolbar, select each property tool required for the
drawing object.
3) If necessary, select the property value from the available options.
4) Select the type of drawing object required on the Drawing toolbar.
5) Click and drag to create the drawing object using the selected properties.

Figure 123: Example of grouping objects


6) To change properties for another drawing object, repeat Steps 2 and 3 before drawing the
object.
7) 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 188 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.

182 | Chapter 5, Working with Images and Graphics


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
1) 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).
2) 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


1) 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.
2) 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.
3) Select individual objects within the group for editing or formatting. An example of editing
individual objects in a group is shown in Figure 124.
4) 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.

Grouping objects | 183


Ungrouping
1) Click on any one of the objects in the group to select the group.

Figure 124: Example of editing inside a group


2) 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
1) 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).
2) Select a Fontwork style from the dialog and click OK. The selected Fontwork appears
centrally on the page and the dialog closes.
3) Double-click on the Fontwork text graphic to switch on editing mode.
4) 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.
5) Press Esc key, or click outside the Fontwork graphic and the text replaces default text.

Figure 125: Fontwork toolbar

184 | Chapter 5, Working with Images and Graphics


Figure 126: Fontwork Gallery dialog

Figure 127: Example of creating Fontwork

Fontwork | 185
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.

186 | Chapter 5, Working with Images and Graphics


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
1) Go to Insert > OLE Object > QR and Barcode on the Menu bar to open the QR and
Barcode Code dialog.
2) Enter the required information in the URL/Text field. This can be, for example, a website
address, or a product number.
3) Select the error correction factor from the options available in Error correction. This is the
complexity of the graphic generated.
4) Enter the margin required in the Margin text box. The margin is placed around the code
when it is generated.
5) Select the type of code from the options available in the Type drop-down list.
6) Click OK to generate the code and close the QR and Barcode dialog.

Figure 130: Example QR code

Barcodes and QR codes | 187


Figure 131: Example Barcode

Editing
1) 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.
2) Make the necessary changes to the information in the QR and Barcode dialog.
3) Click OK to regenerate the code and close the QR and Barcode dialog.

188 | Chapter 5, Working with Images and Graphics


Getting Started Guide 7.6

Chapter 6,
Getting Started with Impress
Presentations in LibreOffice
What is Impress?
Impress is the presentation (slide show) program included in LibreOffice creating presentations in
the Open Document Presentation (ODP) format. ODP presentations can be opened by other
presentation software, or exported in different presentation formats.
Slides can 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) displaying
templates installed with LibreOffice.

Figure 132: Select a Template dialog

190 | Chapter 6, Getting Started with Impress


Figure 133: Main Impress window
1) Slides pane 2) Workspace 3) Sidebar
Templates included with Impress are designed to fit the two standard sizes of presentation slides
using 4:3 and 16:9 ratios. The templates do adapt to other available sizes, which are 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.

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

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.

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.

Main Impress window | 191


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 227.
If master slides are used, then master views become available: Master Slide, Master Notes and
Master Handout. There are no tabs for master views and 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 Sidebar, normally located on the right side of the Workspace, is similar to the Sidebar in the
other LibreOffice module and consists of eight decks. To display or hide the Sidebar, use one of
the following methods:
• Go to View > Sidebar on the Menu bar.
• Use the keyboard shortcut Ctrl+F5 (macOS ⌘+F5).
• Use the Hide/Show marker on the right of the Workspace (Figure 133 on page 221).
• To hide the Sidebar, click on the X in the right top corner of the Sidebar.
• To display the Sidebar, click on one of the Sidebar icons to open a deck.

192 | Chapter 6, Getting Started with Impress


To open a Sidebar 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 from the
drop-down list.
• Use one of the available keyboard shortcuts for Sidebar decks.

Properties
The Properties deck (Ctrl+Alt+1, macOS ⌘+⌥+1) has ten panels, allowing changes to slide
layout and formatting of slide objects.
• When a slide is selected and appears in the Workspace, the Properties deck opens with
the Slide and Layouts panels available.
• When a slide object is selected, the panels in the Properties deck become 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
In the Styles deck (Ctrl+Alt+2, macOS ⌘+⌥+2), drawing and presentation styles are applied
to a selected object, new styles created for drawing and presentation, and formatting changes to
both types of styles. 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 251 and the Impress Guide.

Gallery
Using the Gallery deck (Ctrl+Alt+3, macOS ⌘+⌥+3), an object is inserted into a
presentation either as a copy or as a link. A copied 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 linked object. See the
Impress Guide for more information.

Navigator
The Navigator deck (Ctrl+Alt+4, macOS ⌘+⌥+4) 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 for easy identification when using the Navigator. For more information, see “Navigator” on
page 226 and the Impress Guide.

Shapes
The Shapes deck (Ctrl+Alt+5, macOS ⌘+⌥+5) provides panels for quick selection of basic
shapes that are available on the Drawing toolbar: Lines and Arrows, Curves and Polygons,
Connectors, Basic Shapes, Symbol Shapes, Block Arrows, Flowchart, Callout Shapes,
Stars and Banners, and 3-D Objects.

Slide transition
The Slide Transition deck (Ctrl+Alt+6, macOS ⌘+⌥+6) provides a selection of slide
transitions used in a presentation. There are controls to adjust 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 264 and the Impress Guide.

Main Impress window | 193


Animation
The Animation deck (Ctrl+Alt+7, macOS ⌘+⌥+7) is used to add, change, or remove
animations for different elements or objects on a slide and adjust how objects appear during a
slide show. For more information on animation effects, see “Animation effects” on page 266 and
the Impress Guide.

Master slides
The Master Slides deck (Ctrl+Alt+8, macOS ⌘+⌥+8) provides access to slide designs for
presentations and several designs of master slides are available. 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 251 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: Rulers showing object size

194 | Chapter 6, Getting Started with Impress


Figure 135: Changing ruler units

Figure 136: Status bar


1) Slide Number 5) Object size 9) Fit slide
2) Information area 6) Unsaved changes 10) Zoom slide
3) Master slide 7) Digital signature 11) Zoom percentage
4) Cursor position 8) Text language

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
This changes depending on the object selected on the slide. Examples of the information
displayed are shown in Table 8.
Table 8: Examples of information on Status Bar

Example selection Examples of information shown


Text area Text Edit: Paragraph x, Row y, Column z
Charts, spreadsheets Embedded object (OLE) “ObjectName” selected
Graphics Bitmap with transparency selected

Main Impress window | 195


Master slide
The master slide associated with the slide or notes page currently displayed in the
Workspace. Right-click to open 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 251 and the
Impress Guide.
Cursor position/Object size
Shows different information depending on whether objects are selected or not. When an
object is selected, clicking in either of these areas opens the Position and Size dialog.
– 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 resized using the cursor, the object size numbers
show the size of the object (width and height).
– If an object is selected, the position numbers show X and Y coordinates of the object
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 part or parts of an object.
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 which is similar in appearance and function as the
Navigator dialog.

196 | Chapter 6, Getting Started with Impress


Figure 137: 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, for example “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.

Toolbars
Toolbars provide several tools that are used for creating slides for 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 appearance of toolbar icons varies depending on the computer operating
system, and the selection of icon size and style in Tools > Options > LibreOffice
> View (macOS LibreOffice > Preferences > Options > 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 (Figure 133 on
page 221). 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.

Workspace views | 197


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 138) 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 139).

Figure 138: Example Outline view in Workspace

Figure 139: Outline toolbar

198 | Chapter 6, Getting Started with Impress


Figure 140: Example Notes view in Workspace
– 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.

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:
1) Go to View > Toolbars > Slide View on the Menu bar to show the Slide View toolbar
(Figure 142).
2) Adjust the number of slides, up to a maximum of 15, in the Slides per Row box.

Workspace views | 199


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:
1) Select a slide or a group of slides.
2) 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.
• Click and drag — 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
commands in Table 9:
Table 9: Slide Sorter commands

200 | Chapter 6, Getting Started with Impress


Command Action
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.
Creates a duplicate of the selected slide and places the new slide
Duplicate Slide
immediately after the selected slide.
Rename Slide Renames the selected slide.
Hide Slide Any slides that are hidden are not shown in the presentation.
Delete Slide Deletes the selected slide.
Layout Allows changes to the layout of the selected slide.
Move Allows moving or repositioning of the slide in the presentation order.

Creating presentations
By default, Impress opens with the Select a Template dialog (Figure 132 on page 220) displayed
allowing the selection of 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.

Creating presentations | 201


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.

Figure 144: Slide and Layouts panels in Properties deck on Sidebar


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.

202 | Chapter 6, Getting Started with Impress


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.

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:
1) Select a slide in the presentation.
2) 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, as shown by the example in Figure 145.
Each of these content boxes can be configured to contain the following elements. For more
information on layout content boxes, see the Impress Guide.

Figure 145: Example slide using content boxes


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.

Creating presentations | 203


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


1) Click on the outer frame of the contents box so that the selection handles are displayed.
2) Place the cursor on the frame so that it changes shape. This is normally a clenched hand,
but depends on the computer setup.

204 | Chapter 6, Getting Started with Impress


3) Click and drag the contents box to its new position on the slide and release.

Resizing contents box


1) Click on the outer frame of the contents box so that the selection handles are displayed.
2) Place the cursor on the frame so that it changes shape.
3) 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
1) Select a contents box, or an element to highlight it and the selection handles are
displayed.
2) 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 237 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 246 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 251.
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.

Creating presentations | 205


Figure 146: Slide Properties dialog — Background page
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. For more
information on inserting, formatting, and changing a background, see the Impress Guide, or
Draw Guide.
For example, to change the background of an individual slide or a master slide:
1) Right click on a slide, or master slide, and select Slide Properties from the context menu
to open the Slide Properties dialog (Figure 146).
2) Select the Background tab and then select the type of background to use from None,
Color, Gradient, Image, Pattern and Hatch.
3) Make a selection from the various properties that are available for each type of
background.
4) Click OK to save the change and close the dialog.

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.

206 | Chapter 6, Getting Started with Impress


• 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 modifying and
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 147) 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 148) normally opens,
automatically providing a range of tools to add and format text.

Figure 147: Text toolbar

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 148: Text Formatting toolbar

Adding and formatting text | 207


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.
1) Make sure Normal view is selected in the Workspace.
2) Select the slide where text is to be added into an AutoLayout text box.
3) 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.
4) Type or paste text into the AutoLayout text box and, if necessary, format the text to the
presentation requirements.
5) Click outside the AutoLayout text box to deselect it.

Text boxes
1) Make sure Normal view is selected in the Workspace.
2) Select the slide where the text is to be added.
3) 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 149: Example of a text box in edit mode

208 | Chapter 6, Getting Started with Impress


4) Select the text box to switch on edit mode. This is indicated by a colored border as shown
in by the example in Figure 149. The width and final position of the text box can be
adjusted after adding text into the text box.
5) 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 238 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.
1) Highlight and copy the text from another document or slide.
2) 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 238 and
see “AutoLayout text boxes” on page 238 and the Impress Guide for more information.
3) 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.

Adding and formatting text | 209


– Use the keyboard shortcut Ctrl+Shift+V (macOS ⌘+Shift+V) and select
Unformatted text on the dialog that opens.
4) 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.
1) Highlight and copy the text from another document or slide.
2) Paste the text into the AutoLayout text box, then select the pasted text.
3) 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.
4) 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.
5) 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.
1) Highlight and copy the text from another document or slide.
2) 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 238 and the Impress Guide for more information.
3) 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.
4) 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.
5) Select the required drawing style to format the text from the available drawing styles.

210 | Chapter 6, Getting Started with Impress


6) 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 243.

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 150. 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:
1) Go to View > Normal on the Menu bar to open Normal view.
2) 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.
3) Click on the text ● Click to add Text and start typing the first list item.
4) 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 150: Example of outline levels in AutoLayout text box

Adding and formatting text | 211


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:
1) 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)
2) 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)
3) 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).
4) 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:

212 | Chapter 6, Getting Started with Impress


1) Create a text box on a slide and make sure the cursor is flashing in the text box. See
“Text boxes” on page 238 on how to create a text box.
2) 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.
3) 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.
4) 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 242.

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:
1) 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.
2) Change the list type from unordered to ordered list, or ordered to unordered as described
in “Text boxes” above.

Figure 151: More Bullets dialog

Figure 152: More Numbering dialog


3) If required, change the type of bullet or number used for the list:

Adding and formatting text | 213


a) 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.
b) Select a bullet or number type from the options available in the drop-down window as
shown in Figure 151, or Figure 152.
c) 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:
1) 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.
2) 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.
3) Select a bullet or number type from the options available in the drop-down window as
shown in Figure 151, or Figure 152.
4) 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.

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

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
Any text inside a text box, or graphic object, automatically flows into column
format when the changes are saved.

214 | Chapter 6, Getting Started with Impress


Figure 153: Text dialog — Text Columns page

Figure 154: Columns panel in Properties deck on Sidebar


1) 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.
2) 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 153),
– Click on Columns in Properties on the Sidebar to open the Columns panel
(Figure 154).
3) Set the number of columns required in the Number of columns box and the required
spacing between the columns in the Spacing box.
4) 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.

Adding and formatting text | 215


5) 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.
6) If necessary, format the text to the presentation requirements.
7) Click outside the text box, or graphic object, to deselect it and save the changes.

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 155) 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
1) Open the slide in Normal view on the Workspace where the image is going to be
inserted.
2) 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 155).
– Click on Insert Image on the Standard toolbar.
3) Navigate to the location of the file and select the image file required.
4) Click Open to place the image in the center of the slide.
5) Reposition and resize the image to the presentation requirements.

Figure 155: Insert toolbar

Inserting tables
When a table is inserted into a slide, the Table toolbar (Figure 156) 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 156: Table toolbar

216 | Chapter 6, Getting Started with Impress


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


1) 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 157).
2) Select the Number of columns and the Number of rows required for the table.
3) Click OK to place the table in the center of the slide and close the Insert Table dialog.
4) The Table Design panel on the Properties deck on the Sidebar opens (Figure159). Select
a table design, the type of rows, and the type of columns required.
5) If necessary, reposition and format the table on the slide to the presentation requirements.

Figure 157: Insert Table dialog

Using Insert or Standard toolbar


1) 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).
2) 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.
3) The Table Design panel on the Properties deck in the Sidebar opens (Figure 159). Select
a table design, the type of rows, and the type of columns from the options available.
4) 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 (Figure158) to open the
Insert Table dialog (Figure 157) where the number of rows and columns required
can be selected.

Inserting images, tables, charts, or media | 217


Figure 158: Insert Table graphic

Figure 159: Table Design panel in Properties deck on Sidebar

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.

218 | Chapter 6, Getting Started with Impress


Figure 160: Chart Type panel in Properties deck on Sidebar
When Impress switches to chart view, the Formatting toolbar (Figure 161) 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 161: Formatting toolbar

Inserting audio or video


Using a file browser
1) 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.
2) 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.
3) 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.

Inserting images, tables, charts, or media | 219


Figure 162: Gallery deck in Sidebar
4) Reposition and/or resize the audio or video file. See the Impress Guide for more
information.

Using the Gallery


1) If the Gallery deck (Figure 162) 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.
2) Browse to a category containing media files, for example Sounds.
3) Click on the audio or video file required and drag it onto the slide. The Media Playback
toolbar automatically opens.
4) 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.

220 | Chapter 6, Getting Started with Impress


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 163).
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 164.

Working with master slides | 221


Figure 163: Master Slides deck on Sidebar

Figure 164: Default Master Slide

Creating master slides


1) Go to View > Master Slide on the Menu bar to open Master view in the Workspace. The
Master View toolbar also opens (Figure 165). If the Master View toolbar does not open,
go to View > Toolbars on the Menu bar and select Master View.

Figure 165: Master View toolbar


2) 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.

222 | Chapter 6, Getting Started with Impress


– 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.
3) 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.
4) 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.
5) 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.
6) 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.
7) Save the presentation file before continuing.

Applying master slides


To apply a master slide to all slides or selected slides in a presentation:
1) Click on Master Slides on the right of the Sidebar to open the Master Slides deck
(Figure 163 on page 252).
2) Right-click on the required master slide in the Used in This Presentation panel.
3) Select Apply to All Slides, or Apply to Selected Slides in the context menu.

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.
1) Select the slide or slides on the Slides pane where the master slide is to be changed.
2) Go to Slide > Change Slide Master on the Menu bar to open the Available Master Slides
dialog (Figure 166).
3) To add master slides, click on Load to open the Load Master Slide dialog (Figure 167).

Working with master slides | 223


Figure 166: Available Master Slides dialog

Figure 167: Load Master Slide dialog

224 | Chapter 6, Getting Started with Impress


4) In the Load Master Slide dialog, select the template category and the template to load as
the master slide
5) Click OK to close the Load Master Slide dialog and the master slides from the selected
template appear in the Available Master Slides dialog.
6) In the Available Master Slides dialog, select the master slide required in the Select a Slide
Design box.
7) 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.
8) Click OK to apply the selection to the slides and close the 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:
1) Select View > Master Slide on the Menu bar. This also opens the Master View toolbar.
2) Select a master slide for editing in the Slides pane so that it appears in the Workspace.
3) 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 168).
4) 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.
5) Click OK to save the changes and close the Slide Properties dialog.
6) Select an object on the master slide, then right-click on the object to open a context
menu.
7) 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.
8) Click Close Master View on the Master View toolbar or go to View > Normal on the
Menu bar to exit from editing master slides.
9) Save the presentation file before continuing.

Working with master slides | 225


Figure 168: Slide Properties dialog

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
1) Go to View > Master Slide on the Menu bar to open Master View.
2) Insert a text box on the master slide, see “Text boxes” on page 238 for more information.
3) Type or paste the text into the text box.
4) Click outside the text box when finished adding text.
5) Go to View > Normal on the Menu bar or click Close Master View on the Master View
toolbar when finished.

226 | Chapter 6, Getting Started with Impress


Figure 169: Header and Footer dialog — Slides page

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 169):
1) Go to View > Master Slide on the Menu bar to open Master View.
2) Go to Insert > Header and Footer on the Menu bar to open the Header and Footer
dialog.
3) Click on the Slides tab to open the options available for inserting footers onto a slide.
4) 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.
– 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.
5) To place text in the footer center section, select Footer and then type or paste the text into
the Footer text input field.
6) To place the slide number in the right section of the footer, select Slide number.
7) 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.
8) Click Apply to save the changes and close the Header and Footer dialog.

Working with master slides | 227


9) To format the text used for the default footer fields, see the Impress Guide.
10) 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 237 for more information.

Custom footers
The default fields in a footer section can be replaced with text, or manual fields as follows:
1) Go to View > Master Slide on the Menu bar to open the master slide view.
2) 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.
3) Type in the required text or insert a manual field into the footer section. For more
information, see “Manual fields” on page 258.
4) Format the text or manual field placed in the footer section. See “Adding and formatting
text” on page 237 and the Impress Guide for more information.
5) Click outside the footer section to close the Text Formatting toolbar and reopen the Line
and Filling toolbar.
6) 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

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.

228 | Chapter 6, Getting Started with Impress


Figure 170: Adding a comment
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.
1) 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 170).
2) 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.
3) To show or hide the comment markers, choose View > Comments on the Menu bar.
4) 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.
1) 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 171.
2) Go to Insert > Header and Footer on the Menu bar to open the Header and Footer
dialog (Figure 172).

Printing handouts | 229


Figure 171: Example of Master Handout layout

Figure 172: Header and Footer dialog — Notes and Handouts page
3) 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.

230 | Chapter 6, Getting Started with Impress


– 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.
4) Click on Apply to All to save the options for the handouts and close the Header and
Footer dialog.
5) 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 173.

Figure 173: Example Print dialog — LibreOffice Impress page


6) 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.
7) In Contents, select Slide name, Date and time, and/or Hidden pages if these items are to
be printed.

Printing handouts | 231


8) In Color, select how the handouts are printed.
9) In Size, select the size for how the handouts are printed.
10) 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.
1) Create a new presentation or open an existing presentation.
2) Select the slide that is going to precede the photo album. In a new presentation, this will
be the first slide.
3) Go to Insert > Media > Photo Album on the Menu bar to open the Create Photo Album
dialog (Figure 174).
4) Click on Add to open a file browser and navigate to the folder where the images are
located.
5) Select the images required and click Open. This closes the file browser and the selected
files appear in the Create Photo Album dialog.
6) Select the number of images per slide in the Slide layout: drop-down list.

Figure 174: Create Photo Album dialog


7) If required, select Add caption to each slide. This inserts a text box on each slide allowing
captions to be added to the images.
8) If required and there is only one image per slide, select Fill Screen for each image to fill
the entire slide.
9) Create the required sequence of photos or pictures by moving image files up or down in
the list of images.
10) 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.
11) If required, copy and paste images between slides as with any other elements that can be
placed on a slide.

232 | Chapter 6, Getting Started with Impress


12) If required, set up the photo album to run as a presentation. See “Presentations (slide
shows)” below, “Running presentations” on page 267, and the Impress Guide.

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
1) Select slides for hiding in the Slides pane, or Slide Sorter view in the Workspace.
2) 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.
3) 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


1) Select the slides required for a custom slide show in the Slides pane or Slide Sorter view
in the Workspace.
2) Go to Slide Show > Custom Slide Show on the Menu bar to open the Custom Slide
Shows dialog (Figure 175).

Figure 175: Custom Slide Shows dialog

Presentations (slide shows) | 233


Figure 176: Define Custom Slide Show dialog
3) Click on New and the Define Custom Slide Show dialog opens (Figure 176).
4) Type a name for the new custom slide show in the Name text box.
5) In the Existing slides list, select the slides to include in the show.
6) 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.
7) 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.
8) Click OK to save the custom slide show and return to the Custom Slide Shows dialog.
9) 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.
10) 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.
1) Click on Slide Transition in the Sidebar to open the Slide Transition deck (Figure 177).
2) In the Slides pane or Slide Sorter view in the Workspace, select the slides where slide
transitions are going to be applied.
3) Select a transition from the available options in the Slide Transition panel.
4) 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.

234 | Chapter 6, Getting Started with Impress


– Sound — from the options available in the drop-down list, select a sound or music, to
be played during slide transition.

Figure 177: Slide Transition deck in Sidebar


5) 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.
6) 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.
7) 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.

Presentations (slide shows) | 235


1) Click on Slide Transition on the Sidebar to open the Slide Transition deck.
2) In the Slides pane, or Slide Sorter view in the Workspace, select the slide to add sound
or music.
3) In the Modify Transition panel, select a sound in the Sound drop-down list.
4) To play music, use the following steps to select a music file:
a) Select Other sound in the Sound drop-down list.
b) In the file browser window that opens, navigate to where the music file is located.
c) Select the music file required and click Play to check if the music is suitable.
d) If the music is suitable, click Open to add the music to the selected slide and close
the file browser window.
5) 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.
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.
1) Go to View > Normal on the Menu bar to open Normal view in the Workspace.
2) Select an element on a slide for animation.
3) On the Sidebar, select Animation to open the Animation deck (Figure 178).
4) Select an element in the Animation panel.
5) In the Effects panel, click on +Add to open the animation options.
a) In Category, select an animation category from the drop-down list.
b) In Effect, select an animation effect from the available options.
c) In Start, select how the animation starts from the drop-down list.

236 | Chapter 6, Getting Started with Impress


Figure 178: Animation deck in Sidebar
d) In Direction, select the direction of the animation from the drop-down list.
e) In Duration, enter a time in seconds for the animation duration.
f) In Delay, enter a time in seconds for to create a delay before the animation starts.
6) If required, select Automatic Preview to check the effect of the animation to a slide
element.
7) Click Play to check how the animation effect when applied to a slide element.

Running presentations
1) 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.
2) 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.

Presentations (slide shows) | 237


3) 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.
4) 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.
5) To access more navigation options during a slide-show, right-click on a slide and use the
options available in the context menu.
6) 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.
7) 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.
• Default view — displays the current slide, including any effects and the next slide in the
presentation (Figure 179). Click on the Previous and Next arrows to navigate through the
presentation.
• Notes view — click on Notes to switch to display any notes that accompany each slide in
the presentation (Figure 180). 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 181). Click on Slides again to return to the default view.

238 | Chapter 6, Getting Started with Impress


• Exchange — click on this icon to switch the Presenter Console between displays.

Figure 179: Presenter Console — Default view

Figure 180: Presenter Console — Notes view

Presentations (slide shows) | 239


Figure 181: Presenter Console — Slides view

240 | Chapter 6, Getting Started with Impress


Getting Started Guide 7.6

Chapter 7,
Getting Started with Draw
Vector Drawing in LibreOffice
Introduction
LibreOffice Draw is the vector graphics drawing module included with the LibreOffice installation.
Draw can also carry out some operations on raster graphics (pixels) and a wide variety of
graphical images can also 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 simplifying the exchange of graphics with all
LibreOffice modules. For example, if an image is created in Draw, reusing it in a Writer document
is easy. 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 has more functionality than drawing tools that are generally integrated
with the majority of office software 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 does not cover all the available 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 182) is the Workspace, where
drawings are created. This Workspace is surrounded with toolbars and information areas. The
number and position of visible tools vary with the object being created, 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.

242 | Chapter 7, Getting Started with Draw


Figure 182: Draw main window
1) Pages pane 3) Sidebar 5) Layers bar
2) Workspace 4) Status bar

Layers bar
A layer is a workplace where drawing elements and objects are inserted. By default, the
Workspace consists of three layers, which are Layout, Controls, and Dimension Lines. These
default layers cannot be deleted or renamed, but layers can be added when required.
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, or delete layers. For more
information, see “Working with layers” on page 307.

Sidebar
The Sidebar in Draw is similar to the Sidebar in the other LibreOffice modules and consists of 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 from 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 are changed: Page,
Character, Paragraph, Area, Effect, Shadow, Line, Position and Size, Columns, and
Image. Available panels depend on the selected object.
Styles
Provides options for editing and applying one of the available Drawing Styles to drawing
objects. When a style is 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.

Draw main window | 243


Gallery
Objects on the Gallery deck can be inserted into a drawing either as a copy or as a link
and 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, or 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 for easy identification when
using the Navigator.
Shapes
Provides a quick selection of most items 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 183). Also the rulers are used to manage object handles and
guide lines when positioning objects.

Figure 183: Rulers showing object size

Figure 184: Ruler measurement units

244 | Chapter 7, Getting Started with Draw


Figure 185: Status bar
1) Slide (drawing) number 5) Selected object size 8) Digital signature
2) Information area 6) Scaling factor of the 9) Fit drawing
3) Master drawing document 10) Zoom slider
4) Cursor position 7) Unsaved changes 11) Zoom percentage
The page margins in the drawing area are also shown 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 183).
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 184 for the horizontal ruler. The horizontal and
vertical rulers can be set to different measurement units.

Status bar
The Status bar (Figure 185) is located at the bottom of the Workspace in all LibreOffice modules.
It includes several Draw-specific fields. For content details 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 (macOS LibreOffice > Preferences >
LibreOffice Draw > General) on the Menu bar. These measurement units can be
different to the measurement units set for the rulers.

Toolbars
To display or hide 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 — is similar for all LibreOffice modules. By default it is docked at the top of the
Workspace when a Draw document is opened (Figure 186)

Figure 186: Standard toolbar

Draw main window | 245


• Drawing — contains all the necessary functions for drawing various geometric and
freehand shapes, and for organizing them in the drawing. By default, it is locked in
position on the left of the Workspace (Figure 187).

Figure 187: Drawing toolbar


• Line and Filling — is normally docked at the top of the Workspace below the Standard
toolbar. The tools and drop-down lists vary to match the type of object selected. The Line
and Filling toolbar (Figure 188) only becomes active when an object on the Workspace is
selected.

Figure 188: 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 189). 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 basic shapes, or selecting a shape 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
1) 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 189).

246 | Chapter 7, Getting Started with Draw


Figure 189: Shapes deck on Sidebar

Figure 190: Line starting point


2) Place the cursor at the starting point on the drawing, then click and drag the cursor to
draw a straight line.
3) Release the hold 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 selected. The selection
handle at the starting point of the line is larger than the end point (highlighted in
Figure 190).

Drawing basic shapes | 247


Figure 191: Line panel in Properties deck on Sidebar
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 191).
• Right-click on a line and select Line in the context menu to open the Line dialog
(Figure 192).
• 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 is selected, the Ctrl key (macOS ⌘) deactivates
the snap to grid.
To restrict the drawing angle of a line to multiples of 45 degrees, 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 (macOS LibreOffice > Preferences > 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. Lines are drawn starting
from the center of the line.

248 | Chapter 7, Getting Started with Draw


Figure 192: Line dialog — Line page

Figure 193: 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 193) indicates what type of line,
or arrow each tool will draw. The information field on the Status bar shows them only as lines.
1) 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.
2) Place the cursor at the starting point of the arrow, then click and drag the cursor. The
arrowhead is drawn when the hold is released.

Notes
The tool icon for the Lines and Arrows tool recently used is 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 is changed by opening the
Line dialog and using the options available on the Line Styles or Arrow Styles
pages.

Drawing basic shapes | 249


Figure 194: Basic Shapes sub-toolbar

Figure 195: Legacy Rectangles toolbar

Rectangles
1) 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 194).
– 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 195). To display
the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the rectangle, then click and drag the cursor until
the required size is drawn. As the rectangle is drawn, the rectangle appears with its
bottom right corner attached to the cursor.
3) To draw a rectangle from its center, position the cursor on the drawing, press and hold the
Alt key (macOS ⌥) while dragging the cursor. The rectangle uses the start point as the
center of the rectangle.

Squares
1) 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 cursor 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 194).
– 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 195). To display
the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the square, then click and drag the cursor until
the required size is drawn. As the square is drawn, the square appears with its bottom
right corner attached to the cursor.
3) To draw a square from its center, position the cursor on the drawing, press and hold down
the Alt key (macOS ⌥) while dragging the cursor. The square uses the start point as the
center of the square.

250 | Chapter 7, Getting Started with Draw


Figure 196: Legacy Circles and Ovals toolbar

Ellipses (ovals)
1) 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 194).
– 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 196). To
display the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the ellipse, then click and drag the cursor until the
required size is drawn. As the ellipse is drawn, the ellipse appears with its bottom right
corner attached to the cursor.
3) To draw an ellipse from its center, position the cursor on the drawing, then press and hold
down the Alt key (macOS ⌥) while dragging the cursor. The ellipse uses the start point
as the center of the ellipse.

Circles
1) 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 194).
– 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 196). To
display the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the circle, then click and drag the cursor until the
required size is drawn. As the circle is drawn, the circle appears with its bottom right
corner attached to the cursor.
3) To draw a circle from its center, position the cursor on the drawing, press and hold down
the Alt key (macOS ⌥) while dragging with the cursor. 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 click on Line, Rectangle, Ellipse, or Circle icon 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. For more information, see the Draw Guide.

Drawing basic shapes | 251


Dimension lines
Dimension lines display a measurement of an object in the drawing (Figure 197). The dimension
line does not belong to the object itself, but is normally placed close to it.
1) 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.
2) Place the cursor close to the object to position the start of the dimension line.
3) Click and drag the cursor 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.

Figure 197: Example of object dimension lines

Figure 198: Dimension Line dialog

252 | Chapter 7, Getting Started with Draw


4) 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 198).
5) Select the required options in Line and Legend, then click OK to save the changes and
close the Line Dimension dialog.

Curves
1) 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 199).
– Click on the type of curve required in the Curves and Polygons panel of the Shapes
deck on the Sidebar.
2) 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.
3) 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
1) 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 199).
– Click on the type of polygon required in the Curves and Polygons panel of the
Shapes deck on the Sidebar.
2) Click to create the starting point of the polygon, then drag from the starting point to draw a
line.
3) Release the hold and continue to drag the cursor to draw the next line for polygon, then
click again to mark the end point of the line and start drawing another line. Holding the
Shift key down while drawing lines restricts the angles used in the polygon to 45° or
90°.

Figure 199: Curves and Polygons sub-toolbar


4) 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. A polygon that is not closed at the end of drawing the polygon does
not have a fill.

Drawing basic shapes | 253


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, hold down the
Shift key to draw a line 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.

Free-form lines
Drawing a free-form line is similar to drawing with a pencil on paper.
1) 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 199).
– Click on the type of free-form line required in the Curves and Polygons panel of the
Shapes deck on the Sidebar.
2) Click and drag the cursor to create the free-form line shape required.
3) Release the hold 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.

Gluepoints and connectors


Gluepoints
All Draw objects have gluepoints and are not normally displayed. Gluepoints (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 gluepoints (Figure 200). More gluepoints can be added and customized
using the Gluepoints toolbar (Figure 201). 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 gluepoints, see the Draw Guide.

Figure 200: Example of object gluepoints

Figure 201: Gluepoints toolbar

254 | Chapter 7, Getting Started with Draw


Figure 202: Example of a connector between two objects

Figure 203: Connectors sub-toolbar


Gluepoints are not the same as the selection handles of an object. Selection handles are for
moving or changing the shape of an object. Gluepoints are used to fix or glue a connector to an
object so that when the object moves, the connector stays fixed to the object.

Connectors
Connectors are lines or arrows whose ends automatically snap to a gluepoint 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 gluepoint. 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.
1) 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 203).
– Click on the type of connector required in the Connectors panel of the Shapes deck
on the Sidebar.
2) Move the cursor over one of the objects to be connected. Small crosses (the gluepoints)
appear around the object edges. Click on the required gluepoint for the start of the
connector, then drag the cursor to drag the connector to another object.
3) When the cursor is over a gluepoint of the target object, release the mouse button and the
connector is drawn. The connector end point is attached to the gluepoint.

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:

Geometric shapes | 255


• 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 281. Text can be added to all geometric shapes.
See “Adding and formatting text” on page 293 and the Draw Guide.

Basic shapes
The Basic Shapes sub-toolbar (Figure 204) also includes rectangle and ellipse tools that are
identical to the ones displayed on the Drawing toolbar.

Figure 204: Basic Shapes sub-toolbar


Basic Shapes are numbered from left to right as follows:
1) Rectangle 13) Isosceles Triangle
2) Rectangle, Rounded 14) Right-angle Triangle
3) Square 15) Diamond
4) Square, Rounded 16) Regular Pentagon
5) Parallelogram 17) Hexagon
6) Trapezoid 18) Octagon
7) Ellipse 19) Cylinder
8) Circle 20) Cube
9) Circle Pie 21) Folded Corner
10) Circle Segment 22) Cross
11) Arc 23) Frame
12) Block Arc 24) Ring

Symbol shapes

Figure 205: Symbol Shapes sub-toolbar


Symbol Shapes are numbered from left to right as follows:
1) Smiley Face 10) Square Bevel
2) Heart 11) Octagonal Bevel
3) Sun 12) Diamond Bevel
4) Moon 13) Double Bracket
5) Cloud 14) Left Bracket
6) Lightning Bolt 15) Right Bracket
7) Flower 16) Double Brace
8) Prohibited 17) Left Brace
9) Puzzle 18) Right Brace

256 | Chapter 7, Getting Started with Draw


Block arrows

Figure 206: Block Arrows sub-toolbar


Block Arrows are numbered from left to right as follows:
1) Right Arrow 14) Pentagon
2) Left Arrow 15) Striped Right Arrow
3) Down Arrow 16) Up, Right and Down Arrow
4) Up Arrow 17) Notched Right Arrow
5) Left and Right Arrow 18) Up and Right Arrow
6) Up and Down Arrow 19) Right Arrow Callout
7) Circular Arrow 20) Left Arrow Callout
8) S-shaped Arrow 21) Down Arrow Callout
9) Split Arrow 22) Up Arrow Callout
10) Right or Left Arrow 23) Left and Right Arrow Callout
11) 4-way Arrow 24) Up and Down Arrow Callout
12) Corner Right Arrow 25) 4-way Arrow Callout
13) Chevron 26) Up and Right Arrow Callout

Flowchart

Figure 207: Flowchart sub-toolbar


Flowchart shapes are numbered from left to right as follows:
1) Process 15) Card
2) Alternate Process 16) Punched Tape
3) Decision 17) Summing Junction
4) Data 18) Or
5) Predefined Process 19) Collate
6) Internal Process 20) Sort
7) Document 21) Extract
8) Multidocument 22) Merge
9) Terminator 23) Stored Data
10) Preparation 24) Delay
11) Manual Input 25) Sequential Access
12) Manual Operation 26) Magnetic Disc
13) Connector 27) Direct Access Storage
14) Off-page Connector 28) Display

Callouts

Figure 208: Callouts sub-toolbar


Callouts are numbered from left to right as follows:
1) Rectangular Callout 4) Cloud
2) Rounded Rectangular Callout 5) Line Callout 1
3) Round Callout 6) Line Callout 2

Geometric shapes | 257


7) Line Callout 3

Stars and banners

Figure 209: Stars and Banners sub-toolbar


Stars and Banners are numbered from left to right as follows:
1) 4-Pointed Star 7) Explosion
2) 5-Pointed Star 8) Vertical Scroll
3) 6-Pointed Star 9) Horizontal Scroll
4) 8-Pointed Star 10) Signet
5) 12-Pointed Star 11) Door-plate
6) 24-Pointed Star 12) 6-Point Star, Concave

3D objects

Figure 210: 3D-Objects sub-toolbar


3D objects are numbered from left to right as follows:
1) Cube 5) Pyramid
2) Sphere 6) Torus
3) Cylinder 7) Shell
4) Cone 8) Hemisphere

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.

Figure 211: Text Formatting toolbar

258 | Chapter 7, Getting Started with Draw


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 211) 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 toolbar 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 toolbar 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
1) 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 212).
– 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 cursor 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.

Figure 212: Text information in Status Bar


– 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.
2) 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.

Adding and formatting text | 259


3) 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:
1) Go to Tools > Options > Language Settings > Languages (macOS LibreOffice >
Preferences > Language Settings > Languages).
2) Under Default Languages for Documents, select Asian and accept the default language
displayed.
3) Right-click in a blank area on the Drawing toolbar and select Visible Buttons in the
context menu.
4) Select Insert Vertical Text from the list of available tools to enable vertical text on the
Drawing toolbar.
5) 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.
1) Create an object in a drawing and make sure the object is selected with the selection
handles displayed.
2) 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.
3) Type or paste text into the selected object.
4) If the text goes outside the object borders, format the text using the various tools on the
Text Formatting toolbar, panels in the Properties deck on the Sidebar, options in Format
on the Menu bar, or Text page in the Text dialog. For more information on text formatting,
see the Draw Guide.
5) 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.
1) Switch on text mode and select all of the text required for a list, or type the required text.
2) Create a list using one of the following methods and default settings for lists:

260 | Chapter 7, Getting Started with Draw


– 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.
3) 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.
1) 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.
2) 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.
3) 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.
4) Set the number of columns required in the Number of columns box and the required
spacing between the columns in the Spacing box.
5) 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.
6) If necessary, format the text to the drawing requirements.
7) 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.
8) 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.

Adding and formatting text | 261


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.

262 | Chapter 7, Getting Started with Draw


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 213). 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 213: Object information on left end of Status Bar

Figure 214: Example of moving objects

Figure 215: Example of adjusting object size

Positioning and adjusting objects | 263


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 214).

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 215). 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
1) 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).

Figure 216: Example of rotating an object

264 | Chapter 7, Getting Started with Draw


Figure 217: Example of slanting an object
2) When the object is at the required rotation angle, release the object.
3) 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°.

Slanting
1) 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.
2) 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.
3) When the object is at the desired slant angle, release the object.

Figure 218: Transformations toolbar

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 218) 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.

Positioning and adjusting objects | 265


Object distortion
Three tools on the Transformations toolbar (Figure 218) 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 219.
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 220. For more
information on duplication, see the Draw Guide.

Figure 219: Example of a dynamic gradient

266 | Chapter 7, Getting Started with Draw


Figure 220: Example of duplicating objects
4) 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 221: Duplicate dialog


5) Select the required options in Number of copies, Placement, Enlargement, and
Colors.
6) Click OK to duplicate the object and close the Duplicate dialog.

Positioning and adjusting objects | 267


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 222.
1) Select two differently shaped objects and go to Shape > Cross-fading on the Menu bar
to open the Cross-fading dialog (Figure 223).
2) In Increments enter the number of shapes between the two objects.

Figure 222: Example of cross-fading two objects

Figure 223: Cross-fading dialog


3) Select Cross-fading attributes to apply a gradual change of line and fill properties
between the two objects.
4) Select Same orientation to apply a smooth transition between the two objects.
5) 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 224. For more information on grouping and combining objects, see the Draw Guide.

268 | Chapter 7, Getting Started with Draw


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.

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.

Figure 224: Example of grouping and combining objects


1) Grouped
2) Combined
• 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.

Grouping and combining multiple objects | 269


• 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:
• 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 224 on page 304.
• 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.

270 | Chapter 7, Getting Started with Draw


• 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 3D objects | 271


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.
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
1) Use one of the following methods to open the Insert Layer dialog (Figure 225):
– 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.
2) Enter a meaningful Name, Title, and Description for the new layer in the text boxes.
3) 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.
4) 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.
5) 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.
6) Click OK to create the new layer and close the Insert Layer dialog. A new layer
automatically becomes active when added to a drawing.

272 | Chapter 7, Getting Started with Draw


Figure 225: Insert Layer dialog

Note
Layers are added to the drawing in the order that they were inserted. The layer
order cannot be changed.

Modifying layers
1) 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.
2) Make the required changes to the layer, then click OK to save the changes and close the
Modify Layers dialog.

Figure 226: Color Palette (Color Bar)

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.

Selecting colors | 273


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 226), 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 227), the Color of an
area or line of a selected object can be changed.
1) Select an object in a drawing.
2) 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.
3) Change the color of an area in the Area panel as follows:
a) Select Color in the Fill drop-down list.
b) Click on the triangle ▼ next to the Fill Color box to open a drop-down list of available
color palettes.
c) Select the required color palette from the options available.
d) Click on the required color to change the area color.
4) Change the color of a line in the Line panel as follows:
a) Click on the triangle ▼ next to the Line Color box to open a drop-down list of available
color palettes.
b) Select the required color palette from the options available.

274 | Chapter 7, Getting Started with Draw


Figure 227: Area and Line panels in Properties deck on Sidebar
c) 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.
1) Go to View > Comments on the Menu bar to show or hide the comment markers.

Adding comments to a drawing | 275


2) 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 228). Draw automatically adds the name and the date at the bottom of this text
box.

Figure 228: Example of inserting a comment


3) Type or paste comments into the text box.
4) 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.
5) 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.

276 | Chapter 7, Getting Started with Draw


Getting Started Guide 7.6

Chapter 8,
Getting Started with Base
Relational databases in LibreOffice
Introduction
A data source, or database is an organized collection of information that can be accessed or
managed by software. For example, a list of names and addresses could be turned into a
database that could help you create a mail merge letter, or a business stock list could be a data
source managed through LibreOffice.
When you manage a database in LibreOffice, you will do it through Base. This LibreOffice
module serves as a database front end that can create and store embedded databases or
connect to external databases. This chapter explains how Base can create databases and reads
what is contained in a database, and it also describes how the different parts of the module are
used.

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, which in turn
can be organized into tables. 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 features of the Base module, such as the HSQLDB database engine, and
the ability to create reports) need the Java Runtime Environment (JRE). The JRE
is not installed in Base by default. 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 it. The JRE
is available for Windows and Linux at https://www.java.com/ or some Linux
distributions can use the JRE available from the repository. However, macOS
requires the Oracle’s Java Development Kit (JDK), which includes the Java
Runtime Environment (JRE). You can find the macOS JDK at
https://www.oracle.com/java/technologies/downloads/.

Base can create both flat and relational databases, and it can create databases where fields
have relationships with each other.
For example: Consider a database that lists the books in a library. It will contain fields for the
names of the authors and a field that holds the book’s title. While 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. These are one-to-many relationships: many authors are linked to more
than one book, so this database contains multiple one-to-many relationships.
But the library’s employment database will be different, because its fields contain the names of
the employees plus other fields that contain 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.

278 | Chapter 8, Getting Started with Base


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 and the tables are subsets. Relationships within databases are defined in terms of
unions and intersections of the subsets (tables).

Planning a database
In this chapter, we will show you how to plan a database. In our example, we will create a
database that contains automobile expenses.
The first step in creating a database is to define it by determining what fields are needed. In this
case, we will ask a series of questions about the data:
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, so we will need 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? In this case, the snacks are divided
into two fields: number of snacks and total cost of snacks, and a payment type is also
needed for 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 will be listed together. These date fields
suggest a relationship between the vacation table and the dates in the fuel and food
tables, so the date fields in these tables will be linked when the database is created.
These payment type will include 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
After the fields for the database tables have been listed, we will need a field for
the primary key, which is an identifier that is unique to each record. Some of the
tables already have a suitable field for the primary key but an additional field for
the primary key must be created for other fields (like payment type).

Planning a database | 279


If a table does not have a primary key field, any data that is added, deleted, or
modified must be done with the Execute SQL Statement dialog (Tools > SQL…).
While that process is longer than 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 with the Database Wizard


To create a new database, you should start with the Database Wizard. This wizard can be started
by doing one of the following:
Selecting File > New > Database on the Menu bar
Clicking the arrow next to the New icon on the Standard toolbar and selecting Database in the
drop-down menu.
Clicking 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.
Once the Wizard is started, the first page of the wizard appears (Figure 229). Select the
HSQLDB Embedded entry is selected in the Embedded database drop-down menu, select
Create a new database, then click Next. (Look at the Base Guide for information about using
alternative embedded database engines or existing external databases).

Figure 229: Creating a new database


Next, the second page of the Database Wizard appears (Figure 230) with two questions. For the
first question, make sure the database is registered. And for the second question, click the Open
the database for editing checkbox. Click Finish. The Database Wizard will prompt you to
select a location to name and save the database.

280 | Chapter 8, Getting Started with Base


Figure 230: Registering the new database

Note
To open and close the Data Sources window that contains the list of registered
databases Writer and Calc, select View > Data Sources or press
Ctrl+Shift+F4. If a database is not registered, they will not appear in this
window. and you cannot access it in Writer or Calc if you need to use data from it.

Save this new database with the name Automobile and the Automobile.odb – LibreOffice Base
window appears (Figure 231).

Figure 231: LibreOffice Base window

Creating a new database with the Database Wizard | 281


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
When you create a database, you should save your work regularly. This means
you should 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 only when you save
the database file that the table is written to disk.

Note
All database files in Open Document Format are stored with the *.odb extension.
Files in that format contain 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


Database tables store information in a group of things called fields. For example, a table will use
fields to hold the data in an address book, a stock list, a phone book, or a price list. A database
must have at least one table and will probably have have multiple tables.
Each field can hold data of a single type. For example, an address book that contains phone
numbers would contain phone numbers in fields that are the Phone type. Similarly, a price list
table might 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 231).

Figure 232: Creating a table using Wizard

Using the Table Wizard to create a table


This Base wizard allows you to create two types of tables: business and personal. Each
category contains sample tables from which to choose. Each table has a list of available fields.
Click Use Wizard to Create Table. This opens the Table Wizard (Figure 233).
Step 1: Select fields
First, we will use the wizard to generate a table in the Personal category (CD-Collection):
1) Category: Select Personal and a list of sample tables for personal use appears.

282 | Chapter 8, Getting Started with Base


2) Sample tables: Select CD-Collection and a list of available fields appears in the Selected
fields window..
3) Selected fields: By selecting each field and using the > button, move the following fields
from the Available fields list to the Selected fields list: CollectionID, AlbumTitle, Artist,
DatePurchased, Format, Notes, and NumberofTracks.

Figure 233: Selecting fields from the Personal category


Next, we will use the wizard to create a table from the Business category:
1) Category: Select Business as the Category. Select Employees in the drop-down list of
sample tables.
2) 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.
3) If necessary, click the field name and use the up and down arrows on the right side of
the Selected fields list to move it to the correct position.
4) Click Next.

Tip
You can double-click on a field to transfer it from from the Available fields list the
Selected fields list or double-click a field in the Selected fields list to transfer it
back to the Available fields list.

Creating database tables | 283


Figure 234: Selecting fields for the table
Step 2: Set field types and formats
Once the wizard has helped you to select the fields for your database, it will allow you to assign
properties to each field. (See Figure 235.) In this example, set each field’s properties as follows:

Figure 235: Changing field types

284 | Chapter 8, Getting Started with Base


Note
If any of these fields requires a mandatory entry, set Entry required to Yes. A
blank field will then not be allowed. By default, the Entry required property is set
to No. (Because AutoValue has been set to Yes. Figure 235 does not display the
Entry required field.)

• CollectionID: Since this field must be filled, change AutoValue from No to Yes.
• AlbumTitle:
– Entry required: If all of your music is in album format, set Entry required as Yes. If not,
set this property to No.
– Length: Do not change this property unless you have titles that exceed 100
characters counting the spaces.
• Artist: Set Entry Required to Yes unless you do not always use this field.
• Date Purchased: Field type: default setting. In this case, Entry required should be No
unless you want to add this information to all database entries.
• Format: 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
Since Base requires you to specify the maximum length of each field on creation,
make sure you make each field as large or maybe larger than necessary. By
default, Base uses the VARCHAR format for a text field, so it will only use the
number of characters necessary for the field even if it takes up less space than
than the limit. So when a field uses VARCHAR, a field that contains 20 characters
will only take up 20 characters in the database, even if the limit for the field is set
at 100. In contrast, a text field with the CHAR text format has a fixed length and
that field will be 100 characters long even if 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
Since up and down arrows are available on this page (not shown in Figure 235),
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.

Creating database tables | 285


Step 3: Set primary key
1) In this example, Create a primary key should be checked.
2) Next, select option Use an existing field as a primary key.
3) In the Fieldname drop-down list, select CollectionID.
4) Select Auto value if it is not already checked. Click Next.

Note
A primary key field contains a unique number that can be used to identify a
specific entry in a database. In this case, CollectionID will contain a number that
is assigned automatically by Base to each record of this table.

Step 4: Create table


1) At this point, the wizard will allow you to rename the table. For this example, make no
changes.
2) Leave the option Insert data immediately checked.
3) 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, but a table
named CD-Collection is now listed in the Tables portion of the window.
4) 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 want to create identical tables for each type of music you have, you can make copies of the
original table and name each according to the type of music contained in it.
1) Click on the Tables icon in the Database area of the LibreOffice Base window to see the
existing tables.
2) Right-click on the CD-Collection table icon. Choose Copy in the context menu.
3) Right-click, and select Paste. The Copy table dialog opens.
4) Change the Table name to CD-Jazz, and set Options to Definition and data and click
Create.

Figure 236: Creating copies of original table

Tip
The action buttons on this page allow you to move selected fields, or all fields, in
either direction. You can also double-click to move a field from one list to the
other.

5) Click the Save button on the Standard toolbar at the top of the LibreOffice Base window.

286 | Chapter 8, Getting Started with Base


Caution
After a table has been created in Base and data has been entered, the field
properties cannot be changed. Before you create a table, make sure you have
decided the correct names, length, and format for each field.
As a result, deleting a field deletes all the data once contained in that field.
Changing the field type of a field after the table has been created can lead to data
being lost either partially or completely.
Deleting a table removes all of the data contained in every field of the table. As a
result, do not delete a table unless you are certain.

6) Double-click on the CD-Jazz table icon and visually verify the data before closing the
table
7) Right-click on the CD-Jazz table icon, select Delete and confirm deletion.

Creating Tables in Design View


Once you are familiar with creating a table with the Wizard, use Design View to create a new
table. View allows you to directly enter information about each field in a table. We will use this
method for the next example (the Automobile database).

Note
While the field types and formatting are different in Design View, the process is
similar to the one used in the Table Wizard.

When we create the Automobile database, the first table we will generate is Fuel. Its fields will be
FuelID, Date, FuelCost, FuelQuantity, Odometer, and PaymentType.
1) Find the Tasks area of the LibreOffice Base window and click Create Table in Design
View to open LibreOffice’s Base: Table Design dialog.
2) Enter FuelID into the Field Name field then press Tab key to move to the Field Type
column. Select Integer [INTEGER] from its drop-down field.

Tip
You can select fields from the Field Type drop-down list by pressing the key for
the first letter of the choice. You can cycle through the choices for a given letter by
repeatedly pressing that key.

a) Change the Field Properties in the bottom section of the dialog for FuelID.
Change AutoValue from No to Yes.
b) Set FuelID as the primary key for the Automobile database.
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 237).

Creating database tables | 287


Figure 237: Defining the primary key field

Tip
When you assign certain integer field types (Integer and BigInt for example) to a
field, selecting Yes for AutoValue automatically makes that 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 as a unique ID for each record in a database. You can
use any name for this field. We have used FuelID for convenience, so we know to
what function it serves.

3) When you are creating the Date, FuelCost, FuelQuantity, Odometer, and PaymentType
fields, do the following:
a) Type the field name in the Field Name column.
b) Select the field type:
– 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.
c) FuelCost, FuelQuantity, and Odometer also need changes in the Field Properties
section (Figure 238).
– FuelCost: Change the Length to 5 and Decimal places to 2. Click Format Field
(Figure 238). This opens the Field Format dialog (Figure 239). 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.
d) Repeat steps a) through c) until you have entered all of the fields.

288 | Chapter 8, Getting Started with Base


Figure 238: Changing field properties

Figure 239: Format example options

Creating database tables | 289


4) 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.
5) Close the Table Design dialog.
6) 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 240.

Figure 240: Fields in Vacations table


7) Make the following changes in the Field Properties area of the window.
a) Odometer: As described in step 3)), bullet c)) for the corresponding field of the Fuel
table.
b) 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.
8) 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.
a) Right-click to the left of the field name Date.
b) 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.

290 | Chapter 8, Getting Started with Base


Defining relationships
Now that the tables have been created for the Automobile database, what are the relationships
between these database tables?
When on vacation, you will want to enter all of your 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).
1) Make sure you are still in the Automobile database and 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 241: Designation for a 1:n relationship


2) Once the Add Tables dialog is active, use one of two 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.
3) When you have added the tables you want, click Close to close the Add Tables dialog.
4) Next, define the relationship between the Vacations and Fuel tables by clicking the New
Relation icon on the Standard toolbar or selecting the Insert > New Relation command.
Either command opens the Relations dialog (Figure 242). Our two tables are listed in the
Tables Involved section.
a) In the Fields Involved section, click the drop-down list under the Fuel label.
b) Select Date in the list.
c) Click in the cell to the right of this drop-down list. This opens a drop-down list for the
Vacations table.
d) Select Date in the list. It should now look like Figure 242.

Figure 242: Selected fields in a relationship

Creating database tables | 291


e) Modify the Update Options and Delete Options section of the Relations dialog (Figure
243).
– Select Update cascade in the Update options area.
– Select Delete cascade in the Delete options area.
f) Click OK.
g) In the Relation Design dialog, click the Save icon or select File > Save.
h) Close the Relation Design dialog.
i) 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 will contain the
same number of fields.) If this were the case in Figure 242, 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 243: 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


Once you have created a database to store data, you will need a form. In the language of
databases, a form is a front end for data entry and editing.
A simple form should include all of the fields from a table (Figure 244). More complex forms can
contain much more, including additional text, graphics, selection boxes, and many other
elements. Figure 245 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.

1 A field in a table that stores values of the primary key of records in another table.

292 | Chapter 8, Getting Started with Base


Figure 245: Simple form with additions
Figure 244: Fields of a simple form
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 245, 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

Creating a form with the Form Wizard


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 231), activate the Form Wizard by clicking the Forms icon
in the Database area, selecting View > Forms, or pressing Alt+M. You can also click Use
Wizard to Create Form on the Tasks list to open the Form Wizard (Figure 246). When the Form
Wizard is activated, it displays the Database Form window and the Form Wizard dialog.
Step 1: Select fields
1) On the Form Wizard dialog, under Tables or queries drop-down, select Table: Vacations.
The Available fields list contains the fields for the Vacations table.
2) Move all of these fields to the Fields in the form list by selecting each field and clicking the
the >> button . 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.

Creating a database form | 293


Figure 246: 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, you would have to do it later in the wizard
(Step 4: Get joined fields).
1) Click the box labeled Add Subform.
2) Click the Subform based upon existing relation radio buttons.
3) Fuel is listed as a relation we want to add. So click Fuel to highlight it, as in Figure 247.
Click Next.

Figure 247: Adding a subform


Step 3: Add subform fields
This step is similar to Step 1: Select fields, but not all the fields will be used in the subform.
1) Fuel is preselected under Tables or queries.
2) Use the >> button to move all the fields to the Fields in the form list.
3) Click the FuelID field to highlight it.
4) Use the < button to move the FuelID back to the Available fields list (Figure 248).
5) Click Next.

294 | Chapter 8, Getting Started with Base


Figure 248: Selecting fields for a subform
Step 4: Get joined fields
This step is for tables or queries for which no relationship has been defined. Because the
relationship has been defined in this example, the wizard will skip this step.

Note
Relationships between two tables can be based upon more than one pair of
fields. For more information on this, consult the Base Guide.

Caution
When creating a relationship between fields from two tables, those fields 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 form’s control consists of two parts: label and field. In this step, you determine where a
control’s label and field are placed relative to each other. From left to right, you can choose
Columnar – Labels Left, Columnar – Labels on Top, As Data Sheet, and In Blocks – Labels
Above.
1) In this example, we will arrange the main form by clicking the second icon (Columnar –
Labels on Top). The labels will be placed above the related field.
2) Next, we will arrange the subform by clicking the third icon (As Data Sheet). The labels
are column headings and the field entries are in spreadsheet format. Click Next.

Creating a database form | 295


Figure 249: Arrange controls
Step 6: Set data entry
In this example, accept the default settings and click Next.
Step 7: Apply styles
1) Select the color you want in the Apply styles list. In this example, use the Beige option.
2) Select the Field border you want. In this example, use the 3D look option. You might want
to try different settings.
3) Click Next.
Step 8: Set name
1) Enter the name for the form. Use Vacations.
2) Click Modify the form.
3) Click Finish. The form opens in edit mode, Base will display the Fuel – LibreOffice Base:
Database Form window.

Figure 250: Basic form created using Wizard

296 | Chapter 8, Getting Started with Base


Modifying a form
When a form is generated with the Wizard (Figure 250), it usually needs to be reformatted.
Figure 250 is not organized at all. Every control seems to have a different size and the color
needs to be changed.
These controls are different sizes because they contain different types of field data. Since Base
has three types of controls (text, formatted, and date), these fields are formatted differently. The
width of text controls is designed to display a large number of characters, while formatted
controls are shorter because they will usually contain numbers or decimals. Date controls are
fairly short, except for the date formats is day of the week, month, day, year (Thursday, October
31, 2020), which requires a larger width than 10/31/2020 or 31/10/2020.
First, we will modify the payment type controls. These fields need to be replaced with a list box,
and each list box will be related to an existing field in the table, Payment Type.

Note
The following steps 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.

Next, we will carry out the following steps:


1) Replace fields with list boxes.
2) Modify text controls (label field first and then the data field).
3) Modify the date control.
4) Modify formatted controls.
5) Modify fields in the table.
6) Group the controls (food, fuel subform, and miscellaneous).
7) Modify the memo control.
8) Add headings (for each group in the form).
9) 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.
10) Change tab order of fields.
Figure 251 shows a section of the Form Design toolbar and key icons are identified that will be
used during the following steps. Figure 252 shows the Form Navigator.

1 Design Mode 3 Form Properties


2 Control Properties 4 Form Navigator
Figure 251: Part of Form Design toolbar

Modifying a form | 297


Figure 252: Form Navigator
Step 1): Replace fields with list boxes
1) Open the Control Properties and Form Navigator dialogs and click the Control
Properties and Form Navigator icons. (You may need to select a control to make the
Control Properties icon available)
2) Open the Form Navigator and click the first text box whose name contains the word
“Payment”.
3) 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
If the Form Navigator does not have the input focus, selecting a field highlights
both field components (for example, label and text). 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.

4) Right-click the text box in the Form Navigator, right-click to bring up the context menu,
then select Replace with > List Box.
5) In the Properties dialog, the heading will become Properties: List Box and the General tab
is selected. Scroll down to the Dropdown property and change No to Yes.
6) Select the Data tab.
7) Go to Type of list contents. Change Valuelist to Sql.
8) The line below this becomes List content. Click the ellipsis (…) to the right of this property
to open the SQL Command – LibreOffice Base: Query Design window and the Add Table
or Query dialog.
9) The PaymentType table has the required entries. Click it, and then click the Add button.
10) Close the Add Table or Query dialog.
11) 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.

298 | Chapter 8, Getting Started with Base


Figure 253: Selecting PaymentType
12) Save and close this window. The SQL code appears in the List content property. (SELECT
"Type" FROM "PaymentType")
13) Change the Bound field value from 1 to 0.
14) 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


1) In this step, you will modify the text labels and fields to make them more meaningful.
a) Locate the topmost text control in the Form Navigator.
b) Select the associated control label (begins with lbl). The title of the Properties dialog
should have become Label Field.
c) Click the General tab if it is not already selected.
d) 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.
e) Click on another property to save this change.
f) Adjust the width of the label field if necessary for the new width of the label name.
g) Repeat a) through f) for each label field in the form that contains the word Payment.

Modifying a form | 299


Note
Base allows you to paste the title of a control in multiple control fields. Once the
control title Payment Type has been entered for the first time, it can be copied.
For the next label, highlight the current label name, paste the name you want, and
click another property.

2) Resize the fields.


a) Make sure that you are in the edit mode and have opened the Form Navigator and
Properties dialogs.
b) In the Form Navigator dialog, click the field whose size you want to change.
c) Scroll down to the Width property in the Properties dialog.
d) 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 254: Modifying listbox properties


e) Click either the PositionY or the Height property to save the change. Also, clicking on
any other property will do the same thing.
f) 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
1) 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.
2) In the General tab of the Properties dialog, scroll down to the Date format drop-down list,
and select the date format you desire.
3) Scroll down to the Dropdown property and select Yes.

300 | Chapter 8, Getting Started with Base


4) Is the width of the Date field inappropriate for the selected format? If so:
a) The Date field has a border around it.
b) 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
Next, make a list of the formatted fields and their labels in the Form Navigator. The fields have
the fmt prefix. (There are eight of them.)
One of these fields, Odometer, contains the odometer readings as integers. The rest are
currency fields.
Perform the following tasks with each field:
1) Revise the label of the control so it has the proper annotation. In the case of lblSnCost,
change it to Snack Cost.
2) 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.
3) Click this formatted field in the Form Navigator list.
4) Under the General tab, scroll down to the Formatting property.
5) Click the ellipsis (…) on the right to open the Format Number dialog.
6) For the Odometer field click Number in the Category list, otherwise click Currency.
7) Under Format, select a field.
8) Select the desired number of decimal places (one for Odometer, two otherwise).
9) Select the desired number of leading zeros.
10) Negative numbers red: check if yes, remove the check if no.
11) Thousands separator: check if yes, remove check if no.
12) Click OK.
13) If the width of the field is not correct for the selected format, adjust its width as described
for the Date field above.
14) 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 the controls are in the column headings and 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 the table control must be modified. To change things, access that particular
control’s properties by clicking the header.
1) Click the Date label (select the column named Date).
a) Scroll to the Date format property and select the format you desire from the drop-
down list, if that format differs from the default setting.
b) Scroll to the Width property. Adjust the width if necessary.
c) Scroll to the Dropdown property. If you want to have a small calendar pop-up window,
select Yes.

Modifying a form | 301


2) Click the FuelCost label.
a) Open the drop-down list for the Label property. Add a space between Fuel and Cost
then press Enter.

b) Scroll to the Formatting property. Click the ellipsis (…) on the right. Select Currency
from the Category column. Uncheck the Negative numbers red and the Thousands
separator. Click OK.
c) Scroll to the Width property. Adjust the width if necessary.
d) 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.
3) Click the FuelQuantity label.
a) Open the drop-down list for the Label property. Add a space between Fuel and
Quantity. Press Enter.

b) Scroll to the Formatting property and change to show three decimal places if needed.
c) Scroll to the Width property. Adjust the width if necessary.
d) 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.
4) Click the Odometer label.
a) Scroll to the Formatting property. If you wish to show one decimal place, make the
change.
b) Scroll to the Width property. Adjust the width if necessary.
c) If you do not want data to be to the left, change the Alignment property and if you
want to put the data in the middle of the cell, select Center.
5) Click the PaymentType label.
a) Right-click this label, then add a list box in a context menu by selecting Replace with
> List Box.
b) Open the drop-down list for the Label property. Add a space between Payment and
Type. Press Enter.

c) On the Data tab, change the Type of list contents property to Sql.
d) Paste the SQL code SELECT "Type" FROM "PaymentType" into the List content
property. (This is a shortcut method – see the Tip on page 339 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.
1) 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.

302 | Chapter 8, Getting Started with Base


Figure 255: 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.

2) 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, do not use the PositionX and PositionY properties to
place the control, because this will place the control’s label and field on top of
each other. Those properties can 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.

Modifying a form | 303


Figure 256: Form suggested layout
The layout shows where each control of a group goes for each of these groups. 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.
3) Before you move an entire group to a new location, move the controls within the group to
where you want them to be relative to each other.
a) Click on the first control, placing a border around it.
b) Place the mouse pointer over the label or field where it changes its shape.
c) Drag it to an open area of the form.
d) Using the same method, move the second control to the correct position relative to
the first control.
e) 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.
f) If there is a third control, move it to the correct position relative to the second one.
4) Move the controls for the group to where you want them:
a) Click the first component in the Form Navigator list.
b) Use the standard Control+Click and Shift+Click mechanisms until all of the
labels and fields in this group are highlighted.

304 | Chapter 8, Getting Started with Base


c) Place the mouse pointer over one of the labels or fields changing the arrow.
d) Drag the group to where you want its controls to be.
5) 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 to a place that permits the controls of the form
to be organized without changing the size of the Note control. If the size 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.
1) To change the size of this control, follow the same steps for changing the size for any text
control.
2) If necessary, move the control to the required position using the same steps described
above for grouping the controls (Step 6).
3) Click the Control Properties icon on the Form Design toolbar if the Properties dialog is
not open.
4) Select the txtNotes control in the Form Navigator dialog.
5) On the Properties dialog, click the General tab if it is not selected.
6) Scroll down to the Text type property.
7) Select the Multi-line option in its drop-down list.
8) Scroll down to the Scrollbars property.
9) In its drop-down list, select the option you need (None, Vertical, Horizontal, or Both).
10) Close the Properties dialog.

Figure 257: Scroll bar selections in the Properties dialog


Step 8): Add headings

Modifying a form | 305


This task is easier to complete if you have end-of-paragraph markers visible. You should turn
them on by selecting View > Formatting Marks, clicking the Toggle Formatting Marks icon on
the Standard toolbar, or by pressing Ctrl+F10.
1) Make sure that the cursor is in the top left hand corner of the Database Form window.
2) Move the cursor with the Enter key until it aligns with the gap between the Date field
and the Breakfast field.
3) Select the Heading 2 style from the Set Paragraph Style drop-down list.
4) Place the input cursor where the first heading should be. Enter the heading Meals.
5) Move the input cursor with the space bar to the location where the second heading will
appear. Type the heading Snacks.
6) Press the Enter key repeatedly to move the cursor down until it aligns with the gap
between the Supper field and the table.
7) If the style has changed, use the Set Paragraph Style drop-down list on the Formatting
toolbar to reselect the Heading 2 style.
8) Move the input cursor to the position where you want the table heading to appear. Type
the heading Fuel Data.

Tip
The Styles deck can be opened by selecting View > Styles or by pressing F11.
Also, you can quickly modify the appearance of all three headings by right-
clicking the Heading 2 style and selecting the Modify option in the context menu
would allow. See the Writer Guide for details.

Step 9): Change the background


The background for a form can be a color or an image. Select a color from the color palette at
Tools > Options > LibreOffice > Application Colors or create a custom color from the RGB
fields.
To add a color to the form background:
1) Right-click the form and select Page Style in the context menu.
2) The Page Style dialog (Figure 258) will appear. Make sure the Area tab is selected.

306 | Chapter 8, Getting Started with Base


Figure 258: Page Style dialog
3) Select Color in the row of buttons near the top of the tab.
4) Select a color from the grid. If you wish to access more choices, choose a palette from
the Palette drop-down menu or use the RGB or Hex boxes to create a specific color or
click Pick for even more choices.
5) Click Apply to see what your selection will look like in your form.
6) Change if necessary.
7) Click OK to accept your color choice and close the dialog.
To add other form backgrounds:
1) Perform steps 1) and 2) from the previous numbered
2) Select the type of background from the row of buttons: None, Gradient, Bitmap, Pattern,
or Hatch.
3) 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.
4) Click Apply to see what your selection will look like in your form.
5) Click OK to accept your choice and close the dialog.
If you selected a bitmap in the list, the form might look like Figure 259.
Step 10): Change the tab order
The Tab key moves the cursor from field to field. This method 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.

Modifying a form | 307


Figure 259: Finished form

Figure 260: Form Design toolbar with Activation Order icon circled
1) Select View > Toolbar > Form Design to open the Form Design toolbar.
2) Click the Activation Order icon (circled in Figure 260).
3) Rearrange the field order in the Tab Order dialog.
a) If you click the Automatic Sort button, Base will automatically generate a tab order.
b) You can use the Move Up and Move Down buttons to change the position of a
selected control in the list.
c) If necessary, drag a control from one position to another in the Controls list.
d) Define a tab order. If you like, you can put the fields in the same order as Figure 261.
e) Click OK.
4) Save and close the form.
5) Save the database.

308 | Chapter 8, Getting Started with Base


Figure 261: Possible tab order for the Vacations form

Entering data in a form


Different types of fields allow different methods of data entry. In many cases, more than one data
entry method can be used.
First, open the form from the main database window (Figure 231).
1) Click the Forms icon in the Database list, or select View > Database, or press Alt+M.
2) Find the form’s name in the Forms list (Vacations).
3) Double-click the form’s name.
The quickest way to enter a date in the Date field is to click on the arrow that opens the drop-
down calendar (Figure 262) and select the day that you want. Then press the Tab key to go to
the next field.

Entering data in a form | 309


Figure 262: 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 chose to display to displace the arrows when the form was
created). After you have entered a value in a field, use the Tab key to go to the next field.
• To increase the value, click on the up arrow. If you need to decrease the value, click on
the down arrow.
• The up and down arrows only change the numbers to the left of the decimal place.
• If you need to change numbers to the right of the decimal place, delete them and enter
the desired numbers.
The Motel’s Payment Type field is a drop-down list. If the elements of the list start with different
letters, you move to a field by entering the first letter of the field’s title.
• 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 form’s remaining fields are either numeric fields or drop-down lists until you reach the Notes
field (which 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. However, there are some limitations
where other keys.
Since text fields do not have tab positions, they can not move from one position in
the field to another one. All spacing must be done by the space bar.
The Enter key can be used to move between non-text fields, but the function of
the Enter key in text fields depends upon whether the text field has a single line
property. If it does, pressing Enter will move the cursor to the next field. But if the
text field has been assigned 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 there was no 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 for the
next record.

310 | Chapter 8, Getting Started with Base


Because we have a subform, the Tab key has a different function. It 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.
When the form has a subform, click any of the fields of the main form to move to another record.
In this case, click the Date field of the main form. Then use the directional arrows at the bottom.
Move 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
Each record is numbered and the Record box contains the number of the record
whose data is shown in the form.
If you need to go to a specific record, enter the record’s number into the record
box and type Enter to take you to that record.

Figure 263 is a record with data inserted in its fields.

Figure 263: Sample record of the Vacations form and subform

Entering data in a form | 311


Quickly populate a table with data from a spreadsheet
You can drag and drop a spreadsheet that uses the format for a database table into a database
table by doing the following:
1) Open the database file in the LibreOffice Base window (Figure 231) and select the Table
view.
2) Open the spreadsheet in Calc. Use a sheet that is formatted the same as the database
table.
3) Place the two windows side by side in the desktop.
4) Drag the sheet tab at 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.)
5) Drop the sheet by releasing the mouse button. The Copy table wizard appears to help
you migrate the content to the database table.
6) When the first page of the wizard appears to select the options of the copy operation and
name the database table. Each option is explained in the Help (F1). Next, use the second
page select the sheet columns you want to copy into the table. And finally, the third page
of the wizard allows you to define the data type of each column of your table.
7) 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
If you need get specific information from a database, use a query. Their results are special tables
within the database. This document will demonstrate two different methods for building queries
by:
• Use the Query Wizard to generate a list of albums from a particular artist from the CD-
Collection table.
• 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.)

Method 1: Use the Wizard to create a query


Queries created by the Query Wizard provide a list of information—a single answer or multiple
answers, depending upon the circumstances.
To generate a query with the Wizard, do the following:
1) Open the main database window (Figure 231).
2) Click the Queries icon in the Database section.
3) Select View > Queries, or press Alt+Q.
In the Tasks section, click Use Wizard to Create Query. The Query Wizard dialog opens (Figure
264). We will use the query to find albums by a certain musical group or individual (the album’s
artist), including when each album was bought.

312 | Chapter 8, Getting Started with Base


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 264: First page of the Query Wizard


Step 1: Select the fields
1) Select the Table: CD-Collection option in the Tables drop-down list.
2) Find the Available fields list fields in the CD-Collection table:
a) Click Artist, and use the > button to move it to the Fields in the Query list.
b) 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.
c) 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.
d) In other circumstances, you can use the >> and << buttons to move all fields in one
list to the other list.
3) 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


Base allows you to sort the information of our query with up to four fields. In this step, we must
first decide which field is most important. In this query, the artist field is most important to us, next
field is the album title, and finally the date purchased field is of least importance.

Creating queries | 313


Figure 265: Sorting order page
1) Click the first Sort by drop-down list.
a) Select the CD-Collection.Artist option.
b) To list the artists in alphabetical order (a-z), select Ascending on the right.
2) Click the first Then by drop-down list.
– Select CD-Collection.AlbumTitle and then select Ascending.
3) Click the second Then by drop-down list.
– Select CD-Collection.DatePurchased and then select Ascending.
4) Click Next.
Step 3: Select the search conditions
Next, we will 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.

1) Since we are only searching for one thing, we will use the default setting of Match all of
the following.
2) We are looking for a particular artist, so select CD-Collection.Artist in the Fields drop-
down and is equal to in the Condition drop-down.
3) Type the name of the artist in the Value box.
4) Click Next.

314 | Chapter 8, Getting Started with Base


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).
1) Change the alias for AlbumTitle to Album Title.
2) Change the alias for DatePurchased to Date Purchased.
3) Click Next.
Step 8: Checking results
1) Make sure that you have the query conditions listed in the Overview.
2) If something is wrong, use the Back button to move to the step that contains the error.
3) Then use the Next button to return to this step.
4) Name the query (suggestion: Query_Artists).
5) To the right of this are two choices. Select Display Query.
6) 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.

Method 2: Use 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 266) and the LibreOffice Base: Query Design
window.
Step 2: Add tables to window
1) In the Add Table or query dialog, click Fuel to highlight it.
2) Click Add.
3) Click Close.
4) Base closes the Add Table or Query dialog and includes the Fuel table in the upper area
of the Query Design window.

Creating queries | 315


Figure 266: Add Table or Query dialog

Tip
Move the mouse pointer over the bottom edge of the Fuel table (Figure 267) and
drag the edge to make it longer and easier to see all of the fields in the table.

Figure 267: Fuel table in query


Step 3: Add fields to the table at the bottom
1) Double-click the FuelID field in the Fuel table.
2) Double-click the Odometer field.
3) Double-click the FuelQuantity field.
4) Double-click the FuelCost field.
The query table at the bottom of the Query Design dialog should now have four columns (Figure
268).

316 | Chapter 8, Getting Started with Base


Figure 268: Query table
Step 4: Set the criterion for the query
We want the query to include FuelID values that are greater than 0.
1) Type >0 in the Criterion cell under FuelID in the query table.
2) Click the Run Query icon on the Query Design toolbar(circled in red in Figure 269), or
click View > Run Query, or press F5.

Figure 269: Run Query icon in Query Design toolbar


Base presents the results of the query in the area above the query table.
Figure 270 shows the Fuel table with sample entries. The query results based upon the Fuel
table are shown in Figure 271.

Figure 270: Fuel table

Figure 271: Query of Fuel table


Step 5: Save and close the query
Since this query contains the final odometer reading for our calculations, you sure 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
1) Click Create Query in Design View in the Tasks area to open a new query.
2) Base opens the LibreOffice Base: Query Design window and the Add Table or Query
dialog.
3) 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.

Creating queries | 317


4) Add the End-Reading query to this query.
a) Click Queries to get the list of queries in the database (Figure 272).
b) Click End-Reading.
c) Click Add, and then click Close.
d) 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 272: Selecting queries to add to another query


Step 7: Add fields to the table at the bottom of the query
When calculating the fuel economy, we will need the fuel quantity and distance traveled. Since
the final odometer reading reveals the fuel quantity, 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 273: Tables in this query


1) Double-click FuelQuantity in the End-Reading query.
2) Double-click Odometer in the End-Reading query.
3) Double-click Odometer in the Fuel table.

Figure 274: Added fields to the query


Step 8: Enter the FuelID difference field
The difference between the FuelID value of the Fuel table and FuelID value of the End-Reading
query should equal one (1).
1) Type "End-Reading"."FuelID" - "Fuel"."FuelID" in the field to the right of the
Odometer field of the Fuel table (Figure 275).

318 | Chapter 8, Getting Started with Base


2) Type = '1' in the Criterion cell of this column.
3) Leave the Visible cell of this column unchecked.
4) Calculate the distance traveled:
– Type in the next empty Field cell (Figure 276): "End-Reading"."Odometer" -
"Fuel"."Odometer"
– In the Alias row, type Distance.
– Type > '0' in the Criterion cell.
5) Calculate fuel economy: Type ("End-Reading"."Odometer" -
"Fuel"."Odometer")/"End-Reading"."FuelQuantity" in the next column to the
right of the word Field (Figure 277).
6) Type Fuel Economy as the alias.

Figure 275: Typing in calculation of fields

Figure 276: Field for distance traveled calculations

Figure 277: Fuel economy calculation field

Creating queries | 319


Note
When entering fields for these calculations, follow this format: table or query
name. Then add a period and 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 277.
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


First, we will run the query to make sure it works correctly. Once we are sure that the query will
work, we will hide all of the fields that we do not need.

Figure 278: Result of running the fuel economy query


1) Click the Run Query icon on the Query Design toolbar (Figure 269). The results are
shown in Figure 278.
Two of the column headers are identical. By giving these two headers different aliases,
we can distinguish them.
2) Add Aliases: Type the aliases as they are listed in Figure 279.

Figure 279: Query table with Odometer aliases added


3) Run the query again. The results are in Figure 280.

Figure 280: Query run with aliases


Step 10: Close, save, and name the query
Name the query Fuel Economy.
1) Click the Save icon.
2) Name the query.
3) Close the query.
4) 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.

320 | Chapter 8, Getting Started with Base


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 retrieve information found in the database and arrange it in useful ways. They are similar
to queries except that they are designed to be read by people. Queries are only designed to
retrieve selected data from 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 first you need to decide what fields
you want to use in the report. Before you use fields from different tables, you must first combine
these fields in a single query or view. Then you can use this information to create a report.
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. Then this report will
allow 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
275). 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.

Example: Creating a report


We will create a report on vacation expenses. Before we create the report, we will need to know.
• 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.

Creating reports | 321


We will now create two reports. One will list 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 next 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


1) When you open the Report Wizard, the Report Builder open as well. 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.
2) 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


Before we begin, we must create a new report:
1) Click the Reports icon in the Database area of the main Base window (Figure 231), or
select View > Reports, or press Alt+R.
2) In the Tasks list, click Use Wizard to Create Report. The Report Wizard dialog and the
Report Builder window open.
Step 1: Field selection
1) Select Table: Vacations in the Tables or queries drop-down list.
2) 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 other wizard pages as described earlier in this chapter.
3) Click Next.

Figure 281: Adding fields to a report


Step 2: Labeling fields

322 | Chapter 8, Getting Started with Base


Change any field labels you wish. We will shorten Miscellaneous to Misc. and expand SnackCost
into two words.

Figure 282: Giving aliases to fields


1) Shorten Miscellaneous to Misc.
2) Change SnCost into Snack Cost.
3) Click Next.
Step 3: Grouping
1) Since we are grouping by the date, use the > button to move the Date field from the
Fields list to the Groupings list.
2) 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 or you can double-
click to move a field from one list to the other.
3) Click Next.

Figure 283: Selecting fields for grouping data


Step 4: Sort options
We do not want to do any additional sorting.
• Click Next.
Step 5: Choose layout
1) Select Columnar, three columns in the Layout of data list.
2) Layout of headers and footers have no possible selections.

Creating reports | 323


3) Select Landscape as the Orientation for the page layout.
4) Click Next.

Figure 284: Report Builder template determined by the Report Wizard


Figure 284 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
1) Title the report: Vacation Expenses.
2) Select the Dynamic report option.
3) Select the Create report now option.
4) Click Finish.
5) LibreOffice opens the output report in read-only mode in Writer.
The report (Figure 285) has been created. However, the date could be formatted better and all
the numbers need to be formatted as currency, and the report could have 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 285: Report without modifications

Report Builder: another way to create reports


The Report Builder allows you to create complex database reports. You can define group and
page headers, group and page footers, and calculation fields. Report Builder is installed with
LibreOffice.
While the Report Wizard allows us to create a template in Report Builder for our report. When we
open Report Builder, we open it 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 can link to an external document containing a list of names and
addresses into a letter. One copy of the letter being generated for each entry.

324 | Chapter 8, Getting Started with Base


To access a data source that is not a *.odb file:
1) 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.
2) Select Connect to an existing database. Select the required database type in the drop-
down list. Click Next.
3) The remaining steps in the Database Wizard may vary depending on which database
type you have chosen.
4) At some stage the wizard may prompt you to browse and select a database of interest.
Normally, you will select it to register the database and open the database for editing.
5) 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:
1) 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.
2) Select Connect to an existing database. Select Spreadsheet in the drop-down list.
Click Next.
3) Click Browse to locate the spreadsheet you want to access. If the spreadsheet is
password protected, check the Password required box. Click Next.
4) Make sure that the Yes, register the database for me and Open the database for
editing options are selected.
5) Click Finish to exit the wizard. Name and save the database in the location of your
choice.

Note
If you access a spreadsheet with this method, 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 with Calc.
After modifying the spreadsheet and saving it, the changes will be in the
database. When 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:
1) Choose Tools > Options > LibreOffice Base > Databases.
2) Under Registered Databases, click New. LibreOffice displays the Create Database Link
dialog.
3) Browse to where the database is located. Make sure the registered name is correct.
4) Click OK.

Accessing other data sources | 325


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


Once the data source is registered, 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


First, open a document in Writer or Calc and view the data sources available by pressing
Ctrl+Shift+F4 or select View > Data Sources. This brings up a list of registered databases,
including 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 286). 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 286: 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 287: 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.

326 | Chapter 8, Getting Started with Base


Figure 288: 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 289: Toolbar for the Data Sources window

Tip
Choose Tools > Mail Merge Wizard or click on the Mail Merge icon (circled in
Figure 289) 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
When you need to insert a field from a table in the Data Sources window into a Writer document,
click on the field name (the gray square at the top of the field list) 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, if you wish to enter the cost of meals and who paid for them on a certain date of a
vacation into the database:
1) Open the list of data sources (Ctrl+Shift+F4) and select the Vacations table in the
Automobile database.
2) 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.”
3) 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.

Using data sources in LibreOffice | 327


4) 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>.
5) To replace the first (name), click the BPayment field name and drag it to the right of paid
by. Result: paid by <BPayment>.
6) 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.
7) 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>.
8) Add data to the fields of the sentence:
a) 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 290.
b) Click the Data to Fields icon in the Table Data toolbar (circled in Figure 290). This
should fill the fields with the data from the row you chose.
c) Click another row and then click this icon again. The data in the sentence changes to
reflect this selected row of data.
d) Save the document if you want to use it as an example later.

Figure 290: Selected row in Data Sources window


Adding any data in table format is easier. Some of the steps are quite similar.
1) Navigate to the place you want to place the table and click the location.
2) 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.
3) Click the Data to Text icon to open the Insert Database Columns dialog (Figure 291). (The
Data to Text icon is to the left of the Data to Fields icon in Figure 290.)
4) Move the fields you want in your table from the Database columns list to the Table
column(s) list.
– To place the fields in order, 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.

328 | Chapter 8, Getting Started with Base


– You can double-click a field in one list to move it to the other list.
5) To start over, click the double arrow pointing to the left (this icon may have a different
appearance in some environments).
6) Select the settings for your table. Use the default settings as in Figure 291.
7) Click OK. Save the document.

Figure 291: Insert Database Columns dialog

Calc spreadsheets
There are two ways to transfer data into a Calc spreadsheet:
Enter the data into the spreadsheet cells.
Create 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.
Use the Data to Text icon to enter data directly to the spreadsheet cells as if you are making a
table in a Writer document. But there are certain differences.
The steps are straightforward.
1) Click the cell of the spreadsheet which you want to be the top left cell of your data,
including the column names.

Using data sources in LibreOffice | 329


2) Use Ctrl+Shift+F4 to open the Data Sources window and select the table whose data you
want to use.
3) 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.
4) Click the Data to Text icon to insert the data into the spreadsheet cells.
5) 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.
1) 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.
2) Repeat until you have copied all of the fields you need to where you want them in the
spreadsheet.
3) 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 292.) 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 292: Navigation arrows of a form

330 | Chapter 8, Getting Started with Base


Getting Started Guide 7.6

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. Sample formulas are
shown below:
df (x)
=ln(x)+ tan−1 (x 2) or NH 3+H 2 O ⇌NH+4 + OH −
dx
The Formula Editor in Math uses a markup language to represent formulas. This markup
language is designed to be easily read by users. For example, a divided by using markup
a
language produces the fraction when used in a formula.
b

Getting started
The Formula Editor creates a formula as a separate file that can become a formula library or can
be inserted 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 299):
• 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 293: LibreOffice Math window parts


• From within LibreOffice Math, use the keyboard shortcut Ctrl+N.

332 | Chapter 9, Getting Started with Math


When the markup language in the Formula Editor is entered, the formula will appear in the
Preview window as the markup language is entered in the Formula editor. If the Elements panel
has been selected in View on the Menu bar, it may appear on the sidebar to the right of the
Preview window. (Figure 294).
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 78.

Figure 294: Enabling the Elements panel

Formulas in LibreOffice documents


To insert a formula into a LibreOffice document, open the target document in Writer, Calc, Draw,
or Impress.
• 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 the Menu bar and select Insert > Object > Formula Object to open the Formula
Editor. Or, you may 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.6 Formula” and
then click OK to open the Formula Editor.
The Elements panel will be on the right of the Preview window if Elements has been selected in
View on the Menu bar.
Figure 295 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. If you need to edit the formula,
double-click on the formula object in the document to open the Formula Editor again. .
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 399, “Formulas in Calc,
Draw, and Impress” on page 404, and the user guides for Writer, Calc, Draw, and Impress.

Getting started | 333


Figure 295: Empty formula in a Writer document
If you need to insert formulas frequently, you should add the Formula button to the Standard
toolbar or create a keyboard shortcut. See “Customization” on page 406 for more information.

Creating formulas
You can create a formula with one of the following methods:
• Go to 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 into 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, you ought to select Extended tips in LibreOffice
Options. This will help you to identify the categories and symbols that need to be
used in the formula. Go to Tools > Options > LibreOffice > General on the
Menu bar and select Extended tips in the Help section.

334 | Chapter 9, Getting Started with Math


Elements panel
The Elements panel (Figure 294) 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.
1) Go to View > Elements on the Menu bar to open the Elements panel.
2) Select the category for the formula from the drop-down list at the top of the Elements
panel.
3) Select the symbol for the formula in the Elements panel. The symbols that are available
change according to the selected category.
4) 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 294, or
positioned to the right of the Formula Editor, as shown in Figure 295.

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 which allows users to access categories and
symbols while they are creating formulas. To open the context menu, right-click in the Formula
Editor. Then select a category and select the markup example for use in the sub-context menu.
An example is shown in Figure 296.

Note
The Elements panel and the context menu only contain the commands that are
most commonly used in formulas. If a symbol or a command is not listed in the
Elements panel and context menu, you must insert it manually with the markup
language. For a complete list of commands and symbols available in Math, see
Appendix A, Commands Reference, in the Math Guide.

Creating formulas | 335


Figure 296: 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 5×4 . For experienced markup language users, it
can be the quickest way to enter a formula. Table 10 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 10: Example commands using markup language
Display Command Display Command
a=b a = b √a sqrt {a}

a
2 a^2 an a_n

∫ f (x)dx int f(x) dx ∑ an sum a_n


a≤b a <= b ∞ infinity
a×b a times b x⋅y x cdot y

Greek characters
Using markup language
Greek characters are commonly used in formulas, but they cannot be entered into a formula with
the Elements panel or the context menu. When entering Greek characters into a formula, use the
English names of Greek characters in the markup language See Appendix A, Commands
Reference, in the Math Guide for a list of Greek characters that can be entered using markup
language.

336 | Chapter 9, Getting Started with Math


• 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.
1) Make sure the cursor is in the correct position in the Formula Editor.
2) Go to Tools > Symbols on the Menu bar, or click the Symbols icon in the Tools toolbar,
to open the Symbols dialog (Figure 297).
3) Select Greek in the Symbol set drop-down list. For italic characters, select iGreek in the
drop-down list.
4) 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.
5) Click Close after entering Greek characters into the formula.

Figure 297: Symbols dialog

Formula examples
Example 1
The simple formula 5×4 can be created using LibreOffice Math by performing the following
steps:
1) 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:
2) Go to the Elements panel, select Unary/Binary Operators in the drop-down list, and then
select the Multiplication icon .

Creating formulas | 337


– 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 formula 5×4 directly into the document and there is no
need to carry out steps two or three.
3) 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.
4) 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 formula π ≃ 3.14159 where the value of pi is rounded to 5 decimal places,
without knowing markup associated with the Is Similar Or Equal symbol ≃ , follow these
steps:
1) Make sure the cursor is flashing in the Formula Editor.
2) Enter %pi in the Formula Editor to enter the Greek character for pi (π).
3) 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.
4) Delete the first placeholder <?> before the word simeq in the Formula Editor.
5) Select the second placeholder <?> after the word simeq in the Formula Editor and replace
it with the characters 3.14159. The formula π ≃ 3.14159 now appears in the
document.

Editing formulas
If you need to edit a formula, the approach differs depending on whether the formula is in Math or
another LibreOffice component.

338 | Chapter 9, Getting Started with Math


1) 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.
2) 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.

3) Select the formula element to be changed with one of the following methods:
– Click on the formula element in the Preview window, position 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.
4) Make changes to the selected formula element.
5) 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.
6) In Math, save changes to the formula after editing.
7) 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 discusses how to lay out complex formulas in Math or in a LibreOffice document.

Using braces
Since 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
2 over x + 1 gives the result +1
x
In this example, Math recognizes that the 2 before and the x after the over command
belongs to the fraction, and has represented them accordingly. If x +1 rather than x
is going to be the denominator, they must be bracketed together using braces.
2
Inserting braces into 2 over {x + 1} gives the result where x +1 is now the
x +1
denominator.

Formula layout | 339


Example 2
−1
– 1 over 2 gives the result
2
Math recognizes 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, the fraction must be put in braces to signify to Math that the
characters belong together.
1
Adding braces into the markup language – {1 over 2} gives the result – and the
2
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
x over {–x + 1} gives the result
– x+ 1
Replace the braces using the commands lbrace and rbrace in the markup language.
x
Write x over lbrace –x + 1 rbrace and the result is
{– x +1}

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 }
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.
a b
( matrix { a # b ## c # d } ) ( )
c d
To overcome this problem, Math gives you 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)


(ac bd )
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) ( 14 2 3
6 )

340 | Chapter 9, Getting Started with Math


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 is a closing
one. If there is no closing bracket, Math will place an inverted question mark next to where the
closing bracket should be 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 {a ; b}. However, there are cases where an
unpaired bracket is necessary (see below).

Non scalable brackets


When a backslash \ is placed before a non scalable bracket, it indicates 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 [a ; b [ 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 {
|x|= x for x≥0
−x for x <0
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 a basic installation of Math, the software 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.

Formula layout | 341


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


When a formula 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, you must use the markup command newline.
The examples below illustrate how the markup command newline can be used to add a new line
to a formula.
Examples
The first example simply adds an Enter to break the line in the markup language, which
does not result in adding a new line, while the second example uses the newline
command and yields a two-line formula.
Markup Language Resulting Formula
x = 3
y = 1 x=3 y=1

x = 3 newline y = 1
x=3
y=1
Math cannot create multiple line formulas when a line ends with an equals sign or continue the
formula on a new line without completing the term on the right side of the equals sign. If a
multiple line formula needs 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 406.

Spacing within formulas


If you need spacing between the elements in a formula, they are not set by using space
characters in the markup language. To add spaces into a formula, use one of the following
options:
• The grave ` to add a small space.
• The 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 394.

342 | Chapter 9, Getting Started with Math


Adding limits to sum/integral commands
The sum and int commands, which are used for summations and integrals respectively, can use
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 examples seen below. 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
n
sum from k = 1 to n a_k ∑ ak
k=1

sum to infinity 2^{-n} ∑ 2−n
n m
sum from{ i=1 } to{ n } sum from{ j=1; i
<> j } to{ m } x_ij ∑ ∑ x ij
i=1 j=1 ;i≠ j
x
int from 0 to x f(t) dt ∫ f (t) dt
0
x
int_0^x f(t) dt ∫0 f (t )dt
int from Re f ∫ℜ f

Writing derivatives
When writing derivatives, use the over command to identify fractions to Math. The over
command 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
{df} over {dx}
dx
∂f
{partial f} over {partial y}
∂y
2
{partial^2 f} over {partial t^2}
∂ f
2
∂t

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 406 for more
information.

Formula layout | 343


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 2 %=0.02 . 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 406 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 x for x≥0 . All characters, except double quotes, can
be used in text.
However, if you need 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 298.

Figure 298: 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 390.
By default, text alignment is left-justified in formulas. For more information on how to change text
alignment, see “Adjusting formula alignment” on page 396.

Formatting text in formulas


Formatting commands are not interpreted within text used in formulas. To use formatting
commands within formula text, using double quotes to break up the text in the Formula Editor.
Example
Enter the following in the Formula Editor:
"In " color blue bold "isosceles" "triangles, the base angles are equal"

344 | Chapter 9, Getting Started with Math


creates the following text in a formula In isosceles triangles, the base angles are equal .
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 text within double quotes so
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 ## x+ y = 2


alignr x # {}={} # alignl 2-y } x = 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 394 for more information.

Changing formula appearance


This section describes how to change the font or font size in a selected formula and change the
default font or font size.

Note
Only formulas inserted after the change in font settings will use the new default
settings. Previously inserted formulas 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 users to change the font
name and font size for all or only selected formulas in a document. For more
information, go to this URL:
https://extensions.libreoffice.org/en/extensions/show/formatting-of-all-math-
formulas

Changing formula appearance | 345


The Properties panel in the sidebar
This very simple panel contains allows you to set fonts, fonts sizes, spacing and the alignment of
formulas (Figure 299).

Figure 299: 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, follow these steps:
1) Click on the markup language in the Formula Editor.
2) 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 300).
3) Select a different font size using the Base size spinner or type a new font size in the Base
Size box.
4) 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: π ≃ 3.14159

After font size change to 18pt: π ≃ 3.14159

346 | Chapter 9, Getting Started with Math


Figure 300: Font Sizes dialog

Default formula font size


To change the default font size used for all formulas in Math or another LibreOffice component,
do the following:
1) 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
300).
2) Select a different font size using the Base size spinner or type a new font size in the Base
size box.
3) 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.
4) Click OK to save changes and close the Font Sizes dialog.

Font size options


The Font Sizes dialog (Figure 300) specifies the font sizes for a formula. When you select a base
size, 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
Change current formula fonts
To change the fonts used for the current formula in Math or another LibreOffice component:
1) Click in the markup language in the Formula Editor.
2) Go to Format > Fonts on the Menu bar or click on the Fonts button on the sidebar to
open the Fonts dialog (Figure 301).

Changing formula appearance | 347


Figure 301: Fonts dialog
3) Select a new font for each of the various options in the drop-down lists.
4) 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.
5) Click OK to save changes and close the Fonts dialog.

Change default formula fonts


To change the default fonts used in all formulas in Math or other LibreOffice components, perform
the following steps
1) 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 301).
2) Select a new font for each of the various options in the drop-down lists.
3) 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.
4) Click Default and confirm changes to the fonts. Any formulas created from this point on
will use the new font for formulas.
5) Click OK to save changes and close the Fonts dialog.

Define formula font options


These options define 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 301), 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.

348 | Chapter 9, Getting Started with Math


• 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 302) 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 302: Spacing dialog

Change current formula spacing


To change the spacing used for the current formula in Math or another LibreOffice component do
the following:
1) Click in the markup language in the Formula Editor.
2) Go to Format > Spacing on the Menu bar or click on the Spacing button on the sidebar
to open the Spacing dialog (Figure 302).
3) 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.
4) Enter new values for the spacing category and click OK.
5) Check the result in the formula.

Modify default formula spacing


To change the default spacing used for all formulas in Math or another LibreOffice component, do
the following:
1) 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 302).
2) 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.

Changing formula appearance | 349


3) Enter new values for the spacing category.
4) Click Default and confirm changes to the formula spacing. Any formulas created from this
point on will use the new spacing for formulas.
5) 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. Formulas that were inserted before the change will need to be updated
to match the same spacing as the new default settings.

Change spacing options


To determine the formula element to be updated, employ the Use Category in the Spacing dialog
(Figure 302). The appearance of the dialog depends on the chosen 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.

350 | Chapter 9, Getting Started with Math


– 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


To determine how formula elements located above one another are aligned horizontally relative
to each other, use the alignment settings.

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:
1) Click in the markup language in the Formula Editor.
2) Go to Format > Alignment on the Menu bar or click on the Alignment button on the
sidebar to open the Alignment dialog (Figure 303).
3) Select either Left, Centered, or Right for horizontal alignment.
4) Click OK and check the result in the formula.

Figure 303: 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.
These commands can align formulas in matrices and work for text elements.

Changing formula appearance | 351


Default formula alignment
To change the default alignment used for all formulas in Math or another LibreOffice component,
do the following:
1) 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
303).
2) Select either Left, Centered, or Right for horizontal alignment.
3) Click Default and confirm changes to the formula alignment. Any formulas created from
this point on will use the new alignment for formulas.
4) 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. Previously inserted formulas 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.
This 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
5×4 . Note that only the number 5 was colored red.
If you need to change the whole formula’s color, use the color command and enclose the whole
formula within brackets. For example, entering the markup language color red {5 times 4}
gives the result 5×4 .

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
294 on page 378).

RGB values
To use custom colors defined by RGB (Red, Green and Blue) values ranging from 0 to 255, use
themarkup command color rgb R G B , 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:
Let x ij be a decision variable in the problem under consideration

Hex values
The color command now supports HTML colors as 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 decision .

352 | Chapter 9, Getting Started with Math


Background color
It is not possible to select a background color for formulas in LibreOffice Math. By default, the
background color for a formula is will be the same color as the document or frame that the
formula has been inserted into. In LibreOffice Writer, you can use object properties to change the
background color for a formula. For more information, see “Background and borders” on page
403.

Building a formula library


To reuse formulas, a formula library can be created to contain 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 allow you to develop a
formula library.

Using Math
1) Create a file folder to contain the formula library.
2) 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 377 for more information.
3) Go to File > Save As on the Menu bar or use the keyboard shortcut Ctrl+Shift+S to
open a Save As dialog.
4) Navigate to the formula library folder created in step 1.
5) Name the formula in the File name box.
6) Select in the File type drop-down list either ODF Formula (.odf) or MathML 2.0 (.mml) as
the file type for the formula.
7) Click Save to save the formula and close the Save As dialog.

Using Writer, Calc, Draw, or Impress


1) Create a file folder to contain the formula library.
2) Open a document using Writer, Calc, Draw, or Impress.
3) 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 378 for more
information.
4) Right-click on the formula object and select Save Copy as in the context menu to open a
Save As dialog.
5) Navigate to the folder created for the formula library.
6) Name the formula in the File name box.
7) Select in the File type drop-down list either ODF Formula (.odf) or MathML 2.0 (.mml) as
the file type for the formula.
8) Click Save to save the formula and close the Save As dialog.

Building a formula library | 353


Using a formula library
When you need to add a formula from the formula library into a LibreOffice document, it must be
inserted as an OLE object. It cannot added to a document by dragging and dropping using the
mouse or by using Insert > File on the Menu bar:
1) Open the document in Writer, Calc, Draw, or Impress.
2) Go to Insert > Object > OLE Object on the Menu bar to open the Insert OLE Object
dialog.
3) Select the option Create from file.
4) Click Search to open a file browser dialog.
5) Navigate to the formula library folder.
6) Select the formula to be inserted and click Open, or double-click on the formula.
7) 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 LibreOffice Writer document, the software opens the formula in
a frame and treats the formula as an OLE object. To edit it, double-click on an inserted formula
and you will open the formula in LibreOffice Math’s Formula Editor.
In LibreOffice Writer, the following options are available to change each individual formula within
a document. The chapters on styles in the Writer Guide have information on how to change the
default frame style settings for OLE objects.

Automatic formula numbering in Writer


Only LibreOffice Writer can perform automatic numbering of formulas for cross-reference
purposes. The easiest way to add numbered formulas in sequence is to use the AutoText entry fn
(for 'formula numbered'):
1) Start a new line in the document.
2) 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.
2
E=mc (1)
3) Delete the sample formula and insert the formula as an object in the left column.
4) 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 with formulas in Writer


1) Click in the document where the cross-reference should appear.
2) Go to Insert > Cross-reference on the Menu bar to open the Fields dialog (Figure 304).
3) Click on the Cross-references tab, then select Text in the Type section.
4) In the Selection section, select the formula number to refer to.
5) In the Insert reference to section, select Reference and click Insert.
6) After creating the cross-references, click Close to close the Fields dialog.

354 | Chapter 9, Getting Started with Math


Figure 304: 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, refer to
the Writer Guide.

Anchoring formulas
A formula is treated as an object within Writer and once inserted, its default anchoring is To
character. To change the anchoring of a formula object:
1) Right-click on the selected formula object and select Anchor in the context menu.
2) 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:
1) 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 305).
2) On the Type tab, select an anchoring position from the Anchor section in the upper right.
3) Click OK to save changes and close the Object dialog.

Formulas in Writer | 355


Figure 305: Object dialog – Type tab with Anchor options

Note
When making changes to the options available for frame styles in Writer,
anchoring options are not available in the Object dialog. For more information on
how to modify frame styles, please refer to the Writer Guide.

Vertical alignment
When you are adjusting the vertical alignment of formulas in Writer, the default setting for vertical
alignment for formula objects is the text base line. If necessary, the default 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 in Writer (assuming that
the As character anchoring option is selected):
1) 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 305).
2) 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.
3) 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.
4) 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.
5) 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.

356 | Chapter 9, Getting Started with Math


Object spacing
When a formula object is inserted into a Writer document, LibreOffice gives the formula space
along each side of the formula object. The default value used for spacing is set within the frame
style for formula objects and it 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:
1) Create a formula in a Writer document.
2) 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.
3) Click on the Wrap tab to open the Wrap page in the Object dialog (Figure 306).
4) In the Spacing section, enter the spacing value for Left, Right, Top, and Bottom spacing.
5) Click OK to save the changes and close the Object dialog.

Figure 306: Object dialog – Wrap tab

Text mode
When you place large formulas within a line of text, the formula’s elements are often higher than
the text height. Therefore, to make large formulas easier to read, you should always insert large
formulas into a separate paragraph of their own so that the formula is separated from nearby
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 will be 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:
5

∑ i2
i=2

Formulas in Writer | 357


and the same formula embedded into a line of text using text mode format: ∑5i=2 i 2

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, the background and borders can be changed for individual
formulas in a document.

Note
When a formula is inserted into a Writer document, the size of its surrounding
frame 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 391 for more
information.

Backgrounds
1) In the document, select the formula for the background change.
2) 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.
3) Click on the Area tab and use the buttons at the top to select the desired type of fill for the
formula (Figure 307).
4) Select the options for the formula background. The options change depending on the type
of fill selected.
5) Click OK to save changes and close the Object dialog.

Figure 307: Object dialog – Area tab


Borders
1) In the document, select the formula that needs a border change.

358 | Chapter 9, Getting Started with Math


2) 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.
3) Click on the Borders tab and select the options for the formula borders (Figure 308).
4) Click OK to save changes and close the Object dialog.

Figure 308: Object dialog – Borders tab

Quick insertion of formulas


To insert formula markup language into a Writer document without opening the Formula Editor:
1) Enter the formula markup language into document at the position where it should be
placed.
2) Select the markup language.
3) Go to Insert > Object on the Menu bar and select Formula Object to create a formula
from the selected markup language.
4) Alternatively use the key combination Ctrl + Insert to open the Insert OLE Object
dialog and then select Formula.

Formulas in Calc, Draw, and Impress


When you insert formulas into Calc, Draw, and Impress, they 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.

Formulas in Calc, Draw, and Impress | 359


Anchoring formulas in Calc, Draw and Impress
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:
1) Select the formula object in the spreadsheet.
2) Right-click on the formula and select Anchor > To Page or To Cell in the context menu.
3) 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


The properties of 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 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 that you should use to change the
properties of a formula object:
• For a formula’s background, use the various options in the tabs of the Area dialog.
• For a formula’s border, 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 later be copied and pasted into the Chart object:
1) Create the chart using LibreOffice Calc. For a complete reference on how to create
charts, see Chapter 3 in the Calc Guide.

360 | Chapter 9, Getting Started with Math


2) Click at any cell in the spreadsheet so that the Chart is no longer selected.
3) Insert a Math Formula object by clicking Insert > Object > Formula.
4) Type the desired formula into the Formula Editor.
5) After editing the formula, select the Math Formula object and press Ctrl+C to copy the
Formula object to the clipboard.
6) Double-click the chart object to start editing the chart and press Ctrl+V to paste the
Formula object into the chart.
7) 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 392.
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 406 for more information.

Customization
This section describes how to customize LibreOffice Math formula creation in LibreOffice
documents. Additional information on customizing LibreOffice can be found in Chapter 13,
Customizing 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
309) by using the Edit Symbols dialog (Figure 310).
In this dialog, symbols can be added to a symbol set, symbol sets can be edited, symbol
notations can be modified, new symbol sets can be defined, names can be assigned to symbols,
and existing symbol sets modified.
For details of the fields in the Edit Symbols dialog, please refer to the Math Guide.

Adding symbols
1) Go to Tools > Symbols on the Menu bar or click on the Symbols icon on the Tools
toolbar to open the Symbols dialog.
2) Click the Edit button to open the Edit Symbols dialog.
3) Select a font in the Font drop-down list.
4) Scroll down and select a symbol character to be added in the preview box. The small right
preview box displays the new symbol.

Customization | 361
5) In the Symbol box, locate the symbol that will be added.
6) 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.
7) If required, select a font style in the Style drop-down list – Standard, Italic, Bold, or
Bold, Italic.
8) 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 309: Symbols dialog

362 | Chapter 9, Getting Started with Math


Figure 310: 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 in the document are stored with it
and they are only available in that document. If necessary, you can embed all
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:
1) In the Edit Symbols dialog (Figure 310), 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 310).

Customization | 363
2) 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.
3) Click Modify and the symbol name is changed.
4) Click OK to close the Edit Symbols dialog.

Moving symbols
To move a symbol from one symbol set to another:
1) In the Edit Symbols dialog (Figure 310), in the Old symbol set drop-down list, select the
symbol set where the symbol to be moved is located.
2) 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 310).
3) 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.
4) Click Modify and the symbol is moved to the new symbol set.
5) Click OK to close the Edit Symbols dialog.

Deleting symbols
To delete a symbol from a symbol set:
1) In the Edit Symbols dialog (Figure 310), in the Old symbol set drop-down list, select the
symbol set from which the symbol should be deleted.
2) 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 310).
3) Click Delete and the symbol is deleted from the symbol set without any confirmation.
4) 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
If you need to modify a formula’s 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, they are ignored when they occur at the end of a formula. If you are employing 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.

364 | Chapter 9, Getting Started with Math


Scaling of code in the Formula Editor input window
By default, the code in the Formula Editor input window (Figure 299) is scaled to 100%. 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. 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.

Extensions
For frequent formula creation and editing, you can customize LibreOffice 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 all Math formulas to
be formatted 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


MathML 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
If internet browsers do not fully support the MathML format, they may not display
the formulas 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 you are 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

Exporting and Importing | 365


[L]: Load and convert the object
When a Microsoft document must be opened in LibreOffice, this option allows you to convert
Microsoft OLE objects into the specified LibreOffice OLE objects. 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


If LibreOffice OLE objects need to be converted and saved in Microsoft file format, select this
option, which will allow LibreOffice to convert 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.

366 | Chapter 9, Getting Started with Math


Getting Started Guide 7.6

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
Writer can read Open Document text formats (.odt, .ott, .oth, .odm, and .fodt), and the following
text formats (including various legacy formats):
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)
When opening .htm or .html files used for web pages, LibreOffice customizes Writer for working
with these files.

Spreadsheets
Calc can open Open Document spreadsheet formats (.ods, .ots, and .fods) as well as the
following spreadsheet formats (including various legacy formats):
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)

368 | Chapter 10 Working with File Formats, Security, and Exporting


HTML Document (.htm and .html files, including Web page queries)
Quattro Pro 6.0 (.wb2)
Apple Numbers 2 (.numbers)

Presentations
Impress can open the various Open Document presentation formats (.odp, .odg, .otp, and .fopd)
as well as 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
Draw can use the Open Document graphic file formats (.odg and .otg) and PDF files as well as
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)

File formats | 369


Formulas
Math can use Open Document Formula files (.odf) as well as 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


If you save a LibreOffice file in an ODF format, that file will be correctly rendered if it is
transferred to another user, or reopened in a later version of LibreOffice, or opened with another
application that can open ODF files. Thus, we strongly recommend that you save files in an ODF
as file format. However, files can be saved in other formats, if required.

Tip
If the document needs to be shared and it is not going to be modified, the
preferred option is to convert the document to PDF. LibreOffice has an easy
method to convert documents to PDF.

Text documents
In addition to the ODF text formats (.odt, .ott, and .fodt), Writer can save files 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
Since LibreOffice provides encryption support within the Microsoft Word filter,
password protected Microsoft Word documents can be saved.
While the .rtf format is often used to transfer text files between applications, there
is a loss of formatting and images. Thus, users should employ other formats.

Spreadsheets
Calc can save in the ODF spreadsheet formats (.ods, .ots, and .fods) as well as 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)

370 | Chapter 10 Working with File Formats, Security, and Exporting


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
Impress can save in the ODF presentation formats (.odp, .otp, .fodp, and .odg), as well as the
following formats. Impress can also export to Draw-compatible graphic formats.
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 formats (.odg, .otg, and .fodg) and it can also export to the
graphics formats BMP, EMF, EPS, GIF, JPEG, PNG, SVG, TIFF, and WMF.

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. Unlike
Save As, exporting the file produces a document while keeping the current file format of the
actual document. 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.
If the PDF file format is needed, LibreOffice can export Writer, Calc, Impress, and Draw,
documents in that format. Writer can also export in EPUB. Also, LibreOffice can export files in
HTML and XHTML formats. Draw and Impress can also export in several image and graphic
formats.

Note
If you use the Export command, LibreOffice will create a copy of the file as a new
file using the selected format. The original file will remain open in LibreOffice.

Exporting files | 371


Figure 311: Export dialog

PDF quick export


If a file needs to be quickly exported to the PDF format, LibreOffice is unable to select various file
options such as file format, page range, and image compression. For a quick PDF export, do the
following:
1) Open the target file in LibreOffice.
2) Open the Export dialog (Figure 311) and 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.
3) Enter a file name and select the required location for the PDF file in the Export dialog.
4) 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


If you need more control over the content and quality of a file that will be exported in the PDF
format, do the following in the PDF Options dialog (Figure 312):
1) Open the target file in LibreOffice.
2) Access PDF Options by going to File > Export As > Export as PDF.

372 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 312: PDF Options dialog — General page
3) Select the various options required on each tabbed page of the PDF Options dialog.
4) Click on Export to open the Export dialog.
5) Navigate to the required folder for the PDF file.
6) 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 312 to see 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, the entire document will be
exported.
Pages
Exports the pages that you have selected. 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.

Exporting files | 373


Lossless compression
Selects lossless compression for the image. All pixels are preserved. This setting can
create large files when used with photographs.
JPEG compression quality
Determine the JPEG compression’s quality level. Almost all pixels are preserved if you
choose a high quality level, but if you use a low quality level, file sizes are reduced but
some pixels are lost and artifacts are introduced.
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 with a hybrid file format: 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)
Tagged PDFs contain 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.

374 | Chapter 10 Working with File Formats, Security, and Exporting


Create PDF form
If you are submitting forms within the PDF file, select the available options fromthe
Submit format drop-down list. This menu will override the URL property that is set in the
document. Only one setting is 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 assigned generated unique names.
Structure
Sets options for diverse features such as bookmarks, comments, page layout, and so on.
Export outlines
Use this option 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
This option is only available in Writer. The user can choose if the PDF file will include
any defined placeholder fields, which can be filled in by users.
Comments as PDF annotations
If this option is 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 automatically inserted in the PDF file. This is
recommended if you are 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 determines how PDF images will be exported back into 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.
If this option is enabled, the reference XObject markup is used. This is a simple
operation, but PDF viewers must support this to use 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).

Exporting files | 375


Figure 313: PDF Options dialog — Initial View page

Initial View PDF options


The Initial View page in the PDF Options dialog (Figure 313) allows users to determine how the
PDF file opens by default in a PDF viewer.
Panes
Page only
Generate a PDF file that shows only page contents.
Outline and page
Generate a PDF file that shows a bookmarks palette and page contents.
Thumbnails and page
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
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
Generate a PDF file that displays the page zoomed to fit entirely into a PDF reader
window.
Fit width
Generate a PDF file that displays the page zoomed to fit the width of a PDF reader
window.
Fit visible
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 which determines when a PDF reader opens a PDF file.

376 | Chapter 10 Working with File Formats, Security, and Exporting


Page layout
Default
Generate a PDF file that displays the pages according to the layout setting of the PDF
reader application.
Single page
Generate a PDF file that displays one page at a time.
Continuous
Generate a PDF file that displays pages in a continuous vertical column.
Continuous facing
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
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


The User Interface page in the PDF Options dialog (Figure 314), allows users to specify how the
interface for an external PDF viewer will appear. If you need to create a PDF file that will be used
as a presentation or a kiosk-type display, these options are useful.
Window Options
Resize window to initial page
Generate a PDF file that is shown in a window displaying the whole initial page.
Center window on screen
Generate a PDF file that is shown in a PDF reader application that is centered on the
display.
Open in full screen mode
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
Generate a PDF file that will display the file title in the PDF reader’s title bar.

Figure 314: PDF Options dialog — User Interface page


User Interface Options
Hide menubar
Hide the menu bar when a PDF file is active.

Exporting files | 377


Hide toolbar
Hides the toolbar when a PDF file is active.
Hide window controls
Hides the reader controls when a PDF file is active.
Transitions
Use transition effects
Exports 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 PDF Options dialog Links page (Figure 315) specifies how outlines and hyperlinks will be
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. A checkbox can
allow you to export the names of objects in a document as valid bookmark targets. This
allows objects to be exported by name from other documents.
Convert document references to PDF targets
This option automatically converts filename extensions in URLs from ODF to PDF. In
the referencing URLs, the extensions .odt, .odp, .ods, .odg, and .odm are converted to
the extension .pdf.
Export URLs relative to file system
This option allows URLs to be exported 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 315: PDF Options dialog — Links page


Default mode
All links from a PDF document to other documents are handled as specified in the
computer operating system.

378 | Chapter 10 Working with File Formats, Security, and Exporting


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 a web browser. The web 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 316) specifies the security options used by
an 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
Opens 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
Users will not be able to print the document.
Low resolution (150 dpi)
The document can only be printed in low resolution (150 dpi). However, some PDF
readers ignore this option.

Figure 316: PDF Options dialog — Security page


High resolution
The document can be printed in high resolution.

Exporting files | 379


Changes
Not permitted
The content of the PDF file cannot be changed.
Inserting, deleting, and rotating pages
Inserting, deleting, and rotating pages will be permitted.
Filling in form fields
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
Content can be copied to the clipboard.
Enable text access for accessibility tools
Select to enable text access for accessibility tools.

Digital Signature PDF options


The PDF Options dialog’s Digital Signatures page in Figure 317 specifies how the exported
PDF file can be digitally signed.
• 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 users to select 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 only accessible after a certificate has
been selected.
Certificate password
Enter the password that will be used to protecting the private key associated with the
selected certificate. Usually this is the key store password.

380 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 317: 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
you to enter the PIN again before signing.

Location, Contact information, Reason


These three fields 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, are optional and may be left blank.
Time Stamp Authority
The PDF signing process uses the Time Stamp Authority (TSA) 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 it 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


If you choose to quickly export a Writer file to the EPUB file format, there is no control over
content and quality of the EPUB file.
1) Open the Writer file that is going to be converted.

EPUB format export (Writer only) | 381


2) Go to File > Export As > Export Directly as EPUB on the Menu bar and the Export
dialog opens.
3) Navigate to the folder where the EPUB file is going to be saved.
4) Enter a file name in the File name text box. The format of the exported file is fixed to
EPUB Document (.epub).
5) 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 in Writer, do the following:
1) Open the Writer file that is going to be converted.
2) Go to File > Export As > Export as EPUB and open the EPUB Export dialog
(Figure 318).
3) Enter the necessary information into the various options in EPUB Export dialog. For more
information, refer to “EPUB export options” below.
4) Click OK to close the EPUB Export dialog and open the Export dialog.
5) Navigate to the folder where the EPUB file is going to be saved.
6) Enter a file name in the File name text box. The format of the exported file is fixed to
EPUB Document (.epub).
7) 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) will not be exported.
Fixed — Gives greater control over presentation when a reflowable EPUB is not
suitable for its content.

382 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 318: 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 inside a folder in the current document directory with the
same name of the document file name for custom media and custom metadata. 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 with 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 that overrides the document default metadata. These text
fields can be left empty.
Identifier
Enter a unique identifier for the publication.

EPUB format export (Writer only) | 383


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 will change 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 443
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. To
generate a separate HTML page, you can associate a page break with a specific heading
paragraph style each time that style appears in the document. The Writer module automatically
creates a page containing hyperlinks to each of these pages.
When you save 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 11 for the file types created and
file content when saving HTML format.
Table 11: File types created saving in HTML format
File Contents
The text contents, page layout, text attributes, meta
Myfile.html
tags, and styles.
Myfile_html_[random number].gif GIF images of visible contents of OLE objects.
Myfile_html_[random number].png, Images inserted in the text document as PNG, BMP, or
jpg, or bmp JPEG keep their original format.

384 | Chapter 10 Working with File Formats, Security, and Exporting


To create a HTML file from a text document, do the following:
1) Create a new folder which will be a location for the HTML file and images.
2) To open the Save As dialog, select File > Save As on the Menu bar.
3) Navigate to the required location in the Save As dialog.
4) Enter a file name for the HTML file in the File name: text box.
5) In File type:, select HTML Document (Writer) (.html) as the file type.
6) Click on Save to save the file as HTML and close the Save As dialog.
7) If necessary, click on Use HTML Document (Writer) Format in the Confirmation dialog
that opens confirming the file is saved as HTML.

Export as XHTML
If you want LibreOffice to export a text document as a XHTML file, LibreOffice generates an
XHTML file for each text document. Image files are also embedded in the XHTML file.
LibreOffice-generated XHTML files have better layout rendering, but fail to render objects other
than images.
1) If necessary, create a new folder as a location for the HTML file and images.
2) Go to File > Export on the Menu bar to open the Export dialog (Figure 311 on page 423).
3) Navigate to the location of the new folder in the Export dialog.
4) Enter a file name for the HTML file in the File name: text box.
5) In File type:, select XHTML (Extensible Hypertext Markup Language) as the file type.
6) 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 when LibreOffice exports to XHTML. Instead,
use borderless tables to position contents instead of the Tab character in a line.
You will have to change the bullet and number lists that insert a Tab character
between the bullet or number and the text—instead, create a list style where the
Tab character is replaced by a space.
Objects that are different from usual image formats are not rendered in
LibreOffice XHTML output. This includes drawings, spreadsheets, charts, and
OLE objects in general. To render an OLE object in XHTML, replace the
document’s OLE object with an image of the OLE object.

Saving document as a series of web pages


Writer can save a large document as a series of web pages (HTML files) with a table of contents
page. To this, follow these steps:
1) 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.
2) Go to File > Send > Create HTML Document on the Menu bar and open the Name and
Path of the HTML Document dialog (Figure 319).

Creating HTML files | 385


Figure 319: Name and Path of the HTML Document dialog
3) Navigate to the place where the HTML file is going to be saved.
4) Enter a file name in the File name: text box.
5) Select HTML Document from options available from the File type:.
6) 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.
7) 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. 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. To do this task, perform the following steps:
1) If necessary, create a new folder as a location for the HTML file.
2) Open the Save As dialog by selecting File > Save As on the Menu bar.
3) Navigate to the required location in the Save As dialog.
4) Enter a file name for the HTML file in the File name: text box.
5) Select HTML Document (Calc) (.html) in the File type: field.
6) Click on Save to save the file as HTML and close the Save As dialog.
7) If necessary, click on Use HTML Document (Calc) Format in the Confirmation dialog
that opens confirming the file is saved as HTML.

386 | Chapter 10 Working with File Formats, Security, and Exporting


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 in the HTML Export dialog.

Notes
When you save Impress presentations in HTML format, the new HTML file does
not retain any animation or any 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 will create several HTML, JPG, and GIF files.
You should create a folder to hold all the files needed 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.

1) If necessary, create a new folder as a location for the HTML file.


2) Go to File > Export on the Menu bar to open the Export dialog (Figure 311 on page 423).
3) Navigate to the location of the new folder in the Export dialog.
4) Enter a file name for the HTML file in the File name: text box.
5) Select HTML Document (Impress) (.html; .htm), or HTML Document (Draw)
(.html; .htm) from the In File type: drop-down menu.
6) Click on Export to open the HTML Export dialog (Figure 320).
7) 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.
8) When the HTML design is completed to your requirements, click on Create to close the
HTML Export dialog and create the HTML file.

HTML options
Assign Design
Refer to Figure 320. This page allows you to create a new design, 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 will not be deleted by this action.
New design
Creates a new design using the pages of the Export dialog.

Creating HTML files | 387


Figure 320: HTML Export dialog — Assign Design page

Figure 321: HTML Export dialog — Publication Type page


Existing Design
Loads an existing design from the design list displayed. This will 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 321. This 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.

388 | Chapter 10 Working with File Formats, Security, and Exporting


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. more
information on WebCast is available on the LibreOffice help pages.
Options
Refer to Figure 321.
Create title page
Creates a title page for a document.
Show notes
Specifies that notes are also displayed.
Save images as
Refer to Figure 322. Determines the image format and defines the compression value for
export.
PNG
Export images into the Portable Network Graphics (PNG) format. PNG files are
compressed without loss of data, and can contain more than 256 colors.
GIF
Export images into the Graphics Interchange Format (GIF). GIF files are compressed
without loss of data, and have a maximum of 256 colors.

Figure 322: HTML Export dialog — Save images as page


JPG
The files are exported into the Joint Photographic Experts Group (JPEG) format. JPEG
files have adjustable compression and can contain more than 256 colors.
Quality
Specifies the compression factor used when files are exported into the JPEG format. A
100% value offers the best quality for a large data range. A 25% factor indicates small
files with inferior image quality.

Creating HTML files | 389


Effects
Refer to Figure 322.
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 322. 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 323.
Author
Contains the name of the author.

Figure 323: HTML Export dialog — Title page

390 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 324: HTML Export dialog — Button page
Email address
Contains the email address of the author
Your homepage
Contains the homepage of the author. A hyperlink is inserted in the HTML file.
Additional information
Contains any additional text required for the title page.
Select button style
Refer to Figure 324. Specifies the style of navigation buttons used in the 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 325. 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
Select colors for the text in the presentation.
Hyperlink
Select colors for the presentation’s hyperlinks.
Active Link
Select colors for the presentation’s active links.

Creating HTML files | 391


Figure 325: HTML Export dialog — Color Scheme page
Visited Link
Select colors for the presentation’s visited links.
Background
Select the presentation’s background color.

HTML files using Writer/Web


LibreOffice Writer has a configuration called Writer/Web that can create, edit, and save files in
HTML format. Writer/Web is only available when working with documents that are in HTML
format.

Display modes
By default, Writer/Web opens an HTML file in Normal view (Figure 326). To change Writer/Web
to Web view, go to View > Web on the Menu bar (Figure 327). 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 326: Example of Normal view in Writer/Web

392 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 327: Example of Web view in Writer/Web

Figure 328: Example of HTML Source view in Writer/Web


Writer/Web can also 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 328). 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 options than a ODF text document.
Writer/Web does not 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 elements used to
produce a displayable document in a web browser. It does not contain other
components of a website such as external cascading style sheets (CSS), external
JavaScript, or other script languages. When you manually insert links to any
external components into the web page, you must do it in HTML Source display
mode.

HTML files using Writer/Web | 393


Creating and editing
To create an HTML document, do the following:
1) Select File > New > HTML Document and Writer/Web opens a blank document in Web
display mode (Figure 327).
2) Add content to the document by typing or pasting text, images, tables, and other objects.
3) Use all the formatting resources available in Writer/Web, including the capability to edit
and format the content in styles.
4) When all editing is complete, go to File > Save As on the Menu bar and save the
document in the HTML file type.
5) Preview the HTML document in a browser to make sure it has rendered correctly.

Editing source code


To edit the source code of an HTML document:
1) Open or create an HTML document.
2) Open HTML source view (Figure 328) using one of the following methods:
– Go to View > HTML Source on the Menu bar.
– Click on HTML source on the Standard toolbar.
3) Add, or edit the HTML source code.
4) When all editing is complete, go to File > Save As on the Menu bar and save the
document as HTML file type.
5) Preview the HTML document in a browser to make sure renders correctly.

Previewing HTML documents


It is important to preview HTML documents in a web browser to make sure it displays correctly.
Since not all browsers render HTML files the same way, you should preview an HTML document
in several browsers.
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 329), and then you can 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.

394 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 329: Options LibreOffice Writer/Web dialog
Formatting Aids
Defines the LibreOffice text and HTML documents’ display for certain characters and for
the direct cursor.
Grid
Specifies the settings for the configurable grid for 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 has multiple ways to send documents as email attachments in one of three formats —
Open Document Format (LibreOffice default format); Microsoft Office format; Portable Document
Format.
1) Go to File > Send on the Menu bar and use one of the following options:
– Email Document — The default email program is opened and the document is
attached to the email message.
– Email as OpenDocument text — The default email program is opened and the
document is attached to the email message.
– Email as Microsoft Word — LibreOffice creates a file in Microsoft Word format,
opens the default email program, and the document is attached to the email
message.
– Email as PDF — First, the PDF Options dialog opens. Next, select the required
settings required and click OK. LibreOffice will open the default email program with
the PDF file attached to the email message.

Emailing documents | 395


2) 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.
1) Open the Remote Files dialog (Figure 330) 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.
2) Click on Manage Services, and select Add service to open the File Services dialog
(Figure 331).

Figure 330: Remote Files dialog

396 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 331: File Services dialog
3) 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.
4) Enter the necessary information in the text boxes. The text boxes change depending on
the type of service that has been selected in Type.
5) If necessary, enter a label for the remote server in the Label text box.
6) Click on OK to save the details and close the File Services dialog.
7) In the Remote Files dialog, select the service from the Service drop-down list.
8) Navigate to where the remote file is located and select the required file.
9) Click on Open to open the file and close the Remote Files dialog.

Digital signatures
To sign a file 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.

Digital signatures | 397


Figure 332: Digital Signatures dialog

Figure 333: Select Certificate dialog

Applying digital signatures


This is a sample method for digitally signing a document in LibreOffice. Your actual procedure
depends on how your is computer set up and what operating system is being used.
1) Go to File > Digital Signatures > Digital Signatures on the Menu bar and open the
Digital Signatures dialog (Figure 332) that lists the available digital signatures for the
document.
2) If a message box opens advising to save the document, click on Yes to save the
document.
3) If necessary, click on Sign Document to open the Select Certificate dialog (Figure 333).
4) Select the required digital signature in the Select Certificate dialog.
5) Click on Sign to apply the digital signature to the document and close the Select
Certificate dialog.
6) In the Digital Signatures dialog, select the required digital signature from the signature list.
7) Click on Close to apply the selected digital signature to the document and close the
Digital Signatures dialog.

398 | Chapter 10 Working with File Formats, Security, and Exporting


8) 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:
1) Go to Insert > Signature Line on the Menu bar to open the Signature Line dialog
(Figure 334).
2) Enter the necessary details and select the required options.
3) 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 335.

Figure 334: Signature Line dialog

Figure 335: Example of a signature box

Digital signatures | 399


Figure 336: Drawing Object Properties dialog
4) Click on the signature box to select it and display the object selection handles.
5) 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.
6) Right click on the selected signature box to open the Drawing Object Properties toolbar
(Figure 336).
7) Click on Select anchor for object and select the required anchor type from the options
available in the drop-down list.
8) If necessary, use the other tools available on the Drawing Object Properties toolbar to
format the signature box to the document requirements.
9) Deselect the signature box to close the Drawing Object Properties toolbar.
10) Save the document fix the signature box into the document.

Document properties
To open a document’s Properties dialog (Figure 337), go to File > Properties on the Menu bar.
The tabbed pages in the Properties dialog provides information about the document and allows
the document’s properties to be changed.

Figure 337: Properties dialog

400 | Chapter 10 Working with File Formats, Security, and Exporting


General
Contains basic information about the current file as follows:
File
Displays the file name.
Change Password
Opens a dialog to change the password 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.

Document properties | 401


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.

402 | Chapter 10 Working with File Formats, Security, and Exporting


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 the fonts that are used in your 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. 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 properties | 403


Document classification
Document classification and security is an important issue for businesses and governments.
LibreOffice has 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.

Business Authentication Framework (BAF) Categories


The default BAF categories for LibreOffice are listed below.
Intellectual Property
Select this category for general purpose document classification.

Tip
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
Selecting this category assigns the national security policy type to the document. 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 this category assigns the export control policy type to the document. 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.

404 | Chapter 10 Working with File Formats, Security, and Exporting


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 users to customize 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
If you need to remove personal data, versions, notes, hidden information, or recorded changes
are removed from a file before sending it to other users, take the following steps:
1) 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.
2) Click Options to open the Security Options and Warnings dialog (Figure 338).
3) Select the required options to display warnings and/or set security options. See “Security
options and warnings” on page 457 for more information.
4) Click OK to close the Security Options and Warnings dialog.
5) Go to File > Properties on the Menu bar to open the Properties dialog (Figure 337 on
page 451) and click on General to open the General page.

User and personal data | 405


Figure 338: Security Options and Warnings dialog
6) Deselect the option Apply user data and click on Reset Properties to do the following:
– 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.
7) Click OK to close the Properties dialog.
8) 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 allows users to set 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.

406 | Chapter 10 Working with File Formats, Security, and Exporting


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
LibreOffice 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 LibreOffice 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.
A copy of any documents redacted in LibreOffice Writer, Calc, or Impress are automatically
transferred to LibreOffice Draw where the redaction is carried out.

Redaction tools
The tools available on the Redaction toolbar (Figure 339) 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 (lack)
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 339: Redaction toolbar

Redaction | 407
Documents, spreadsheets, or presentations
A copy of a document, spreadsheet, or presentation is automatically transferred to LibreOffice
Draw where the redaction is carried out.
1) 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.
2) Go to Tools > Redact on the Menu bar and click on Rectangle Redaction or Freeform
Redaction in the Redaction toolbar.
3) 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.
4) 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.
5) If necessary, delete the PDF copy after reviewing the redaction areas in the file.
6) Click on Redacted Export (White), or Redacted Export (Black) in the Redaction toolbar
to export the presentation file as a redacted PDF file.
7) 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.
8) 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 459 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 redacted blocks of pixels.
These blocks of pixels prevent any attempt to restore, or copying the original
contents that have been redacted.

Automatic redaction
When LibreOffice conducts automatic redaction, it allows the user 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.

408 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 340: Automatic Redaction dialog

Figure 341: 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.
1) Open a document and use Tools > Auto-Redact on the Menu bar to open the Automatic
Redaction dialog (Figure 340).
2) Click on Add Target to open the Add Target dialog (Figure 341).
3) Enter a target name in the Name text box.
4) 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.
5) Enter the content in the Content text box.
6) If necessary, select the options Match case and Whole words only to help define which
targets are auto-redacted.

Redaction | 409
7) Click OK to close the Add Target dialog and the target is added to the Redaction Targets
list in the Automatic Redaction dialog.
8) Repeat Steps 2 thru 7 above until all targets required have been added to the document.
9) 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.
10) Print the document, or export the document as a PDF file.

Exporting targets
1) Open a document where targets for automatic redaction have been added.
2) Go to Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog.
3) Select the targets for export in the Redaction Targets list.
4) Click on Save Targets to open the Save Targets dialog and navigate to the location
where the JSON file is going to be saved.
5) Enter a file name for the JSON file in the File name text box.
6) Click on Save to save the JSON file and close the Save Targets dialog.
7) Click OK to close the Automatic Redaction dialog.

Importing targets
1) Open a document where targets for automatic redaction are going to be used.
2) Go to Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog.
3) Click on Load Targets to open the Load Targets dialog and navigate to the location of the
JSON file.
4) Select the required file and click on Open to import the targets into the document and
close the Load Targets dialog.
5) 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.
6) 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.

410 | Chapter 10 Working with File Formats, Security, and Exporting


Figure 342: Save as dialog

Figure 343: Set Password dialog

Password protection
LibreOffice provides two levels of password protection:

Password protection and OpenPGP encryption | 411


• 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
1) Go to File > Save As on the Menu bar to open the Save as dialog (Figure 342).
2) Navigate to the folder where the file is going to be saved.
3) 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.
4) Select the Save with password option, then click on Save to open the Set Password
dialog (Figure 343).
5) In File Encryption Password, enter a password to open the document and then enter
the same password as confirmation. Passwords are case sensitive.
6) Click on Options to open File Sharing Password.
7) Select Open file read-only to prevent any editing being carried out on the document.
8) To allow editing of the document, enter a password in Enter password to allow editing
and repeat the password as confirmation.
9) 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.
1) Go to File > Properties > General on the Menu bar to open the Properties dialog.
2) Click on Change Password to open the Set Password dialog.
3) Enter a new password to open the file and to allow editing of the document.
4) Click OK to close the Set Password dialog.
5) 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.

412 | Chapter 10 Working with File Formats, Security, and Exporting


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:
1) 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.
2) 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.

3) Go to File > Save As on the Menu bar to open the Save as dialog.
4) Navigate to the required location for the file, then enter a file name and file type in the
Save as dialog.
5) Select Encrypt with GPG key option and click on Save to open the Select X.509
Certificate dialog.
6) Select the public key for the recipient. Multiple keys can be selected.
7) Click Encrypt to close the dialog and save the file encrypted with the selected public
keys.

Password protection and OpenPGP encryption | 413


Getting Started Guide 7.6

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. For example, a simple
macro allows you to enter your address into an open document and a macro can 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 with LibreOffice’s user
interface via the open source LibreOffice Basic scripting language (an implementation of the well-
known BASIC programming language). These macros can be edited and enhanced after
recording with the built-in LibreOffice Basic Integrated Development Environment (IDE).
The most powerful macros in LibreOffice can be created with one of the four supported scripting
languages (LibreOffice Basic, Python, JavaScript, and BeanShell). This chapter provides an
overview of LibreOffice’s macro facilities with an emphasis on its default macro scripting
language, LibreOffice Basic. Though some introductory examples are included for the BeanShell,
JavaScript, and Python scripting languages, an in-depth discussion on using these languages for
scripting is beyond the scope of this chapter.

Your first macros


Adding a macro
To start with LibreOffice macros, we recommend that you find and use existing macros. We
assumes that you have an existing macro that you want to use, which was originally found in a
book or on the internet. In this example, the macro in Listing 1 is used. Once you have a macro,
you create a library and module to contain your macro; the creation of a macro library is below,
but see “Macro organization” on page 482 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:
1) Open any LibreOffice application.
2) Go to Tools > Macros > Organize Macros > Basic to open the Basic Macros dialog
(Figure 344).
3) Click Organizer to open the Basic Macro Organizer dialog (Figure 345) and select the
Libraries tab.
4) Set the Location drop-down to My Macros & Dialogs, which is the default location.
5) Click New to open the New Library dialog (not shown here).
6) Enter a library name, for example TestLibrary, and click OK.
7) On the Basic Macro Organizer dialog, select the Modules tab (Figure 346).
8) 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.
9) Select Module1, or the new module that you created, and click Edit to open the
Integrated Development Environment (IDE) (Figure 347). The IDE is a text editor and
associated facilities that are built into LibreOffice and allow you to create, edit, run, and
debug macros.

416 | Chapter 11, Getting Started with Macros


Figure 344: Basic Macros dialog

Figure 345: LibreOffice Basic Macro Organizer dialog, Libraries tab


10) When a new module is created, it contains a comment and an empty macro named Main,
which does nothing.
11) If you are ready, add the new macro either before Sub Main or after End Sub. Listing 2
shows the new macro added before Sub Main.

Your first macros | 417


Figure 346: Basic Macro Organizer dialog, Modules tab

Figure 347: LibreOffice Basic IDE (Integrated Development Environment) window

418 | Chapter 11, Getting Started with Macros


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.

12) (Optional) To check if the macro is written as expected by the LibreOffice Basic
programming language, click the Compile icon on the Macro toolbar.
13) 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 348: Dialog with results of the Print instruction.


14) Click OK to close this small dialog.
15) If no subroutine or function is selected, a dialog like the one in Figure 349 will open. Then
select the macro and click Run to execute it.
16) 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.
17) Select a macro and then click Run.

Your first macros | 419


Figure 349: Dialog to select and run a macro

Recording a macro
When you record a macro in LibreOffice, you are actually using programming language to record
the steps needed to perform a certain task. For example, if you have to repeatedly enter the
same information into a document, you can create a macro that automatically enters this piece of
information without having to copy it every time you need it.

Note
Sometimes, it might be better to create an AutoText that can repeatedly enter
information into a document. See Chapter 2, Working with Text: Basics, in the
Writer Guide for more information.

First enable macro recording in LibreOffice 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.
1) 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.
2) Type the desired text you want to be entered when this macro is run. As an example, type
your name.
3) Click Stop Recording on the small dialog. This will cause Basic Macros dialog to open
(similar to Figure 344 on page 470, but with different action buttons).
4) Open the library container My Macros.
5) Find the library named Standard in My Macros. Note that every library container has a
library named Standard.

420 | Chapter 11, Getting Started with Macros


6) 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.
7) 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.
8) 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
1) Go to Tools > Macros > Run Macro to open the Macro Selector dialog (Figure 350).
2) For example, select your newly created macro EnterMyName and click Run.
3) Alternatively, go to Tools > Macros > Organize Macros > Basic to open the Basic
Macros dialog (Figure 344), select your macro and click Run.

Figure 350: Use the Macro Selector dialog to select and run an existing macro

Viewing and editing macros


To view and edit the macro that you created:
1) Go to Tools > Macros > Organize Macros > Basic to open the Basic Macros dialog.

Your first macros | 421


2) 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 (see Listing 3):
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 on a line
that begins with REM 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. It is worth noting that symbolic constants
are an advanced topic that is not covered by this user guide and they 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


When you are defining a variable (which contains data), you should use the DIM keyword, which
was 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.

422 | Chapter 11, Getting Started with Macros


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 usually
begin at 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.
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 an object when a
macro commands it via an object’s method.

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.

Your first macros | 423


NOTE
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:
1) Can the task be written as a simple set of commands?
2) Can the steps be arranged so that the macro’s final command leaves the cursor ready for
the next command? Or does it allow the user to return to entering text or data into the
target document?

A more complex example of a macro


One common macro task is to copy rows and columns of data from a website and format them as
a table in a text document. Typically this macro works as follows:
1) Copy the data from the website to the clipboard.
2) To avoid strange formatting and fonts, paste the text into a Writer document as
unformatted text.
3) 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 you can record a macro that
formats the text. As an example of copied data, consider the text copied from the API website
describing the FontWeight constants (Figure 351). 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.

424 | Chapter 11, Getting Started with Macros


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 351: Example of copied data


In this example we will want the first column in the table to contain the numeric value of the font
weight, the second column will contain the constant name, and the third column will hold 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”.
1) 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.
2) Go to Tools > Macros > Record Macro to start recording.
3) Press Ctrl+Right Arrow to move the cursor to the start of the word “specifies”.
4) Press Backspace twice to remove the tab and the space.
5) Press Tab to add the tab without the space after the constant name.
6) Press Delete to delete the lower case “s” and then press Shift+S to add an upper
case “S”.
7) Press Ctrl+Right Arrow twice to move the cursor to the start of the number.
8) Press Ctrl+Shift+Right Arrow to select and move the cursor before the % sign.
9) Press Ctrl+C to copy the selected text to the clipboard.
10) Press End to move the cursor to the end of the line.
11) Press Backspace twice to remove the two trailing spaces.
12) Press Home to move the cursor to the start of the line.
13) Press Ctrl+V to paste the selected number to the start of the line.
14) Pasting the value also pasted an extra space, so press Backspace to remove the extra
space.
15) Press Tab to insert a tab between the number and the name.
16) Press Home to move to the start of the line.
17) Press Down Arrow to move to the next line.
18) Stop recording the macro and save the macro, see “Recording a macro” on page 473.
It takes much longer to read and write these steps 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
into macros that can be used to automate repetitive tasks.

Creating a macro | 425


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())

426 | Chapter 11, Getting Started with Macros


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, 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 352 shows the original line and the resulting line after applying the macro.

Figure 352: Result of applying the recorded macro


Keep in mind that the steps described above will only work properly if the first 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 353 shows the original line starting with “DONTKNOW”.

Creating a macro | 427


Figure 353: Result of using the macro in a line with a different structure

Running a macro quickly


Since it is not convenient to repeatedly run macros using Tools > Macros > Run Macro, you can
assign a keyboard shortcut to quickly trigger it. To assign the shortcut Ctrl+K to the
CopyNumToCol1 macro, do the following:
1) Go to Tools > Customize. This will open the Customize dialog.
2) Select the Keyboard tab. In the Shortcut Keys section, select the Ctrl+K shortcut.
3) In the Category section, select LibreOffice macros. Navigate this section and select the
CopyNumToCol1 macro.
4) Now click the Modify button to assign the Ctrl+K shortcut to the CopyNumToCol1
macro.
5) 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 354 illustrates the steps
involved.

Figure 354: Assigning a shortcut to a macro

428 | Chapter 11, Getting Started with Macros


Limitations of the macro recorder
Unfortunately, the Macro Recorder cannot record some actions, and its limitations are related to
LibreOffice’s dispatch framework and its relationship to the macro recorder.

Understanding the dispatch framework


The purpose of the dispatch framework is to provide uniform access to components (documents)
for commands that generally correspond to menu items. It translates File > Save, the shortcut
keys Ctrl+S, or clicking the Save icon on the Standard toolbar into the same “dispatch
command.”
Also, the dispatch framework can send “commands” back to the user interface (UI). For example,
after saving a new document, the framework makes sure that 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 the frame the command around the API until an
object is found that can handle the command.

How the macro recorder uses the dispatch framework


The macro recorder can only register commands generated by the dispatch framework, but 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())
Though a command is generated when you open a dialog, any work done inside the dialog is not
usually recorded. This occurs in places like macro organization dialogs, when you are inserting
special characters, and similar types of dialogs. Other possible problems using the macro
recorder can occure when you insert a formula, set user data, create filters in Calc, do actions in
database forms, and export a document to an encrypted PDF file. You never know for certain
what the macro recorder can capture until 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, normally the next steo is to
write actual 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 355 shows
an example of the hierarchical structure of macro libraries in LibreOffice.

Macro organization | 429


Figure 355: Macro Library hierarchy
Go to Tools > Macros > Organize Macros > Basic to open the Basic Macros dialog (Figure 344
on page 470). All available library containers are shown in the Macro From list and 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 have administrator rights in LO. 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 only applicable 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. We strongly recommend that you
create your own libraries with meaningful names instead of using the Standard library. Libraries
with meaningful names are easier to manage and unlike Standard, your own libraries can be
imported into other library containers.

Caution
While LibreOffice allows you to import libraries into a library container, 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, you should 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. Macros stored in the
application library container named My Macros are globally available to all documents and
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.

430 | Chapter 11, Getting Started with Macros


While the Standard and Template libraries are automatically loaded, other library macros are not
available until the library that contains them is 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. To find out where configuration data is stored, go to Tools > Options
> LibreOffice > Paths. 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
If you want to export macro libraries so that they can be reused and shared with other people,
use the LibreOffice Basic Macro Organizer. To export a macro library:
1) Go to Tools > Macros > Organize Macros > Basic and the click the Organizer button.
2) Click the Libraries tab and choose which library you want to export.
3) Click Export and then select Export as BASIC Library (note that you cannot export the
Standard library).
4) 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 356 shows an example of how a library named TestLibrary with a single module called
Module1 would be exported.

Figure 356: 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.
1) On the Libraries tab, select the library container to use and then click Import to import
macro libraries.
2) Navigate to the directory containing the library to import (Figure 357). Normally you can
choose between dialog.xlb and script.xlb. It does not matter which of these two files
you select; both will allow your macro to be imported. Macros can be stored in libraries
inside LibreOffice documents. To import libraries contained in a document, select a
document rather than a directory on disk.

Macro organization | 431


Figure 357: Navigating to a macro library
3) Select a file and click Open to continue and open the Import Libraries dialog (Figure 358).

Figure 358: Choose library import options


4) 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 that library 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.
5) Click OK to import the macro library you selected.

432 | Chapter 11, Getting Started with Macros


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 LibreOffice community in the internet. Some macros are
contained in documents, some as regular files that you need to import, and others are published
as text and must be copied and pasted into the Basic IDE. See “Adding a macro” on page 469 on
how to add macros to your macro library and “Viewing and editing macros” on page 474 on how
to edit macros using the Basic IDE.
Some macros are available as free downloads on the Internet (see Table 12).
Table 12. Places to find macro examples
Location Description
https://www.pitonyak.org/oo.php Reference materials regarding macros.
Reference materials regarding database
https://www.pitonyak.org/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


You can run a macro with Tools > Macros > Run, but this will not be efficient when you use
macros frequently. Fortunatley LibreOffice has many other ways to run your macros.
While you can assign a shortcut to macros, as seen in “Running a macro” on page 474, 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 13.
Table 13. Where to store a macro
Where to place For all LibreOffice For a specific LO For a single
the macro applications application document
Toolbar No Yes Yes
Menu No Yes Yes
Shortcut Yes Yes No
Event Yes No Yes

How to run a macro | 433


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 allows you 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 LibreOffice detects a user action, we call it 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, if you write an
event handler that is called every time that a document is modified but make a
mistake so the event is not properly handled, problems can occur. One possible
result is that your event handler will force you to kill LibreOffice.

1) Go to Tools > Customize to open the Customize dialog and select the Events tab (Figure
359). The events in the Customize dialog are related to the entire application and specific
documents.
2) In the Save In drop-down, select LibreOffice, or a specific document from the menu to
save your event.
3) 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 350 on page 474 but with
different action buttons).
4) 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.

434 | Chapter 11, Getting Started with Macros


Figure 359: Events tab in Customize dialog

Using extensions
An extension is code 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.

Using extensions | 435


Writing macros without the recorder
The examples covered so far in this chapter were created using the macro recorder and the
dispatcher, but you can also write macros in code which directly access the objects that comprise
LibreOffice. 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 in code 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:
1) Go to Tools > Macros > Organize Macros > Basic.
2) In My Macros, navigate to the library where you want the macro to be created. In this
example, consider the library TestLibrary.
3) 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.
4) 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.
5) 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 in code 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.

436 | Chapter 11, Getting Started with Macros


For example, Listing 6 below shows the Basic code for a macro that analyzes a range of cells to
determine if all values are between 0 and 100. 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: 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 in code for
Writer” on page 489. 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 486 to execute it.
Figure 360 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 361 will also be
displayed.

Writing macros without the recorder | 437


Figure 360: Cell values after being formatted by the macro

Figure 361: Message box presented if some values are


not between 0 and 100

The ScriptForge library


Since 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, LibreOffice has provided them with the ScriptForge library. This library makes 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.
ScriptForge 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()

438 | Chapter 11, Getting Started with Macros


End Sub
As seen in the example, the ScriptForge library provides straightforward commands to execute
commands, and 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, programmers often have problems discovering object
types as well as their supported services, methods, and properties.
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
available languages (LibreOffice Basic, Python, JavaScript, and BeanShell) which provides some
means of access to the various interfaces which they might need to perform an action on a
document.
The UNO Object Inspector can help macro developers inspect objects, learn how to access
them, and use them 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 362.

Figure 362: 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:

UNO Object Inspector | 439


• 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, toggle the Current
Selection button, then inspect the object properties in search of a property that matches the
desired effect. Figure 363 shows the CharBackColor property selected, which is the property
used to set text background color.

Figure 363: 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.

440 | Chapter 11, Getting Started with Macros


Overview of Python, BeanShell, and JavaScript macros
Many programmers may not be familiar with LibreOffice Basic, so LibreOffice supports macros
written in three other familiar languages: 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 those macros that you made 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 364).
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 364: Macro Selector dialog

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/

Overview of Python, BeanShell, and JavaScript macros | 441


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 365). 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 484.

Figure 365: Python Macros dialog


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, especially when they are 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.

442 | Chapter 11, Getting Started with Macros


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 366).

Figure 366: BeanShell Macros dialog


Click the Edit button on the BeanShell Macros dialog to access the BeanShell Debug Window
(Figure 367).

Overview of Python, BeanShell, and JavaScript macros | 443


Figure 367: 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 368).

444 | Chapter 11, Getting Started with Macros


Figure 368: JavaScript Macros dialog
Click the Edit button on the JavaScript Macros dialog to access the Rhino JavaScript Debugger
(Figure 369). 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");

Overview of Python, BeanShell, and JavaScript macros | 445


Figure 369: 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).

446 | Chapter 11, Getting Started with Macros


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.

Finding more information | 447


Getting Started Guide 7.6

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 370), 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 370: 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.

450 | Chapter 12, Configuring LibreOffice


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 370), 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 371) 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.

LibreOffice options | 451


Figure 371: 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.

452 | Chapter 12, Configuring LibreOffice


Figure 372: Options LibreOffice dialog — View page

View
The options available in the View page of the Options LibreOffice dialog (Figure 372) 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.

LibreOffice options | 453


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 14.
Table 14: Clipboard and Selection clipboard functions
Function Clipboard Selection clipboard
Edit > Copy or Ctrl+C (macOS
Copy content Select text, table, or object.
⌘+C)
Edit > Paste or Ctrl+V (macOS
Clicking the middle mouse button
Paste content ⌘+C) pastes at the cursor
pastes at the cursor position.
position.
Pasting into another No effect on the clipboard The last marked selection is the
document contents. 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.

454 | Chapter 12, Configuring LibreOffice


Figure 373: 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 373).
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.

LibreOffice options | 455


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 374), 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.

456 | Chapter 12, Configuring LibreOffice


Figure 374: 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 375) 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 15 below for more information
Apply replacement table
Enables the font replacement settings that have been defined.

LibreOffice options | 457


Figure 375: Options LibreOffice dialog — Fonts page
Table 15: Font replacement options
Always check box Screen only check box Replacement action
Font replacement on screen and when
Checked Blank
printing, whether the font is installed or not.
Font replacement only on screen, whether
Checked Checked
the font is installed or not.
Font replacement only on screen, but only
Blank Checked
if font is not available.
Font replacement on screen and when
Blank Blank
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.

458 | Chapter 12, Configuring LibreOffice


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 376), 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 376: Options LibreOffice dialog — Security page

LibreOffice options | 459


Figure 377: 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 377), 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 378), 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.

460 | Chapter 12, Configuring LibreOffice


Figure 378: 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.

LibreOffice options | 461


Figure 379: Options LibreOffice dialog — Accessibility page

Accessibility
On the Accessibility page of the Options LibreOffice dialog (Figure 379), 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.

462 | Chapter 12, Configuring LibreOffice


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 380), 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 380: Options LibreOffice dialog — Advanced page

LibreOffice options | 463


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.

464 | Chapter 12, Configuring LibreOffice


Figure 381: Options LibreOffice dialog — Online Update page

Online update
On the Online Update page of the Options LibreOffice dialog (Figure 381), 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/.

LibreOffice options | 465


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 382), 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.

466 | Chapter 12, Configuring LibreOffice


Figure 382: 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 16: 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.

Loading and saving documents | 467


Figure 383: Options Load/Save dialog — VBA Properties page

VBA properties
On the VBA Properties page of the Options Load/Save dialog (Figure 383), 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.

468 | Chapter 12, Configuring LibreOffice


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 384), 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 384: Options Load/Save dialog — Microsoft Office page

Loading and saving documents | 469


[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 385), 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.

470 | Chapter 12, Configuring LibreOffice


Figure 385: 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.

Loading and saving documents | 471


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 386), 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.

472 | Chapter 12, Configuring LibreOffice


Figure 386: 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.

Language settings | 473


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 387) 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.

474 | Chapter 12, Configuring LibreOffice


Figure 387: 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.

Language settings | 475


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:
1) Go to Tools > Language > More Dictionaries Online on the Menu bar to open the
Extension Dictionaries dialog.
2) Select the required dictionary from the list of available dictionaries.
3) If necessary, click on the website link to find out more information on the selected
dictionary.
4) Click on Install below the required dictionary and the dictionary is installed into
LibreOffice.
5) Click on Close to close the Extensions Dictionary dialog.
6) 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 388) the
search properties for Japanese can be specified.

476 | Chapter 12, Configuring LibreOffice


Figure 388: 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 389), 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.

Language settings | 477


Figure 389: 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 390), 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).

478 | Chapter 12, Configuring LibreOffice


Figure 390: 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.

Language settings | 479


Figure 391: Options Language Settings dialog — Language Tool Server page

Figure 392: Options Language Settings dialog — English Sentence Checking page

Language tool server


On the Language Tool Server page of the Options Language Settings dialog (Figure 391), 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 392),
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 393) 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.

480 | Chapter 12, Configuring LibreOffice


Figure 393: Options Charts dialog — Default Colors page

Figure 394: 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 394) 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.

AutoCorrect functions | 481


Figure 395: AutoCorrect dialog
1) Go to Tools > AutoCorrect > AutoCorrect Options on the Menu bar to open
AutoCorrect dialog (Figure 395). A document must be open for this menu item to appear.
2) 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.
3) Click OK to save the changes and close the dialog.

482 | Chapter 12, Configuring LibreOffice


Getting Started Guide 7.6

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

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 396), 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
1) Go to Tools > Customize on the Menu bar to open the Customize dialog.
2) Click on Menus to open the Menus page (Figure 396). In the Scope drop-down list,
LibreOffice Writer appears as the selected module.
3) 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.
4) 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.
5) If necessary, enter a command name in the Search text box to locate the command in the
Available Commands list.
6) If necessary, select a command category from the Category drop-down list. By default,
All commands is displayed as the category.
7) Select the required command in the Available Commands list. This may require scrolling
through the list of commands.
8) Click on the right arrow to add the required command to the Assigned Commands list.
9) If necessary, click on the up arrow, or down arrow, to move the command into its correct
position in the Assigned Commands list.

484 | Chapter 13, Customizing LibreOffice


Figure 396: Customize dialog — Menus page
10) If necessary, insert a menu separator above the newly inserted command as follows:
a) Select the newly inserted command in the Available Commands list.
b) Click on Insert and select Insert Separator from the drop-down list.
11) If necessary, insert a submenu as follows:
a) Select the newly inserted command in the Available Commands list.
b) Click on Insert and select Insert Submenu from the drop-down list.
c) Enter a name for the submenu in the Add Submenu dialog that opens.
d) Click OK to create the submenu and close the dialog.
12) If necessary, rename the newly inserted command as follows:
a) Select the newly inserted command in the Available Commands list.
b) Click on Modify and select Rename from the drop-down list.
c) Enter a new name for the command in the Rename Menu dialog that opens.
d) Click OK to rename the command and close the dialog.
13) Click OK to save the changes to the menu and close the Customize dialog.

Removing commands
1) Go to Tools > Customize on the Menu bar to open the Customize dialog.

Menu customization | 485


2) Click on Menus to open the Menus page. In the Scope drop-down list, LibreOffice Writer
appears as the selected module.
3) Select the command for removal in the Assigned Commands list.
4) Click on the left arrow to move the selected command to the Available Commands list.
5) 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 397: Adding new menu


1) Go to Tools > Customize on the Menu bar to open the Customize dialog.
2) Click on Menus to open the Menus page.
3) Click on the three bars Ξ next to the Target drop-down list to open a context menu
(Figure 397).
4) Select Add from the context menu to open the New Menu dialog (Figure 398).
5) 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.
6) Select the new menu and use the up and down arrows to reposition the new menu in the
Menu position list.
7) Click OK to close the New Menu dialog and the new menu name appears in Target with
the Assigned Commands box empty.
8) Add commands to the new menu. See “Adding commands” on page 544 on how to add
menu commands.

486 | Chapter 13, Customizing LibreOffice


Figure 398: New Menu dialog
9) 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:
1) Go to Tools > Customize on the Menu bar to open the Customize dialog.
2) Click on Menus to open the Menus page.
3) Select the menu from the Target drop-down list.
4) Select the menu command from the Assigned Commands list.
5) Click on the three bars Ξ ("hamburger menu") next to the Target drop-down list to open a
context menu.
6) Click on Rename from the context menu to open the Rename dialog.
7) Add a tilde (~) before the character to be used as the keyboard shortcut.
8) Click OK to save the change and close the Rename dialog.
9) 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.

Menu customization | 487


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 399: Customize dialog — Toolbars page


The Toolbars page on the Customize dialog (Figure 399) 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.

488 | Chapter 13, Customizing LibreOffice


Toolbar customization
Adding tools
1) Open the Customize dialog and click on Toolbars to open the Toolbars page.
2) 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.

3) In the Target drop-down list, select the toolbar for customization. The tools on the
selected toolbar are displayed in the Assigned Commands list.
4) Select a tool in the Available Commands list. By default, all available tools are displayed
in the Available Commands list.
5) 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.
6) 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.
7) Use the up and down arrows in Assigned Commands to position the tool in its required
position on the selected toolbar.
8) If necessary, insert a separator bar above the newly inserted tool as follows:
a) Select the newly inserted tool in the Available Commands list.
b) Click on Insert and select Insert Separator from the drop-down list.
9) If necessary, to remove a separator bar, right-click on the separator bar and select
Remove from the drop-down list.
10) If necessary, rename the newly inserted tool as follows:
a) Select the newly inserted tool in the Available Commands list.
b) Click on Modify and select Rename from the drop-down list.
c) Enter a new name for the tool in the Rename Menu dialog that opens.
d) Click OK to rename the tool and close the dialog.
11) Click OK to save the changes to the toolbar and close the Customize dialog.

Removing tools
1) Open the Customize dialog and click on Toolbars to open the Toolbars page.
2) In the Scope drop-down list, the LibreOffice module that is open appears as the selected
module.
3) In the Target drop-down list, select the toolbar that has the tool that is going to be
removed.
4) Select the tool for removal in the Assigned Commands list.

Toolbar customization | 489


5) Click on the left arrow to move the selected tool into the Available Commands list and
remove the tool from the selected toolbar.
6) Click OK to save the changes to the toolbar and close the Customize dialog.

Figure 400: Name dialog

Creating new toolbars


1) Open the Customize dialog and click on Toolbars to open the Toolbars page.
2) In the Scope drop-down list, select the LibreOffice module displayed, or one of the listed
documents.
3) Click on the three bars Ξ next to the Target drop-down list to open a context menu
(Figure 397 on page 546).
4) Select Add from the drop-down list to open the Name dialog (Figure 400).
5) Type a name for the new toolbar in the Toolbar name box.
6) In the Save in box select where to save the new toolbar. This can be a LibreOffice
module, or one of the listed documents.
7) Click OK to save the new toolbar and close the Name dialog.
8) Add the required tools to the new toolbar. Refer to “Toolbar customization” on page 549
for information on how to add tools.
9) 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:
1) Open the Customize dialog and click on Toolbars to open the Toolbars page.
2) In the Target drop-down list, select the toolbar where icons are going to be customized.
3) In Assigned Commands, select the tool where the icon is going to be changed.
4) 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 401).
5) Select an icon from the available icons shown in the Icons preview box.
6) Click OK to change the icon for the selected tool and close the Change Icon dialog. There
is no confirmation message when changing icons.
7) Click OK to save the changes to the toolbar and close the Customize dialog.

490 | Chapter 13, Customizing LibreOffice


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 401: 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.

1) Open the Customize dialog using one of following methods:

Keyboard shortcuts | 491


– 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.
2) Click on Keyboard to open the Keyboard page (Figure 402).

Figure 402: Customize dialog — Keyboard page


3) 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 402 shows that Writer has been
selected.
4) Select the required category for the keyboard shortcut from the Category list.
5) Select the required function for the keyboard shortcut from the Function list.
6) 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.
7) Click OK to save the new keyboard shortcut and close the Customize dialog.

492 | Chapter 13, Customizing LibreOffice


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 402
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 403: 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.
1) 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 403).
2) Navigate to the folder to be used for keyboard configuration files.
3) 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.
4) Click on Save to save the keyboard configuration file and close the Save Keyboard
Configuration file browser.
5) 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:

Keyboard shortcuts | 493


1) 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.
2) Navigate to the folder to be where keyboard configuration files are located.
3) Click on Open to load the selected keyboard configuration into LibreOffice and close the
Load Keyboard Configuration file browser.
4) Click OK to save the changes and close the Customize dialog.
5) 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:
1) 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.
2) Click on Keyboard to open the Keyboard page
3) 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.
4) Click OK to save the changes and close the Customize dialog.
5) 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:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog (Figure 404).

494 | Chapter 13, Customizing LibreOffice


2) Click on Get more extensions online link. The official extension repository for
LibreOffice opens in a web browser.
3) Enter a search term in What are you looking for? text box in the web browser and click
on Search.
4) If necessary, select a tag filter before searching to reduce the number of extensions in the
search result.

Figure 404: Extensions dialog


5) Locate the extension required and click on it to open the web page for the selected
extension.
6) Check the extension description and its compatibility for the LibreOffice version and
computer operating system being used.
7) For the correct extension version, click on Download and the extension is downloaded
into the Downloads folder on the computer.
8) In the Extensions dialog, click on Add to open the Add Extension(s) browser window.
9) Navigate to the folder where the extension is located.
10) Select the extension and click on Open.
11) If necessary, agree to accepting the license agreement and the extension is installed and
listed in the Extensions dialog.
12) If necessary, restart LibreOffice for the extension to become effective.

Adding extensions | 495


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:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog.
2) Click on Check for Updates to open the Extension Update dialog.
3) Select any extension that is listed in Available extension updates and click on Install to
update the extension.
4) Close the Extension Update and Extensions dialogs.
5) 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:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog.
2) Select the extension for removal in the Extensions dialog.
3) Click on Remove and confirm the removal of the extension.
4) Close the Extensions dialog.

Disabling extensions
To disable an extension without removing the extension from LibreOffice is as follows:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog.
2) Select the extension being disabled in the Extensions dialog.
3) Click on Disable. The Disable button changes to Enable.
4) When necessary, click on Enable and the extension can be used again in LibreOffice.
5) Close the Extensions dialog.

Note
If Remove and Disable are grayed out in the Extensions 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)

496 | Chapter 13, Customizing LibreOffice


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


1) Insert a filled object into a document, for example a square, and make sure it is selected.
2) Right-click on the selected object and select Area from the context menu to open the
Area dialog (Figure 405).
3) Click on Color to open the options available for a color fill.
4) 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.
5) Click on Add in Custom Palette and enter a name for the color in the Name dialog that
opens.
6) Click OK to close the Name dialog and the color is added to the Custom palette.
7) 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.

Creating custom colors | 497


Figure 405: Area dialog — Color page

Figure 406: 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.

498 | Chapter 13, Customizing LibreOffice


Using Pick a Color dialog for objects
1) Insert a filled object into a document, for example a square, and make sure it is selected.
2) Open the Pick a Color dialog (Figure 406) 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.
3) 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.
4) Click OK to close the Pick a Color dialog and save the color. The color appears as a fill in
the selected object.
5) Open the Color page of the Area dialog.
6) Click on Add in Custom Palette and enter a name for the color in the Name dialog that
opens.
7) Click OK to close the Name dialog and the color is added to the Custom palette.
8) 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).

Adding fonts | 499


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 407: Select Your Preferred User Interface dialog


Select a preferred user interface variant as follows:
1) Open a LibreOffice module to change the user interface.
2) Go to View > User Interface on the Menu bar to open the Select Your Preferred User
Interface dialog (Figure 407).
3) Select the preferred user interface from the options available in UI variants. A preview of
the selected user interface is displayed in the dialog.
4) To use the selected user interface for all LibreOffice modules, click on Apply to All.
5) To only use the selected user interface for the LibreOffice module that is open, click on
Apply to {Module}, for example Apply to Writer.
6) Click on Close to close the dialog.

500 | Chapter 13, Customizing LibreOffice


Getting Started Guide 7.6

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 408 and for
macOS see Figure 409.

Figure 408: Customize dialog — Keyboard page for Linux/Windows

502 | Appendix A, Keyboard Shortcuts


Figure 409: 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.

macOS keyboard shortcuts | 503


Tables 17, 18 and 19 show the most common variations in keyboard shortcuts and keyboard
labelling. Table 20 shows examples of using macOS keyboard shortcuts. For more information on
keyboard shortcuts, see LibreOffice Help.
Table 17: 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 18: Home and End keys
Windows or Linux macOS
Home Fn+Left Arrow
End Fn+Right Arrow
Table 19: Page Up and Page Down
Windows or Linux macOS
Screen Up Fn+Up Arrow
⌥ or Option or
Page Up
Alt+Fn+Up Arrow
Screen Down Fn+Down Arrow
⌥ or Option or
Page Down
Alt+Fn+Down Arrow
Table 20: Example of using macOS keyboard shortcuts
Windows or Linux macOS equivalent Effect
Tools > Options LibreOffice > Preferences Access setup options
Control+click or right-click
Right-click Opens a context menu
depending on computer setup
Ctrl (Control) ⌘ (Command) Used with other keys
⌥ (Option) or Alt,
Alt Used with other keys
depending on keyboard
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.

504 | Appendix A, Keyboard Shortcuts


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 21: Keyboard shortcuts for opening menus and menu items
Windows
macOS Effect
Linux
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
Alt+<?> with underlined characters. Press the underlined
character directly to carry out the action or option.
(Windows only)
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.
Repeatedly pressing F6 switches the focus through the
following objects:
Menu bar.
F6
Every toolbar from top to bottom and from left to right.
Every free window from left to right.
Document.
Repeatedly pressing F6 switches the focus through the
following objects:
F6 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


1) 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.
2) Press the right, or left arrow, to move the selection right, or left.

Keyboard shortcuts | 505


3) 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.
4) Press the down, or up arrow, to move the selection down, or up, the list of menu
commands.
5) 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.
6) If necessary, press the down, or up, arrow to move the selection down or up the list of
submenu commands.
7) If necessary, press the left arrow to close a submenu.
8) Press Enter to run the selected menu, or submenu command.

Accessing toolbar commands


1) Press F6 repeatedly until the first icon on a toolbar is selected.
2) On a horizontal toolbar, press the right or left arrows to move tool selection to the right or
left.
3) On a vertical toolbar, press the up or down arrows to move tool selection upward or
downward.
4) 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.
5) Press Enter to action the selected tool on the toolbar.
6) 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 22.
Table 22: Keyboard shortcuts for navigation
Windows
macOS Effect
Linux
Left Arrow Left Arrow Moves the cursor one character to the left.
Shift+Left Shift+Left Moves the cursor one character to the left
Arrow Arrow 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 Shift+Right Moves the cursor one character to the right
Arrow Arrow and selects the character.
Ctrl+Right Moves the cursor to the beginning of the
⌥+Right Arrow
Arrow next word.

506 | Appendix A, Keyboard Shortcuts


Windows
macOS Effect
Linux
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.
Moves the cursor to the beginning of the
Ctrl+Up Arrow ⌥+Up Arrow
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.
Moves the cursor to the end of the
Ctrl+Shift+Down ⌥+Shift+Down paragraph. Selects the text in the paragraph
Arrow Arrow from the cursor position to the end of the
paragraph.
Fn+Left Arrow or Moves the cursor to the beginning of the
Home
Ctrl+A current line.
Shift+Home Moves the cursor to the beginning of the line
and selects the text from the cursor position.
Moves the cursor to the beginning of the
Ctrl+Home ⌘+Up Arrow
document.
Fn+Right Arrow Moves the cursor to the end of the current
End
or Ctrl+E line.
Moves the cursor to the end of the line and
Shift+End
selects the text from the cursor position.
Moves the cursor to the end of the
Ctrl+End ⌘+Down Arrow
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.
⌘+Fn+Down
Ctrl+Page Down Moves the cursor to the footer.
Arrow

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.

Keyboard shortcuts | 507


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 23: Keyboard shortcuts for controlling dialogs
Shortcut Keys Result
Activates selected button. When no button is selected,
Enter
Enter is equivalent to clicking OK.
Closes dialog without saving any changes made while the
dialog was open. Esc is also equivalent to clicking Cancel.
Esc
When a drop-down list is open and selected, Esc closes the
list.
Spacebar Checks or clears an empty checkbox.
Moves focus up or down a list. Increases or decreases value
Up or Down Arrow 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
Shows items in a drop-down list.
(macOS ⌥+Down Arrow)

Controlling documents and windows


The keyboard shortcuts for controlling documents and windows in LibreOffice are shown in
Table 24.
Table 24: Keyboard shortcuts for controlling documents and windows
Windows
macOS Effect
Linux
Ctrl+O ⌘+O Opens the Open dialog to select and open a document.
Saves the current document. If the document is a
Ctrl+S ⌘+S previously unsaved file, the shortcut opens the Save As
dialog.
Ctrl+N ⌘+N Creates a new document.
Shift+Ctrl+
⌘+Shift+N Opens the Templates dialog.
N
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+
Searches for the last entered search term.
F
Ctrl+Shift+ Toggles the view between full-screen mode and normal
J mode in Writer or Calc.
Ctrl+Shift+
⌘+Shift+R Opens and closes the rulers.
R
Opens the LibreOffice Help contents in your default
browser. If the local Help package is not installed,
F1 F1
LibreOffice opens the online Help located at
https://help.libreoffice.org.

508 | Appendix A, Keyboard Shortcuts


Windows
macOS Effect
Linux
Turns the cursor into a What’s This? question mark.
Shift+F1 Shift+F1 Shows the tip for an item underneath the cursor. The
shortcut does not work with the online help.
Turns on Extended Tips for the currently selected
Shift+F2 Shift+F2 command, icon or control. The shortcut does not work
with the online help.
Ctrl+Shift+ Docks and undocks floating toolbars, Sidebar and
⌘+Shift+F10
F10 Navigator.
Ctrl+F4 or Closes the current document. Closes LibreOffice when
⌘+F4
Alt+F4 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 25.
Table 25: Keyboard shortcuts for editing and formatting documents
Windows
macOS Effect
Linux
When an OLE object is selected, activates the software
Enter Enter used to create the OLE object. When a drawing object is
selected, activates text mode.
Cuts selected text or objects from a document and
Ctrl+X ⌘+X
places them in the clipboard.
Copies selected text or objects and places them in the
Ctrl+C ⌘+C
clipboard.
Places text or objects from the clipboard that have
Ctrl+V ⌘+V
copied or cut into the document.
Ctrl+Alt+ Pastes unformatted text from the clipboard. The text is
⌘+⌥+Shift+V
Shift+V pasted using the format that exists at the insertion point.
Ctrl+Shift+
⌘+Shift+V Opens the Paste Special dialog.
V
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+
⌘+Shift+Y Repeats last command.
Y
Applies the Italic attribute to selected characters and
Ctrl+I ⌘+I
text.
Applies the Bold attribute to selected characters and
Ctrl+B ⌘+B
text.
Applies the Underline attribute to selected characters
Ctrl+U ⌘+U
and text.
Removes direct formatting from selected text or objects.
Ctrl+M ⌘+M This command is also available in Format > Clear
Direct Formatting in the Menu bar.

Keyboard shortcuts | 509


Sidebar keyboard shortcuts
General
The general keyboard shortcuts for using the Sidebar in LibreOffice are shown in Table 26.
Table 26: General keyboard shortcuts for Sidebar
Windows
macOS Effect
Linux
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.
Fn+Left
Home Moves focus to first entry.
Arrow
Fn+Right
End Moves focus to last entry.
Arrow
Up or Down Up or Down Moves the selection up or down and opens the
Arrow Arrow 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 27.
Table 27: Keyboard shortcuts for the Gallery
Windows
macOS Effect
Linux
Opens the Enter Title dialog. Only themes added to
Ctrl+R LibreOffice can be renamed. Themes installed with
LibreOffice cannot be renamed.
Deletes themes that have been added to LibreOffice.
Ctrl+D ⌘+D
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+ ⌘+Shift+ Inserts the selected object as a linked object into the
Insert Insert current document.
Ctrl+I Ctrl+I Inserts a copy of the selected object into the current
document.
Ctrl+P Ctrl+P
Spacebar Spacebar Switches between a view of a list of object previews
and a selected object.
Enter Enter

Database table keyboard shortcuts


The keyboard shortcuts for using a database table in LibreOffice are shown in Table 28.

510 | Appendix A, Keyboard Shortcuts


Table 28: Keyboard shortcuts for a database table
Windows
macOS Effect
Linux
Ctrl+Shift+ Opens and closes a database table in a document for
⌘+Shift+F4
F4 editing.
Toggles row selection, except when the row is in edit
Spacebar Spacebar
mode.
Ctrl+
⌘+Spacebar Toggles row selection.
Spacebar
Shift+ Shift+
Selects the current column.
Spacebar Spacebar
Ctrl+Page ⌘+⌥ + Fn+
Moves the cursor to the first row.
Up Up Arrow
Ctrl+Page ⌘+⌥ + Fn+
Moves the cursor to the last row.
Down Down Arrow

Controlling macros
Keyboard shortcuts for controlling macros in LibreOffice are shown in Table 29. For more
information on macros, see Chapter 11, Getting Started with Macros.
Table 29: Keyboard shortcuts for controlling macros
Windows
macOS Effect
Linux
Runs a macro field. The multiplication sign is only
Ctrl+* ⌘+*
available on a numeric keypad.
Shift+Ctrl+
⌘+Ctrl+Q Stops a running macro.
Q

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.

Defining keyboard shortcuts | 511


Further reading
For help with keyboard shortcuts, or using LibreOffice with a keyboard only, search LibreOffice
Help using the keywords “shortcut keys” or “accessibility”.

512 | Appendix A, Keyboard Shortcuts


Getting Started Guide 7.6

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.

514 | Appendix B, Open Source, Open Standards, Open Document


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 defines a method for accomplishing something that is independent of
manufacturer or vendor. In this case, we are discussing open standards which allows competing
software programs to freely use the same file formats. HTML, XML, and ODF are examples of
open standards for documents.
In computing, 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.

What is OpenDocument? | 515


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.6 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)

516 | Appendix B, Open Source, Open Standards, Open Document


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/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy