Yes, definitively,

I've checked, this code seems to be currently geared to use DISPID 
interfaces. This works in Delphi, but not in FPC for the time being.

For example, the following code:
   fDocument := fDesktop.loadComponentFromURL('file:///'+ 
StringReplace(FileName, '\', '/', [rfIgnoreCase, rfReplaceAll]) , 
'_blank', 0, wProperties);

declares fDocument as an OleVariant. The author hopefully expects FPC to 
understand how to go and fetch "loadComponentFromURL". It ain't gonna 
work ;-).

It should be done this way:
   var fDocument : IDispatch;
   ...
   fDocument.InvokeDispatch( DISPID_LOADCOMPONENTFROMURL, ...);

Thierry Coq

Luiz Americo Pereira Camara wrote:
> Henrique Faria escreveu:
>> Very good. What about something to OpenOffice?
>>  
>
> It seems fpc OLE support is not good enough to work with OO.
>
> Attached are a Lazarus project and a Delphi project that converts a OO 
> document to pdf. Both shares the same unit (OOPdf) and have the same 
> logic.
>
> Delphi version works OK. Lazarus one crashes.
>
> Using:
> Lazarus 0.9.27 + fpc 222
> TurboDelphi
>
> Luiz
> ------------------------------------------------------------------------
>
> _______________________________________________
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>   

_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to