Hi Kent Gibson, this is a pure API topic, so discussion should rather go on over there (dev@api.openoffice.org). Thus I am forwarding your message.
2006/2/6, Kent Gibson <[EMAIL PROTECTED]>: > Hi-ya, > > I would like to create XTextFrames of a fixed > arbitrary height and width and place them at arbitrary > x and y coordinates. > > I can manage to get the frame, but I can't seem to > size it or place it arbitrarily. I have based my code > on the TextFrameExample() in TextDocuments.java. > > These properties seem to have no effect: > > XInterface xTextFrameInterface = (XInterface) > mxDocFactory.createInstance("com.sun.star.text.TextFrame"); > > > XPropertySet xFramePropSet = (XPropertySet) > UnoRuntime.queryInterface(XPropertySet.class, > xTextFrameInterface); > xFramePropSet.setPropertyValue( "FrameHeightAbsolute", > new Long(5000)); > xFramePropSet.setPropertyValue( > "FrameIsAutomaticHeight", new Boolean(false)); > xFramePropSet.setPropertyValue( "SizeType", new > Short((short)1)); > > Also when I use xShape to define height and width, it > doesn't seem to work either. The textframe is only as > big as the text inside it. > > XShape xShape = ( XShape ) UnoRuntime.queryInterface( > XShape.class, xFrame ); > > // Access the XPropertySet interface of the TextFrame > XPropertySet xFrameProps = ( XPropertySet ) > UnoRuntime.queryInterface( XPropertySet.class, xFrame > ); > > // Set the size of the new Text Frame using the > XShape's 'setSize' method > Size aSize = new Size(); > // this is probably (1/100 mm) > aSize.Height = 400; > aSize.Width = 15000; > xShape.setSize(aSize); > > If anyone has any pointers that would be grand. -- Best Regards Christian Junker --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]