Created attachment 183398 [details]
SmartArt 'Venn diagram' with theme colors
The commits 0c13e476 and 1868dea8 have introduced theme colors (Miklos Vajna). But using them produces a regression in Writer.
Make sure option "SmartArt to LibreOffice shapes or reverse" is enabled in 'Microsoft Office' in 'Load/Save' in Tools>Options.
Open attached docx file. It contains a SmartArt shape.
Save it to ODF 1.3extended.
Reopen the saved file. You have no longer a SmartArt but a group. That is OK. The colors are OK.
Save that file to docx format.
Open the saved docx file in Word. The colors are missing. Instead a single blue is used.
Problem is, that the shapes get a reference to the theme in their fill attribute, but the folder 'Theme' is missing.
That is a regression compared to LO 7.3, which has no support for themes but sets the correct fill colors directly in the shape attributes and so the colors were correct in Word.
If a solution with generating the needed 'Theme' folder is not possible for LO 7.4, then the old way with direct colors should be used.
For LO 7.5 a solution with generating the needed 'Theme' folder would be nice. But if that will not be possible in time, for 7.5 too the old way with direct colors should be used for odt->docx.
I confirm it with
Version: 18.104.22.168.alpha0+ (X86_64) / LibreOffice Community
Build ID: 55cd20e6228a06836285c14ca6726adb1bb4ffcb
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-GB
Calc: CL threaded
But you can see a problem also in LO
Save as docx and reload
Actual result: Colors are missing. Instead a single black is used.
Miklos, can you have a look at it?
This never worked, full handling of the theme itself is only there in Impress. Although Tomaz is now looking at this for Writer (and ideally also for Calc later), so CC Tomaz.
Created attachment 185413 [details]
File with shapes with theme color
The missing theme-folder is still a problem in Version: 22.214.171.124.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9d44236a62bf59d120dda89924d0d1407b2bd52b
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
It affects not only SmartArt but ordinary shapes too. We now have loext:theme for odt and that works for odt in the main. Exporting such file to docx produces the correct attributes with 'schemeClr' in the markup of the shapes. But the 'theme' folder is still missing and therefore Word uses its default theme.
Created attachment 185414 [details]
Screenshot comparing left Writer with right Word
@Regina can you recheck? I think this is fine now. ODT doesn't work as the element names have changed.
It still doesn't work. The theme is now exported to odt and later exported to docx. So that part is correct now.
But there is the additional error, that the color transformations are lost. The ellipses in the diagram all have 'accent5' as a:schemeClr and that is read and exported. But actual color has to consider the color transformations, which is not the case yet.
I see these color transformations in the drawing1.xml in the diagram in the original docx file:
<a:hueOff val="0"/><a:satOff val="0"/><a:lumOff val="0"/>
<a:hueOff val="-3311292"/><a:satOff val="13270"/><a:lumOff val="2876"/>
<a:hueOff val="-6622584"/><a:satOff val="26541"/><a:lumOff val="5752"/>
<a:hueOff val="-9933876"/><a:satOff val="39811"/><a:lumOff val="8628"/>
I have tested it with a build Version: 126.96.36.199.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8da305acc9bc1fa0a31cd61d5da632e6bb4ae48c
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US