Bug 156981 - Theme color is not used for rendering
Summary: Theme color is not used for rendering
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: lowest normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 157034
Blocks: Document-Themes
  Show dependency treegraph
 
Reported: 2023-08-28 23:46 UTC by Regina Henschel
Modified: 2023-09-28 23:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Colors only determined by complex-color attributes (17.01 KB, application/vnd.oasis.opendocument.presentation)
2023-08-28 23:46 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-08-28 23:46:01 UTC
Created attachment 189220 [details]
Colors only determined by complex-color attributes

Open attached file. It contains a shape, for which fill and stroke color is only determined by loext:stroke-complex-color and loext:fill-complex-color.

The import reads it correctly into the FillColorTheme, FillColorLumMod, FillColorLumOff, FillComplexColor, and LineComplexColor properties. And the Theme property of the master page is correct too.

But the shape is rendered with default color.

If a complex color is present, then it has to override the old fill and line color property, respectively. Fill and line color could be created from complex color on import. But I'm not sure, whether that would the best possible solution.

Should fill and line color be re-created when ever the assigned theme color changes or the theme itself changes? Or should rendering be changed to use the theme color in the first place?

@Tomaž: What do you think?
Comment 1 Regina Henschel 2023-08-31 10:14:30 UTC
Currently wrong loext:theme-type is written, see bug 157034. Before the import problem here is fixed to use theme colors instead of draw:fill-color, the export needs to write the correct loext:theme-type.
Comment 2 Tomaz Vajngerl 2023-08-31 21:20:35 UTC
Hm... there is no svg:stroke-color and draw::fill-color attributes in the document. For backwards compatibility they should always be written in addition to stroke-complex-color and fill-complex-color elements. 
I have set the same theme to the document again, so the colors are recalculated and the svg:stroke-color and draw::fill-color are properly written to the saved document, so the document also loads with correct colors set. 

On load we don't trigger theme recalculation, because of the assumption that the  old color attributes are still present and have the correctly recalculated theme color set.
Comment 3 Regina Henschel 2023-09-01 10:09:01 UTC
(In reply to Tomaz Vajngerl from comment #2)
> On load we don't trigger theme recalculation, because of the assumption that
> the  old color attributes are still present and have the correctly
> recalculated theme color set.

OK, then lets postpone a solution for the import problem till theme colors are available in an ODF version.
Comment 4 Stéphane Guillou (stragu) 2023-09-28 23:44:24 UTC
Quikee, Regina: should this be set to "new" until it can be actioned when ODF integrates theme palettes? Or did I misunderstand?