please an example in java would be grand, this has been a two day struggle.
kind regards, kent --- Steffen Grund <[EMAIL PROTECTED]> wrote: > Hi Kent, > > the text frame is only really valid after you've > inserted it in the > document. > See > http://api.openoffice.org/docs/common/ref/com/sun/star/text/TextFrame.html > for a Basic example on how to insert the frame. If > you need one in Java, > let me know. > > Regards, Steffen > > > Kent Gibson wrote: > > 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. > > > > kent > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
