Bug 90497 - Implementing document themes
Summary: Implementing document themes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0 target:5.2.2 target:7.4.0
Keywords:
: 45176 97350 101074 101724 156909 (view as bug list)
Depends on: 91511
Blocks: Styles Document-Themes Sidebar-Design 46550 105122
  Show dependency treegraph
 
Reported: 2015-04-07 13:27 UTC by Yousuf Philips (jay) (retired)
Modified: 2023-09-28 20:29 UTC (History)
17 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-04-07 13:27:34 UTC
Document themes are a feature currently implemented in Apple iWorks and Microsoft Office and would be useful for implementation in LibreOffice.

Details about how this is implemented in MSO can be read at < https://blogs.kde.org/2011/12/14/fruits-css2-shared-themes >. I reached out to the author of the blog, Jaroslaw Staniek, about what work he had done regarding implementing this in Calligra and details of his reply can be found at < https://mail.kde.org/pipermail/calligra-devel/2015-April/013576.html >.

Initial discussion about implementing themes in LO can be seen in bug 90048.
Comment 1 Yousuf Philips (jay) (retired) 2015-04-08 05:03:40 UTC
I've begun collecting information on microsoft's usage of themes and am placing them into a google doc.

https://docs.google.com/document/d/1pSAJNnlnhRvs53nGFmemtuFNTgkYmryQKuolVnK6bEk/edit?usp=sharing

One thing that cant be implemented yet is of themes effecting table styles, as libreoffice doesnt have table styles.
Comment 2 Yousuf Philips (jay) (retired) 2015-04-11 21:55:47 UTC
Mirek provided the following links as good resources to understanding the MSO document themes.

https://msdn.microsoft.com/en-us/library/cc964302%28v=office.12%29.aspx

https://support.office.com/en-us/article/All-about-themes-Quick-Styles-cell-styles-and-background-styles-2cf8ffb9-4c87-47b3-9b36-bb2e8a836288?CorrelationId=37871130-d070-4bac-8056-bac0b5bd72c0&ui=en-US&rs=en-US&ad=US

He also stated in an email to me and others, "Microsoft's specs look pretty good -- I'm hoping ODF will more or less stick to them. (I'm a bit worried about feature creep here.)

The nice thing about themes is that the different aspects are relatively separate, so it seems to me that they could be implemented gradually. I'd suggest starting with theme fonts -- those seem easier to implement than the other aspects and relatively high-impact if the UX is thought-out well. (Generally, fonts should never be hard-coded.) Presentation themes would have a higher impact, but they're much more complex.

As an aside, it'd be good to sit down and decide on the purpose of each major UI element in LibreOffice, weeding out unnecessary interfaces that only add bloat. Adding themes to the mix will require some major changes to existing UI elements and, in the interest of maintainability, consistency, discoverabillity, and less work, it's imperative that the UI is streamlined and focused before adding major features. (Here, I'd suggest taking inspiration from iWork's UI.)"
Comment 3 Yousuf Philips (jay) (retired) 2015-05-01 09:19:28 UTC
So i was digging through commits to include in the design meeting minutes and noticed the following commits from Tomaz, as he begins implementing style theming in the sidebar. In order to see what has been achieved so far, you will need to turn on experimental features in the options dialog.

add "Design" deck to the sidebar
http://cgit.freedesktop.org/libreoffice/core/commit/?id=cb09f4daa018274c8d0cdd1a91b7c3038cbc8cb9

add "Style Presets" sidebar panel (experimental) to writer
http://cgit.freedesktop.org/libreoffice/core/commit/?id=b48025af032a4c252f0f4111d5a4d37e679acfad

add some default style presets to templates
http://cgit.freedesktop.org/libreoffice/core/commit/?id=25d200bf448735f063ce1e3ca9f762d39892eafd

Theme panel to change color/fonts of current styles
http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e20c37c4c60d485736261b60089acdc7dc4b886

Fix applying of theme fonts sets, add new / rename old variants
http://cgit.freedesktop.org/libreoffice/core/commit/?id=b55a9559e6c40060cafa62a824ab0cc0e27dba26

Modify tint/shade for theme colors, different shades for headings
http://cgit.freedesktop.org/libreoffice/core/commit/?id=6581d0b31869a4aea3bca27dcbaaaf0b2abddf3e
Comment 4 Yousuf Philips (jay) (retired) 2015-09-02 03:19:42 UTC
I had created 3 documents regarding document theming and they are available in this google drive folder.

https://drive.google.com/folderview?id=0B6qJrVIa0SAlflNsaGxmNjB2SzlCSV9faFQ0cVVOTGZWRDMwUzhTd0ZDRG0xUkZSSDdHWXc&usp=sharing

So Tomaz mentioned that he's still continuing his work on the hidden experimental 'Design' sidebar tab, where there is now previews of the color and style sets.

ColorSets: add preview to ThemePanel, move impl. to own file
http://cgit.freedesktop.org/libreoffice/core/commit/?id=c9df840d207c8d965b2df993e0a90be89f52c254

Show previews of style presets in sidebar
http://cgit.freedesktop.org/libreoffice/core/commit/?id=48d2dca48d75fef67e3caa61d80f074fdbeb9984

Again add ability to change tint/shade of a color + unit test
http://cgit.freedesktop.org/libreoffice/core/commit/?id=a0ab7c31a254285856f6520d069570647c56af22
Comment 5 Gerry 2015-09-21 04:52:37 UTC
Hi Jay, is this one a duplicate bug 45176?
Comment 6 Yousuf Philips (jay) (retired) 2015-09-21 09:02:46 UTC
(In reply to Gerry from comment #5)
> Hi Jay, is this one a duplicate bug 45176?

Yes the bug seems to be asking for the same thing, so i'll close it.
Comment 7 Yousuf Philips (jay) (retired) 2015-09-21 09:03:56 UTC
*** Bug 45176 has been marked as a duplicate of this bug. ***
Comment 8 Heiko Tietze 2016-08-26 06:53:21 UTC
*** Bug 101724 has been marked as a duplicate of this bug. ***
Comment 9 Luke 2016-08-29 17:15:46 UTC
*** Bug 101074 has been marked as a duplicate of this bug. ***
Comment 10 Luke 2016-08-29 17:24:58 UTC
When implementing this feature, we should be mindful of prior MSO interoperability issues such as Bug 67830, Bug 84205, and issues like https://lists.freedesktop.org/archives/libreoffice/2015-May/068280.html . Resolving this would also address the core need of Bug 55592(way to quickly swap document colors).
Comment 11 Commit Notification 2016-08-30 11:10:26 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5758f8a7f8e2e9819ef09f4e1fe38921b247dc65

tdf#90497 Unhide document themes sidebar design deck

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 imperativejonas 2016-09-06 11:43:52 UTC
I requested a feature to change all instances of a colour by changing that colour in the palette. Or another way of changing colours in an efficient way.

My request was marked as a duplicate of this one. Now I built 5.3.0.0.alpha0+ but I can't find much to test and report.

Did I build the wrong version or have I simple not understood the way to find and use the fix inside LO?
Comment 13 Yousuf Philips (jay) (retired) 2016-09-06 17:29:03 UTC
@imperativejonas: Go into Tools > Options > Advanced and check the 'Enable experimental features', then you'll find the 'Design' deck in the sidebar. Incase you dont find it there, reset your user profile.

https://wiki.documentfoundation.org/UserProfile#Default_location
Comment 14 imperativejonas 2016-09-06 18:54:02 UTC
Thank you! This is my first time doing something like this.
Comment 15 Commit Notification 2016-09-06 19:41:57 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f14be52b1995731ebc06fb99689d90909ac29d4b&h=libreoffice-5-2

tdf#90497 Unhide document themes sidebar design deck

It will be available in 5.2.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Heiko Tietze 2016-10-16 21:07:23 UTC
*** Bug 97350 has been marked as a duplicate of this bug. ***
Comment 17 Luke 2017-03-10 22:40:59 UTC
From Bug 103478 :

> OOXML documents may contain a theme file that specifies a list of preset
> styles, colors, etc. Changing the theme in MSO would change the format for
> any objects that are related to it.
> 
> The purpose of the set of commits that bc0a9076aa4 belongs is to preserve
> the assignment of theme colors. Previously to that commit, theme colors were
> converted to plain colors by LO on save, so when the document was opened
> back in MSO it remained unaffected by theme changes.
> 
> Unfortunately, the theme file (which is an XML file that is part of the
> OOXML document) is lost in the save process of XLSX or PPTX files. It only
> survives in the case of DOCX. That's why colors are lost, the shape refers
> to a theme color and the theme file doesn't exist.
> 
> The proper way to fix this bug is making sure the theme file is preserved on
> save. It should be detected on open, stored somewhere and written back to
> the file on save.

From 

https://lists.freedesktop.org/archives/libreoffice/2015-May/068280.html

> so I just traced back a regression to
> bc0a9076aa43a0782bcf81e55d3f84f6af0f68e8 and realized that the whole
> concept is flawed as long as we are not at the same time export the theme
> color file.

> Do you plan to fix that or are you ok with me disabling the whole grabbag
> based color export? It might improve the MSO compatibility a little bit for
> the price that LibreOffice itself can't handle the exported file anymore as
> we have no mapping for the theme colors during the next import.

> Regards,
> Markus
Comment 18 Thomas Lendo 2017-08-22 11:40:49 UTC
The Colors section in the Design sidebar deck are not working in my installation (version 5.4.0.3). Maybe I'm doing something wrong. Anyway, is any progress planned for this feature in the near future?
Comment 19 Yousuf Philips (jay) (retired) 2018-01-30 23:40:17 UTC
Now that Noto font family is bundled with LO, a 'Noto Family' entry should be added to initFontSets() and as Open Sans is no longer bundled, the 'Open Sans' entry should be removed.

https://opengrok.libreoffice.org/xref/core/sw/source/uibase/sidebar/ThemePanel.cxx
Comment 20 Commit Notification 2022-01-09 16:42:11 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9754b3feb4092243f30c665abc0344b1a665b5f6

tdf#90497 Replace Open Sans -> Noto Sans

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Stéphane Guillou (stragu) 2023-08-25 09:21:45 UTC
*** Bug 156909 has been marked as a duplicate of this bug. ***
Comment 22 Stéphane Guillou (stragu) 2023-08-25 09:26:02 UTC
Tomaž, do you think this can be considered as fixed by your implementation in 7.6?
Or should it linger until there is UI for Draw and Impress too?
Comment 23 Tomaz Vajngerl 2023-08-28 16:13:36 UTC
(In reply to Stéphane Guillou (stragu) from comment #22)
> Tomaž, do you think this can be considered as fixed by your implementation
> in 7.6?
> Or should it linger until there is UI for Draw and Impress too?

There is UI for Draw/Impress in master, but there are many things still need to be done. Then again it may make more sense to have individual bugs for what still needs to be done.

For example - chart support for themes.
Comment 24 Stéphane Guillou (stragu) 2023-09-06 16:18:31 UTC
(In reply to Tomaz Vajngerl from comment #23)
> For example - chart support for themes.

Happy to create that report. Would you say that charts supporting document themes depends on us implementing chart styles? (bug 62925)
Comment 25 Tomaz Vajngerl 2023-09-06 19:14:16 UTC
(In reply to Stéphane Guillou (stragu) from comment #24)
> Happy to create that report. Would you say that charts supporting document
> themes depends on us implementing chart styles? (bug 62925)

No, themes don't depend on styles.
Comment 26 Stéphane Guillou (stragu) 2023-09-28 20:29:56 UTC
(In reply to Tomaz Vajngerl from comment #23)
> Then again it may make more sense to have individual bugs for
> what still needs to be done.
> For example - chart support for themes.

Theme support for charts requested in bug 157496.