Bug 52159 - EDITING: Error bars values become Y-values when copying charts from calc to writer
Summary: EDITING: Error bars values become Y-values when copying charts from calc to w...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.5.0 Beta0
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: bibisect35older target:4.1.0 target:4...
Keywords: regression
: 55696 55718 57605 62058 (view as bug list)
Depends on:
Blocks: mab3.6
  Show dependency treegraph
 
Reported: 2012-07-16 16:38 UTC by Sebastian C.
Modified: 2014-04-30 05:41 UTC (History)
16 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of chart in calc (upper half) and writer (lower half) with different error bars (275.99 KB, image/png)
2012-07-16 16:38 UTC, Sebastian C.
Details
graph with error bars that do not copy into writer properly (24.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-08-04 16:14 UTC, ritchiew
Details
calc and writer documents with scatters with broken error bars in writer (22.26 KB, application/x-gzip)
2012-08-04 19:25 UTC, Sebastian C.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian C. 2012-07-16 16:38:54 UTC
Created attachment 64284 [details]
screenshot of chart in calc (upper half) and writer (lower half) with different error bars

Problem description: 

When trying to copy/paste x/y chart from calc to writer, the error bars (x and y) are transformed to lines that are as long as the plot. This lines are recognized as error bars, but their length is completely wrong.

Steps to reproduce:
1. create x/y plot in calc
2. create error bars from specified fields or constant value (others not tested)
3. copy to writer

Current behavior:

error bars corrupted (lenght -> infinite)

Expected behavior:

error bar length perserved

Platform (if different from the browser): 
              
Browser: Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.289 Version/12.00
Comment 1 ritchiew 2012-07-17 01:35:42 UTC
This is a problem for me too. 3.6rc1 in Ubuntu

If the "Error Category" of the error bars is "percent", then the chart pasted into Writer will show no error bars. Their percent will be reduced to 0.

These broken error bars are especially problematic when their size comes from a Data Range, as there seems to be no way to manually fix the mistake in Writer.
Comment 2 Rafael Dominguez 2012-08-04 15:38:07 UTC
I confirmed that error bars are lost when pasting from calc to writer, but i couldnt reproduce getting infinite lenght bars. Can you provide a minimal document that reproduces the behaviour?


I will assign this to myself to fix this.
Comment 3 ritchiew 2012-08-04 16:14:22 UTC
Created attachment 65127 [details]
graph with error bars that do not copy into writer properly

Spreadsheet with graph containing x-error bars from Cell Range. 

When the graph is pasted into Writer, the error bars don't stay the same. At first it looked like they were infinite, but that doesn't look quite true. When pasted into Writer, the beginning of the error range defaults to the y-axis. Then the whole error range shown is from 0 to the data point, doubled.

So the error bars are wrong, but not infinite. They just look that way when they extend beyond the graph.

This is a junk file I happen to have on this machine. If there's too much extraneous stuff in there, let me know and I can try to trim it down tonight.
Comment 4 Sebastian C. 2012-08-04 19:25:37 UTC
Created attachment 65129 [details]
calc and writer documents with scatters with broken error bars in writer

As asked for, here two minimal documents showing the bug.
Comment 5 John Kuang 2012-10-23 12:47:40 UTC
I have noticed this problem since 3.6 RC and even now with 3.6.2. The error bars are not infinite. They are actually pegged to the value of that point. This is clearer when you double click on the chart in Writer and right click into "Chart Data Table". For simple bar charts with only y-values and y-error bars, the error bars become the same value as the y-value. If you try to change the y-error bar value through "Chart Data Table", the y-value of the point is changed as well. This is a serious problem as I cannot do work at all using Libreoffice until this gets fixed.
Comment 6 John Kuang 2012-10-23 12:50:52 UTC
*** Bug 55718 has been marked as a duplicate of this bug. ***
Comment 7 tim.topptopp 2012-11-25 02:00:15 UTC
There is a workaround which might work well for people who don't intend to edit the charts once they are pasted into their Writer document.

1. Copy chart in Calc
2. Menu: Edit->Paste Special
3. Choose "GDI metafile"

The downside of this procedure is obviously that you loose the ability to manipulate the data source of the chart. On the upside, you can paste charts into a Writer document correctly and they get pasted as vector graphics which scale nicely and make for equally nice (pdf) prints.

Nonetheless, please fix this bug!
Comment 8 John Kuang 2012-12-05 21:05:13 UTC
Bug still present in 3.6.4. Rafael, any idea of when work on this critical bug will start?

For now, I'm making do with the workaround mentioned by Tim. Thanks! But whenever I need to resize the chart, I have to go back to Calc.
Comment 9 dittrich.m 2013-01-15 14:22:49 UTC
I think bug 55696 and 57686 may be duplicates.
Comment 10 John Kuang 2013-01-15 17:33:05 UTC
Yes, they definitely are duplicates. However, the assigned person of this bug (Rafael Dominguez) seems to be not working on it, so I wouldn't mark the duplicates as duplicates in the hope that someone else more proactive will take the lead.
Comment 11 Joel Madero 2013-01-16 19:38:31 UTC
We don't leave duplicates open just because a developer who is assigned isn't working on it. Ping the developer, if they don't respond within a week, change status from ASSIGNED to NEW. Please close the duplicate bug
Comment 12 John Kuang 2013-01-16 19:42:25 UTC
*** Bug 55696 has been marked as a duplicate of this bug. ***
Comment 13 Joel Madero 2013-01-16 19:50:54 UTC
I'm working on a bibisect of this one, looks like it can be done but I'm hitting snags. If someone else knows how to bibisect, please try with this one
Comment 14 John Kuang 2013-01-16 20:27:59 UTC
Also found that for scatter plots with both X and Y error bars, after copying and pasting into writer, the X and Y error bars values become that of the X and Y values respectively.
Comment 15 Joel Madero 2013-01-18 16:23:17 UTC
*** Bug 59525 has been marked as a duplicate of this bug. ***
Comment 16 John Kuang 2013-01-18 18:44:21 UTC
*** Bug 57605 has been marked as a duplicate of this bug. ***
Comment 17 andis.lazdins 2013-01-28 15:04:37 UTC
The problem is appearing also in 3.6.5 RC2.

I found also that error bars from olfer libreoffice disappear when opened in 3.6.5, however I cannot reproduce it, because I don't have anymore versions of those documents with error bars.
Comment 18 Mike Sobieraj 2013-02-01 14:12:08 UTC
Similarly, error bars disappear when copying a chart into writer from calc in 4.0 RC2
Comment 19 John Kuang 2013-02-05 02:26:45 UTC
Perhaps this (promptly fixed) bug might be related? https://bugs.freedesktop.org/show_bug.cgi?id=58562
Comment 20 tim.topptopp 2013-02-05 16:30:06 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=58562

It might be related, but their fix didn't solve our bug.

I used a vanilla xubuntu 12.04 and installed the 32bit version of the most recent daily build:

tinderbox: administrator: fridrich.strba@bluewin.ch
tinderbox: buildname: Linux-x86_10-Release-Configuration
tinderbox: tree: libreoffice-4-0
tinderbox: pull time 2013-02-03 12:48:54
tinderbox: git sha1s
core:9b70bf62e6b5319e282cd3533c90216aabccfe53


and reproduced the faulty behaviour. Y-errorbar get's lost and X-errorbar get's scaled by the factor of ~15.
Comment 21 Joel Madero 2013-02-05 16:32:18 UTC
Adding two of our Spreadsheet experts:

Kohei, Markus - any opinions/ideas? Want to take it?
Comment 22 Markus Mohrhard 2013-02-21 02:23:20 UTC
I'm currently taking care of Bug 60083 which is most likely the same error.

Copy&paste is just a special case of export and import.
Comment 23 Joel Madero 2013-02-28 20:46:56 UTC
hm I did more investigating on this one. 

Notes: I went all the way back to 3.6alpha0 and I see a very similar (although not quite as bad) problem. Because of this I am removing bibisectrequest as we are unable to do a bibisect on it. 

Marcus - if the other bug is a regression this very well could be a different issue. Not sure if you want to investigate further or if I should poke Kohei or someone else who knows the code.
Comment 24 andis.lazdins 2013-03-01 09:43:07 UTC
In 4.0 there was a problem that error bars did not appeared at all on copy / paste. Now in Version 4.0.1.2 (Build ID: 84102822e3d61eb989ddd325abf1ac077904985) they are appearing, but just like before Y error value is the same Y value.
Comment 25 andis.lazdins 2013-03-01 09:48:09 UTC
It is funny, but in contrast to 3.6 it is not possible to get error bars on copy paste if chart is copied from spreadsheet to writer as metafile. So the only option to keep error values is to use screen copies.

It start to look like horrible problems with Microsoft word 97 charts some years ago :)
Comment 26 John Kuang 2013-03-01 15:54:03 UTC
Andis, the error bars disappearing in 4.0 is a separate Bug 60083. Your are right, once Bug 60083 is fixed in 4.0, Bug 52159 shows up again.

Markus, you commented (#22) that this Bug is a special case of Bug 60083. But now I think the evidence points to it being a separate bug. Hope you can take charge and fix! :)
Comment 27 Markus Mohrhard 2013-03-03 07:35:27 UTC
So let us start slowly into debugging this bug.

There is no y error bar in this file. Only an x error bar.

I can reproduce the problem with the length of the bar and I know what is the problem with this file. So the first part that no error bars are pasted is actually fixed with Bug 60083 and the second one is only about using cell ranges as source for error bars.

I'll check if it actually possible to solve this bug. There are some problems around the use of cell ranges in writer charts and if I'm not totally wrong the standard limits the use of cell ranges to spreadsheet applications.

So from what I can see we can deescalate this bug report a bit. It only affects one special case which maybe is not even supported outside of Calc.
Comment 28 andis.lazdins 2013-03-03 07:51:19 UTC
Hi!

I always used cell range as y error bar as soon as it was possible. As far as I can remember there were always problems in some special case, gut in general it was possible to paste charts with error bars from calc to writer. I think this is the case when implementation of standard should be reorganized, because cell range is the most convinient way to use error bars.

> I'll check if it actually possible to solve this bug. There are some
> problems around the use of cell ranges in writer charts and if I'm not
> totally wrong the standard limits the use of cell ranges to spreadsheet
> applications.
Comment 29 Markus Mohrhard 2013-03-03 08:14:07 UTC
(In reply to comment #28)
> Hi!
> 
> I always used cell range as y error bar as soon as it was possible. As far
> as I can remember there were always problems in some special case, gut in
> general it was possible to paste charts with error bars from calc to writer.
> I think this is the case when implementation of standard should be
> reorganized, because cell range is the most convinient way to use error bars.

Well that is not as easy as you think. Cell ranges are a spreadsheet concept and making them required for all use cases requires that text processing application would have to implement an ODS import filter. The normal chart data is differently organized and the values are written into an additional table just for that reason.

I have not yet an idea if there is a solution to it. Let me first read a bit the ODF standard and talk to our expert for ODF compliance.
Comment 30 John Kuang 2013-03-07 19:40:03 UTC
Now that bug 61781 and bug 60253 are fixed, we can see that this bug is clearly still present as of 4.1.0.0.alpha0+ (2013-03-07 build).

Worse still, the workaround for 3.6, which was to paste the cart to writer/impress/draw using right click > "GDI metafile", now doesn't work!! The GDI metafile has NO error bars! Shall I open a new bug for that?
Comment 31 Commit Notification 2013-03-18 01:39:03 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

use the right range representation, fdo#52159



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 32 Commit Notification 2013-03-18 01:39:23 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

error bar range is also part of chart range, related fdo#52159



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 33 Commit Notification 2013-03-18 01:39:44 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

we need to register data sequences during import, fdo#52159



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 34 Markus Mohrhard 2013-03-18 01:47:57 UTC
So there were 3 bugs and it seems that it is working correctly now. Testing in master highly appreciated.
Comment 35 Markus Mohrhard 2013-03-18 01:50:52 UTC
Oh and just for the record: There is another bug in the CopyStaticToDocument code but since it is a design flaw I have to think a bit about a solution. I doubt that anybody will be affected by the bug as it is a nasty corner case.
Comment 36 Commit Notification 2013-03-19 08:39:24 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

use the right range representation, fdo#52159


It will be available in LibreOffice 4.0.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 37 Commit Notification 2013-03-19 08:39:45 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

error bar range is also part of chart range, related fdo#52159


It will be available in LibreOffice 4.0.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 38 Commit Notification 2013-03-19 08:40:06 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

we need to register data sequences during import, fdo#52159


It will be available in LibreOffice 4.0.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 39 John Kuang 2013-03-19 16:17:13 UTC
Can't see if fixed yet because the 3/19 master build (and the day before that) crashes upon just copying a chart in Calc, regardless of error bars present or not.
Comment 40 Joel Madero 2013-03-20 16:37:56 UTC
*** Bug 62058 has been marked as a duplicate of this bug. ***
Comment 41 Clemens Eisserer 2013-03-21 14:59:10 UTC
Libreoffice-4-0/Win-x86@6/2013-03-21_14.13.26 works for me :)
Thanks!
Comment 42 andis.lazdins 2013-03-21 15:26:15 UTC
I can confirm that the problem is gone in 4.0.3.0+ (Build ID: 6dc07a184d8c0aae373935b8a6884545d6ab9fa) TinderBox: Linux-x86@34-Release-Configuration-RHEL5-Baseline, Branch:libreoffice-4-0, Time: 2013-03-20_22:37:19

Thank you a lot!
Comment 43 tim.topptopp 2013-03-21 18:50:59 UTC
I'd like to test the new builds, but neither the 

/daily/master/Linux-x86_10-Release-Configuration

nor the

/daily/libreoffice-4-0/Linux-x86_10-Release-Configuration

folder contains any packages. #libreoffice-dev channel wasn't helpful either.
Comment 44 Commit Notification 2013-03-25 13:28:19 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0-2":

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

use the right range representation, fdo#52159


It will be available already in LibreOffice 4.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 45 Commit Notification 2013-03-25 15:47:42 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0-2":

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

error bar range is also part of chart range, related fdo#52159


It will be available already in LibreOffice 4.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 46 Commit Notification 2013-03-25 15:48:05 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0-2":

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

we need to register data sequences during import, fdo#52159


It will be available already in LibreOffice 4.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 47 dittrich.m 2013-03-27 10:53:30 UTC
Hi, it´s great to see that the copy bug is fixed. But LO 4.0.2.1 is still incompatible to LO 3.5.7 documents. By the way: can´t test With LO 4.0.3 because sal3.dll is missing.
 
see bug #62218
Comment 48 dittrich.m 2013-03-27 11:11:05 UTC
fixed in libreoffice-4-0~2013-03-25_11.18.31_LibO-Dev_4.0.3.0_Win_x86
Comment 49 Björn Michaelsen 2013-04-15 14:24:54 UTC
older than 3.5
Comment 50 adarmodjo 2014-04-30 04:11:57 UTC
The bugs still appear on Version: 4.1.3.2.
I run on Mint 16, 64 bit.

Regards,
Comment 51 tommy27 2014-04-30 05:41:02 UTC
I tested attachment 65127 [details] under Win7x64 using 4.1.5.3 and 4.2.3.3 and it works fine.

so please retry with up do date LibO releases (4.1.6 and 4.2.3 are available right now).

if you think the bug is still there, please open a new report about it, attach a test case, screenshots and steps to reproduce and put the current report link under "see also".