Description: Automatic font colour is imported from DOCX as very dark blue (0x0A) rather than automatic. Steps to Reproduce: 1. Create a new Text Document in LibreOffice 2. Type some text, such as "Hello World" 3. Confirm that the font colour is set to "Automatic" via "Format" menu -> "Character..." -> "Font Effects" tab -> "Font Color" 4. Save as a docx file, close, reopen 5. Now check the font colour again Actual Results: The font colour is very dark blue (#00000A) Expected Results: The font colour should be still set to Automatic Reproducible: Always User Profile Reset: No Additional Info: Tested in 5.1.6.2, 6.0.1.1, and master. (It is a bit harder to verify in 5.1.6.2 because the RGB value is not shown in the UI at step 5, instead it just shows the colour as "User"; but saving as ODT I can see that colour is indeed #00000A) User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.) I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Created attachment 140378 [details] Hello World DOCX Added a document created using the steps above (created using LibreOffice 6.0.2.1 on Ubuntu 16.04)
Confirmed on RT when imported from Writer created DOCX. Word created DOCX imports fine in Writer. Writer created DOCX imports fine in Word.
I think the problem comes from this element in word/styles.xml within the docx: <w:color w:val="auto"/> LibreOffice unfortunately tries to parse "auto" as a hexadecimal number. It stops at the letter 'u' which is not a valid hex digit, so we have only "a" -> 0x0000000A Interpreted as an RGB value, this is very dark blue (#00000A), so very dark that nobody noticed it was not black :-) When using Microsoft Word to create a similar file, the colour of the normal paragraph style is not explicitly specified in word/styles.xml, so LibreOffice does not encounter this problem. I can reproduce the same issue way back in LibreOffice 4.0.6.2
Luke Deller committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe6da2feb57c3d5e355a36f6b8ac09b48412ff39 tdf#116179 Support reading "auto" colour from docx It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
OK, I confirm the fix with master. Please see about backport to 6.0. Since I see you have a number of (interop) fixes, can I ask you to see other bugs with automatic color, mostly Impress: Bug 98311, Bug 94122, Bug 60316.
Luke Deller committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3967aebca94be9ceea3e36b43f7f53589473ad4e&h=libreoffice-6-0 tdf#116179 Support reading "auto" colour from docx It will be available in 6.0.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
A polite ping to Luke Deller: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks