Re: [api-dev] Inserting GraphicObjects into XTextFrame
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: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- Sun Microsystems GmbHJuergen 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: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Embedding data files in Calc and extracting on need
Hi Bernard, On Thu, Mar 18, 2010 at 12:32 PM, Bernard Marcelly marce...@club-internet.fr wrote: Message de Madhur Kashyap date 2010-03-18 05:35 : Hi, I have built an application on top of openoffice calc using the Macro programming techniques. Now, some part of my application is in a compiled executable in a separate file which I invoke through a shell command. I want to distribute a single OO calc doc as the application, kind of self contained. In order to do that I need a mechanism to keep this executable embedded / kept inside the calc document itself. Also, a way to extract it out when needed during the use of application. Please guide me on how to do that. My users are on Windows as well as Linux. I think a simpler solution would be to create and distribute an extension. An extension may include any number of documents of any kind. You can easily find the path of the installed extension folder and then the address of the document. http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Location_of_Installed_Extensions I read about the extensions and how they are managed. This mechanism would not serve the typical use model for this application. It is like a spreadsheet type calculator in which the updated results would be exchanged with the calculator among people. Extensions method would require it to be installed for every user in order to transfer the spreadsheet. I can't seem to find a way to embed arbitrary file(s) into calc spreadsheet. If needed I am ok with zipping it up if it helps OO in understanding. Do you know a way to do this? Regards Madhur
Re: [api-dev] Embedding data files in Calc and extracting on need
Hello Madhur, On Friday 19 March 2010, 07:17, Madhur Kashyap wrote: I can't seem to find a way to embed arbitrary file(s) into calc spreadsheet. you need to use the embed API, cf. http://api.openoffice.org/docs/common/ref/com/sun/star/embed/module-ix.html Regards -- Ariel Constenla-Haile La Plata, Argentina - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Embedding data files in Calc and extracting on need
On Fri, Mar 19, 2010 at 4:10 PM, Ariel Constenla-Haile ariel.constenla.ha...@googlemail.com wrote: Hello Madhur, On Friday 19 March 2010, 07:17, Madhur Kashyap wrote: I can't seem to find a way to embed arbitrary file(s) into calc spreadsheet. you need to use the embed API, cf. http://api.openoffice.org/docs/common/ref/com/sun/star/embed/module-ix.html I did notice this module earlier but it is complicated for me to grasp. Do you know some examples which I can refer to? Regards -- Ariel Constenla-Haile La Plata, Argentina - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- Regards Madhur Kashyap
Re: [api-dev] Embedding data files in Calc and extracting on need
You can explore sources of OOChemistry extension (http://oochemistry.sourceforge.net). But it's complicated too :) Also there is very simple example in OOo SDK (examples/Java/EmbedDocument/EmbeddedObject) 19.03.10, 16:32, Madhur Kashyap physiologo...@gmail.com: On Fri, Mar 19, 2010 at 4:10 PM, Ariel Constenla-Haile ariel.constenla.ha...@googlemail.com wrote: Hello Madhur, On Friday 19 March 2010, 07:17, Madhur Kashyap wrote: I can't seem to find a way to embed arbitrary file(s) into calc spreadsheet. you need to use the embed API, cf. http://api.openoffice.org/docs/common/ref/com/sun/star/embed/module-ix.html I did notice this module earlier but it is complicated for me to grasp. Do you know some examples which I can refer to? Regards -- Ariel Constenla-Haile La Plata, Argentina - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- Regards Madhur Kashyap -- Regards, Konstantin - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Embedding data files in Calc and extracting on need
Hello Madhur, On Friday 19 March 2010, 08:02, Madhur Kashyap wrote: On Fri, Mar 19, 2010 at 4:10 PM, Ariel Constenla-Haile ariel.constenla.ha...@googlemail.com wrote: Hello Madhur, On Friday 19 March 2010, 07:17, Madhur Kashyap wrote: I can't seem to find a way to embed arbitrary file(s) into calc spreadsheet. you need to use the embed API, cf. http://api.openoffice.org/docs/common/ref/com/sun/star/embed/module-ix.ht ml I did notice this module earlier but it is complicated for me to grasp. Do you know some examples which I can refer to? mmm not that I'm aware of (what Konstantin said is an example on how to implement an embedded object, you simply want to embed and then extract some content, so believe me you wouldn't like to mess with such a complicated thing). I'll try to write some OOo Basic example this weekend, I'll let you know, stay tuned. Regards -- Ariel Constenla-Haile La Plata, Argentina - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Embedding data files in Calc and extracting on need
Hi Ariel, On Fri, Mar 19, 2010 at 4:55 PM, Ariel Constenla-Haile ariel.constenla.ha...@googlemail.com wrote: Hello Madhur, On Friday 19 March 2010, 08:02, Madhur Kashyap wrote: On Fri, Mar 19, 2010 at 4:10 PM, Ariel Constenla-Haile ariel.constenla.ha...@googlemail.com wrote: Hello Madhur, On Friday 19 March 2010, 07:17, Madhur Kashyap wrote: I can't seem to find a way to embed arbitrary file(s) into calc spreadsheet. you need to use the embed API, cf. http://api.openoffice.org/docs/common/ref/com/sun/star/embed/module-ix.ht ml I did notice this module earlier but it is complicated for me to grasp. Do you know some examples which I can refer to? mmm not that I'm aware of (what Konstantin said is an example on how to implement an embedded object, you simply want to embed and then extract some content, so believe me you wouldn't like to mess with such a complicated thing). I'll try to write some OOo Basic example this weekend, I'll let you know, stay tuned. Thanks for the help. I thought it is important from my part to describe the word content. I have few text and binary executable files which I would like to keep embedded in the document. Regards -- Ariel Constenla-Haile La Plata, Argentina - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- Regards Madhur Kashyap