XMultiServiceFactory.class, m_document.getDocument() );
XControlShape xShape = (XControlShape)UnoRuntime.queryInterface( XControlShape.class,
xDocAsFactory.createInstance( "com.sun.star.drawing.ControlShape" ) );
// position and size of the shape
xShape.setSize( new Size( nWidth * 100, nHeight * 100 ) );
xShape.setPosition( new Point( nXPos * 100, nYPos * 100 ) );
// adjust the anchor so that the control is tied to the page
XPropertySet xShapeProps = UNO.queryPropertySet( xShape );
TextContentAnchorType eAnchorType = TextContentAnchorType.AT_PARAGRAPH;