[Solved] Calling C++ function in client application w addins

Java, C++, C#, Delphi, ??? - Using the UNO bridges

[Solved] Calling C++ function in client application w addins

Postby mangesh » Wed Jan 02, 2013 12:17 pm

Hi ,
I have an C++ application, which need to be integrated with OpenOffice Calc. For this I wish to implement an addin in OpenOffice. When the user calls the addin functions, I need to call the functions in the external application dll. Is there a sample to demonstrate this usage.

thanks,
mangesh.
Last edited by mangesh on Fri Feb 08, 2013 3:49 pm, edited 1 time in total.
OpenOffice3.4.0 Win7 x64.
mangesh
 
Posts: 26
Joined: Tue Aug 21, 2012 10:48 am

Re: Calling C++ function in a client application through add

Postby RoryOF » Wed Jan 02, 2013 12:22 pm

Have you looked at
http://www.openoffice.org/udk/cpp/man/tutorial/unointro.html
and the various links from it?
Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31232
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calling C++ function in a client application through add

Postby mangesh » Wed Jan 02, 2013 1:06 pm

Hi RoryOF,
Thanks for the quick reply. I have gone through the link you have mentioned and have started looking at the SDK samples. I am actually evaluating OpenOffice.org, and am not actually developing anything as yet. I just want to know if the functionality that I want to implement is possible with OpenOffice.org. Following is the functionality, I am looking for in OpenOffice calc.

1] Add menu and toolbar items (add-ons) to Calc at runtime. I think the Add-ons map to this requirement. But I am not sure, if the Add-ons can be added at runtime. There are several menu items which need to be added, but not all will be visible all the time. Hence I need the ability to add only those menu items that are required by the user. From the documentation, I gather, that I will have to implement the Add-on as a component and deploy it. But this would be static creation. I would then like to have the ability to disable/hide the menu items at runtime.

It would be great help if you can point me to some samples for dynamic menu creation, which I can check out.


2] Add some addins to the functions wizard as discussed in link below. The link discusses the addin creation and adding functions to the function wizard.
http://wiki.openoffice.org/wiki/OpenOff ... oject_Type

These functions would in turn call extern functions in the client applications as discussed in the post above. Since the addin is deployed as a UNO package, I am guessing the functions to be called from the external application will need to be specified at runtime. Since I am evaluating this behavior, I need some sample code, before starting implementation on OOo Calc.
OpenOffice3.4.0 Win7 x64.
mangesh
 
Posts: 26
Joined: Tue Aug 21, 2012 10:48 am

Re: Calling C++ function in a client application through add

Postby mangesh » Fri Jan 04, 2013 8:41 am

Hi,
I am a newbie to OpenOffice development and am evaluating OpenOffice Calc for my application. I wish to communicate with Openoffice using my application, and am looking at adding Macros ( user functions ) to the Functions wizard. When the user function is invoked, I need to get the call back to my application, so that I can send data back to OpenOffice Calc.

Is this possible. I know that OpenOffice macros can invoke external DLLs and call functions in them, but is it possible to call functions in external applications and get the data required.
If this is possible, could you please direct me to some sample application for reference.

Please let me know if there are any doubts.

thanks,
Mangesh
OpenOffice3.4.0 Win7 x64.
mangesh
 
Posts: 26
Joined: Tue Aug 21, 2012 10:48 am


Return to External Programs

Who is online

Users browsing this forum: No registered users and 2 guests