Bug 106145 - Chart is not copied properly from Calc to Impress
Summary: Chart is not copied properly from Calc to Impress
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2017-02-22 18:07 UTC by Jan Lachnitt
Modified: 2018-12-05 14:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Affected spreadsheet (707.38 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-02-22 18:10 UTC, Jan Lachnitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lachnitt 2017-02-22 18:07:23 UTC
Description:
A specific chart is not copied properly into the clipboard in vector formats. Bitmap is OK. "Save as image..." works correctly (tested EMF and EPS), but this is not a full workaround, as an inserted EMF or EPS image is not rendered so nicely as a chart transferred through the clipboard.

Steps to Reproduce:
1. Download and open the attached spreadsheet.
2. Go to the "IntSpots" tab.
3. Click on the chart and press Ctrl+C.
4. Create a new presentation.
5. Select Edit > Paste Special.
6. Select "Star Object Descriptor (XML)" or "GDI Metafile" and confirm.

Actual Results:  
Two short curve segments in the bottom right of the chart are missing in the pasted chart.

Expected Results:
The complete chart should be pasted.


Reproducible: Always

User Profile Reset: No, but I tried restarting LO.

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.88 Safari/537.36 Vivaldi/1.7.735.46
Comment 1 Jan Lachnitt 2017-02-22 18:10:24 UTC
Created attachment 131413 [details]
Affected spreadsheet
Comment 2 Jan Lachnitt 2017-02-22 18:27:41 UTC
I have noticed that if the chart is pasted as a Star Object Descriptor (the default), wrong number format is used on the secondary Y axis. Should I file another bug?
Comment 3 Xisco Faulí 2017-02-23 10:24:17 UTC
Confirmed in

Version: 5.4.0.0.alpha0+
Build ID: 880033edde516fc30225005245253293a6a58ba4
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and

Version: 4.5.0.0.alpha0+
Build ID: 2851ce5afd0f37764cbbc2c2a9a63c7adc844311
Locale: ca_ES

unfortunately, the paste action doesn't work in previous versions.

Issue not reproducible in 

LibreOffice 3.5.0 
Build ID: d6cde02
Comment 4 Jan Lachnitt 2017-02-23 15:44:17 UTC
I have found a complete workaround: Save chart as StarView Metafile, then insert in the presentation as an image. (SVG also works.)
Comment 5 Dimitri Bouron 2017-08-10 13:13:59 UTC
Resolved, on Ubuntu 17.04 x86_64, in:

Version: 6.0.0.0.alpha0+
Build ID: d5630adf33cc7d30a657e789e2bf0978028e0c1f
CPU threads: 8; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: CL

(In reply to Jan Lachnitt from comment #2)
> I have noticed that if the chart is pasted as a Star Object Descriptor (the
> default), wrong number format is used on the secondary Y axis. Should I file
> another bug?

Not fixed on my LO version.
Should we open a new ticket for this bug and mark this one as resolved?
Comment 6 QA Administrators 2018-08-11 02:36:33 UTC Comment hidden (obsolete)
Comment 7 Markus Mohrhard 2018-11-29 22:02:46 UTC
(In reply to Jan Lachnitt from comment #2)
> I have noticed that if the chart is pasted as a Star Object Descriptor (the
> default), wrong number format is used on the secondary Y axis. Should I file
> another bug?

Actually the same number format is used (General). However, Calc has some special code to get the necessary precision based on the cell number format. The same can obviously not be implemented for the internal data table. In Impress one needs to use a different number format if one wants to avoid the default 2 decimal places rounding.

WHile the behavior might have changed here I think there is nothing we can do.
Comment 8 Jan Lachnitt 2018-12-05 14:32:21 UTC
(In reply to Markus Mohrhard from comment #7)
> (In reply to Jan Lachnitt from comment #2)
> > I have noticed that if the chart is pasted as a Star Object Descriptor (the
> > default), wrong number format is used on the secondary Y axis. Should I file
> > another bug?
> 
> Actually the same number format is used (General). However, Calc has some
> special code to get the necessary precision based on the cell number format.
> The same can obviously not be implemented for the internal data table. In
> Impress one needs to use a different number format if one wants to avoid the
> default 2 decimal places rounding.
> 
> WHile the behavior might have changed here I think there is nothing we can
> do.

I'd expect the General number format to have as many decimal places as needed, not just two.

I have now also tested the main issue (the missing curve segments) in LO 6.1.3.2 (1:6.1.3~rc2-0ubuntu0.16.04.1). Pasting the chart in the default format (Star Object Descriptor) now correctly reproduces all curve segments, as reported by  Dimitri Bouron in Comment 5. However, pasting it as a GDI Metafile still produces the incomplete chart, as I originally reported.