Bug 164617 - Slide becomes blue when Lights template is applied from Master Slides sidebar
Summary: Slide becomes blue when Lights template is applied from Master Slides sidebar
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Laurent Balland
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Templates Sidebar-Master-Slides
  Show dependency treegraph
 
Reported: 2025-01-07 05:10 UTC by Aron Budea
Modified: 2025-01-09 06:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (191.08 KB, image/png)
2025-01-07 05:10 UTC, Aron Budea
Details
Screenshot when created from template for reference (265.59 KB, image/png)
2025-01-07 05:10 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-01-07 05:10:11 UTC
Created attachment 198407 [details]
Screenshot

Open Impress with an empty presentation, open the Master Slides sidebar, and click on the Lights template among the Available for Use ones.

=> You get a blue slide with circles, ie. the colors aren't applied.

This started happening since the following commit in 25.2:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=1da2778bc4df3209689dc32dfa0c91848d384556
author		Laurent Balland <laurent.balland@mailo.fr>	2024-07-30 22:53:59 +0200
committer	Laurent Balland <laurent.balland@mailo.fr>	2024-08-31 16:54:04 +0200

"Update Lights Impress template"

Note that builds before the following commit on 2024-12-28 will also exhibit another issue, leaving the slide blank. Builds after this date are OK in this regard.
https://cgit.freedesktop.org/libreoffice/core/commit/?id=960db01dbfe2f916b91782da03532fae1f836445
Comment 1 Aron Budea 2025-01-07 05:10:58 UTC
Created attachment 198408 [details]
Screenshot when created from template for reference
Comment 2 Laurent Balland 2025-01-07 08:31:08 UTC
I see the problem with many templates, which were supposed to work. I need to dive in it.
Comment 3 Laurent Balland 2025-01-08 16:16:27 UTC
I think I understood the problem: when selecting a master page, only the <office:automatic-styles> section is imported and not the <office:styles> section. This implies that all styles created in the template are lost :-(

This is clearly the case when applying Focus master page: the orange and purple triangles appear blue because they are using styles defined only in template, whereas other triangles keep their color because their style is using automatic style. See https://opengrok.libreoffice.org/xref/core/extras/source/templates/presnt/Focus/styles.xml?r=13d27a60ec301874a5d0d171dcdf86f20e5f7473#1037

1037     <style:master-page style:name="Focus" style:page-layout-name="PM1" draw:style-name="Mdp1">
1038       <draw:polygon draw:style-name="Mgr3" .../>
1039       <draw:polygon draw:style-name="Filled_20_Orange" .../>
1040       <draw:polygon draw:style-name="Mgr5" .../>
1041       <draw:polygon draw:style-name="Mgr6" .../>
1042       <draw:polygon draw:style-name="Mgr7" .../>
1043       <draw:polygon draw:style-name="Filled_20_Purple" .../>

I'm going to fix it asap.
Comment 4 Commit Notification 2025-01-09 06:50:36 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d2c3b27a05bdb4adb8c058b1092f9d88f5e0369b

tdf#164617 Fix Ligths Impress template

It will be available in 25.8.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 5 Commit Notification 2025-01-09 06:51:38 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4e8775bfa4dbdf392b0e6f89331c2ae33bd68d97

tdf#164617 Fix Focus Impress template

It will be available in 25.8.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.