| View previous topic :: View next topic |
| Author |
Message |
naveen_srma General User


Joined: 15 Nov 2005 Posts: 36 Location: gurgaon,india
|
Posted: Mon Jan 09, 2006 9:33 am Post subject: How to call a shared object(.so) from openoffice macro |
|
|
Hi all...
I had written a dialog box class in QT and had converted it into a shared object(.so) file,
I need to call this dialog from openoffice macro. How can I do this??
In windows I had done the same thing by putting the dialog in a DLL and calling it from
macro.
But in linux i dont know, can any one help me out.
Thanks. |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
Posted: Mon Jan 09, 2006 10:27 am Post subject: |
|
|
if you want to call a so file you have to transform it as a component.
See my document chapter 13.
But in your case I think the problem is not so simple because of event manager : you will have two different windows managed by two different events manager... Try it but I am not sure you have before that to embed OOo in QT Windows system. It is possible as it is possible to embbed OOo in JSwing but I don't know how to do that.
It would be simpler to write your dialog in UNO/OOobasic or in UNO/C++. _________________ 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 |
|
 |
naveen_srma General User


Joined: 15 Nov 2005 Posts: 36 Location: gurgaon,india
|
Posted: Tue Jan 10, 2006 7:32 am Post subject: |
|
|
Hi,
Thanks for this great suggestion.
I am also thinking to use UNO/C++ coz current method is getting quite complicated.
I am going threw your chapters on how can link my code to openoffice.
Apart from that how can i learn using UNO/C++..if you can give some advice, that would be very useful.
I need to create some dialogs, handle documents, write on documents to give you an idea what I am trying to do.
Thanks. |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
naveen_srma General User


Joined: 15 Nov 2005 Posts: 36 Location: gurgaon,india
|
Posted: Thu Jan 12, 2006 7:34 am Post subject: |
|
|
Hi Serge,
Thats a great tutorial on dialogs...now that i can create a dialog in uno/c++, but one problem remains....On a menu click i need to call that c++ dialog.
You have written that we can call a macro from c++, but how can we call a dialog written in uno/c++ from macro.
coz only on menu event we need to call that dialog, is it possible?
Thanks. |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
naveen_srma General User


Joined: 15 Nov 2005 Posts: 36 Location: gurgaon,india
|
Posted: Mon Jan 30, 2006 10:32 pm Post subject: |
|
|
Hi,
Thats right that i can create a add-on or a component and can call a c++ module, but i want an easy way.
As im not creating any interface in c++, so i just want that i should call a shared object from macro and intercept the return value from it....thats it.
So isn't there a way that i can call a c++ programm and just know wht it returned.
Like on window we can call .dll's and access its return values.
Thanks. |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
Posted: Thu Feb 02, 2006 10:26 am Post subject: |
|
|
Here is an example where I construct an addIn to call an external shared .so library
This example is probably too complicated for your purpose because you only want a component. But it shows that this idea can work. You can propably program a more generic component which allow you to call every functions you need through only one method where the name of the function is a parameter and also the type of parameter and the number of parameters and so on. This problem is interesting to solve but probably complicated (very complicated if you haven't the .h (or .hxx) header file). _________________ 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 |
|
 |
naveen_srma General User


Joined: 15 Nov 2005 Posts: 36 Location: gurgaon,india
|
Posted: Fri Feb 03, 2006 10:45 am Post subject: |
|
|
Thanks serge for such a great help...
I will go threw all this...lets see if i can grasp any thing out of it...
I hope im finding a way out to this problem...
thanks again.... |
|
| Back to top |
|
 |
|