Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-12

Question: OpenOffice and FPC?

12 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tiziano - Mekar Srl -

hi,

Is here someone that knows if there is a way to take control of Opeoffice with FPC?

Time ago I made something with Delphi and OpenOffice COM Bridge, it was an interesting and stimulating experience, mainly because OOffice is available on many platforms, but this is not true for Delphi and COM.

Now that that the 2.0 release is shining, I am going to make some other things, but I would like to use FPC.

I just know that "Dispatch interface support for variants is currently broken in the compiler" but since I would like to do it in a portable way, the COM bridge is not the right way.

any ideas?

bye
tiziano

Reply by email

Michael Van Canneyt
to Tiziano - Mekar Srl -
Tiziano - Mekar Srl - wrote 18 lines
hi, Is here someone that knows if there is a way to take control of Opeoffice with FPC? Time ago I made something with Delphi and OpenOffice COM Bridge, it was an interesting and stimulating experience, mainly because OOffice is available on many platforms, but this is not true for Delphi and COM. Now that that the 2.0 release is shining, I am going to make some other things, but I would like to use FPC. I just know that "Dispatch interface support for variants is currently broken in the compiler" but since I would like to do it in a portable way, the COM bridge is not the right way. any ideas?

I once wrote an article about using OpenOffice 1.1 and Delphi. There were only 2 ways to control it: using Java or COM. COM is just a bridge to Java. Currently it seems that there are Java, C++, COM and Python bindings. None of these are directly accessible from FPC.

Michael.

Reply by email

Felipe Monteiro de Carvalho
to Michael Van Canneyt
Michael Van Canneyt wrote 5 lines
I once wrote an article about using OpenOffice 1.1 and Delphi. There were only 2 ways to control it: using Java or COM. COM is just a bridge to Java. Currently it seems that there are Java, C++, COM and Python bindings. None of these are directly accessible from FPC.

Well, if there are c++ bindings it should be easy to translate them to Pascal.

It's only a question of the size of does bindings and time to translate them.

Felipe Monteiro de Carvalho

Reply by email

Michael Van Canneyt
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 8 lines
On 12/14/05, Michael Van Canneyt wrote: > I once wrote an article about using OpenOffice 1.1 and Delphi. > There were only 2 ways to control it: using Java or COM. COM is > just a bridge to Java. Currently it seems that there are Java, > C++, COM and Python bindings. None of these are directly accessible > from FPC. Well, if there are c++ bindings it should be easy to translate them to Pascal.

C, yes. C++: Not unless you write a C wrapper first...

It's only a question of the size of does bindings and time to translate them.

Indeed.

Michael.

Reply by email

Marc Santhoff
to Tiziano - Mekar Srl -: Is here someone that knows if there is a way to take control of Opeoffice with FPC? Time…
Tiziano - Mekar Srl - wrote 17 lines
hi, Is here someone that knows if there is a way to take control of Opeoffice with FPC? Time ago I made something with Delphi and OpenOffice COM Bridge, it was an interesting and stimulating experience, mainly because OOffice is available on many platforms, but this is not true for Delphi and COM. Now that that the 2.0 release is shining, I am going to make some other things, but I would like to use FPC. I just know that "Dispatch interface support for variants is currently broken in the compiler" but since I would like to do it in a portable way, the COM bridge is not the right way. any ideas?

This is difficult. I'm not aware of all the gory details, but:

- the COM-Binding is Windows only
- having a fpc binding would need a so called "bridge" for fpc and to write it is a task for a specialist having enouch knowledge of assembler and linking stuff, even each C++ compiler on the same os needs it's own bridge
- there are informations on the website, try:
http://udk.openoffice.org/

HTH,
Marc

Reply by email

Felipe Monteiro de Carvalho
to Marc Santhoff
Marc Santhoff wrote
This is difficult. I'm not aware of all the gory details, but:

Besides difficult this is not needed. It is better to translate from the c++ headers. You gain less headache and more portability.

A COM binding would be nice, but for other things.

Right now I am translating the huge ImageWand c headers from ImageMagick. Not very difficult, just a lot of work.

Felipe Monteiro de Carvalho

Reply by email

Tiziano - Mekar Srl -

this should be a task for Jedi... or they are only delphi oriented?

by now I think that this is a very very good point in order to learn to dig with python... or persist with the Windows-Delphi-OOffice job.

many thanks for your kind answers

tiziano

Show quoted text 18 lines
-----Original Message----- From: On Behalf Of Felipe Monteiro de Carvalho Sent: Friday, December 16, 2005 3:26 AM To: FPC-Pascal users discussions Subject: [SPAM] - Re: [fpc-pascal] Question: OpenOffice and FPC? - Email found in subject Right now I am translating the huge ImageWand c headers from ImageMagick. Not very difficult, just a lot of work. -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.f-secure.com/

Reply by email

Marc Santhoff
to Felipe Monteiro de Carvalho: Besides difficult this is not needed. It is better to translate from the c++ headers. You…

Am Freitag, den 16.12.2005, 00:25 -0200 schrieb Felipe Monteiro de Carvalho:

Show quoted text 5 lines
On 12/15/05, Marc Santhoff wrote: > This is difficult. I'm not aware of all the gory details, but: Besides difficult this is not needed. It is better to translate from the c++ headers. You gain less headache and more portability.

AFAIK only translating the header is not enough because of special requirements of the code to be generated by the compiler/linker.

Anyone who wants to do something like that: save yourself unneccessary work by looking at the UDK website if tranlating header can ask on the mailing list there.

HTH,
Marc

Reply by email

Felipe Monteiro de Carvalho
to Marc Santhoff
Marc Santhoff wrote
AFAIK only translating the header is not enough because of special requirements of the code to be generated by the compiler/linker.

What I meant was: It is not necessary to implement COM on Free Pascal in order to communicate with OOo, because there are c++ headers and you can translate them. I don't think the c++ headers use COM or require special compiler.

Felipe Monteiro de Carvalho

Reply by email

Vincent Snijders
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 10 lines
On 12/16/05, Marc Santhoff wrote: >AFAIK only translating the header is not enough because of special >requirements of the code to be generated by the compiler/linker. What I meant was: It is not necessary to implement COM on Free Pascal in order to communicate with OOo, because there are c++ headers and you can translate them. I don't think the c++ headers use COM or require special compiler.

C++ headers are near useless, when you want to use fpc.

Vincent.

Reply by email

Felipe Monteiro de Carvalho
to Vincent Snijders
Vincent Snijders wrote
C++ headers are near useless, when you want to use fpc.

What about java. Is is easier to translate?

I still don´t get it why you guys think it is so hard to translate c++ headers..... not that I´ve ever done it, but c++ code doen´t seam so different then c code to me.

Python and Perl probably much worse, since their structure is so different.

Felipe Monteiro de Carvalho

Reply by email

Michael Van Canneyt
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 8 lines
On 12/16/05, Vincent Snijders wrote: > C++ headers are near useless, when you want to use fpc. What about java. Is is easier to translate? I still don´t get it why you guys think it is so hard to translate c++ headers..... not that I´ve ever done it, but c++ code doen´t seam so different then c code to me.

The main problem are not the headers. The problems are on a binary level.

The first problem is the class structure - you need knowledge of VMT etc etc etc. On an assembler level, the name mangling is very different from C, it also changes with each version of the C++ compiler. We could have bindings for GCC 2.90, and with GCC 3.0 they would no longer work.

Python and Perl probably much worse, since their structure is so different.

They are not compiled languages, but interpreted. All you could do from FPC is to run the interpreter.

Michael.

Reply by email