Background color change when converting docx->odt->docx

asked 2017-06-21 15:24:38 +0100

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: Before after: After

Here is the document: changebgcolor.docx
and this is what I do:

  1. Open in libreoffice writer and save as odt
  2. Exit libreoffice writer
  3. Open odt document in libreoffice and save as docx. (no color change so far)
  4. 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 ( (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

edit retag flag offensive close merge delete


This is not a forum for bug reports indeed; so please use LibreOffice Bugzilla.

Mike Kaganski gravatar imageMike Kaganski ( 2017-06-21 15:42:08 +0100 )edit