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 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)


If your first method gives you the wanted result, why not using it?
The second method cannot lead to the wanted result as the chart itself does not know anything about a surrounding spreadsheet page.
Each shape that you get from the charts draw page has a position relative to 
the chart.

Kind regards,
Ingrid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@graphics.openoffice.org
For additional commands, e-mail: dev-h...@graphics.openoffice.org

Reply via email to