Apache OpenOffice (AOO) Bugzilla – Issue 103460
ODF charts without svg:width and svg:height are not imported correctly
Last modified: 2013-02-24 21:20:24 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.
Created attachment 63470 [details] sample file
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."
change component to chart.
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.
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.
Created attachment 63472 [details] second sample file that also contains a png replacement for the chart
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.
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.)
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.
Created attachment 63487 [details] gnumeric file with svg dimensions on embedded chart:chart
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."
For using SVG/PNG as preview instead of GDI metafile, see 103779
Taking a look.
Fixed in CWS chart41. Thanks for the report!
@Thomas, please verify in CWS chart41. Load the attached example chartinspreadsheet:gnm1-9-10.ods (first or second). A chart should be visible.
verified
Seen ok in current master -> closed