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

Connection Problem with PyUNO

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


Joined: 16 Mar 2007
Posts: 5
Location: India

PostPosted: Tue Jul 24, 2007 2:05 am    Post subject: Connection Problem with PyUNO Reply with quote

Hello,

While working with PyUNO i have to every time write

soffice -accept=socket,host=0,port=2002;urp;

or ,

<prop oor:name="ooSetupConnectionURL">
<value>socket,host=localhost,port=2002;urp;StarOffice.ServiceManager
</value>
</prop>

in setup.xcw file

but i want to do it by coding
is it possible ?????

Then please provide it as soon as fast ......
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Tue Jul 24, 2007 8:29 am    Post subject: Reply with quote

perhaps a clue with DannyB's code in OOoBasic :

Code:
Sub btnAccept_Clicked()
   ' Get access to the controls on the drawing.
   oDrawDoc = ThisComponent ' get the drawing.
   oDrawPage = oDrawDoc.getDrawPages().getByIndex( 0 ) ' get a page from the drawing.
   oForms = oDrawPage.getForms() ' get the group of forms on the page.
   oForm = oForms.getByName( "Standard" ) ' get a particular form.
   
   ' Get user entered values from the drawing.
   cConnectionsFrom = oForm.getByName( "fldConnectionsFrom" ).Text
   nConnectionPort = oForm.getByName( "fldConnectionPort" ).Value
   
'   SetUnoConnectionURL( "socket,host=0,port=8100;urp;StarOffice.ServiceManager" )
   SetUnoConnectionURL( "socket,host=" + cConnectionsFrom _
         + ",port=" + CSTR( nConnectionPort )_
         + ";urp;StarOffice.ServiceManager" )
End Sub


Note that this code use a form but you can probably simplfy it.
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
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