Bug 60814 - Colors of shapes change after copy+paste from one drawing to another
Summary: Colors of shapes change after copy+paste from one drawing to another
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: bibisected40
Keywords: bibisected, needsDevAdvice, regression
: 154901 (view as bug list)
Depends on: 41436
Blocks: Paste Shapes
  Show dependency treegraph
 
Reported: 2013-02-13 19:08 UTC by Clemens Eisserer
Modified: 2023-10-19 10:57 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
testcase (9.65 KB, application/vnd.oasis.opendocument.graphics)
2013-02-13 19:08 UTC, Clemens Eisserer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Eisserer 2013-02-13 19:08:36 UTC
Created attachment 74776 [details]
testcase

When copying shapes from one drawing to another using the clipboard, colors of the shapes are changed as illustrated in the screencast: http://youtu.be/cT4xWtDoJVo

This happend on Fedora17+updates running XFCE.
Comment 1 Joel Madero 2013-02-23 21:28:16 UTC Comment hidden (obsolete)
Comment 2 Joel Madero 2013-02-23 21:29:06 UTC
@Clemens - when you report bugs please (even for incredibly simple bugs) write out steps how to reproduce in an easy to read method, makes it much easier for QA to work and much easier for devs to see the issue.
Comment 3 Clemens Eisserer 2013-02-23 22:01:33 UTC
@Joel: Thats why I added the video. instead of complex textual description, its easily understandable what I did and what happend watching the video.
Previously I filed bugs with textual descriptions - which caused confusion. Textual description can be interpreted in many different ways...

Thanks for bisecting :)
Comment 4 CassieLX 2013-06-04 16:09:13 UTC
I can confim this on Libre Office V4.0.3.3.

The colours change between copying from one drawing and paste it into another one. I have to copy and paste a very big block diagram into a new form.
Unfortunately large parts of the drawing are change the color. Outline blue (!) and black to grey e.g.

Perhaps the fill color will be mixed with the line-colour? Wrong size/handling of the colourtable? Maybe this helps.
Comment 5 CassieLX 2013-06-04 20:26:59 UTC
Libre Office 3.6.6 is not affected by this bug. This is a regression between LibO 3.6 and 4.0.

One thing I have discovered:
After copy and paste in libO 4.0.x the color has changed. If I correct this manually and save the file, close LibO, reload the new saved drawing and copy and paste it into a new drawing the colors does NOT change anymore.

Is this a bug with the embedded color palette between different LibO-Series?
Comment 6 CassieLX 2013-06-04 20:59:35 UTC
The bug is also reproducable in Libre Office V4.1.0 beta 1.
Comment 7 David Tardon 2013-07-15 13:21:35 UTC
The regression here is because we have changed the default background color of a shape (from light blue to darker blue).

The underlying cause is that styles are matched only by name on pasting (at least in Draw/Impress. I am not sure how Writer handles it). Because every drawing has a style named Default, it is used even if it is not the same as the Default style in the the original drawing.

So, this is not really a regression, because it has always been broken. The brokenness is just more visible now.
Comment 8 David Tardon 2013-07-15 13:32:45 UTC
Actually this is only part of the picture. The second part, reported in bug#62175, is that custom styles are not copied with shapes, only with whole slides.
Comment 9 steve 2016-02-09 10:37:05 UTC
Retested, persisting. Adjusting hardware to all since reported on Linux and now reproduced on OSX.

Freeing bug since it has been assigned for over 2 years. David, retake if you still want to work on this.

Version: 5.2.0.0.alpha0+
Build ID: e07ffae5046e9c91ef96026435cab84c3bcb4534
CPU Threads: 4; OS Version: Mac OS X 10.11.3; UI Render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-02-08_23:39:45
Locale: de-DE (de.UTF-8)
Comment 10 Björn Michaelsen 2016-08-16 11:17:06 UTC
Adapt metadata:
Whiteboard:bibisected is Keyword:bibisected now.
Comment 12 Roman Kuznetsov 2018-06-17 12:57:52 UTC
still confirm for example from attach, but if i'm copying shape between two drawing in modern version of LO there isn't that problem.
Comment 13 QA Administrators 2019-06-18 02:47:13 UTC Comment hidden (obsolete)
Comment 14 Riyadh 2021-02-03 01:02:49 UTC
Writer DOES preserve the color! (see the informative comment 7 above)

Is it possible/appropriate to adapt the mechanism used in Writer to Impress?
Comment 15 Regina Henschel 2021-02-03 10:16:34 UTC
(In reply to Riyadh from comment #14)
> Writer DOES preserve the color! (see the informative comment 7 above)
> 
> Is it possible/appropriate to adapt the mechanism used in Writer to Impress?

Currently Writer does not support graphic styles at all. Therefore when pasting a drawing to Writer, the settings from the styles are "burned in" as direct attributes. Hopefully we will get graphic styles in Writer too so that this workaround can be removed.

I'm against "burn-in" as default behavior for Draw/Impress. For them graphic styles are essential. But I can image a "paste special" for to "burn-in" the values similar to Writer.
Comment 16 QA Administrators 2023-02-04 03:20:02 UTC Comment hidden (obsolete)
Comment 17 Clemens Eisserer 2023-02-04 19:13:40 UTC Comment hidden (no-value)
Comment 18 Stéphane Guillou (stragu) 2023-04-17 21:51:51 UTC
(In reply to Clemens Eisserer from comment #3)
> @Joel: Thats why I added the video. instead of complex textual description,
> its easily understandable what I did and what happend watching the video.

But now the video is not on YouTube anymore. And in general, videos are less accessible than text.

Copying and pasting blue and yellow rectangles from attachment 74776 [details] into a new document, I can still reproduce in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1b06f35de68a555b85bceb5fc29d1a5f426f4bb7
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

Outline (for both) and fill (for the blue rectangles) change.
Comment 19 Stéphane Guillou (stragu) 2023-04-19 11:49:39 UTC
*** Bug 154901 has been marked as a duplicate of this bug. ***
Comment 20 Stéphane Guillou (stragu) 2023-10-19 10:57:41 UTC
(In reply to David Tardon from comment #7)
> The regression here is because we have changed the default background color
> of a shape (from light blue to darker blue).

(In reply to Xisco Faulí from comment #11)
> Regression introduced in range
> https://cgit.freedesktop.org/libreoffice/core/log/
> ?qt=range&q=c33019b36d613f951787ce9836e34d74bfbd6a1b..
> b67a51b40a4876f4bd97a2917103112006710b0c

So relevant commit should be:

commit 895890563cb0cc5fa872bdfd06918a46cdda172d
author	Alexander Wilms 	Thu Nov 29 01:37:26 2012 +0100
committer	Alexander Wilms Thu Nov 29 01:38:02 2012 +0100
Change default shape color