I use libreoffice in a report generator to convert a docx document to odt, replace some markers with text and then convert back to docx.
For some documents, however, I have strange changes in background color and I have traced this back to libreoffice writer using a minimal document.
Before: after:
Here is the document: changebgcolor.docx
and this is what I do:
- Open in libreoffice writer and save as odt
- Exit libreoffice writer
- Open odt document in libreoffice and save as docx. (no color change so far)
- Exit libreoffice writer
When I open the document again in MS-Word or LibreOffice the background color is there.
This does not happen for all documents and not for all text in the document.
I have tested with the latest versions in Ubuntu (1:5.1.6~rc2-0ubuntu1~xenial2) and Windows 10 (5.3.3.2 (x64)) and get the same result.
My observations:
In the odt document the style (in content.xml) is changed to have a background color and this color appears in some tags in the docx document (in document.xml). I have no idea how to interpret the docx xml, the documentation is a bit “heavy”.
What I really would like is a bug fix, but this is apparently not a forum for bug reports, so if someone could recommend a work around I would be grateful.
Regards,
Fredric Fredricson