Hi Andreas,

when I look at your code, the cast from XComponentContext to XComponentLoader will not work. Note that you cannot simply cast one UNO interface to another, you have to use the UnoRuntime.queryInterface() construct. That's because of the Java UNO language binding:
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/Java_Language_Binding

You have to use the getComponentLoader() function that already exists in your code:

exportFile( (String) file, getCompLoader());

should work, but only when you change the xContext variable from a local variable in the main function to the already existing class variable - you'll get a null pointer exception otherwise.

Hope that helps, Steffen

Andreas Mantke wrote:
Hi Jürgen,

Am Saturday 04 October 2008 16:08:53 schrieb Juergen Schmidt:

(...)
I am not aware of such changes. The changes made for OO.org 3.0 wwere
internally only. We had to adapt the code to find and work with the new
structure. That's all.
You problem must be a different one.

thanks for that hint. I tried it with the code of the old implementation of the PDFExporter-Java-Program and it works.
I had to test it now on a box without a OOo3 (only 2.4.x).

Regards,
Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to