Bug 71767 - Copying and Pasting Chart looses date formatting
Summary: Copying and Pasting Chart looses date formatting
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.1.1.2 release
Hardware: Other All
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.4.0 target:4.3.0.2
Keywords:
: 61805 76477 79145 80554 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-19 03:52 UTC by skiani
Modified: 2018-09-14 14:59 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Here is the source spreadsheet an chart. Notice date in bottom axis (14.19 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-11-19 03:52 UTC, skiani
Details
Here is the results if you paste that chart into another appication, notice how date is messed up. (12.75 KB, application/vnd.oasis.opendocument.graphics)
2013-11-19 03:53 UTC, skiani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description skiani 2013-11-19 03:52:14 UTC
Created attachment 89437 [details]
Here is the source spreadsheet an chart. Notice date in bottom axis

When copying and pasting a chart with dates as part of chart from Calc to other LO or other applications the the date gets converted to a code. There is no way to copy and paste without this loss. Only way is take screen shot and crop the bitmap. Not a very acceptable work around. I will add attachment to illustrate.
Comment 1 skiani 2013-11-19 03:53:08 UTC
Created attachment 89438 [details]
Here is the results if you paste that chart into another appication, notice how date is messed up.
Comment 2 Dominique Boutry 2013-11-21 10:08:36 UTC
In Calc (as in Excel), a Date is a number, formatted with a "date", "time" ou "datetime" format.
Clearly in your copy the date value is copied (41308 is the 3rd of February 2013 00h00) but the format is lost.

Impress also provides a way to format a number as a date (right clic on the graph X axis > Format Axis > Numbers > Category > Date/Time).

Where both source and destination provide a date/time formatting, one could reasonably expect that the format is copied along with the values. IMHO Bug.
Comment 3 skiani 2013-11-21 19:00:05 UTC
Just tested in 3.5.4. No problem there, so definitely a regression.
Comment 4 GerardF 2013-11-22 17:31:46 UTC
Reproducible with 4.1.3.2 and 4.0.6.2 when format of numbers/dates of X-Axis are dependant on Data series format :
i.e Source format checked in Format Axis > Number.

When this checkbox is unticked and date format set in this dialog (thus not related to the source), formatting is correctly pasted.

Set to New as confirmed by different people.
Comment 5 Kohei Yoshida 2014-06-18 19:36:59 UTC
I fixed this one as part of Bug 71076.  Different root causes, but similar symptoms.
Comment 6 Kohei Yoshida 2014-06-19 14:35:20 UTC
*** Bug 61805 has been marked as a duplicate of this bug. ***
Comment 7 Kohei Yoshida 2014-06-19 19:34:09 UTC
Since auto commit notification didn't notify this one, here is the commit that fixes it.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1d38cb365543924f9c50014e6b2227e77de1d0c9
Comment 8 Kohei Yoshida 2014-06-20 00:51:02 UTC
4.3 backport:

https://gerrit.libreoffice.org/9835
https://gerrit.libreoffice.org/9836
Comment 9 Kohei Yoshida 2014-06-20 03:36:04 UTC
*** Bug 79145 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2014-06-20 16:03:39 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#71767: Write test for this.



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 11 Kohei Yoshida 2014-06-23 16:09:17 UTC
No automatic notification, but this is now backported to the 4.3 branch.
Comment 12 ign_christian 2014-06-26 16:36:04 UTC
*** Bug 80554 has been marked as a duplicate of this bug. ***
Comment 13 Kevin Suo 2014-07-16 05:17:59 UTC
Is Bug 68942 the same cause?
If so, any plan to backport the commit to 4.2?
Thanks.
Comment 14 raal 2014-08-03 17:55:51 UTC
*** Bug 76477 has been marked as a duplicate of this bug. ***