Issue 103460 - ODF charts without svg:width and svg:height are not imported correctly
Summary: ODF charts without svg:width and svg:height are not imported correctly
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:
Depends on:
Blocks:
 
Reported: 2009-07-10 20:30 UTC by aguelzow
Modified: 2013-02-24 21:20 UTC (History)
3 users (show)

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


Attachments
sample file (9.19 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-07-10 20:31 UTC, aguelzow
no flags Details
second sample file that also contains a png replacement for the chart (11.77 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-07-10 22:54 UTC, aguelzow
no flags Details
gnumeric file with svg dimensions on embedded chart:chart (9.16 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-07-11 20:12 UTC, barthanssens
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aguelzow 2009-07-10 20:30:29 UTC
I will be attaching an ODF file. On opening the file, calc fails to display the
chart although selecting edit from the context menu of the chart does display it.
Comment 1 aguelzow 2009-07-10 20:31:13 UTC
Created attachment 63470 [details]
sample file
Comment 2 Regina Henschel 2009-07-10 21:20:04 UTC
The replacement graphic has type
<manifest:file-entry manifest:media-type="image/svg+xml"
manifest:full-path="Pictures/Graph1"/>

As far as I know, up to now OOo is not able to import or view svg-graphics. So
this would be an enhancement. I think that it depends on the outstanding
solution for issue 49991 "Allow embedding SVG vector graphics into all documents."
Comment 3 Regina Henschel 2009-07-10 21:21:32 UTC
change component to chart.
Comment 4 aguelzow 2009-07-10 22:38:56 UTC
I would think that if calc can't read the replacement graphic then it should
just render the chart itself (which it apparently can do but chooses not to do
at this time.)  So I would thin kthat this is a bug not just an enhancement
since it does not depend on the ability to render svg graphics.

PS. Note that ODF 1.2 committee draft 2 revision 1 even states:
"Note: While the image data may have an arbitrary format, it is recommended that
vector graphics are stored in the [SVG] format and bitmap graphics in the [PNG]
format."

So the provided format is in fact the preferred vector format. 
Comment 5 aguelzow 2009-07-10 22:53:46 UTC
I am attaching a second version of that file that contains 2 replacement images:
one that is as before svg and the second one a png one. I would think that it
should be able to show the graph then.
Comment 6 aguelzow 2009-07-10 22:54:44 UTC
Created attachment 63472 [details]
second sample file that also contains a png replacement for the chart
Comment 7 Regina Henschel 2009-07-11 00:01:58 UTC
Yes, there seems to be a problem in following the path to the replacement
graphic. The problem might be connected to issue 103076.

OOo does not refresh the chart on load, even not with its own format. So
refreshing when loading would be a new behavior and another problem.
Comment 8 aguelzow 2009-07-11 00:09:23 UTC
I was aware of issue 103076. So I made sure that this file uses
<draw:object xlink:href="./Graph1" .../>
(the OOo rather than MS version of this link.)
Comment 9 barthanssens 2009-07-11 20:09:52 UTC
Actually, OOo 3.1 _is_ capable of displaying the SVG preview (or PNG, for that 
matter), although it's tricky/buggy since it depends on the presence of the svg 
height/width of the _embedded chart_ (instead of the parent <draw:frame>)
 
In Graph1/content.xml of the Gnumeric file, change 

<chart:chart chart:class="chart:bar">

into

<chart:chart svg:width="8cm" svg:height="7cm" chart:class="chart:bar">


and OOo 3.1 (windows) will be able to render it.
Comment 10 barthanssens 2009-07-11 20:12:36 UTC
Created attachment 63487 [details]
gnumeric file with svg dimensions on embedded chart:chart
Comment 11 aguelzow 2009-07-13 17:23:28 UTC
Of course according to the ODF 1.1 standard (10.2) this should not be necessary:

"The svg:width and svg:height (see section 9.2.15) attributes define the extent
of the entire chart. If they are omitted, the size of the chart is determined by
the size of the window in which the chart is displayed."
Comment 12 barthanssens 2009-07-27 21:47:39 UTC
For using SVG/PNG as preview instead of GDI metafile, see 103779
Comment 13 IngridvdM 2009-08-28 10:32:17 UTC
Taking a look.
Comment 14 IngridvdM 2009-08-28 17:47:59 UTC
Fixed in CWS chart41. Thanks for the report!
Comment 15 IngridvdM 2009-09-07 18:51:50 UTC
@Thomas, please verify in CWS chart41.
Load the attached example chartinspreadsheet:gnm1-9-10.ods (first or second). A
chart should be visible.
Comment 16 kla 2009-09-11 13:23:16 UTC
verified
Comment 17 kla 2009-12-14 12:42:15 UTC
Seen ok in current master -> closed