Index ¦ Archives ¦ RSS

Start of document themes in Impress: shape text

Estimated read time: 5 minutes

Impress now has the start of document theme support: it is possible to define a document theme on master pages and you can refer to the theme colors from shape text (including effects).

First, thanks to our partner SUSE for working with Collabora to make this possible.

Motivation

PowerPoint users can attach a set of colors (and fonts, formattings) to master pages, and then refer to these in shape text, shape fill, shape geometry. You can even make the original color lighter and darker. These effects are preserved when you change the theme colors.

This is a larger feature, this blog post shows how theme colors can be defined and how to refer to those colors from Impress shape text. The rest of the feature is to be done in follow-up steps.

Results so far

Here is a demo that shows how it works:

Figure 1. Demo of theme support in Impress shape text

In other words, it consists of 2 parts on the UI:

  • You can define theme colors once you click on "Master View" in Impress, and then select the Slide → Slide properties menu item, and there choosing the new Theme tab. You can e.g. make "accent1" blue, "accent2" orange, and so on.

  • Then you can refer to these theme colors. Select some shape text, and then either use Format → Character → Font effects → Font color → Theme colors or use the sidebar to set the font color.

This later shows a grid of colors: each column is one theme color and then the column offers various lighter and darker variants of the color.

And the important bit: if you later change theme colors, then the color of shape text (using theme colors) is updated, even the effects (lighter or darker variants) are preserved.

To set expectations, this only works for shape text for now, and only in Impress, as a start.

How is this implemented?

If you would like to know a bit more about how this works, continue reading… :-)

As usual, the high-level problem was addressed by a series of small changes. The first step was to upstream work by Tomaž Vajngerl and Sarper Akdemir from the feature/themesupport2 feature branch:

The rest of the work was to go through the usual stages of document model, UNO API, rendering, ODP/PPTX filter and UI work to complete the work started on the branch:

Want to start using this?

You can get a snapshot / demo of Collabora Office and try it out yourself right now: try unstable snapshot. Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF’s next release too (7.4).

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.