Issue 79009 - Charts in Writer loose connection to table in old versions
Summary: Charts in Writer loose connection to table in old versions
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: michael.ruess
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-29 12:00 UTC by bjoern.milcke
Modified: 2013-02-24 21:22 UTC (History)
1 user (show)

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


Attachments
Document created with old chart showing the wrong ranges for data from columns and from rows (17.39 KB, application/vnd.oasis.opendocument.text)
2007-07-12 12:35 UTC, bjoern.milcke
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description bjoern.milcke 2007-06-29 12:00:20 UTC
Create a chart from an entire writer table, save the document and load it in OOo
2.2.1 or earlier (Even StarOffice 7 with ODF filter shows this behavior): the
chart does no longer get updates of data in a table even with F9 or the "Update
all Charts" function.

The problem are the ranges that are written in the content.xml stream of the
chart. The ranges have ever since been wrong (the row number was one too large).
In m217 this is fixed, i.e. the range is written correctly, however loading fails.

Suggested fix: Write the ranges wrong again, so that loading works in older
versions. Also implement a check using versioning (possible since charts have
their own meta stream). To fix ranges only for existing versions of OOo, so that
a fixed range in a document created with OOo 2.4 or 3.0 will be read correctly
in OOo 2.3.
Comment 1 bjoern.milcke 2007-07-12 12:31:48 UTC
->TL: Please pass an Argument "BrokenCellRangeForExport" (or sth. like that) in
the XDataProvider::detectArguments() method that contains the same as
"CellRangeRepresentation" only that all rows that appear there are one too large.

It is always the rows, no matter if data was taken from rows or columns.
Comment 2 bjoern.milcke 2007-07-12 12:35:52 UTC
Created attachment 46721 [details]
Document created with old chart showing the wrong ranges for data from columns and from rows
Comment 3 bjoern.milcke 2007-07-12 12:40:21 UTC
Note that with the mentioned approach the range must be convertible by the
XRangeXMLConversion, even if it overlaps the table boundaries. If this is not
possible, we have to use a different approach.
Comment 4 bjoern.milcke 2007-07-13 13:26:41 UTC
xmloff/source/chart/SchXMLExport.cxx now uses the value of the argument
"BrokenCellRangeForExport" if it is available for export at the plot-area.
Otherwise it exports "CellRangeRepresentation" like before.
Comment 5 thomas.lange 2007-07-13 14:08:05 UTC
Fixed in CWS chart07.

Files changed:
- unochart.hxx
- unochart.cxx
Comment 6 thomas.lange 2007-07-13 14:12:04 UTC
TL->BM: Seems to work. Please have a look.
Comment 7 bjoern.milcke 2007-07-16 13:59:09 UTC
Not fixed. This is how the range is converted to be "broken":
orig:    "Table1.$A$1:.$C$3"
broken:  "Table1.A2:C4"

The "$"s are missing, and the "." before the end-cell is missing. The latter
leads to losing label information in the old chart.
Comment 8 bjoern.milcke 2007-07-16 13:59:36 UTC
Trying to fix.
Comment 9 bjoern.milcke 2007-07-16 15:24:10 UTC
-TL: As I expected the range conversion does not work. I explicitly asked you if
that was a problem (even mentioned in this issue), and that we would need a
different approach if it was. Why did you set this issue to fixed when it
obviously doesn't work. I would expect a developer to do at least one test
before setting an issue to fixed.
Comment 10 bjoern.milcke 2007-07-16 16:15:53 UTC
I removed the check for valid cells.

->TL: Maybe this was a misunderstanding, it seems like you implemented the
validity check in the range conversion explicitly for this issue. Please confirm
that it is ok to remove it, i.e. no other fix needs this. (see diff between
1.3.32.7 and 1.3.32.8 of unochart.cxx).
Comment 11 bjoern.milcke 2007-07-16 16:24:46 UTC
->mru: Please verify in CWS chart07 (or send to kla, if there is no time).

Test: create a chart using a writer table using a range compatible to the old
behavior, i.e. only one range spanning a rectangular sub-range of a table. Save,
and reload in a version prior to SRC680.m212, i.e. containing the old chart.
Change a value, press F9, the chart should get the new value.
Comment 12 bjoern.milcke 2007-07-16 16:32:12 UTC
Er, addition for the test note: Of course the "trivial subrange", i.e. the
complete table should also work :-)
Comment 13 michael.ruess 2007-07-19 14:08:55 UTC
Verified in CWS chart07.
Comment 14 michael.ruess 2007-08-02 11:33:39 UTC
Checked in 680m224.