Bug Hunting Session
Bug 92379 - ODF import: styles with fo:background-color wrongly imported causing wrong frame and paragraph backgrounds
Summary: ODF import: styles with fo:background-color wrongly imported causing wrong fr...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: Other All
: high critical
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: odf target:5.1.0 target:4.4.6 target:...
Keywords: bibisected, bisected, dataLoss, regression
Depends on:
Blocks:
 
Reported: 2015-06-27 11:11 UTC by Pascal Hingamp
Modified: 2016-10-25 19:19 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Original rendering of the .odt document (157.75 KB, image/png)
2015-06-27 11:11 UTC, Pascal Hingamp
Details
Garbled rendering of document frames when opened in LO 4.4.3.2 (111.46 KB, image/png)
2015-06-27 11:12 UTC, Pascal Hingamp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Hingamp 2015-06-27 11:11:51 UTC
Created attachment 116871 [details]
Original rendering of the .odt document

In a LO Writer document, some text frames have a coloured background imposed by a specific Frame style. 

Problem:
========
When a document produced in LO version Version: 4.3.7.2 Build ID: 430m0(Build:2) is opened in LO version Version: 4.4.3.2 Build ID: 40m0(Build:2), the frame background colors are totally garbled. See the attached screenshots for the difference in rendering.
I'm totally mystified because not only has the color changed, it also looks like the background color which used to be specified in the frame's style, is now specified in the paragraph style? I can't verify this because I've now switched to 4.4.3.2 and can't reopen in 4.3.7.2 to check where the color was originally specified. In any case the rendering is totally screwed up. The file is here should anyone want to test:
http://biologie.univ-mrs.fr/upload/p1/tpe_20150214_ex2.odt

Expected behaviour:
===================
The style's background color rendering should be the same, irrespective of the LO version.
Comment 1 Pascal Hingamp 2015-06-27 11:12:56 UTC
Created attachment 116873 [details]
Garbled rendering of document frames when opened in LO 4.4.3.2
Comment 2 raal 2015-06-28 07:27:34 UTC
I can confirm with Version: 5.1.0.0.alpha1+
Build ID: 7790b6a4544cf2d5ba0bcdfae31346cf2f9a0041
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-06-26_23:51:00

Correct color in Version: 4.2.0.0.alpha1+
Comment 3 Matthew Francis 2015-08-12 10:04:06 UTC
As best I can see it, the last time the frames are rendered correctly is before (1), then they are broken in the current manner (with the wrong background colour) since (2)

Adding Cc: to vmiklos@collabora.co.uk; Any chance you could take a look at this one? Thanks

(1)
    commit 6e61ecd09679a66060f932835622821d39e92f01
    Author:     Armin Le Grand <alg@apache.org>
    AuthorDate: Wed Mar 19 16:17:02 2014 +0000
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Fri Mar 28 14:31:08 2014 +0100
    
        Merge back branch alg_writerframes to trunk
    
        (cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62)

(2)
    commit 7d9bb549d498d6beed2c4050c402d09643febdfa
    Author:     Armin Le Grand <alg@apache.org>
    AuthorDate: Mon Jun 2 15:00:50 2014 +0000
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Tue Jul 1 13:30:09 2014 +0200
    
        Related: #i124638# Second step of DrawingLayer FillAttributes...
    
        for Writer objects, now added support for Paragraph and PageStyle (including
        Header and Footer) for direct attributes and style attributes
    
        (cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b)
Comment 4 Commit Notification 2015-08-21 23:03:18 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=79fb61efb847405fa47235002b52ee8efad5e339

tdf#92379: svx: don't overwrite fo:background-color on ODF import

It will be available in 5.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.
Comment 5 Michael Stahl (CIB) 2015-08-26 21:04:50 UTC
there are several different bugs in the handling of background in styles in LO 4.4 here:

1. the frame style "encarts" has a background color set via
   fo:background-color but that is not imported

2. the paragraph style "Titre Avis expert" has a background color,
   and the style "Avis expert questions" derives from it and
   overrides the background color with fo:background-color="transparent"
   but that is not imported properly so it wrongly inherits parent
   style's background

3. on export the derived paragraph style did not have the legacy
   attribute fo:background-color="transparent" so an exported
   document imported in LO 4.3 would have a Sky Blue background color

all fixed on master now.
Comment 6 Commit Notification 2015-08-26 21:06:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=982537d77c2db463cc053cfdcd522530a3834c9e

tdf#92379: sw: unit test for frame style background color

It will be available in 5.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.
Comment 7 Commit Notification 2015-08-26 21:06:25 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f38f018053a43d1f7b473103e936abe2d4d8fa05

tdf#92379: sw: ODF import: fix fo:background-color="transparent"

It will be available in 5.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.
Comment 8 Commit Notification 2015-08-26 21:06:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=25c50a71ffdf7c43f8f3dd10736188271cc75ef0

related: tdf#92379: sw: backward compatible ODF export of overriding

It will be available in 5.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.
Comment 9 Commit Notification 2015-08-29 20:15:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=89e2e2f59738adee91282c19e7d43e98784fdacb&h=libreoffice-4-4

tdf#92379: svx: don't overwrite fo:background-color on ODF import

It will be available in 4.4.6.

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.
Comment 10 Commit Notification 2015-08-29 20:16:40 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f27cba26afe416de48b7ff2cded69ae60ae14fd4&h=libreoffice-4-4

tdf#92379: sw: ODF import: fix fo:background-color="transparent"

It will be available in 4.4.6.

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.
Comment 11 Commit Notification 2015-08-29 20:16:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b77b0c467ae55e3368b33d9dc248d86853e4510c&h=libreoffice-4-4

related: tdf#92379: sw: backward compatible ODF export of overriding

It will be available in 4.4.6.

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.
Comment 12 Commit Notification 2015-08-29 20:17:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c128724679d0be1defe74a4b6bf45f0235cac6a5&h=libreoffice-5-0

tdf#92379: svx: don't overwrite fo:background-color on ODF import

It will be available in 5.0.2.

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.
Comment 13 Commit Notification 2015-08-29 20:19:13 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=848e0e4f8cb4917713e522b654a69a493274952e&h=libreoffice-5-0

tdf#92379: sw: ODF import: fix fo:background-color="transparent"

It will be available in 5.0.2.

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.
Comment 14 Commit Notification 2015-08-29 20:19:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c4bb051d644996eb92e3a6c6dd8d09972450733&h=libreoffice-5-0

related: tdf#92379: sw: backward compatible ODF export of overriding

It will be available in 5.0.2.

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.
Comment 15 Robinson Tryon (qubit) 2015-12-17 09:15:05 UTC Comment hidden (obsolete)