<div dir="ltr"><div dir="ltr">Hi Regina,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 2, 2023 at 6:43 AM Regina Henschel <<a href="mailto:rb.henschel@t-online.de">rb.henschel@t-online.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Miklos, hi Tomaž, hi all,<br>
<br>
Tomaž, I have put you in CC because you are currently heavily working on <br>
theme colors.<br>
<br>
I come across the problem, that my import in <br>
<a href="https://gerrit.libreoffice.org/c/core/+/143615" rel="noreferrer" target="_blank">https://gerrit.libreoffice.org/c/core/+/143615</a> does not get the correct <br>
color, if theme colors other than 'accent1'..'accent6' are used.<br>
<br>
Colored text in shapes in PowerPoint and fill and stroke of shapes in <br>
Word use e.g.:<br>
<a:rPr> <a:solidFill> <a:schemeClr val="bg1"><br>
But colored text in shapes in Word uses e.g.:<br>
<w:rPr> <w:color w:themeColor="background1"><br>
<br>
The themeColor attribute uses ST_ThemeColor (ISO 17.18.97) and that are <br>
the long variants of the color keys, e.g:<br>
background1, dark1, light1<br>
<br>
<schemeClr> uses the ST_SchemeColorVal enumeration (ISO 20.1.10.54). <br>
That one has the same items as the elements in <clrScheme> in <br>
<themeElements> but with the additional items 'bg1', 'bg2', 'tx1', 'tx2'.<br>
The ClrScheme::getColor() method maps these additional items to 'lt1', <br>
'lt2', 'dk1' and 'dk2' respectively before searching the color. But it <br>
does not catch the keys used with themeColor attribute.<br></blockquote><div> </div><div>Yes, you can add the missing long keys here and map them to the dark/light variant.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The only kind of mapping with the long variants that I have found at all <br>
is TDefTableHandler::getThemeColorTypeIndex and those assignments look <br>
wrong to me (e.g. using 0 for background1 and for dark1).<br></blockquote><div><br></div><div>This is indeed wrong.. background should map to light and text to dark. I will fix this but it will take a while until it hits master, unless you need to change this too?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
VML import/export is likely effected too, because it uses <w:color <br>
w:themeColor=".."> too.<br></blockquote><div><br></div><div>Yes, probably this needs to be changed also, but it's only for backwards compatibility.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Where to fix it?<br></blockquote><div><br></div><div>I think for this you will need to change the implementation in oox to just map the keys and it should work I guess.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Kind regards,<br>
Regina</blockquote><div><br></div><div>Tomaž <br></div></div></div>