Hi Steffen,
you are not subscribed with this email address, please ensure that you
either use an email address that is subscribed correctly or subscribe
under http://api.openoffice.org/servlets/ProjectMailingListList
Thanks
Juergen
On 3/18/10 5:16 PM, Steffen Boersig wrote:
Hi guys,
I'm currently stuck with the insertion of pictures into a XTextFrame. My
goal is to insert a GraphicObject at a cursor position. If the cursor
resides inside an XTextFrame, the size of the XTextFrame should be
queried and the image should be scaled accordingly to fit the size of
the XTextFrame. This behaviour can be done with "Insert -> Graphic" in
the OO GUI while the cursor resides in a XTextFrame.
What I can do by now is:
- Embed a GraphicObject into an XTextContent. The method can of course
also insert into the XTextFrame if the cursor was placed there.
- Get the XTextFrame via the XTextFramesSupplier
- Query the XServiceInfo for supported Services. ( XTextCursor,
XTextRange and XTextViewCursor seem to not support
com.sun.star.text.XTextFrame , so what should i use here?)
What I cannot do by now is:
- Getting the "surrounding content" of the XTextCursor, therefor I'm
also not able to determine if the cursor is currently inside a
XTextFrame. I need to find out if I'm inside a XTextFrame to query for
the size of the XTextFrame to be able to resize the picture.
Am I on the right track with the XServiceInfo or do I have to use a
different approach? And if there is an easier solution to embed
GraphicObjects into a XTextFrame( and resize it accordingly), please
tell me.
Regards,
Steffen Boersig
Offtopic: I solved my previous problem , with executing the same code
several times, by upgrading to OO 3.2.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Sun Microsystems GmbH Juergen Schmidt
Nagelsweg 55 Technical Lead Programmability
20097 Hamburg, Germany
Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Thomas Schröder
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]