> 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.
 
Hope that helps,
Ingrid

 

 

Hi Ingrid,

 

Thanks so much for your helps! Now I could resolve the problem.

 

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 code:

 

Object shapeAsObject = drawPage.getByIndex(0);

XShape chartShape = (XShape) UnoRuntime.queryInterface(XShape.class,
shapeAsObject);

com.sun.star.awt.Point oopos = chartShape.getPosition();

 

But with draw page of the chart document, the position of the shape always
is (0, 0). May be we should update whatever before getting the position of
the chart? (I've already updated the view before getting the position, but
it doesn't help)

 

Thanks and best regards,

Doan Nguyen Van

Reply via email to