Bug 68475 - FILESAVING: Custom color border is incorrectly converted when exported to doc format
Summary: FILESAVING: Custom color border is incorrectly converted when exported to doc...
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
: medium normal
Assignee: Luke Deller
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-23 10:44 UTC by Antonio Martins
Modified: 2014-03-30 09:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
border-up-lo.doc (incorrectly mapped color after export to doc) (9.00 KB, application/msword)
2013-08-23 10:44 UTC, Antonio Martins
Details
Sample text border with custom color (correctly saved) (7.49 KB, application/vnd.oasis.opendocument.text)
2013-08-23 10:47 UTC, Antonio Martins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Martins 2013-08-23 10:44:56 UTC
Created attachment 84513 [details]
border-up-lo.doc (incorrectly mapped color after export to doc)

When you create a text border with a custom color, it is correctly saved as long as you keep the OpenDocument format. When you export to doc, it gets mapped to a different standard color. AFAIK doc format should have kept the custom color as custom colors are supported.

Steps to reproduce:
1 - Create new LO document, write a word in a line;
2 - Goto Tools -> Options -> Colors, create a new custom color (in case you have never created one);
3 - Select Format -> Paragraph -> Borders, select a border with a custom color;
4 - Save the document as Word format (.doc);
5 - Open the saved document and notice that color has been mapped to a standard color;

Current behavior:
A standard color close to the one chosen is presented in the text border, however it is not the same as selected by the user.

Bug present in Ubuntu 12.04, LO 4.1.0.3
Bug also present in Windows 8, LO 4.0.3.3

As example, there are two attachments:
border-up-lo.odt (correct border with custom color)
border-up-lo.doc (incorrectly mapped color after export to doc)

Expected behavior:
The export filter should have kept the custom color as in the .odt format.

Operating System: Linux (Other)
Version: 4.1.0.3 rc
Comment 1 Antonio Martins 2013-08-23 10:47:56 UTC
Created attachment 84514 [details]
Sample text border with custom color (correctly saved)
Comment 2 Thomas van der Meulen [retired] 2013-08-23 11:11:44 UTC
Thank you for your bug report, I can reproduce this bug running LibreOffice.
Version: 4.1.1.2
Build ID: 7e4286b58adc75a14f6d83f53a03b6c11fa2903 on Mac osx 10.8.4.

Wenn I save the file to doc it will turn been/blue
Comment 3 Luke Deller 2014-03-02 10:07:50 UTC
I also encountered this bug, and have done some debugging.

In the [MS-DOC] file format specifications published by Microsoft, there are two different paragraph properties which can be used to specify the top border colour.

http://msdn.microsoft.com/en-us/library/dd923496%28v=office.12%29.aspx

- "sprmPBrcTop80" which allows the border colour to be set to one of the following 17 options only: http://msdn.microsoft.com/en-us/library/dd773060%28v=office.12%29.aspx

- "sprmPBrcTop" which allows the border colour to be set to any 24-bit RGB value

I see in the source that the LibreOffice doc filter only knows about the former property.  I guess that is the older property, the only one available back when this part of the LibreOffice doc filter was written.  The "80" in its name suggests it dates back to Word 8.0 = Word 97.
Comment 4 Luke Deller 2014-03-30 09:32:42 UTC
fixed in LibreOffice 4.3
(commit ad51d4952dc30e0d1cdcc6037556cd7c66a61542)