Issue 88591 - Charts with empty cells change aftercopy/paste from Calc to Writer
Summary: Charts with empty cells change aftercopy/paste from Calc to Writer
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@graphics
URL:
Keywords:
: 89427 (view as issue list)
Depends on:
Blocks: 72764
  Show dependency tree
 
Reported: 2008-04-22 13:47 UTC by malinalda
Modified: 2013-02-24 21:22 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
just see (45.18 KB, application/vnd.oasis.opendocument.text)
2008-04-27 23:03 UTC, malinalda
no flags Details
4x4 data sets all with the same problem. data ranges for diagrams were created manually (227.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-04-28 18:32 UTC, malinalda
no flags Details
patch_080522 (741 bytes, text/plain)
2008-05-22 03:38 UTC, weiz
no flags Details
patch2 (2.45 KB, text/plain)
2008-06-05 09:57 UTC, IngridvdM
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description malinalda 2008-04-22 13:47:37 UTC
I have produced multiple diagrams in OO calc. Each diagramm is an x-y diagram
with 4 data sets. each data set has a different length, like 575 or 801 rows.
when copying these good looking diagrams from calc to writer, writer fills up
every short row to the maximum row length with zeros. this would mean 226 zero
zero rows in the above example. the result is an unaesthetic line to (0,0). I
can send you an example file if necessary.
Comment 1 eric.savary 2008-04-22 14:23:28 UTC
Please attach a sample document
Comment 2 malinalda 2008-04-27 23:03:05 UTC
Created attachment 53228 [details]
just see
Comment 3 michael.ruess 2008-04-28 13:22:54 UTC
Yes, from the document I can see that the empty data fields are filled with zero
values. I need to replicate the way to this result. Could you please attach you
ods (spreadsheet) document to this issue?
When I create something similar with my own test files the empty cells will
remain - and not be filled with zero's...
Comment 4 malinalda 2008-04-28 18:32:14 UTC
Created attachment 53240 [details]
4x4 data sets all with the same problem. data ranges for diagrams were created manually
Comment 5 michael.ruess 2008-04-29 08:48:29 UTC
Thanks malinalda for the quick response. With the attached document this is
reproducible.

MRU->IHA: The empty cells of the spreadsheet are transferred as zero values to
the Chart when it is copied into Writer. See attached ods file. On the table
"Graphen" copy the first chart from Calc into Writer and see that the chart
lines flow back into the origin.
Comment 6 IngridvdM 2008-05-14 12:08:50 UTC
@weiz, please analyze where the empty values are wrongly replaced with zero
Comment 7 IngridvdM 2008-05-14 12:11:31 UTC
*** Issue 89427 has been marked as a duplicate of this issue. ***
Comment 8 weiz 2008-05-22 03:37:50 UTC
->iha: The patch for this issue is finished. Please let me know if you have any 
suggestions. Thank you!
Comment 9 weiz 2008-05-22 03:38:42 UTC
Created attachment 53833 [details]
patch_080522
Comment 10 IngridvdM 2008-06-03 16:09:54 UTC
@weiz, I compiled and tested the patch but the problem still exists. Did you
maybe attach not the complete patch?
Comment 11 weiz 2008-06-04 02:44:34 UTC
->iha: It's the complete patch, and it's OK in my test cases. 
If you use the example document "Messwerte E103.ods" to test the patch, you 
should click into the chart before you copy it, as the empty values are already 
replaced with zero in file "content.xml", so we need to rewrite the values to 
empty. 
The step above is unnecessary for the charts that new create.
Comment 12 IngridvdM 2008-06-05 09:54:59 UTC
Ah yes great, it works fine! :-) .
And its good to mention here that a special handling is needed for older documents.

Cool that you found that place where the problem is caused! And the patch is
absolute correct. Only there is a possibility to make the fix more elegant.
Instead of setting a default value to each element of a vector after resizing
it, you can use the resize method with two parameters where the second parameter
is the value with which inserted elements are initialized. I have changed the
code accordingly and will attach a patch.
Comment 13 IngridvdM 2008-06-05 09:57:07 UTC
Created attachment 54249 [details]
patch2
Comment 14 IngridvdM 2008-06-05 09:58:49 UTC
Fixed in CWS chart27.
Comment 15 IngridvdM 2008-06-25 12:18:38 UTC
@Thomas, please verify in CWS chart27. For all old files including the attached
one it is necessary to double click the chart once before copying. Updateing the
charts via F9 before copying works also. Newly created charts should behave fine
directly now.
Comment 16 kla 2008-06-26 13:51:15 UTC
seen ok in cws chart27 -> verified
Comment 17 kla 2008-08-27 09:55:31 UTC
seen ok in current master -> closed