I really can't figure how to get XAccessibleShape from XShape.
Anybody help?
Laurent.
On 3/27/07, Malte Timmermann <[EMAIL PROTECTED]> wrote:
This information is only available for things rendered to the screen.
There you can use the Uno Accessibility API (XAccessibleText for char
glyphs)
But I don't know if you can query XAccessibleText from XShape directly.
See openoffice.org/access for details.
Malte.
Laurent Denoue wrote, On 03/27/07 04:08:
> I can get the text, position and size of all shapes on each page of an
> Impress document.
> However, I need the position of individual words that are inside
text-based
> shapes.
> How can I do this?
> Laurent.
>
> int npages = PageHelper.getDrawPageCount( xComponent );
> for (int i=0;i<Math.min(2,npages);i++)
> {
> XDrawPage xPage = PageHelper.getDrawPageByIndex(
> xComponent,i);
> XShapes xShapes = (XShapes)UnoRuntime.queryInterface(
> XShapes.class, xPage);
> int nshapes = xShapes.getCount();
> for (int j=0;j<nshapes;j++)
> {
> XShape xShape = (XShape)UnoRuntime.queryInterface(
> XShape.class, xShapes.getByIndex( j ));
> System.out.println(xShape.getShapeType());
> XText xText = (XText) UnoRuntime.queryInterface(
> XText.class, xShape );
> System.out.println(xText.getString());
> System.out.println(xShape.getPosition().X + "," +
> xShape.getPosition().Y + "," + xShape.getSize().Width + "," +
xShape.getSize
> ().Height);
> }
> }
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]