OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Can I use Java Object in OOo Macro?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
waitsun
General User
General User


Joined: 21 Jun 2004
Posts: 5

PostPosted: Thu Jun 24, 2004 5:54 pm    Post subject: Can I use Java Object in OOo Macro? Reply with quote

I want to write a function in OOo Macro to get results from calling a url. In Java, I can use the class HttpURLConnection to achieve this purpose.

So, can I use the Java class HttpURLConnection in Macro?
Or I need to write my own Java class that have the function to get the results and register it under OpenOffice?

Please help, thanks a lot Smile
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Thu Jun 24, 2004 9:31 pm    Post subject: Re: Can I use Java Object in OOo Macro? Reply with quote

waitsun wrote:

So, can I use the Java class HttpURLConnection in Macro?
Or I need to write my own Java class that have the function to get the results and register it under OpenOffice?

Yes and to question 2:
You would need to do that, at least it must be a registered component and thus known to UNO. Components are registered with the pkgchk tool from the /program folder.
You'll find examples in the SDK to that, under DevelopersGuide examples I think.
Once you have registered your own service/interface in OpenOffice, you should be able to easily make use of it with Starbasic.

I would suggest that you just inherit from HttpURLConnection class (mhh I am not positive if it works then, but just test it out!).
Feel free to share if inheritance works for registering a Java class as a UNO component.

Hope that helps.
Christian
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Fri Jun 25, 2004 7:01 am    Post subject: Reply with quote

Just adding a cross reference.....
http://www.oooforum.org/forum/viewtopic.php?t=10022
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group