// that is provided by the component if you create the ShapeColletion
XShapes xSelection = (XShapes)UnoRuntime.queryInterface( XShapes.class,
xOfficeContext.getServiceManager().createInstanceWithContext(
"com.sun.star.drawing.ShapeCollection", xOfficeContext ) );
xSelection.add( xShape );
xSelectionSupplier.select( xSelection );
}
catch( java.lang.Exception ex )
{
System.out.println( ex );
}