Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Oleg Mikheev
Hi! Just checking if the mail list works or not. The forwarded message was sent out one day ago - still hasn't appeared on the list. If you see this message we would be grateful if you could (try to) answer the question. Thanks! Original Message Subject:FW: Re: [graphic

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Ingrid Halama
Hi, In case the draw page from spreadsheet is used it is ok to export only the first shape from that page (as this first shape is the chart as it seems in this scenario). But different if you use the draw page of the chart. In that case it is wrong to only export the first shape. Try to use the

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Doan Nguyen Van
On 02/26/10 02:59, Ingrid Halama wrote: > Hi, > In case the draw page from spreadsheet is used it is ok to export only the first shape from that page (as this first shape is the chart as it seems in this scenario). But different if you use the draw page of the chart. In that case it is wrong t

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Ingrid Halama
Am 26.05.10 12:34, Doan Nguyen Van schrieb: The draw page of the chart has only one shape (drawPage.getCount()returns 1). I've tried to use the draw page for exporting but It was failed, no image has been exported. Ah, I see. Then this is a different problem. The shapes representing the chart

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Doan Nguyen Van
> Hm, there are different possibilities how to trigger the generation of the shapes within the given draw page. I think the best one is to directly request the view to update: . . . This is not standard API code, but I don't expect this part of the chart2 API to change in the next years.

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Ingrid Halama
Am 26.05.10 16:11, Doan Nguyen Van schrieb: Thanks so much for your helps! Now I could resolve the problem. Nice to hear that! Now I have another problem concerning getting position of a chart within a sheet. With draw page of the sheet, we could get position of the shape using following co

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Doan Nguyen Van
Ingrid, > If your first method gives you the wanted result, why not using it? Because the shapes (of draw page of the sheet) don't have any references to TableChart or ChartDocument, so it is not possible to understand which TableChart some shape is related to. > The second method canno

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Ingrid Halama
Hi Doan Nguyen Van, Am 26.05.10 17:20, Doan Nguyen Van schrieb: Ingrid, If your first method gives you the wanted result, why not using it? Because the shapes (of draw page of the sheet) don't have any references to TableChart or ChartDocument, so it is not possible to understand whi

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-26 Thread Doan Nguyen Van
Ingrid, > If your first method gives you the wanted result, why not using it? Because the shapes (of draw page of the sheet) don't have any references to TableChart or ChartDocument, so it is not possible to understand which TableChart some shape is related to. > The second method canno

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-27 Thread Ingrid Halama
Hi Doan Nguyen Van, On 05/27/10 09:50, Doan Nguyen Van wrote: > Do you know how to receive XSpreadsheet from XChartDocument or XTableChart? Query XChartDocument for interface com.sun.star.container.XChild. The parent then should be a XSpreadsheetDocument. Kind regards, Ingrid -

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-27 Thread Ingrid Halama
Hi Doan Nguyen Van, On 05/27/10 13:18, Doan Nguyen Van wrote: I have more one question: Is chart name unique in the spreadsheet document? As the PersistName is used to save the OLE object, it must be unique, yes. Kind regards, Ingrid

Re: Fwd: FW: Re: [graphics-dev] save chart image to file

2010-05-27 Thread Doan Nguyen Van
Ingrid, Thank you very much for your helps. Kind regards, Doan Nguyen Van