Issue 100070 - chart data is not loaded correctly anymore if chart is not on the first sheet
Summary: chart data is not loaded correctly anymore if chart is not on the first sheet
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@graphics
Keywords: regression
Depends on:
Blocks: 95768
  Show dependency tree
Reported: 2009-03-09 20:43 UTC by IngridvdM
Modified: 2013-02-24 21:18 UTC (History)
5 users (show)

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

fix for this (1.60 KB, patch)
2009-03-09 21:55 UTC, kyoshida
no flags Details | Diff
patch to fix the wrong *export* issue (585 bytes, patch)
2009-03-09 22:19 UTC, kyoshida
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description IngridvdM 2009-03-09 20:43:01 UTC
Within Calc create a chart with data not from the first sheet.
Save the Calc and reload the document. Double click the chart
->all ranges are broken and wrong data is displayed.
For example if a chart was created with data from Sheet2.C6:C9;
after reload and double click the range has changed to Sheet2.C6:Sheet1.C9.
So the end cell of the range is located on the wrong tab page after load.
Comment 1 IngridvdM 2009-03-09 21:00:26 UTC
This is a regression from ooo310m2 to m3.
The problem was introduced by CWS koheiformula02.
@kohei, please have a look at this. The problem occurs within method
I rate this as  3.1 showstopper. If you can provide a patch until tomorrow
Niklas may can integrate the fix into CWS calc31stopper2.
Comment 2 IngridvdM 2009-03-09 21:07:44 UTC
adding to showstopper issue
Comment 3 kyoshida 2009-03-09 21:46:31 UTC
I'm working on this as we speak.
Comment 4 kyoshida 2009-03-09 21:55:07 UTC
Created attachment 60836 [details]
fix for this
Comment 5 kyoshida 2009-03-09 22:00:43 UTC
So, apparently Calc supports normal range syntax e.g. Sheet.A1:C4 with the end
cell not explicitly having a sheet name.  My code only supported

* Sheet.A1:Sheet.C4
* Sheet.A1:.C4

which is why the end cell ended up referencing the first sheet.  That is the
reason for failure.

What puzzles me is that, when I worked on koheiformula02, the range syntax was
always Sheet.A1:Sheet.C4, with both cells having a sheet name specified.  I
wonder if this is a recent change, or my oversight...
Comment 6 kyoshida 2009-03-09 22:07:31 UTC
actually, I introduced that change unintentionally, so, it's my fault. :-/

Let me try to fix that as well.
Comment 7 kyoshida 2009-03-09 22:19:34 UTC
Created attachment 60837 [details]
patch to fix the wrong *export* issue
Comment 8 kyoshida 2009-03-09 22:23:15 UTC
Ok.  The 2nd patch is the correct fix.  It's my understanding that, in ODF,
ranges always have the begin and end cell addresses, and they both specify sheet
name.  So, exporting a range that omits sheet name in the end cell was incorrect.

With the 2nd patch applied, it's not necessary to apply the first patch.
Comment 9 kyoshida 2009-03-09 22:34:05 UTC
re-assigning to Niklas for committing the patch in.  Thanks!
Comment 10 niklas.nebel 2009-03-10 11:45:19 UTC
Thanks Kohei for fixing this quickly.

For 3.1, I added both patches to CWS "calc31stopper2", to be safe and to avoid
losing data from files created with interim versions.

For 3.2, we should remove the first patch again, and possibly also the fix for
issue 100062, and make sure correct range strings are really used everywhere.
Comment 11 niklas.nebel 2009-03-10 12:50:03 UTC
reassigning to QA for verification
Comment 12 kla 2009-03-13 13:23:35 UTC
Seen ok in cws -> verified
Comment 13 kla 2009-03-18 12:48:31 UTC
Seen ok in current master -> closed