Bug 65404 - FILESAVE: DOCX export of text with highlighting and character shading loses the highlighting information
Summary: FILESAVE: DOCX export of text with highlighting and character shading loses t...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: All All
: low major
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-05 09:22 UTC by Adam CloudOn
Modified: 2015-07-01 08:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX containing text with highlighting *and* character shading (11.42 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-06-05 09:22 UTC, Adam CloudOn
Details
DOCX containing text with highlighting *and* character shading (17.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-09-21 15:10 UTC, Adam CloudOn
Details
DOCX exported by LO with character highlighting lost (4.87 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-09-21 15:13 UTC, Adam CloudOn
Details
Screenshot comparison between original DOCX and exported DOCX (65.39 KB, image/png)
2013-09-21 15:13 UTC, Adam CloudOn
Details
attachment for comment 7 (27.68 KB, application/zip)
2014-11-20 19:47 UTC, Norbert X
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam CloudOn 2013-06-05 09:22:05 UTC
Created attachment 80330 [details]
DOCX containing text with highlighting *and* character shading

Problem description: 
This is related to the import bug I've opened here:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=65403

When opening a DOCX with text that has highlighting *and* character shading - LO only shows the character shading.
When saving as a NEW.DOCX file - the text highlighting that was in the original DOCX is not exported and is lost.

Steps to reproduce:
1. Open the attached DOCX in LO
2. Save as a NEW.DOCX
3. Open the NEW.DOCX in Word
4. There is no highlighting to the text

Current behavior:
LO exports the DOCX and loses the highlighting information

Expected behavior:
LO should export the highlighting information of the text to the NEW.DOCX
              
Operating System: Windows 8
Version: 4.0.3.3 release
Comment 1 Jorendc 2013-06-08 09:16:15 UTC
I can confirm that using Mac OSX 10.8.3 with LibreOffice 4.1.0 beta 2, with Word for Mac 2011.

Kind regards,
Joren
Comment 2 Adam CloudOn 2013-09-21 15:10:48 UTC
Created attachment 86258 [details]
DOCX containing text with highlighting *and* character shading
Comment 3 Adam CloudOn 2013-09-21 15:13:28 UTC
Created attachment 86259 [details]
DOCX exported by LO with character highlighting lost
Comment 4 Adam CloudOn 2013-09-21 15:13:56 UTC
Created attachment 86260 [details]
Screenshot comparison between original DOCX and exported DOCX
Comment 5 Adam CloudOn 2013-09-21 15:16:00 UTC
It is important to note that:

(1) if there is ONLY character HIGHLIGHTING on the characters - LO will convert it to character SHADING

(2) if there is both character HIGHLIGHTING   *AND*   character SHADING - LO will only import the character SHADING and lose the character highlighting

This is because Writer's core only has one way of storing a character's background color, and it cannot store both HIGHLIGHTING *AND* SHADING.
Comment 6 Tamás Zolnai 2013-09-29 10:27:36 UTC
Fixed with commit: 8b949134441056a1455d67ddfdd7e0bc5f2ee682
Comment 7 Norbert X 2014-11-20 19:44:54 UTC
It seems that something is wrong with Highlighting and Shading (LibO "Background color") - LibO produces files, which are incompatible with MS Word 2k3, 2k7.

I created DOC and DOCX files with Higlighting and Shading.
For saving DOC and DOCX files I used:
1. LibreOffice 4.3.3.2 (Build ID: 430m0(Build:2)). 
2. LibreOffice 4.4.0.0.alpha2 (Build ID: 24f0a5815f581dd9a7f09d30213a379edee6e9ac).

ODT source files and resulting DOC/DOCX files are in attachment.

For opening produced DOC and DOCX files I used:
1.a. I use MS Word 2003 SP3 (11.8169.8172) - I see Highlighting (converted to Shading - it is wrong) and background is missed (converted to Shading - it's wrong). 
2.a. I use MS Word 2007 SP3 (12.0.6612.1000 SP3 MSO 12.0.6607.1000) -  - I see Highlighting (converted to Shading - it is wrong) and background is missed (converted to Shading - it's wrong).

2.a. I use MS Word 2003 SP3 (11.8169.8172) - I see only Highlighting (converted to Shading - it is wrong), background is missed.
2.b. I use MS Word 2007 SP3 (12.0.6612.1000 SP3 MSO 12.0.6607.1000) - I see only Highlighting (converted to Shading - it is wrong), background is missed.


I tested 4.3.3.2 and 4.4.0 about bug 79599 - it is fixed in these versions. 

IMHO we have one more example of Microsoft pronouncing of term "Open Standards". 

So Shading and Highlight is broken again, in 4.4.0 it is useless (rendering ODT != DOC/DOCX).
Comment 8 Norbert X 2014-11-20 19:47:13 UTC
Created attachment 109775 [details]
attachment for comment 7
Comment 9 Norbert X 2014-11-20 20:18:04 UTC
As a conclusion I can say the following - I can't fix bug 65403, bug 65404, bug 64490 by myself (they are more difficult than bug 79599). But I'm ready to test changes.

But these bugs brake normal document exchange between MS Word' and LibO Writer' users, so they should be fixed as soon as possible in LibO 4.3 and upcoming 4.4.
Developers can use my attachments: DOC-to-ODT [1] and ODT-to-DOC [2] for round-trip testing.


1. https://bugs.freedesktop.org/attachment.cgi?id=109778
2. https://bugs.freedesktop.org/attachment.cgi?id=109775