Bug 75872 - ODF documents written by LO < 4.2 and loaded by LO 4.2 may show drawing objects with different stroke and fill colours
Summary: ODF documents written by LO < 4.2 and loaded by LO 4.2 may show drawing objec...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:4.3.0 target:4.2.3
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2014-03-07 03:55 UTC by minhsien0330
Modified: 2015-12-17 07:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The odt file to demo this problem. (13.98 KB, application/vnd.oasis.opendocument.text)
2014-03-07 03:55 UTC, minhsien0330
Details

Note You need to log in before you can comment on or make changes to this bug.
Description minhsien0330 2014-03-07 03:55:45 UTC
Created attachment 95279 [details]
The odt file to demo this problem.

Problem description: 
I have a odt file created by earlier Libreoffice version  before 4.2.
The odt file has  rectangles with black frame.
But the black frame became  "blue frame" in Libreoffice 4.2.


Steps to reproduce:
1. Download the attachment" wrong_rectangle_color2.odt"
2. Open  "wrong_rectangle_color2.odt" with Libreoffice 4.1 or any earlier version, you will see a rectangle with black frame.
3. Open  "wrong_rectangle_color2.odt" with Libreoffice 4.2, you will see a rectangle with blue frame.

Current behavior:
Libreoffice 4.2 show the rectangle frame as blue.

Expected behavior:
Libreoffice 4.2 should show the rectangle frame as black.
              
Operating System: Debian
Version: 4.2.0.4 release
Last worked in: 4.1.5.3 release
Comment 1 tommy27 2014-03-07 12:42:10 UTC
regression confirmed under Win7x64 using 4.2.1.1
status -> NEW 
platform -> ALL
Comment 2 Björn Michaelsen 2014-03-07 20:24:26 UTC
# bad: [25428b1e953636f74986622c5df614f04c150ed1] source-hash-cb4e009c4539c535108021934e545194b35cad9d
# good: [f0f6c65eb764f0303f59c58d320e9b0d5a894377] source-hash-4b9740b4ec3987e1d4d2ad6d20b4dcf996a4fa2e
git bisect start 'latest' 'oldest'
# good: [a72833796a7e527d9efc9ca6d8fe9b579e469105] source-hash-1472b5f87314fe660ef1a7b254e51272669f12f6
git bisect good a72833796a7e527d9efc9ca6d8fe9b579e469105
# bad: [b21386bf459ae47bd6e461ea94cea6a06729a1ff] source-hash-570fe620e9d573cfc9fc260e6518563c6a6c1a3c
git bisect bad b21386bf459ae47bd6e461ea94cea6a06729a1ff
# bad: [8febbf1f26867388acf1d005b58978cbe4130d16] source-hash-7275a051677b5646e56623b3addc783880ce8e9b
git bisect bad 8febbf1f26867388acf1d005b58978cbe4130d16
# good: [6cb2b7f87d8177ca4821dc91ba4af8a39e4591b9] source-hash-c4cca49f49408bc4094bdfcf782de2f7cd16ce6a
git bisect good 6cb2b7f87d8177ca4821dc91ba4af8a39e4591b9
# good: [5c46119324ebec87377c20c785cc294f41da5933] source-hash-7ef1a64bdb8f9afaeb93e7a88219650381e0d323
git bisect good 5c46119324ebec87377c20c785cc294f41da5933
# bad: [a6e3e92580370176886fe58ce6b8e3394e24dd27] source-hash-4e41227dd6af52ec562d10efcb365defba6bd36e
git bisect bad a6e3e92580370176886fe58ce6b8e3394e24dd27
# bad: [6d59a6409b6e44e4eb8c707e541454b5f61e07ba] source-hash-6571193609f4fb4e5ac714b55787d172a86983fe
git bisect bad 6d59a6409b6e44e4eb8c707e541454b5f61e07ba
# bad: [2b97edc1bec73e10c651d30fdcd34e78a08ab747] source-hash-a47a153a7f75edfe3bce33f0d34b723cbd2d5195
git bisect bad 2b97edc1bec73e10c651d30fdcd34e78a08ab747
# first bad commit: [2b97edc1bec73e10c651d30fdcd34e78a08ab747] source-hash-a47a153a7f75edfe3bce33f0d34b723cbd2d5195

So the offending commit is in:
http://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=7ef1a64bdb8f9afaeb93e7a88219650381e0d323..a47a153a7f75edfe3bce33f0d34b723cbd2d5195

Of those http://cgit.freedesktop.org/libreoffice/core/commit/?id=c0eb5e7772c848806db8ab461f77f9549c1d8b2b looks suspicious:

commit c0eb5e7772c848806db8ab461f77f9549c1d8b2b
Author: Armin Le Grand <alg@apache.org>
Date:   Mon Dec 10 13:34:26 2012 +0000

    Resolves: #i121448# Aligned default fill color/line style for all apps
    
    (cherry picked from commit 81664c037c8d6094b66c1660b6eee9693eadf401)
    
    Conflicts:
        sc/inc/document.hxx
        sc/source/core/data/documen2.cxx
        sc/source/core/data/documen3.cxx
        sc/source/core/data/documen9.cxx
        svx/inc/svx/svdmodel.hxx
        svx/source/svdraw/svdmodel.cxx
        sw/inc/doc.hxx
        sw/source/core/doc/docdraw.cxx
        sw/source/core/doc/docnew.cxx
        sw/source/ui/app/docshini.cxx
    
    Change-Id: Id0f62f0cd5b83794e2dbaee4e8b6afa704a0c23a
Comment 3 Björn Michaelsen 2014-03-07 20:32:03 UTC
This indeed seems to be mostly intended -- see i#121448. Of course, changing the rendering of existing documents is a severe sideeffect. :/
Comment 4 Björn Michaelsen 2014-03-07 20:36:21 UTC
@Caolan: Is this a WONTFIX?
Comment 5 tommy27 2014-03-08 06:54:59 UTC
(In reply to comment #3)
> This indeed seems to be mostly intended -- see i#121448. Of course, changing
> the rendering of existing documents is a severe side effect. :/

bad side effect indeed... this make me think it could be labeled as a 4.2mab but I'd like some advise from you...

is the benefit of i#121448 fix, worth the current regression?
Comment 6 Michael Stahl (allotropia) 2014-03-12 11:59:53 UTC
similar to bug 74230

... but in that case LO 4.1.x wrote the svg:stroke-color and
draw:fill-color attributes on the default graphic style,
whereas this bugdoc (written by LO 4.0.x) does not contain them,
so it gets the new pool defaults... argh.
Comment 7 Michael Stahl (allotropia) 2014-03-12 22:59:47 UTC
fixed on master
Comment 8 Commit Notification 2014-03-12 23:00:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75872: ODF import: fix up graphics defaults stroke/fill colors



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 minhsien0330 2014-03-13 09:01:41 UTC
To tommy27, Björn Michaelsen and Michael Stahl:
I am happy to hear this bug was fixed.
Thank you very very much!!!
Comment 10 tommy27 2014-03-13 09:18:12 UTC
I suggest a 4.2.x backport once the 4.3.x fix is verified
Comment 11 Commit Notification 2014-03-13 09:52:25 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

fdo#75872: ODF import: fix up graphics defaults stroke/fill colors


It will be available in LibreOffice 4.2.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.
Comment 12 Commit Notification 2014-03-17 09:48:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-3":

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

fdo#75872: ODF import: fix up graphics defaults stroke/fill colors


It will be available already in LibreOffice 4.2.3.

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 minhsien0330 2014-03-17 12:25:45 UTC
Michael Stahl:
Thank you so much!
I can't wait for LibreOffice 4.2.3~!
Comment 14 Robinson Tryon (qubit) 2015-12-17 07:53:25 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]