Download it now!
Bug 117455 - Add color drawing styles in Draw
Summary: Add color drawing styles in Draw
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected)
Hardware: All All
: medium enhancement
Assignee: Heiko Tietze
Whiteboard: target:6.1.0
Keywords: needsDevAdvice
Depends on:
Blocks: ImpressDraw-Styles
  Show dependency treegraph
Reported: 2018-05-06 07:50 UTC by Roman Kuznetsov
Modified: 2020-04-20 10:13 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:

File ODG with new color drawing styles (25.31 KB, application/
2018-05-06 07:51 UTC, Roman Kuznetsov
Screenshot with color drawing styles (100.82 KB, image/jpeg)
2018-05-06 07:52 UTC, Roman Kuznetsov
Test for new styles of (12.71 KB, application/
2018-05-14 00:25 UTC, Regina Henschel
Solution for missing gradient names (701 bytes, patch)
2018-05-15 15:45 UTC, Regina Henschel

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2018-05-06 07:50:49 UTC
Add color drawing styles in Draw in addition existing styles

Steps to Reproduce:
1.  I want add color drawing styles in Draw in addition existing styles

Actual Results:  
we have only old drawing styles in Draw from 199x

Expected Results:
now we'll have our old styles and additional nice color drawing styles for 2-D shapes

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 Roman Kuznetsov 2018-05-06 07:51:47 UTC
Created attachment 141925 [details]
File ODG with new color drawing styles
Comment 2 Roman Kuznetsov 2018-05-06 07:52:59 UTC
Created attachment 141926 [details]
Screenshot with color drawing styles
Comment 3 Heiko Tietze 2018-05-06 07:55:56 UTC
Should we change/add draw styles? Topic for the next weekly meeting.
Comment 4 Regina Henschel 2018-05-06 13:17:10 UTC
I dislike to add more graphic styles to the default and would like to remove a lot of the existing ones. For example "title" is not needed.

The needed styles for shapes depend on the used template and is related to the content of the presentation. So I would prefer to add suitable styles to the document templates and remove as much as possible from the default.

The usage does not become easier with more styles. However, some users need assistance in creating styles that harmonize to each other and to the presentation object styles and the backgrounds. That does not only include colors but fonts too. So another idea can be, to provide a tool, that can change the basic styles all together to a selectable theme.
Comment 5 Kenneth Hanson 2018-05-07 14:08:29 UTC
Support for themes and/or color schemes would be a huge improvement. Even for advanced users, built-in themes are a great as a starting point, and the ability to create your own would make it easier to keep templates for various kinds of documents in sync.

It might be helpful to look at how MS Office does this. It's been several years since I've used it, but I remember in Powerpoint 2010 there was a drop-down that offered basic shapes with several colors and designs much like the attachments here, and several nice built-in color schemes. Word also provided several style sets for text with previews (which were rather ugly).

I have no idea how these are implemented. In the case of LO drawing objects, I'm imagining a system where each main style come with several child styles, one for each theme color. Probably just 4-5 would be adequate for most uses. Then, changing the theme would change the colors (and perhaps other attributes) of these styles.

Something like:
- Object with fill 1 (main theme color)
  - Object with fill 2
  - Object with fill 3
  - Object with fill 4
- Object without fill 1
  - Object without fill 2

I agree with Regina that the current built-in drawing styles need some cleanup, but unless ODF has some other provision for color schemes, I suspect something like this would be required.
Comment 6 Regina Henschel 2018-05-14 00:25:24 UTC
Created attachment 142082 [details]
Test for new styles of

I have tried the patch from

I see these problems:
(1) Shapes, which have lighten and darken areas, lose these areas. That is not a problem of gradient or missing line, as you can see in the page, where I have applied gradients by toolbar.
(2) If you open the file in an actual release version, the gradients are black to white. The reason is, that the needed draw:fill-gradient-name is missing in the style in the file.
Comment 7 Heiko Tietze 2018-05-14 11:23:41 UTC
(In reply to Regina Henschel from comment #6)
> I see these problems:

Thanks, looking into it. When I open the file with 6.0 it shows 'filled > filled_blue' in the styles list (coming from another source) while 6.1 has "Filled > Blue". Looks like more expertise is needed here.
Comment 8 Heiko Tietze 2018-05-14 14:53:07 UTC
Finished the second part. Opening a document with new gradient styles in 6.0 still fails. It works when the style is created manually (under Default). New style names are taken regardless it is used or not - and apply as black/white gradient.

Asked Mike on IRC and he didn't see a problem skimming over the changes. Armin, Samuel: please help.
Comment 9 Regina Henschel 2018-05-14 18:02:04 UTC
For problem (1) I have found, that it has nothing to do with the new styles, but it is already present in LO54. I will write a bug report for it.
Comment 10 Regina Henschel 2018-05-15 15:45:56 UTC
Created attachment 142115 [details]
Solution for missing gradient names

@Heiko: Your gradients need names, see attached file. I have used a name, which does not need encoding. You should try, whether a name with space will work too. I suggest to use a name which contains the style name.

You know, I'm not a experienced developer but a beginner. So I cannot guarantee, that the proposed solution is correct in all aspects. But in my test, the file format is correct now and LO6.0 shows no longer the default black/white gradient, but the  green, specified one.
Comment 11 Heiko Tietze 2018-05-15 17:35:40 UTC
(In reply to Regina Henschel from comment #10)
> @Heiko: Your gradients need names, see attached file.

Yes, works like a charm now. Thanks for the dev advice :-)
Comment 12 Heiko Tietze 2018-05-16 16:08:09 UTC
(In reply to Regina Henschel from comment #9)
> For problem (1) I have found, that it has nothing to do with the new styles,
> but it is already present in LO54. I will write a bug report for it.

So how do we proceed with the patch? +1 it on Gerrit, if you think the removed and added styles make sense. Otherwise we can still work on it.
Comment 13 Regina Henschel 2018-05-16 16:42:51 UTC
I have set it already to +1 on Gerrit :).

A short test of roundtrip with PowerPoint has no problems. So I think, it is ready to be pushed.
Comment 14 Commit Notification 2018-05-16 16:49:40 UTC
heiko tietze committed a patch related to this issue.
It has been pushed to "master":

tdf#117455 - New drawing styles

It will be available in 6.1.0.

The patch should be included in the daily builds available at in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.
Comment 15 Roman Kuznetsov 2018-05-18 06:44:01 UTC
verified in build from 17 April 2018
Comment 16 Volga 2018-06-08 04:58:05 UTC
Is it possible to make legacy drawing styles as extension?
Comment 17 Roman Kuznetsov 2018-06-08 06:21:19 UTC
(In reply to Volga from comment #16)
> Is it possible to make legacy drawing styles as extension?

You can save new empty drawing from old version of LibreOffice as template and use it later for creating new drawing. It that template will be save all legacy drawing styles
Comment 18 Heiko Tietze 2018-06-08 07:24:43 UTC
(In reply to Volga from comment #16)
> Is it possible to make legacy drawing styles as extension?

No, the styles are hard-coded. So kompilainenn's workaround is your only chance to get back what I removed (hardly can think of why someone uses those styles).
Comment 19 Heiko Tietze 2018-06-27 08:53:07 UTC
*** Bug 94369 has been marked as a duplicate of this bug. ***