Apache OpenOffice (AOO) Bugzilla – Issue 32899
PDF Export of a chart selection in calc is empty
Last modified: 2013-08-07 15:15:24 UTC
Load the simple .sxc, select the chart and use export as pdf and export this selected chart on its own, i.e. not the full spreadsheet just the little chart Problem: error dialog reports... General Error General input/output error. Expected behaviour: Exported .pdf containing chart alone Extra information: copying and pasting the chart into writer and selecting it and using writers export to PDF does the right thing.
Created attachment 17098 [details] .sxc to export to .pdf chart by selection
This occurs with SRC680_m49 as well as 1.1.2
Hi Caolan, this is not a bug. A chart in writer has its own datarange contained in itself. A chart in Calc has a datarange conected to the calc sheet. As we do not have a standalne chart, exporting such docs is not possible. So the given Error message is correct. Nevertheless I think we should support exporting Charts directly to PDF. So I assign this as Enhancement to Bjoern to keep an eye on it for the new Chart model. It may be a double to internal #95885#. Frank
Even an improved error message that pointed at a workaround would be an improvement :-)
In the latest developer snapshot SRC680m222 exporting a selected chart to pdf in calc gives no error message but instead exports nothing when you choose to export the 'selection' as Range as General PDF Options. In writer and impress this works fine, so I think this is a defect in calc. ->Niklas, please have a look.
Just checked with chart07 (based on m219, checked on Windows) and the chart is exported together with the cells, so it looks like "selection" has been ignored, instead everything was exported. In m222 (checked on Linux), indeed, the pdf is empty. When doing a cell selection including the chart, it works, however.
Also happens with selected shapes in the drawing layer of Calc. ->NN: Ok, now I have checked enough, now it's your turn ;-)
change target from 2.x to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
*** Issue 81797 has been marked as a duplicate of this issue. ***
->iha: the patch is finished, please find the attachment. I am not sure whether it's the most suitable way to fix this issue, so please let me know your suggestions. Thank you!
Created attachment 53281 [details] patch_sc_080430
->weiz: When exporting a selected chart now more than the chart is exported. If the cells that are partly covered by the chart do contain values these values are now printed in addition. So you export the chart and some rubbish. Maybe you can try to do a more correct fix? I could imagine to expand the structure ScMarkData maybe by a list of Page Number, Position And Size for each selected shape. This additional information has to be handled at several places of course (e.g. ScPrintFunc::DoPrint ) which is much more effort than the current solution. If you think that it is too much effort for you even the current solution could be enhanced: It is possible to select more than one OLE object, but only the first one gets exported right now. Then it is possible to make a multiselection of OLE objects and some cellranges (select a chart, press ctrl+shift on the keyboard and select some additional cellranges with the mouse). So the new code should not be if( chart selected ) else (cell range selected) .
->iha: the attached is the patch that for export multi-selection of OLE objects. Thank you!
Created attachment 54221 [details] patch_080604
Fixed in CWS dr62. @weiz, thanks for the patch. I found that the export of a multi selection is also not supported for simple cell ranges. So it is ok in the first step to have no multi selection export for charts. I extended the patch in a way that no cell content is exported when a selected object is exported.
Reassigning to QA for verification
verified in internal build cws_dr62
Hello @ll, I have tested it under Debian SID AMD64 with DEVm28 and the export of the chart to PDF alone works :) No more sheet inside :) So I close this bug as resolved.