Bug 105517 - Chart: incorrect colour
Summary: Chart: incorrect colour
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Aron Budea
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords: bibisected, bisected, filter:pptx, regression
Depends on:
Blocks: Chart OOXML-Doc-Themes
  Show dependency treegraph
 
Reported: 2017-01-25 10:45 UTC by Xisco Faulí
Modified: 2018-07-14 14:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2017-01-25 10:45:19 UTC
Steps:
1. Open attachment 130670 [details]
2. Comparison file: attachment 130671 [details]

Reproduced in

Version: 5.4.0.0.alpha0+
Build ID: d3ff66999d924e832f8219c65ced0526f1a67f82
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 1 Xisco Faulí 2017-01-25 10:47:59 UTC
Regression introduced by:

author	Markus Mohrhard <markus.mohrhard@googlemail.com>	2015-04-15 16:19:47 (GMT)
committer	Markus Mohrhard <markus.mohrhard@googlemail.com>	2015-04-15 16:23:35 (GMT)
commit f3121049828596b369e3ea844355d61666e49795 (patch)
tree 89dca766b999674508df2142d02353f0feaa7de6
parent b99a4b81f53aa406a98e167fc9b8e1f1347fa970 (diff)
use index as real index and not token, tdf#90511
At least in calc a theme index is a zero based index into the clrScheme.
A map is unsiutable for that task so let us use a vector and still allow
to get them by their tokens.

Adding Cc: to
Comment 2 Xisco Faulí 2017-01-25 10:49:24 UTC
Adding Cc: to Markus Mohrhard
Comment 3 Aron Budea 2017-09-03 01:02:39 UTC
The direct cause is that in ClrScheme::setColor(...) [1] there is now an unconditional push_back into maClrScheme.

During loading the bugdoc there are two "rounds" of filling maClrScheme, and after the second round there are two sets of tokens where the tokens overlap. Making push_back conditional, and overwrite the entry in maClrScheme if it exists trivially fixes this issue, but I don't know if the solution is that simple.

[1] https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/clrscheme.cxx#83
Comment 4 Commit Notification 2017-12-19 23:07:59 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#105517: overwrite existing scheme colors in vector

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.
Comment 5 Commit Notification 2017-12-20 00:12:58 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

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

tdf#105517: overwrite existing scheme colors in vector

It will be available in 6.0.0.1.

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 6 Aron Budea 2017-12-20 10:36:49 UTC
Should be fixed now.
Comment 7 Xisco Faulí 2017-12-26 19:08:56 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: 2bf1cc7372088ec31ac5f0fb60de57feda59d3b7
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

Thanks Áron!!