Sign in Join

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

Mailing lists / fpc-pascal / 2007-11

What about to support of automation technologies (UNO, COM) ?

14 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Andrey Gusev

I have tried to compile of Delphi-UNO bridge (was fetched from sourceforge) - it was unsuccessful.
After i have look through freepascal.ru, freepascal.org forums, i suspect that at present fpc cannot
get basic automation support (in sense to call to automation interfaces by variant means). I'm is
right in that assumption ?

If i'm is right - then that question:
When it will emplemented, if it planned to implement (roadmap on freepascal.org has not clean this moment) ?

Export reports from LazReport to OpenOffice (and other things like that) is very wanted...

Marc Santhoff
to Andrey Gusev
Andrey Gusev wrote 7 lines
I have tried to compile of Delphi-UNO bridge (was fetched from sourceforge) - it was unsuccessful. After i have look through freepascal.ru, freepascal.org forums, i suspect that at present fpc cannot get basic automation support (in sense to call to automation interfaces by variant means). I'm is right in that assumption ?

If I understand you correctly:

You can use OLE Automation with any pascal compiler, but only on windos platform. There are examples on the OO.o-site, try finding something there:

http://development.openoffice.org/

For OS independent programming Openoffice you'd need to port the Delphi-UNO-bridge to an fpc-UNO-bridge.

I had some looks at the code and found nothing that could not be adapted to fpc at first sight, but i still has to be done. Has anyone else tried compiling this stuff (me not)?

HTH,
Marc

Andrey Gusev
to Marc Santhoff
For OS independent programming Openoffice you'd need to port the Delphi-UNO-bridge to an fpc-UNO-bridge.

That is my target (and comply to my-in-what-i-am-work company needs).

Has anyone else tried compiling this stuff (me not) ?

With information, available at present to me (freepascal.ru, freepascal.org) - no one.
Only FPC ifdefs presence in Delphi-UNO source code is evidence of such attempts.

The direct call from FPC to OO-shared libraries is left (mean - without fpc elaboration) to my possible solutions.
The preprocessing of synthetic code is easy to implement with perl... And so, i'm interested the time of fpc elaborations...

Marco van de Voort
to Marc Santhoff: If I understand you correctly: You can use OLE Automation with any pascal compiler, but…
Show quoted text 11 lines
Am Mittwoch, den 07.11.2007, 14:18 +0300 schrieb Andrey Gusev: there: http://development.openoffice.org/ For OS independent programming Openoffice you'd need to port the Delphi-UNO-bridge to an fpc-UNO-bridge. I had some looks at the code and found nothing that could not be adapted to fpc at first sight, but i still has to be done. Has anyone else tried compiling this stuff (me not)?

There appear to be several bridges. I tried Clootie's one. It is a mess, and I didn't even succeed to use it in Delphi without packages.

Florian Klaempfl
to Andrey Gusev: I have tried to compile of Delphi-UNO bridge (was fetched from sourceforge) - it was…
Show quoted text 7 lines
I have tried to compile of Delphi-UNO bridge (was fetched from sourceforge) - it was unsuccessful. After i have look through freepascal.ru, freepascal.org forums, i suspect that at present fpc cannot get basic automation support (in sense to call to automation interfaces by variant means). I'm is right in that assumption ?

No. Using the delphi units coming with the OO SDK I was able to create documents with OO.

Krishna
to Marc Santhoff: If I understand you correctly: You can use OLE Automation with any pascal compiler, but…
Marc Santhoff wrote 20 lines
Am Mittwoch, den 07.11.2007, 14:18 +0300 schrieb Andrey Gusev: > I have tried to compile of Delphi-UNO bridge (was fetched from > sourceforge) - it was unsuccessful. > After i have look through freepascal.ru, freepascal.org forums, i > suspect that at present fpc cannot > get basic automation support (in sense to call to automation interfaces > by variant means). I'm is > right in that assumption ? If I understand you correctly: You can use OLE Automation with any pascal compiler, but only on windos platform. There are examples on the OO.o-site, try finding something there: http://development.openoffice.org/ For OS independent programming Openoffice you'd need to port the Delphi-UNO-bridge to an fpc-UNO-bridge.

imho, a bridge to XPCOM is more useful than UNO. object pascal is deally suited for component oriented programming. btw, is there a delphi bridge for xpcom? googling dint help.

cheers,
-krishna

One reason that life is complex is that it has a real part and an imaginary part -Andrew Koenig
Andrey Gusev
to Florian Klaempfl: No. Using the delphi units coming with the OO SDK I was able to create documents with OO.
No. Using the delphi units coming with the OO SDK I was able to create documents with OO.

I'm cannot.

The SampleCode.pas (from OO SDK 2.3 InsertTables example) compiling: ---
SampleCode.pas(145,18) Error: Illegal qualifier
SampleCode.pas(145,30) Error: Illegal expression
SampleCode.pas(145,30) Fatal: Syntax error, ";" expected but "(" found ---
The same just as when the Delphi-UNO compiling.

========================================================= the second approach

When i have edit the sourcecode to (vvv - is Variant): ---

        vvv :=

CoreReflection.forName('com.sun.star.beans.PropertyValue');

        vvv.createObject(PrepertyValue);

---
then above errors have been vanished - also can't understand... And the
---

        PropertyValue.Name := 'ReadOnly';
        PropertyValue.Value := true;

---
hav'nt compiled.

Marc Santhoff
to Marco van de Voort: There appear to be several bridges. I tried Clootie's one. It is a mess, and I didn't…
Marco van de Voort wrote 14 lines
> Am Mittwoch, den 07.11.2007, 14:18 +0300 schrieb Andrey Gusev: > there: > > http://development.openoffice.org/ > > For OS independent programming Openoffice you'd need to port the > Delphi-UNO-bridge to an fpc-UNO-bridge. > > I had some looks at the code and found nothing that could not be adapted > to fpc at first sight, but i still has to be done. Has anyone else tried > compiling this stuff (me not)? There appear to be several bridges. I tried Clootie's one. It is a mess, and I didn't even succeed to use it in Delphi without packages.

Urgs, That damn thing deosn't have any URL in it's readmes ... and I can't find the link anywhere ...

I'm pretty sure I have found it on sourceforge. Can you post a link showing the other ones, please?

Marc

Marc Santhoff
to Andrey Gusev
Andrey Gusev wrote
> Can you post a link showing the other ones, please? http://sourceforge.net/projects/uno-pas-bridge/ - the Delphi-UNO bridge

Yes, that's the one I've had a look at in v0.9.1. There seems to be some effort to make it compile with fpc.

I do not understand what problems there are with fpc, something regarding variants ... and problems accessing UNO structs, that mabe is not an error on the pascal side of things. I'll test that thing if I find the time ...

But what about the other ones?

Marc

Andrey Gusev
to Marc Santhoff

* Marc Santhoff [Thu, 08 Nov 2007 05:47:06
+0100]:

But what about the other ones?

I cannot get even the clean comprehension - may fpc operate automated interfaces or not (in delphi style or somehow yet, fully or partially) ? FPC 2.2 reference, pg.40: "Remark: Dispatch interface support for variants is currently broken in the compiler."
I cannot compile sources both Delphi-UNO and OOSDK-InstertTables - compiler sayed that he cannot process variants calls. But Florian Klaempfl say "Using the delphi units coming with the OO SDK I was able to create documents with OO"!
I make direct post to Florian Klaempfl - he keep silence. It seems nobody to know anything definitely about automation and Variants. What left to me ? - examination (with microscope) of the fpc sources ? My way to make whatever (with programming at least) is the comprehension at first, and the get the clean comprehension is heavy when people keep secret somewhat important from you...
Or, may be, it is honour of poineer occured to me ?...

I will try somewhat yet (i.e. "another ones"), if i will know somewhat wort then i will (of course) give that to community.

Andrey Gusev
to Andrey Gusev

* Andrey Gusev [Thu, 08 Nov 2007 12:11:44 +0300]:

I make direct post to Florian Klaempfl - he keep silence. It seems

Correction: meanwhile i write the previous post - i get post from Florian...

Marc Santhoff
to Andrey Gusev: * Marc Santhoff [Thu, 08 Nov 2007 05:47:06 +0100]: I cannot get even the clean…
Andrey Gusev wrote 12 lines
* Marc Santhoff [Thu, 08 Nov 2007 05:47:06 +0100]: > But what about the other ones? I cannot get even the clean comprehension - may fpc operate automated interfaces or not (in delphi style or somehow yet, fully or partially) ? FPC 2.2 reference, pg.40: "Remark: Dispatch interface support for variants is currently broken in the compiler." I cannot compile sources both Delphi-UNO and OOSDK-InstertTables - compiler sayed that he cannot process variants calls. But Florian Klaempfl say "Using the delphi units coming with the OO SDK I was able to create documents with OO"!

I really don't know for sure. The last time I used Windows-specific OLE stuff has been years ago. I remember using the programs from the SDK somewhen in the past and they did work - that doesn't tell anything about todays fpc. But all this OLE Automation stuff is windows only.

For being cross platform you have to use a bridge between the compiler in use and the office software. This bridge is compiler specific, each compiler has to have it's own.

The one from sourceforge currently does not work with fpc, and asking for "the other ones" was a reply to Marco writing:

There appear to be several bridges. I tried Clootie's one. It is a mess, and I didn't even succeed to use it in Delphi without packages.

So there seem to be other bridges that I don't know but would like to. Thats why I asked for the links pointing to these other bridge implementations.

HTH,
Marc

Andrey Gusev
to Marc Santhoff

* Marc Santhoff [Thu, 08 Nov 2007 11:37:11
+0100]:

But all this OLE Automation stuff is windows only. For being cross platform you have to use a bridge between the compiler in use and the office software.

I remember of it. Thetefore i have thus obstination regarding to UNO.

So there seem to be other bridges that I don't know but would like to. Thats why I asked for the links pointing to these other bridge implementations.

Scarcely that i have know more about such bridges than You. But, i intend to solve this problem (Pascal_ReportGenerator -> OpenOffice coupling),
however without elaboration of fpc, or with available facilities only, it will have a time.
OpenSource and cross-platform solution both need to me. Way with ODF/XML still actual - in perl it works acceptable.